News, RSS and Categories : Bug + my solution

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
fredt
Forum Members
Forum Members
Posts: 144
Joined: Mon Jun 27, 2005 10:36 am
Location: Southern France

News, RSS and Categories : Bug + my solution

Post 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...
Post Reply

Return to “Modules/Add-Ons”