Customized RSS feeds?

Post Reply
kr428
Sr. Bludit
Posts: 38
Joined: Thu Jan 05, 2023 9:07 pm
Has thanked: 11 times
Been thanked: 3 times

Folks; are there any recommendations on how to best provide customized rss feeds with bludit? Especially, I'd like to add keywords as # tags to each post, for certain integration ideas for which this is missing at the moment. Where to start? Is that something I can even achieve out of the box?
Thanks very much and best regards,
Kristian
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Can you please give an example for such a feed.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
kr428
Sr. Bludit
Posts: 38
Joined: Thu Jan 05, 2023 9:07 pm
Has thanked: 11 times
Been thanked: 3 times

I think I found it (without having the change applied yet but it seems straightforward). For the history, I'm about to modify the createXML method in plugin.php of the RSS plugin and extend

Code: Select all

		foreach ($list as $pageKey) {
			try {
				// Create the page object from the page key
				$page = new Page($pageKey);
				$xml .= '<item>';
				$xml .= '<title>'.$page->title().'</title>';
				$xml .= '<link>'.$this->encodeURL($page->permalink()).'</link>';
				$xml .= '<image>'.$page->coverImage(true).'</image>'; 
				$xml .= '<description>'.Sanitize::html($page->contentBreak()).'</description>';
				$xml .= '<pubDate>'.date(DATE_RSS,strtotime($page->getValue('dateRaw'))).'</pubDate>';
				$xml .= '<guid isPermaLink="false">'.$page->uuid().'</guid>';
				$xml .= '</item>';
			} catch (Exception $e) {
				// Continue
			}
		}
... and tweak <description> according to my needs. ;)
User avatar
Romeo21
Ssr. Bludit
Posts: 10
Joined: Fri Nov 25, 2022 7:00 pm
Been thanked: 3 times

This is what I could find, maybe it will be useful
Check for Existing Plugins or Themes:

First, check the official Bludit website or forums to see if there are any existing plugins or themes that provide RSS feed functionality or tagging. There might be community-contributed solutions that suit your needs.
Use a Custom Theme:

Create a custom theme for Bludit. This will involve working with PHP, HTML, and CSS. You can find documentation on creating custom themes on the official Bludit website.
RSS Feed Integration:

Implement RSS feed functionality in your custom theme. PHP has libraries and functions for creating RSS feeds. You can use these to generate a feed of your posts. This may include extracting posts with specific tags.
Tagging System:

Integrate a tagging system into your theme. When creating or editing a post, allow the user to add tags, and then display these tags on the post page. Ensure that this information is stored in a way that can be easily queried when generating the RSS feed.
Modify the RSS Feed Generation:

When generating the RSS feed, filter the posts based on the specified tags. Include only the posts that have the desired tags in the feed. You'll need to modify the PHP code responsible for generating the RSS feed.
Testing:

Test your custom theme thoroughly. Make sure that the RSS feed is generated correctly and that it includes only the posts with the specified tags.
Post Reply