Page 1 of 1

News, RSS and Categories : Bug + my solution

Posted: Tue May 23, 2006 12:29 pm
by fredt
I first was disapointed when in my fresh 0.13 test install

Code: Select all

{cms_module module='news' category='MyNews' makerssbutton="true"}
sent me all News again.

So I looked in the code and found that CreateLink from lib/classes/class.module.inc.php won't parse Params (so, Categories won't be found) if last parameter, $prettyurl, is set.

I solved this on my 0.13 by changing News / action.default.php :

Code: Select all

		if (isset($params["makerssbutton"]))
		{
			$params["showtemplate"] = "false";
			echo $this->CreateLink($id, 'rss', $returnid, "<img border=\"0\" src=\"images/cms/xml_rss.gif\" alt=\"RSS Newsfeed\" />", $params,'',false,false,'',true,'news/rss');
			return;
		}
to

Code: Select all

		if (isset($params["makerssbutton"]))
		{
			$params["showtemplate"] = "false";
			echo $this->CreateLink($id, 'rss', $returnid, "<img border=\"0\" src=\"images/cms/xml_rss.gif\" alt=\"RSS Newsfeed\" />", $params,'',false,false,'',true,'');
			return;
		}
(removed 'news/rss')

So it works for me...
config.ph is the standard 0.13 :

Code: Select all

$config['assume_mod_rewrite'] = false;
$config['page_extension'] = '';
$config['internal_pretty_urls'] = true;
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
But I've not tested under a different configuration. So, please validate !

...Sorry for not posting this as a bug in the Forge, I can't make my IE log in...