View Single Post
(#6)
juven14's Avatar
juven14 juven14 is offline
Moderator
juven14 is on a distinguished road
 
Posts: 1,305
Join Date: Mar 2006
Location: NJ/NYC Area
Default 08-23-2006, 02:55 PM

The thing is that the module pulls down all feeds and sends them to the template which then loops through them. I'd have to rewrite most of the module to handle this. It is a good idea, and I agree that this should be a feature.

You can do this for the time being (I haven't tested this, just don't have enough time today):

On the page you want the feed:

PHP Code:
require_once(FILESYSTEM_PATH.'modules/rss_mod/includes/rss_fetch.inc.php');
require_once(
FILESYSTEM_PATH.'modules/rss_mod/includes/rss_utils.inc.php');

$url = "some url";
$rss = fetch_rss($url);

$class_tpl->assign('rss', $rss);


Create a new template page and then give it a name and place it in the modules template folders with the other templates. Then copy the code to the template you wish to be displayed and change the template file to the one you created.

The new template file should look like this:
HTML Code:
<table width="600" align="center"> <tr> <th><strong>  <a href="{$rss->channel.link}">{$rss->channel.title}</a></strong></th> </tr> <tr> <td><a href="{$rss->channel.link}">{$rss->channel.link}</a></td> </tr> <tr> <td>{$rss->channel.description}</td> </tr> <tr> <td>{$rss->channel.copyright}</td> </tr> </table> {foreach from=$rss->items item=item} <table width="600" align="center"> <tr> <th><strong>  <a href="{$rss->items.link}">{$rss->items.title}</a></strong></th> </tr> <tr> <td>{$rss->items.description}</td> </tr> </table> {foreachelse} <table width="600" align="center"> <tr> <td>No Feeds Availible</td> </tr> </table> {/foreach}


Regards,

John
mods.auscity.com
v3.1.4 Developer

�By perseverance, study, and eternal desire, any man can become great.� George S. Patton