[CDB] Feed post bot

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Ger
Registered User
Posts: 2116
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

[CDB] Feed post bot

Post by Ger »

Extension Name: Feed post bot
Author: Ger

Extension Description: This extension enables you to read any RSS, ATOM or RDF feed. It looks for new items every half hour and post them to a specified forum.

Extension Version: 1.0.10

Requirements:
  • PHP SimpleXML extension (usually available, check this in ACP -> PHP info)
Features:
  • Define multiple feeds in ACP
  • Automatically recognises the feed type (RSS/RDF/ATOM), can be overridden in ACP
  • Choose a forum and a user for each feed to post new items
  • Optionally add prefix to topic titles
  • Use phpBB cron to fetch feeds every 30 minutes
  • Limit size of post instead of full content
  • HTML in feeds is converted to valid BBcode where possible, all other HTML is stripped
  • Choose between using local time or publication date of feed for post time
  • Events are added to allow for changing the posted result (see next post)
Extension Download: https://github.com/GerB/feedpostbot

Translations:
Translations are very much appreciated, but won't be added to the main package at this point since language strings are prone to change. If you have a translation available please post in this topic, I'll add a link to your post in below list.

Available translations:
Last edited by Ger on Thu Mar 08, 2018 10:49 am, edited 20 times in total.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
Ger
Registered User
Posts: 2116
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: [RC] Feed post bot

Post by Ger »

Events available in 1.0.1RC:

Since I have had some requests about the actual posted messages, I decided to make it possible to hook into some key points of this extension. In doing so, I can keep this extension as simple as reasonably possible (which already seems to be relatively complex too some) while more advanced users can change the workings to their liking. The following events are currently available


ger.feedpostbot.parse_atom_append
ger.feedpostbot.parse_rdf_append
ger.feedpostbot.parse_rss_append

These 3 do mostly the same, but need separate events since the structure of each feed type differs. They allow you to extract extra data from the feed using the $item var and change or add information in the $append var.


ger.feedpostbot.submit_post_before
This event allows you to alter the $data array before it's send to the submit_post() function. It also supplies the $rss_item for reference, which holds all the information stored in the parse_{method} functions (which you might have extended with the events mentioned above).

------

If you have the need for other events, please post in this thread and explain your goals, the event location and vars needed. If it sounds reasonable to me, I will probably add it within a couple of days. Please note that I'm happy to advice you wile writing an extension, I won't be the one supporting each and every extension created by other authors.
Last edited by Ger on Mon Sep 18, 2017 12:27 pm, edited 1 time in total.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland

Re: [ALPHA] Simple RSS post bot

Post by PaulusB »

I downloaded the extension and created a folder ger in the ext folder in downloaded your files as a zip from github but the extension doesn't come up in the acp extension enable page.
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland

Re: [ALPHA] Simple RSS post bot

Post by PaulusB »

Solved must rename the folder from simplerss-master on download to simplerss than copy to server.

I uploaded this rss http://nieuws.volkswagen.nl/feed/nl and assigned this forum https://www.volkswagen-forum.nl/forum/v ... m.php?f=47 when wil this post something automatic?

Great job by the way for making this mod.
User avatar
Ger
Registered User
Posts: 2116
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: [ALPHA] Simple RSS post bot

Post by Ger »

PaulusB wrote: Mon Feb 27, 2017 7:33 pm Solved must rename the folder from simplerss-master on download to simplerss than copy to server.
Yeah, it's somewhat there in the README, but I should explain that a bit better.
I uploaded this rss http://nieuws.volkswagen.nl/feed/nl and assigned this forum https://www.volkswagen-forum.nl/forum/v ... m.php?f=47 when wil this post something automatic?
Well, probably not. :P
I checked your feed, and I see I had a bug with guid checking. Your feed always returned like "nothing new here".
I corrected the bug just now, please download the new version from Github.
Great job by the way for making this mod.
Thanks!
Keep in mind though that this is still in ALPHA stage. Actually you are the first person besides me that uses this extension, so you may find some bugs down the road.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland

Re: [ALPHA] Simple RSS post bot

Post by PaulusB »

User 2 has good rights.

De phpbb cron set to yes? Standard its set to no. Is that oké see pictures

Image

Image

If i press process manuely is does not post anything.

De feed have content if u visit them.
User avatar
Ger
Registered User
Posts: 2116
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: [ALPHA] Simple RSS post bot

Post by Ger »

I actually just edited my post 15 minutes ago. There was a bug, I pushed an update to Github.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland

Re: [ALPHA] Simple RSS post bot

Post by PaulusB »

I deleted the old mod en and uploaded the new mod and a cache dump but nothing is happening if a process them.

I have also this one http://www.autoblog.com/category/volkswagen/rss.xml
User avatar
Ger
Registered User
Posts: 2116
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: [ALPHA] Simple RSS post bot

Post by Ger »

Both feeds work fine by me. Have you tried the button "Fetch all feeds manually"?

You might need to disable the extension and also delete the data (button in extension management to also delete the config settings created by the extension). Then re-enable the extension and add your feeds. Don't forget to assign a forum to post in and a user to post with.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland

Re: [ALPHA] Simple RSS post bot

Post by PaulusB »

I have done al that.

If i use the rss feed from phpbb site it working oke https://www.phpbb.com/feeds/rss/ also older content if u process it manually.
User avatar
Ger
Registered User
Posts: 2116
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: [ALPHA] Simple RSS post bot

Post by Ger »

Then I think everything is in order. Now you only need to choose to use either the phpBB cron or the system cron. I see in your screenshot you set that to Yes, so you need to setup a cron job in your hosting panel as described in the setting explanation.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland

Re: [ALPHA] Simple RSS post bot

Post by PaulusB »

I set it back tot phpbb cron so i dont have to do server side work. If everything is oké i wil wait that the post something new in the rss and hope that it wel added. But i dont onderstand why i am niet getting older news when i run IT manuel?
User avatar
Ger
Registered User
Posts: 2116
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: [ALPHA] Simple RSS post bot

Post by Ger »

I'm not sure actually. Can you do some things for me:
- purge cache on the ACP index page
- Take a look at ACP index -> PHP information and search (Ctrl + F) for "simplexml". Is that present?
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland

Re: [ALPHA] Simple RSS post bot

Post by PaulusB »

Purged the cache for u.

PHP Version 7.1.2

SIMPLEXML SUPPORT
Revision
$Id: 7e5516dcdf2fe6ded7970eaeb6abd8d07df39a2a $
Schema support
enabled
User avatar
Ger
Registered User
Posts: 2116
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: [ALPHA] Simple RSS post bot

Post by Ger »

Haven't tested it on PHP 7 actually, but that shouldn't be a problem though. Most important is the SimpleXML support, and that's available.

Can you execute some queries for me?

Code: Select all

SELECT config_value FROM phpbb_config WHERE config_name = 'simplerss_cron_last_run';

Code: Select all

SELECT config_value FROM phpbb_config_text WHERE config_name = 'ger_simple_rss_current_state';
Please post the results within code-tags.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-

Return to “Extensions in Development”