RSS 2.0RSS Feed Generator {v1.0} These scripts are simple RSS feed generators made for PHP (rss20-php.zip) & ASP (rss20-asp.zip). They are distributed as freeware. So, feel free to use or distribute them. You can see a demo here. Using them you can create RSS feeds from your site with any information you want. For instance, last posted articles, last registered users, news or anything else. Or you can use as basis for your own scripts. Many PHP or ASP pages don't have RSS feeds by default. To add a RSS feed you only have to install these scripts on your site. They are customizable and very easy to use. Basically, there are 2 files:
Installation & Use:
Parameters:
The only first four parameters are mandatory. All others could be empty. Before use this script you have to add one or more channels using add_channel() function. This function has a few parameters:
Here you are a few samples : 1. For phpBB - returning last 10 postings, limited to 25 words (description): add_channel( "phpBB Forums :: Last postings", "http://www.2RSS.com/", "My phpBB forum description.", "SELECT phpbb_topics.topic_title AS Title , phpbb_posts_text.post_id AS Link, CONCAT(SUBSTRING_INDEX(phpbb_posts_text.post_text,' ',25),' ...') AS Description, FROM_UNIXTIME(phpbb_posts.post_time) AS Date, phpbb_users.user_email AS Author FROM phpbb_posts_text INNER JOIN phpbb_posts ON phpbb_posts_text.post_id=phpbb_posts.post_id INNER JOIN phpbb_users ON phpbb_posts.poster_id=phpbb_users.user_id INNER JOIN phpbb_topics ON phpbb_posts.topic_id=phpbb_topics.topic_id ORDER BY phpbb_posts_text.post_id DESC LIMIT 10", ""); 2. For Drupal.org - first channel is default (without parameters), return last 10 articles or pages and second one (rss20.php?rss=forum) returns last 10 postings in forums: add_channel( "Drupal.org :: Last articles posted", "http://www.2RSS.com/", "Last articles posted with Drupal.org", "SELECT node.title AS Title , node.nid AS Link, node.teaser AS Description, FROM_UNIXTIME(node.created) AS Date, users.mail AS Author FROM node INNER JOIN users ON node.uid=users.uid WHERE node.type='story' OR node.type='page' ORDER BY node.nid DESC LIMIT 10", ""); add_channel( "Drupal.org :: Last postings in forums", "http://www.2RSS.com/", "Last posted entries in forums with Drupal.org", "SELECT node.title AS Title , node.nid AS Link, CONCAT(SUBSTRING_INDEX(node.body,' ',25),' ...') AS Description, FROM_UNIXTIME(node.created) AS Date, users.mail AS Author FROM node INNER JOIN users ON node.uid=users.uid WHERE node.type='forum' ORDER BY node.nid DESC LIMIT 10", "forum"); 3. For PostNuke - thanks to Craig Williams: add_channel(
"Austin Web Farms :: Last postings",
"http://www.AustinWebFarms.com/",
"Latest articles on web design, technology and business.",
"SELECT nuke_stories.pn_title AS Title , nuke_stories.pn_sid AS Link,
CONCAT(SUBSTRING_INDEX(nuke_stories.pn_hometext,\' \',25),\' ...\') AS Description,
nuke_stories.pn_time AS Date, nuke_stories.pn_informant AS Author FROM nuke_stories
ORDER BY nuke_stories.pn_sid DESC LIMIT 10",
"");
4. For PHPWebSite - thanks to Craig Williams: add_channel(
"Scott Williams :: Latest Postings",
"http://www.scottwilliams.biz/",
"Scott Williams is a full-time freelance writer.",
"SELECT pws_mod_article.title AS Title , pws_mod_article.id AS Link,
CONCAT(SUBSTRING_INDEX(pws_mod_article.summary,' ',25),' ...') AS Description,
pws_mod_article.publication_date AS Date, pws_mod_article.created_username AS Author
FROM pws_mod_article ORDER BY pws_mod_article.id DESC LIMIT 10",
"");
5. InvisionBoard: add_channel(
"Last posts",
"http://forum.2RSS.com/",
"Last posts at forum.2RSS.com.",
"SELECT title,tid as Link, description, FROM_UNIXTIME(start_date) as Date,
CONCAT(starter_name,'@a.com') as Author FROM ibf_topics ORDER BY tid DESC Limit 10",
"");
Other channels could be built very easily, by analyzing the database and creating
a proper SQL command. Important « Back
|
|