ZenphotoCMS Forum
RSS feeds based on tags? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html)
+--- Thread: RSS feeds based on tags? (/thread-13382.html)



RSS feeds based on tags? - davidarnoult - 30-03-2020

Hi,

I would like to publish newsletters from ZenPhoto RSS with mailchimp.
Is there a way to publish rss feeds based on tags?

Example : A feed for all elements with tags "ocean" AND "Germany".

[code]getRSSLink()
[/code] looks like to support

  • @param string $addl provided additional data for feeds (e.g. album object for album feeds, $categorylink for zenpage categories

Thanks for help!

David




RSS feeds based on tags? - acrylian - 30-03-2020

No, sorry tags are not supported. You find a list of all supported options that can be added to a feed on the main class: https://docs.zenphoto.org/1.5.3/source-class-feed.html#169-233

In general getRSSLink() is a theme context dependent function so you cannot really use it standalone for your purpose anyway.




RSS feeds based on tags? - davidarnoult - 01-04-2020

Thanks. Is the tag module could provide this kind of information using a function from it?




RSS feeds based on tags? - acrylian - 01-04-2020

Not sure what you mean with "tag module". You can certainly get all information via the object model. Perhaps you should explain what you want to do and if you reallly need tags. RSS supports categories for news articles and albums (dynamic albums should work as well) for the gallery. So you could use those instead.




RSS feeds based on tags? - davidarnoult - 02-04-2020

That is wiser and will be easier to manage using dynamic album for sure.

Can you precise how to call the album object (like a dynamic album) in the parameter $addl of printRSSLink?

Function requires an object:

case 'album':
if (getOption('RSS_album_image')) {
if (is_object($addl)) {
$album = $addl;
} else {
$album = $_zp_current_album;
}
$link = array('rss' => 'gallery', 'albumname' => $album->getFileName());
break;
}

Thanks!




RSS feeds based on tags? - davidarnoult - 02-04-2020

  • @param string $addl provided additional data for feeds (e.g. album object for album feeds, $categorylink for zenpage categories



RSS feeds based on tags? - davidarnoult - 02-04-2020

Example: printRSSLink('album','before the link','RSS Text', 'after the link', true, null, 'fr', 'dynamic album object';




RSS feeds based on tags? - acrylian - 03-04-2020

Please take a look here: https://www.zenphoto.org/news/zenphotos-object-model-framework/




RSS feeds based on tags? - davidarnoult - 03-04-2020

Thanks acrylian, it is clearer for me. In fact, I realize that with ZP, there's no limit thanks to this great development framework ;-)




RSS feeds based on tags? - acrylian - 03-04-2020

Yep, the name "framework" is a bit misleading as this is actually just the base or core of Zenphoto actually ;-)