Please fix output from Flatpress RSS
-
Lubomír Ludvík
- Posts: 82
- Joined: Wed Feb 20, 2019 7:44 pm
- Location: Rouchovany
- Contact:
Please fix output from Flatpress RSS
Please fix output from flatpress RSS
- briefer description to tag <description>
- add picture to tag <image>...</image>
Try Widget Preview: https://www.rssfeedwidget.com/
https://www.flatpress.org/feed/rss2/ - has big description with picture
http://feeds.bbci.co.uk/news/england/rss.xml - look good
http://wordpress.org/news/feed/ - look good
- briefer description to tag <description>
- add picture to tag <image>...</image>
Try Widget Preview: https://www.rssfeedwidget.com/
https://www.flatpress.org/feed/rss2/ - has big description with picture
http://feeds.bbci.co.uk/news/england/rss.xml - look good
http://wordpress.org/news/feed/ - look good
- fraenkiman
- FlatPress Coder
- Posts: 520
- Joined: Thu Feb 03, 2022 7:25 pm
- Location: Berlin, Germany
- Contact:
Re: Please fix output from Flatpress RSS
Hello Lubomír
to shorten the description, edit the file rss.tpl in the directory /fp-interface/sharedtpls. (Template on GitHub)
Look for the <description> tag there. Replace
with
This would shorten the description to 256 characters, for example.
Alternatively, you can also use the [more] BBcode tag and place an image of your choice before the [more] tag. It will look something like this: An image in the <image> tag is not so easy to realize, because you can include several images in a post, or even entire galleries or no image. These aspects would have to be taken into account during implementation. I'll take a look at it when I get the chance. I have created #505 for this. If you already have an implementation suggestion, I look forward to a pull request.
With best regards
Frank
to shorten the description, edit the file rss.tpl in the directory /fp-interface/sharedtpls. (Template on GitHub)
Look for the <description> tag there. Replace
Code: Select all
{$content|tag:the_content}Code: Select all
{$content|tag:the_content|truncate:256}Alternatively, you can also use the [more] BBcode tag and place an image of your choice before the [more] tag. It will look something like this: An image in the <image> tag is not so easy to realize, because you can include several images in a post, or even entire galleries or no image. These aspects would have to be taken into account during implementation. I'll take a look at it when I get the chance. I have created #505 for this. If you already have an implementation suggestion, I look forward to a pull request.
With best regards
Frank
My
- fraenkiman
- FlatPress Coder
- Posts: 520
- Joined: Thu Feb 03, 2022 7:25 pm
- Location: Berlin, Germany
- Contact:
Re: Please fix output from Flatpress RSS
Post text without image can be reached with
Code: Select all
{$content|tag:the_content|strip_tags|strip|truncate:256:“...”:true|escape}My
- fraenkiman
- FlatPress Coder
- Posts: 520
- Joined: Thu Feb 03, 2022 7:25 pm
- Location: Berlin, Germany
- Contact:
Re: Please fix output from Flatpress RSS
Hello everyone.
Mini-spoiler:
The PhotoSwipe plugin version 2.0.1 is now available for FlatPress 1.3 and 1.3.1. The update fixes the problem that the 6 overlay buttons were displayed in the RSS feed in an unsightly way. The good case
Update on the topic: Plain text in the RSS feed
But I like the HTML output better.
Have a merry Christmas.
With best regards
Frank
Mini-spoiler:
The PhotoSwipe plugin version 2.0.1 is now available for FlatPress 1.3 and 1.3.1. The update fixes the problem that the 6 overlay buttons were displayed in the RSS feed in an unsightly way. The good case
Update on the topic: Plain text in the RSS feed
Code: Select all
{$content|tag:the_content|strip_tags|strip|truncate:1024:"...":true|escape}Have a merry Christmas.
With best regards
Frank
My
-
Lubomír Ludvík
- Posts: 82
- Joined: Wed Feb 20, 2019 7:44 pm
- Location: Rouchovany
- Contact:
Re: Please fix output from Flatpress RSS
The PhotoSwipe plugin version 2.0.1 no works, get HTTP ERROR 500 on PHP Version 8.2.26
Code: Select all
[22-Dec-2024 07:47:00 UTC] PHP Fatal error: Uncaught Error: Undefined constant "RANDOM_HEX" in /home/eywjamcd/flatpress.cz/fp-plugins/photoswipe/photoswipefunctions.class.php:222
Stack trace:
#0 /home/eywjamcd/flatpress.cz/fp-includes/core/core.wp-plugin-interface.php(134): PhotoSwipeFunctions::echoScriptTags('')
#1 /home/eywjamcd/flatpress.cz/fp-includes/core/core.theme.php(303): do_action('wp_head')
#2 /home/eywjamcd/flatpress.cz/fp-content/cache/e93fccb09cf8b04111b9595da102f3f4^21e22cdf11647423625b7c388c19562289f32c8a_0.file.header.tpl.php(33): theme_smarty_function_action(Array, Object(Smarty_Internal_Template))
#3 /home/eywjamcd/flatpress.cz/fp-includes/smarty-4.3.1/libs/sysplugins/smarty_template_resource_base.php(123): content_673ef5718346c1_50717738(Object(Smarty_Internal_Template))
Last edited by Lubomír Ludvík on Sun Dec 22, 2024 8:00 am, edited 2 times in total.
-
Lubomír Ludvík
- Posts: 82
- Joined: Wed Feb 20, 2019 7:44 pm
- Location: Rouchovany
- Contact:
Re: Please fix output from Flatpress RSS
Thank you, strip_tags works in /fp-interface/sharedtpls/rss.tpl
Code: Select all
a) {$content|tag:the_content|truncate:256}
b) {$content|tag:the_content|strip_tags|strip|truncate:256:"...":true|escape}- fraenkiman
- FlatPress Coder
- Posts: 520
- Joined: Thu Feb 03, 2022 7:25 pm
- Location: Berlin, Germany
- Contact:
Re: Please fix output from Flatpress RSS
Hello Lubomír,
Error from the post:
Oops, I must have forgotten that under FlatPress 1.3/ 1.3.1 there were no nonce values for inline scripts to mark Java scripts as safe.
I have cleaned up the PhotoSwipe plugin accordingly and uploaded it again.
Thanks for testing.
With best regards
Frank
Error from the post:
Oops, I must have forgotten that under FlatPress 1.3/ 1.3.1 there were no nonce values for inline scripts to mark Java scripts as safe.
I have cleaned up the PhotoSwipe plugin accordingly and uploaded it again.
Thanks for testing.
With best regards
Frank
My
-
Lubomír Ludvík
- Posts: 82
- Joined: Wed Feb 20, 2019 7:44 pm
- Location: Rouchovany
- Contact:
Re: Please fix output from Flatpress RSS
I tested it, it's ok.fraenkiman wrote: Sun Dec 22, 2024 12:02 pm I have cleaned up the PhotoSwipe plugin accordingly and uploaded it again.
- fraenkiman
- FlatPress Coder
- Posts: 520
- Joined: Thu Feb 03, 2022 7:25 pm
- Location: Berlin, Germany
- Contact:
Re: Please fix output from Flatpress RSS
Hello everyone,
since we are already on the subject: There is an update 1.1.0 available for the LastComments plugin.
I found an old unfinished function in the PHP code and fixed it. The plugin now also outputs an RSS and Atom feed.
Happy new year.
Frank
since we are already on the subject: There is an update 1.1.0 available for the LastComments plugin.
I found an old unfinished function in the PHP code and fixed it. The plugin now also outputs an RSS and Atom feed.
Happy new year.
Frank
My
Re: Please fix output from Flatpress RSS
Very nice - thank you both for reporting, fixing and testing!
Who is online
Users browsing this forum: No registered users and 7 guests