Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


RSS Feed

posts: 122 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?
posts: 215

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:

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


To this:

Copy to clipboard
foreach ($changes["data"] as $data) { $result = ''; $pgnchk=$data['pageName']; 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.

Tom


Upcoming Events

1)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3) 
Tiki birthday
4)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting