Page 1 of 1

RSS Module hack

Posted: Sun Feb 06, 2005 12:54 am
by KevinR
The default behaviour of the RSS module is to open links in the same window - not always the best (IMHO).

I have edited my copy of RSS/modulefunctions.php to allow the browser window target to be specified in the parameters.

Here's the hack:

Insert into line 44

//allow target to be specified in params
if (isset($params['target']))
{
$target = $params['target'];
}
else
{
$target = '';
}

Now change the echo line at the bottom of the function to include the target (line 68 after inserting the above):

echo "$title
\n";

The module can now be called with the target parameter i.e.
{cms_module module="rss" url="http://homepage.mac.com/kevinread/blogw ... io/rss.xml" numbertoshow="15" target="_rss"}