E107: forum e_rss

Created on 28 Mar 2019  路  19Comments  路  Source: e107inc/e107

I know that developers spend lot of time to improve e107 and have to face for multitude of questions and fixes.
But one of the most important thing is a integration/cohesion with modern media tools such as social media.
One of the simplest method (for newbie) is publishing rss feed to social media.
Rss format is most acceptable for great number of them.
I'd like to know when forum posts and threads will be available in rss feeds.

forum rss_menu awaiting feedback testing required enhancement

Most helpful comment

I might get to it this week

All 19 comments

The e_rss addon is there in the forum plugin, but it may not be functional due to the rewrites: https://github.com/e107inc/e107/blob/master/e107_plugins/forum/e_rss.php
It needs updating to v2 standards anyway.

It is totally non functional. I think that 1 or 2 developers can make forum e_rss compatible with v2 standards in half an hour.

@Moc @net1313
I am working on content plugin, so it's similar a bit. I am posting this just to show that it's not work in half an hour. Normally rss_menu would work with not updated e_rss.php and it worked some time ago.

problem is mainly in rss_menu plugin

  1. $this -> limit in sql queries is empty now (just noted), result: e_rss.php for download, featurebox, forum, links_page has sql errors now (php 7.2)
    this is reason why $rss is empty and nothing is displayed in rss feeds for outdated e_rss.php

  2. you can't use * in import but rss.php still counts with it.
    With * you got 404 error.
    I think it's because this regex
    ^{alias}/(.*)/rss/?([\d]*)?$
    So what is correct fix? It's impossible to display all available feeds during import like with news categories.

  3. $this->parm doesn't work anymore, so next reason why for forum rss is empty

And notes:

  1. this is not clear
    $this -> contentType = $row['rss_name']; - later 'rss_url'=>$this->contentType,
    rss_name in my case it name of rss feed... so I am sure it can't be rss_name there . It's just my opinion, but it should be fixed by ($this -> contentName) and correct value for contentType(rss_url)
  1. outdated switch values - new values are missing there for forum (easy fix)
    6 - forumthreads
    7 - forumposts
    8 - forumtopic
    11 - forumname
    and in my case 4 - content
    but it still should work with default value

@Jimmi08 I just tested chatbox and downloads under PHP 7.3 and it is working as intended.
Forum has an issue.

The database queries still need to be updated to work with the v2 forum table structure. Anyone feel like working on it? @Moc @Jimmi08 ? (Ideally, it should use the forum class and e107::url() for the URLs)

I might get to it this week

@CaMer0n I am on page rss_menu/admin_prefs.php?mode=main&action=import
I can see in debug mode 2 sql errors (php 7.2)

SELECT d.*, dc.* FROM e107jm_download AS d LEFT JOIN e107jm_download_category AS dc ON d.download_category = dc.download_category_id WHERE d.download_active > 0 AND d.download_class IN (0,251,252,253) ORDER BY d.download_datestamp DESC LIMIT 0,

SELECT * FROM e107jm_featurebox WHERE fb_class = 0 DESC LIMIT 0,

The same is on live site with 5.6

Just report, I don't need it.

Thanks @Moc I have added back the rss links from the v1 template as a reference.
https://github.com/e107inc/e107/commit/f58714c35de8cd63449a7a2020b595ffbc35a17e

@Jimmi08 Yes, I see that too, it doesn't affect functionality and will disappear once they are ported to v2 standards.

Could be v2 standard to check if addon class doesn't exist before declare this class? I think I saw it in some e_ addon already, but I can't find it now. So if I declare this class sooner, my customized class will be used and not core? Do you know what I am trying to say?

@Jimmi08 I believe you're talking about overriding plugin addons. (e_xxxx)
It is currently unsupported.

@CaMer0n Just for your information. In fact, it already works thanks to that way the new version is written. I could be mistaken, of course. Only 2 things were needed:

  • alphabetical sorting of add-ons after $elist = self::getPref($filename.'_list'); in getAddonConfing() method. ksort() for example
  • check if the class exists.
    So if I add plugin f.e. blank, and put inside e_gsitemap.php file with class news_gsitemap(), the output of this class is used, not core.

Some rule for order how add-ons are loaded should be there regardless of this (I think that there is the issue about this, f.e. alphabetical order is the rule). I was sure it was in alphabetical order, but now it's in order how they are installed.
And checking if some class is declared should be everywhere too, not just because of this.

@Jimmi08 Looks like a bug. It means that plugins could break functionality of other plugins.

I have started work on this, but it will take a while. There is a lot of complexity due to the database structure that has changed from v1 to v2. Updates incoming asap.

I've done the first two feeds, they are working now: /feed/forumthreads/rss/ and /feed/forumposts/rss/.

There is a minor issue with 'forumposts' atm: replies do not get the "RE: " added as prefix to the title. This is because a changed database structure, and I'm not such an SQL expert to know how to handle this type of query. I'll get back to this later.

Now I'll continue to work on the other feeds.

Doing more work on this but I found another complexity related to anonymous forum posts. Will post updates when I have them.

@net1313 All Forum RSS feeds should be functional now. Please test extensively and let me know your feedback :) Thanks

@Moc Thanks. I 'll test it next week

@net1313 Did you get a chance to test this already? :)

Closing as I assume it's fixed now. If there any issues, please let me know and I'll re-open.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

realmontazeri picture realmontazeri  路  5Comments

Jimmi08 picture Jimmi08  路  5Comments

Jimmi08 picture Jimmi08  路  3Comments

chimcen picture chimcen  路  3Comments

MaDDoG9x9 picture MaDDoG9x9  路  4Comments