RSS feed tests

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: RSS feed tests

Post by *ghisler(Author) »

You are right, I didn't update smartfeed. Can you try again now?
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: RSS feed tests

Post by *Hacker »

Christian,
Looks still the same in my RSS reader. I will report tomorrow if anything changed.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: RSS feed tests

Post by *ghisler(Author) »

Could you try again now, please? It looks like I didn't catch all possible configuration options.
I have tried with the Firefox extension "Feedbro", and it seems to work.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: RSS feed tests

Post by *Hacker »

Christian,
Sorry I forgot. Yes, it indeed looks better now, thank you!

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
white
Power Member
Power Member
Posts: 4593
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

RSS feed tests

Post by *white »

white wrote: 2014-02-27, 16:08 UTC I created the wiki page Web feeds.
I have updated the wiki page.

2ghisler(Author)
If you find the information useful and correct, you may want to copy the information to the first post or simply refer to the wiki page.

I noticed 2 things regarding Smartfeed:
  • View feed (Allows you to inspect the generated feed source code in a window) doesn't work.
  • The Smartfeed urls offered in the forum pages are the same for all pages (no forum feed, no topic feed) and the links are not valid, they don't generate a feed. The code in the forum pages is:

    Code: Select all

    <link rel="alternate" type="application/atom+xml" title="ATOM" href="/board/app.php/smartfeed/feed" />
    <link rel="alternate" type="application/rss+xml" title="RSS" href="/board/app.php/smartfeed/feed?y=2" />
    
Do you have the latest version of Smartfeed installed? The extension review team has approved Smartfeed 3.0.17 on Jun 10, 2022.
User avatar
white
Power Member
Power Member
Posts: 4593
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

RSS feed tests

Post by *white »

white wrote: 2022-06-12, 08:38 UTC 2ghisler(Author)
If you find the information useful and correct, you may want to copy the information to the first post or simply refer to the wiki page.
Or unlock this thread and add some information to Forum rules, Wiki, Guidelines for Moderators. Perhaps make the name:
"Forum rules, Guidelines for Moderators, Wiki, News feeds"
User avatar
white
Power Member
Power Member
Posts: 4593
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: RSS feed tests

Post by *white »

white wrote: 2022-06-12, 08:38 UTC I noticed 2 things regarding Smartfeed:
  • View feed (Allows you to inspect the generated feed source code in a window) doesn't work.
Screenshot of how it is supposed to look like: Screenshot
First, select the forums to include in the feed and click the Generate button. Then click the View feed button. The button doesn't work because of mixed https and http content. Console error:
Mixed Content: The page at 'app.php/smartfeed/ui' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.ghisler.ch/board/app.php/smartfeed/feed?t=7&x=500&s=1&i=0&y=0&d=3&w=0'. This request has been blocked; the content must be served over HTTPS.
send @ jquery-3.6.0.min.js?assets_version=174:2
ajax @ jquery-3.6.0.min.js?assets_version=174:2
view_feed @ ui:249
onclick @ ui:595
The other issue was:
white wrote: 2022-06-12, 08:38 UTC
  • The Smartfeed urls offered in the forum pages are the same for all pages (no forum feed, no topic feed) and the links are not valid, they don't generate a feed. The code in the forum pages is:

    Code: Select all

    <link rel="alternate" type="application/atom+xml" title="ATOM" href="/board/app.php/smartfeed/feed" />
    <link rel="alternate" type="application/rss+xml" title="RSS" href="/board/app.php/smartfeed/feed?y=2" />
    
The urls fail because of missing mandatory parameters. Error message: Screenshot
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: RSS feed tests

Post by *ghisler(Author) »

Thanks for your report. I have updated Smartfeed to the latest version. This has fixed the second issue, although it still generates the same URLs everywhere.

I have changed the code to create a https URL, this seems to fix the first issue. Please note that not all feed readers can handle https, so you will have to change the URL to http if it doesn't work in your reader.
Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: RSS feed tests

Post by *HolgerK »

ghisler(Author) wrote: 2022-07-17, 13:43 UTC I have updated Smartfeed to the latest version.
The shortened forum names are lost after the update.
See also:
Hacker wrote: 2020-12-18, 21:21 UTC Christian,
Could you please shorten the forum names for the RSS feed? They used to be shortened to "Deu", "Eng", "Plugins", "TC9.5x bugs", "TC for Android", "Suggestions", "Slovak and Czech", etc., but now they have their full names again.
Regards
Holger
Make our planet great again
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: RSS feed tests

Post by *Hacker »

HolgerK wrote: 2022-07-18, 19:50 UTC The shortened forum names are lost after the update.
See also:
Hacker wrote: 2020-12-18, 21:21 UTC Christian,
Could you please shorten the forum names for the RSS feed? They used to be shortened to "Deu", "Eng", "Plugins", "TC9.5x bugs", "TC for Android", "Suggestions", "Slovak and Czech", etc., but now they have their full names again.
Indeed, please do.

TIA
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
white
Power Member
Power Member
Posts: 4593
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: RSS feed tests

Post by *white »

ghisler(Author) wrote: 2022-07-17, 13:43 UTC Thanks for your report. I have updated Smartfeed to the latest version.
Latest version being 3.0.17 or master? There have been 3 commits after 3.0.17, see:
https://github.com/MarkDHamill/smartfeed/compare/3.0.17...master
ghisler(Author) wrote: 2022-07-17, 13:43 UTC This has fixed the second issue, although it still generates the same URLs everywhere.
According to the explanation on the Smartfeed page, topic feeds should be generated:
Smartfeed wrote:Smartfeed also supports a topic feed. You need to know the topic number to use this option and it can be used only for a single topic. The easiest way to get a feed URL for a particular topic is to view the page source when on the topic page of interest. You will find the URL in the markup in a <link> tag. It will look something like this: /app.php/smartfeed/feed?tf=123. Copy that link into your newsreader.
I cannot see something wrong with the code. If script_name contains "viewtopic" it should list topic feeds too.

Code snippets:

phpbbservices\smartfeed\event\main_listener.php:

Code: Select all

	public function overall_header_head_append()
	{
		$script_name = $this->request->server('script_name', 'NONE');

		$this->template->assign_vars(array(
			'L_SMARTFEED_PUBLIC_ATOM_TITLE'			=> $this->config['sitename'] . ' - ' . $this->language->lang('SMARTFEED_ATOM_FEED'),
			'L_SMARTFEED_PUBLIC_RSS_TITLE'			=> $this->config['sitename'] . ' - ' .  $this->language->lang('SMARTFEED_RSS_FEED'),
			'S_AUTO_ADVERTISE_PUBLIC_FEED'			=> $this->config['phpbbservices_smartfeed_auto_advertise_public_feed'],
			'S_SMARTFEED_UI_LOCATION'				=> $this->config['phpbbservices_smartfeed_ui_location'],
			'U_SMARTFEED_URL_ATOM'					=> $this->helper->route('phpbbservices_smartfeed_feed_controller'),
			'U_SMARTFEED_URL_RSS'					=> $this->helper->route('phpbbservices_smartfeed_feed_controller', array('y'=>2)),
		));

		if (stristr($script_name, 'viewtopic'))
		{
			$topic_id = $this->request->variable('t', 0);
			// If on the view topic page, show the generated feed links
			$this->template->assign_vars(array(
				'S_SHOW_TOPIC_FEED'				=> true,
				'U_SMARTFEED_TOPIC_URL_ATOM'	=> $this->helper->route('phpbbservices_smartfeed_feed_controller', array('tf'=>$topic_id)),
				'U_SMARTFEED_TOPIC_URL_RSS' 	=> $this->helper->route('phpbbservices_smartfeed_feed_controller', array('y'=>2,'tf'=>$topic_id)),
			));
		}
	}
phpbbservices\smartfeed\styles\all\template\event\overall_header_head_append.html:

Code: Select all

{% if S_AUTO_ADVERTISE_PUBLIC_FEED %}
<link rel="alternate" type="application/atom+xml" title="{{ lang('SMARTFEED_PUBLIC_ATOM_TITLE') }}" href="{{ U_SMARTFEED_URL_ATOM }}" />
<link rel="alternate" type="application/rss+xml" title="{{ lang('SMARTFEED_PUBLIC_RSS_TITLE') }}" href="{{ U_SMARTFEED_URL_RSS }}" />
{% endif %}
{% if S_SHOW_TOPIC_FEED %}
<link rel="alternate" type="application/atom+xml" title="{{ TOPIC_TITLE }} - {{ lang('SMARTFEED_ATOM_TOPIC_FEED') }}" href="{{ U_SMARTFEED_TOPIC_URL_ATOM }}" />
<link rel="alternate" type="application/rss+xml" title="{{ TOPIC_TITLE }} - {{ lang('SMARTFEED_RSS_TOPIC_FEED') }}" href="{{ U_SMARTFEED_TOPIC_URL_RSS }}" />
{% endif %}
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: RSS feed tests

Post by *ghisler(Author) »

The shortened forum names are lost after the update.
Confirmed, I only installed the new extension. I have re-added my changes now.
Latest version being 3.0.17 or master?
The latest release version 3.0.17. I just tried master, but it gives me errors:
[phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbbservices/smartfeed/controller/feed.php on line 1197: substr() expects at least 2 parameters, 1 given

The relevant line 1197 is:

Code: Select all

			$pieces = explode('=', $item); // $pieces[0] = parameter name, $pieces[1] = parameter value
			if ($pieces[0] == constants::SMARTFEED_FORUMS && $pieces[1] == constants::SMARTFEED_REQUIRED_FORUMS_ONLY)
			{
				// This is an unusual case and it means that no forums were selected but there are required forums.
				// In this case the feed is restricted to returning content ONLY for required forums.
				$required_forums_only = true;
				break;
			}
			if ($pieces[0] == constants::SMARTFEED_FORUMS)
			{
1197->				$requested_forum_ids[] = (int) substr($pieces[1]);
			}
I think that line 1197 should be
$requested_forum_ids[] = (int) $pieces[1];
without the substr() code because "explode" above already did the separation.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: RSS feed tests

Post by *Hacker »

Christian,
ghisler(Author) wrote: 2022-07-19, 07:13 UTC
The shortened forum names are lost after the update.
Confirmed, I only installed the new extension. I have re-added my changes now.
The short names do not seem to work. I am still getting long names in my RSS reader.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
white
Power Member
Power Member
Posts: 4593
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: RSS feed tests

Post by *white »

ghisler(Author) wrote: 2022-07-19, 07:13 UTC I think that line 1197 should be
$requested_forum_ids[] = (int) $pieces[1];
without the substr() code because "explode" above already did the separation.
Yeah, I noticed that too. Didn't understand it. He says he is fixing a syntax error (did you see one before the "fix"?), but he seems to add one.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: RSS feed tests

Post by *ghisler(Author) »

The short names do not seem to work. I am still getting long names in my RSS reader.
Sorry, I didn't use the filtered_forum_names variable in all possible branches. It should work fine now.
Author of Total Commander
https://www.ghisler.com
Post Reply