Features / Usability

Features / Usability

RSS Feed

United States
I want to create an RSS feed for Wiki Pages, but I want to only include pages with certain characters in their names. Does anyone know what file I need to modify for that?

Hi Greg,

I've made some modifications to my calendar rss feed, so I thought I would look into your question,

The tiki-wiki_rss.php program generates the wiki page rss feed.

I think you can remove pages from the feed that do not match a certain character string by changing these lines:

foreach ($changes["data"] as $data) {
                $result = '';
                if ($tiki_p_view != 'y') {

To this:

foreach ($changes["data"] as $data) {
                $result = '';

                  if ( !preg_match("/xyz/i",$pgnchk) ) { continue; }

                if ($tiki_p_view != 'y') {

That should skip the rss feed generation for page names that do not contain "xyz". The "i" after the last slash indicates that the match is done ignoring the case of the matching characters, remove that 'i' if the match is to be case sensitive.

You will have to clear cache before each test, and probably do each test in a new browser window.

Those 3 lines of code in tiki-wiki_rss.php are the same in Tiki versions 9 through 14, but I only tried it on version 9.


Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.