Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.5
Author Message
ashishjha54
Hangin' Around



Joined: Jan 24, 2005
Posts: 41

PostPosted: Tue May 10, 2005 11:50 am Reply with quote

where can i get a rss or xml feeds for downloads module.
 
View user's profile Send private message
CurtisH
Life Cycles Becoming CPU Cycles



Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI

PostPosted: Tue May 10, 2005 5:17 pm Reply with quote

Copy the following into a plain text editor and save it as downfeed.php and upload it to your nuke root directory

Code:
<?php 




/************************************************************************/

/* name downfeed.php and put in the root Nuke directory                 */

/* Copyright 2004 by NukeWire.com                                    */

/* ============================================                         */

/* This program is free software. You can redistribute it and/or modify */

/* it under the terms of the GNU General Public License as published by */

/* the Free Software Foundation; either version 2 of the License.       */

/************************************************************************/



include("mainfile.php");

global $prefix, $db;



header("Content-Type: text/xml");



    $sql = "SELECT lid, title FROM ".$prefix."_downloads_downloads ORDER BY lid DESC LIMIT 10";

    $result = $db->sql_query($sql);



echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n";

echo "<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"\n";

echo " \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n\n";

echo "<rss version=\"0.91\">\n\n";

echo "<channel>\n";

echo "<title>".htmlspecialchars($sitename)."</title>\n";

echo "<link>$nukeurl</link>\n";

echo "<description>".htmlspecialchars($backend_title)."</description>\n";

echo "<language>$backend_language</language>\n\n";



while(list($lid, $title) = $db->sql_fetchrow($result)) {

    $title = stripslashes($title);

    $title2 = ereg_replace(" ", "_", $title);

    echo "<item>\n";

    echo "<title>".htmlspecialchars($title)."</title>\n";

    echo "<link>$nukeurl/modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$lid&amp;ttitle=$title2</link>\n";

    echo "</item>\n\n";

}

echo "</channel>\n";

echo "</rss>";



?>

_________________
Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe 
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.5

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©