Page 1 of 1

{image} and other tags in NEWS module

Posted: Sat Jul 01, 2006 1:27 pm
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?

Re: {image} and other tags in NEWS module

Posted: Sat Jul 01, 2006 1:37 pm
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.

Re: {image} and other tags in NEWS module

Posted: Thu Jul 06, 2006 4:17 am
by mahjong
You'll find my patch for the News module here...