Blog on homepage…

On Apr 20, 2005, at 8:37 AM, Francis Swasey wrote:

I want to have my homepage (www.uvm.edu/~fcs) show the two most  recent posts to my blog…. Steve says I want you to figure out how to  make RSS work with the magicscript…. Steve says this is a good  project for you.

hmmm…interesting. If you were using wordpress, we wouldn’t need to worry about RSS http://www.uvm.edu/~waw/wordpress/

I looked into it. Found Magpie (magpierss-0.71.1). Wrote simple script

<?

require_once('magpie/rss_fetch.inc');

#$url="http://fcs.blog.uvm.edu/index.rdf";

#$url="http://www.uvm.edu/~waw/wordpress/wp-rss2.php";

$rss = fetch_rss($url);

echo "

Channel Title: " . $rss->channel['title'] . "

";

foreach ($rss->items as $item) {

$href = $item['link'];

$title = $item['title'];

$what = $item['description'];

$when = $item['date'];

print "

$title

";

print "
$when
n
$what
n";

}

exit;

?>

On Apr 20, 2005, at 8:52 AM, Francis Swasey wrote:

I went to your wordpress page and clicked on the RSS 2.0 link and  got the following:  XML Parsing Error: not well-formed > Location: http://www.uvm.edu/~waw/wordpress/wp-rss2.php > Line Number 18, Column 64:
http://www.uvm.edu/~waw/wordpress/?Page=./default.php&p=32 link What’s that all about?

Bad wordpress code and complicated magicscript URLs. Hacked and fixed. But that wasn’t what I was talking about — what I was talking about was the incorporation of wordpress into the template But what you and Steve are talking about is this http://www.uvm.edu/~waw/rss.php?url=http://fcs.blog.uvm.edu/index.rdf or this http://www.uvm.edu/~waw/rss.php?url=http://www.uvm.edu/~waw/wordpress/ wp-rss2.php

So, look at the code of http://www.uvm.edu/~waw/rss.php modify to suit insert in your default.php file

About Wesley Wright

Born on a mountain top near New York City, Craziest state in the land of the pretty. Raised in the woods so's he knew every tree, Killed him a bear when he was only three.
This entry was posted in Blogs, Projects. Bookmark the permalink.

Leave a Reply