How To Install MagpieRSS

Posted on Friday, August 8th, 2008 at 9:27pm.

An easy way to understand RSS is to think of an RSS reader as a custom newspaper; you choose who writes the articles in your newspaper. The RSS feed just inserts the “article” into your “newspaper”.
This is a really handy way of keeping up to date with your favourite sites; you just add the URL of the RSS feed into your feed reader.

MagpieRSS basically uses your site as a feed reader. If an RSS feed is just a list of updates from a site, you can use your site to show updates from another site.

To install it, first you need to download MagpieRSS^.
It’ll probably download as a .tar.gz file which you probably won’t be able to open. This doesn’t matter; you won’t need to open it anyway. As always, when you’ve downloaded it, scan it to make sure it’s virus free.

Upload the .tar.gz file to your root directory. You might as well do this in your cPanel because you’ll need to use it in a moment anyway.
Once uploaded, use the File Manager in your cPanel and view your root folder (usually called ‘Document Root’).

If you’re using the fancy file manager, check the checkbox next to the MagpieRSS .tar.gz file. If you’re using the basic HTML file manager, click on the name of the file.
Click the “Extract” button.

You’ll now find that you’ve got a new folder, called “magpierss”.
You don’t need to do anything else; it’s now installed. :)


Display Last.fm Scrobbles On Your Site

Posted on Friday, August 8th, 2008 at 8:16pm.

Disclaimer: I didn’t write this script; I’ve modified David Kadavy’s TwitBlog script^ to display your Last.fm scrobbles and the time the track was scrobbled.

FOR NON-WORDPRESS USERS:
Before you can use this on your site, you’ll need to install MagpieRSS; this script grabs the parsed feed from MagpieRSS and displays it in a visitor-friendly way. :) (Don’t know how to install MagpieRSS?)
WordPress users don’t need to install MagpieRSS. :)

Download the Last.fm.txt file (right click on the link » Save As) and open the file in Notepad.

Press Ctrl + G and type in 12 (this will take you to line 12).
Change /home/USER/public_html/magpierss/rss_fetch.inc to the server path where the rss_fetch.inc file is. If you don’t know where it is, just change USER to your cPanel username.
WordPress comes with MagpieRSS installed, so if you will be using this with WordPress, you will need to point the path to go to /home/USER/public_html/wp-includes/rss.php

Go down to line 16 and change /home/USER/public_html/cache to the server path where your cache directory is. If you don’t know where it is but you installed MagpieRSS in your root directory, just change USER to your cPanel username.

Next, go down to line 19 and change http://ws.audioscrobbler.com/1.0/user/lirae666/recenttracks.rss to the URL of your Recent Tracks feed. (Unless you want to display what I’ve been listening to!)
You can find this on your profile, just above the “Recently Listened Tracks” list:

Go down to line 22 if you want to change the amount of scrobbles you wish to display on your site. (I think the most amount of scrobbles you can show is 10.)

For now, leave line 25 as it is. This just sets how many hours ahead or behind your server time is, compared to Last.fm’s server time.
If you find that the times are off, change +4 to how many hours off the times are.
For example: if the time the track was played is showing up as 9am, when you played it at 11am, change +4 to +6. Similarly, if the time is showing up as 11am, when you played the track at 9am, change +4 to +2.

Now resave the file as “last.fm.php” and upload it to the root directory of your site.

To show the list on your site, all you need to do is include the last.fm.php file in your sidebar: <?php include("/home/USER/public_html/last.fm.php");?> (change USER to your cPanel username).


Displaying your recent Flickr photos without using WordPress

Posted on Friday, June 8th, 2007 at 2:48pm.

I wanted to ‘pull’ my recent Flickr photos^ and display them on my site. All of the scripts I found were actually WordPress (or other blogging tools) plugins.

I sort of gave up on the idea until last night, when I joined Twitter^; I wanted to display my twitters on my site. I found a JavaScript snippet that would do it for me but it kept killing Internet Explorer, so I kept looking around and found a script called TwitBlog^.

TwitBlog requires Magpie RSS^ to be installed; the script is actually pulling your Twitters from the RSS feed and displaying it in HTML format and the RSS feed is parsed with Magpie RSS. (Don’t know how to install MagpieRSS?)

I then Googled ‘flickr rss parser’ and came across a script called GetFlickrPHP^ (the link no longer works, so you can download a copy of GetFlickrPHP from here), which did the whole ‘display in HTML format’ thing for me. ;)

To get it working, I had to find my Flickr ID^ and then modify the variables, near the top of the script. This is what my variables are set to:

# set what type of tag you're pulling from flickr
# 0 = tag; 1 = user; 2 = group pool
$tagtype = 1;
# set the tag to pull from flickr (tag, user or group pool)
# example: "cats", "44124462494@N01", "circle"
$tag = "46498153@N00";
# set default value for number of pictures to show
# (flickr show maximum of 10 photos in feed)
$num_items = 9;
# set to true to use medium pics, otherwise it uses small
$mediumPics = false;
# set location of Magpie RSS files
# require_once('magpierss/rss_fetch.inc');
# require_once('magpierss/rss_utils.inc');
require_once('/home/user/public_html/magpierss_installed/rss_fetch.inc');
require_once('/home/user/public_html/magpierss_installed/rss_utils.inc');
# use image cache & set location
$useImageCache = false;
$cachePath="http://www.thebishop.net/news/cache/";
$fullPath="/home/tbishop61/www/news/cache/";

Easy! :D I just wish someone had done this before me and talked about it!



 
 
Copyright © Carlee Tibbs 2006-2009. · Archives · Search · Sitemap · Top ↑