News RSS Feed Title and Icon

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

News RSS Feed Title and Icon

Post by Russ »

UPDATED
1. What does this set? Is it for discovery??
(Set in action.rss.php)

$feed_title = 'CMS Made Simple News Feed';

2. Also should the RSS feed use what seems to be the standard icon used by Firefox and now IE for RSS (attached.)

3. Also being able to add some text to the RSS feed would be good, like 'Subscribe to our RSS News Feed' as an option of the tag e.g.
{cms_module module="news" makerssbutton="true" linktext ="Subscribe to our RSS News Feed"}
So it could become part of the link?

Russ

[gelöscht durch Administrator]
Last edited by Russ on Sat Sep 16, 2006 7:22 am, edited 1 time in total.
liudaz

Re: News RSS Feed Title and Icon

Post by liudaz »

Allright, i have made the RSS feed button to show its title.

1. In news.module.php you add a line

Code: Select all

$this->SetParameterType('rsstitle',CLEAN_STRING);
2. Then, in News folder, action.default.php file, somewhere at a line 34, you make it to look like this

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 feed\" align=\"top\"/> ".$params['rsstitle']."",$params,'',false,false,'',true,'news/rss', $parameters);
    return;
  }
3. You call RSS button like this: {news makerssbutton="true" rsstitle="whatever"}

BTW: you can change the RSS image here too by replacing images/cms/xml_rss.gif\ with your own :)
Hope this works :)

liudaz
Last edited by liudaz on Wed Oct 10, 2007 3:20 pm, edited 1 time in total.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm
Location: Finland

Re: News RSS Feed Title and Icon

Post by tsw »

wanna make a patch against current svn
liudaz

Re: News RSS Feed Title and Icon

Post by liudaz »

Would make a patch, but dont know how..  ???
Post Reply

Return to “Developers Discussion”