{image} and other tags in NEWS module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
mahjong

{image} and other tags in NEWS module

Post by mahjong »

I wanted to put tags in news content. For instance :

Code: Select all

CMSMS 0.14 has been released. 
Here's a screenshot : {image src="screenshot.png"} of the new interface. 
Please {cms_selflink page="release" text="read the release notes"} before updating.
The actual news module won't render the tags.  >:(

So, I change the last lines of action.default.php and action.detail.php for

Code: Select all

if (isset($params['summarytemplate']))
{
	$tempdata = $this->ProcessTemplate($params['summarytemplate']);
}
else
{
	$tempdata = $this->ProcessTemplateFromDatabase('displaysummary');
}

echo $this->ProcessTemplateFromData($tempdata);

Code: Select all

#Display template
if (isset($params['detailtemplate']))
{
	$tempdata = $this->ProcessTemplate($params['detailtemplate']);
}
else
{
	$tempdata = $this->ProcessTemplateFromDatabase('displaydetail');
}

echo $this->ProcessTemplateFromData($tempdata);
By doing so, is there a security aspect I'm unaware?
Last edited by mahjong on Sat Jul 01, 2006 1:28 pm, edited 1 time in total.
mahjong

Re: {image} and other tags in NEWS module

Post by mahjong »

The same solution could be applied on the Bookmark module.

Bookmarks.module.php, line 1236:

Code: Select all

$bookmark_summary = $this->ProcessTemplateFromData(empty($parameters["summaries"]) ? '' : " <span class='cms-module-bookmarks-summary'>" . $row['bookmark_summary'] . "</span>");
And generalised to every module.
Last edited by mahjong on Sat Jul 01, 2006 2:02 pm, edited 1 time in total.
mahjong

Re: {image} and other tags in NEWS module

Post by mahjong »

You'll find my patch for the News module here...
Locked

Return to “Modules/Add-Ons”