Using the RSS Feed
Many people want to know how you can add an RSS feed for their 68 Classifieds site. This is actually already built into the script. There is a file called “external.php” in the root directory of the software.
The external.php file has included several parameters that can be used in your links to specify what you would like to include in the RSS feed. These parameters include:
- type
- limit
- category
- showchild
- city
- state
- country
- owner
- searchtext
So, now you probably want to know how you use this. Well, let’s start with the most basic form. Just a simple feed without parameters. Most likely you would put this in your main template, layout.tpl. Just decide where you want to put it and then you just simply put in a standard HTML link like this:
<a href="yoursiteurl/external.php">RSS Feed</a>
That’s it! You’re done. See, now wasn’t that easy?
Now, let’s try using some of these paramenters. So, how do you use the parameters? This is relatively easy as well. First you need to understand that since the external.php file is indeed a php file, you would need to use standard php urls for your parameters. I’m sure you’ve seen this in the location field of your web browser at many sites including your own. These urls look something like this: http://www.somesite.com/somefile.php?something=this
So that is exactly how you use these parameters. Let’s say that you have a busy site with tons of listings, so you don’t really want to include your thousands of listings in a single RSS feed. So, let’s use the limit parameter for this example. We will limit the feed to only 20 listings here:
<a href="yoursiteurl/external.php?limit=20">RSS Feed</a>
Now when someone uses this link it will limit the feed to only 20 listings. See, that was also easy.
Now, I’m going to show you one more example which should give you a full understanding of how this works for you to be able to use the external.php to your hearts desire. Let’s add more than just one parameter. In this example, we are going to get featured listings with a limit of 20 listings. Again, this is relatively easy and is based on the URL that you use for the link. To use more than one parameter you simply need to add an ampersand “&” between the parameters. So here is this example:
<a href="yoursiteurl/external.php?type=featured&limit=20">Featured RSS Feed</a>
So, again, that was easy.
For your reference, Here is the list again of the parameters and how they should be used.
- type (new, featured, top)
- limit (number)
- category (categoryID number)
- showchild (Y or N)
- city (text)
- state (text)
- country (text)
- owner (userID number)
- searchtext (text – [You need to use %20 instead of a space between words, like%20this])
*This is an add-on to the original article.
There is one more parameter that is included in the external.php file that isn’t mentioned in the list of parameters, however is listed in the example in the documentation. That is the minimum/maximum price. Although the price field itself isn’t listed in the parameters list, it is accessible in the following manner:
<a href="yoursiteurl/external.php?minprice=20&maxprice=100">
Do not use commas or the dollar sign, only use whole numbers (integers).
There you have it. RSS Feed away now!
-Mike-N-Tosh™

January 4th, 2009 at 12:46 am
Great tutorials Mike!