ElkArte Community

Extending Elk => Addons => Topic started by: vbgamer45 on January 27, 2017, 07:07:39 am

Title: RSS Feed Poster
Post by: vbgamer45 on January 27, 2017, 07:07:39 am
RSS Feed Poster

Addon Information:
For Elkarte 1.1.x and 1.0.x

Allows you to add RSS Feed Posting Bots to your forum.
Has a built in scheduled task that you can run or can either use a real cron job
Using the following file http://www.yourforums.com/cronrss.php

Or you can run fake cron jobs via php

Allows multiple posting bots
Set Poster Name Or Member Id for the bot
Topic Prefix option
Option to lock topics
Option to enable/disable html in the feed post
Set the update time in minutes
Set how many items to get from the feed
Choose the forum for the feeds.
No duplicate posts. Posts are hashed and stored as a hash.


Big thanks to emanuele for the  HTML BBCode tag used in this mod.
Title: Re: RSS Feed Poster
Post by: Trekkie101 on January 27, 2017, 09:53:16 am
I like this! :)
Title: Re: RSS Feed Poster
Post by: Trekkie101 on January 28, 2017, 05:52:54 pm
Hey @vbgamer45 it seems after install on a vanilla forum it looks to godo feedsadmin and then just seems to leave you on the admin panel homepage?

Doesn't seem to have added the interfact on my install. It didn't complain about any tests failing either.
Title: Re: RSS Feed Poster
Post by: vbgamer45 on January 28, 2017, 07:16:21 pm
On Elk 1.0.x?
It should add a menu in the admin area under Configuration called RSS Feed Poster Configuration
Title: Re: RSS Feed Poster
Post by: Trekkie101 on January 28, 2017, 10:48:41 pm
Yeah 1.0.x

Had a little more time to debug. Package info.xml is missing an instruction to copy over feedposter.integrate.php to sources. It's in the package but not in the xml.
Title: Re: RSS Feed Poster
Post by: vbgamer45 on January 29, 2017, 02:16:14 am
Fixed thanks  Trekkie101
If anyone downloaded it before this post download the new version now.
Title: Re: RSS Feed Poster
Post by: vbgamer45 on October 26, 2017, 05:25:11 am
Updated for Elkarte 1.1.x
Title: Re: RSS Feed Poster
Post by: vbgamer45 on October 13, 2018, 08:00:35 pm
Update
5.0
+Https images now supported with the embed images option
+Added support for https feeds when using the fsockopen method
+Curl support improved for https feeds
Title: Re: RSS Feed Poster
Post by: mgrde on January 30, 2019, 01:38:47 pm
@vbgamer45
1st of all: many thanks for this addon, I use it several years on two SMF forums and now in ElkArte.

Alas the same error is also in this version: the rss-items are not counted for the posting member. After digging through the module source I found out: the "board"-info count field is 0 when postings are counted and 1 if this option is deactivated.

Changing that was a snap but should be done from the beginning  ;)

And a suggestion: Please make the downloadcount limits configurable (best on a per feed basis) for the user instead of the hardcoded limit ( > 50 = 25)

TIA
Title: Re: RSS Feed Poster
Post by: Trekkie101 on February 04, 2019, 08:07:23 pm
If you do a recount from the maintenance section, it fixes this I believe in the meantime?
Title: Re: RSS Feed Poster
Post by: mgrde on February 04, 2019, 09:23:23 pm
Not really. The feedposter file interprets the value for count postings as 1 for count posting whereas in the database is a zero for count posting. A small modification in feedposter.php corrects this "bad behaviour". If you have some RSS feeds the continuous use of recount is really annoing.

BTW: I did the source modification in my forum but with any update of RSS-Poster I have to do it again :(
Title: Re: RSS Feed Poster
Post by: vbgamer45 on February 05, 2019, 12:06:41 am
Can you post your change file want to see what was changed.
Title: Re: RSS Feed Poster
Post by: mgrde on February 05, 2019, 01:12:39 am
Here we go:

Code: ("RSS.subs line 382") [Select]
								if ($feed['count_posts'] == 1) // mgr
$updatePostCount = 0;
[1]   :D

Code: ("RSS.subs line 863") [Select]
								if ($feed['count_posts'] == 1)   // mgr
$updatePostCount = 0;
    :D
Just a small suggestion for ElkArte
Title: Re: RSS Feed Poster
Post by: ahrasis on February 05, 2019, 01:55:44 am
@Spuds, @emanuele, should default rss file be updated to this as well?
Title: Re: RSS Feed Poster
Post by: Spuds on February 05, 2019, 04:58:06 pm
I'm not sure what I would change, but then I'm not sure I understand why the problem is occurring. 

Setting the $posterOptions array key 'update_post_count'  to a non empty value should increase that posters post count when they make the post (unless its on a board that does not count posts).    So I don't know why changing it to 0 seems to work?

(PS I tweaked the format of your post so it rendered properly, footnotes inside of a code block do not render)
Title: Re: RSS Feed Poster
Post by: mgrde on February 05, 2019, 07:41:50 pm
...

unless its on a board that does not count posts).  


Well - that is the reason. board-counting in the database is 0, subs.RSS interprets 1 as count. There are only the marked lines where a previous set user-counting value is set to off when boards do not count (== 0 originally, changed by mgr to == 1)


(PS I tweaked the format of your post so it rendered properly, footnotes inside of a code block do not render)

Many thanks. I didn't dream that a tag code=Text was possible and already in ElkArte. I didn't yet come to exploring the source how BBC is formatted. M limited knowledge is based on SMF files.
Title: Re: RSS Feed Poster
Post by: mgrde on March 05, 2019, 04:41:41 pm
Reading my answer now me thinks I have thought too quickly before posting - sorry.

The user count-switch is set correctly to 0 or 1, all following conditions set this switch to 0 for not counting. Up to here all OK.

Now comes the feed-counting switch (from the board counting switch) testing this value against 0[sic] sets user-count switch to 0 (off). A look into the database reveals though that a board setting of count = off sets this value to 1. My working and supposed changes will correct this wrong assumption and count all RSS-Postings correctly in the board and for the selected user.