[3.1][3.2][BETA] 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!
Get Involved
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: 789
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Feed post bot

Post by Ger » Sun Mar 19, 2017 9:30 am

Hmm... I thought of a time out but I guess that won't be the case then. Need to dive into this further.

Kaffe
Registered User
Posts: 22
Joined: Tue Nov 01, 2016 6:18 pm

Re: [3.1][3.2][BETA] Feed post bot

Post by Kaffe » Sun Mar 19, 2017 11:48 am

What about the possibility to add the [Feed name] as a kind of prefix in the topic title to let readers separate between different feeds?

i.e

[BBC News] Donald Trump has resigned
[FOX News] Survey says: Carrots are healthier than cigarettes
[MSNBC] Bill Gates is the new CEO of Apple inc.

thekraken
Registered User
Posts: 8
Joined: Sat Mar 11, 2017 12:49 pm

Re: [3.1][3.2][BETA] Feed post bot

Post by thekraken » Sun Mar 19, 2017 7:36 pm

Ger wrote:
Sun Mar 19, 2017 9:30 am
Hmm... I thought of a time out but I guess that won't be the case then. Need to dive into this further.
No problem - coffee is a brewing hehe - let me know if you need any other info on my env. :)

User avatar
Ger
Registered User
Posts: 789
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Feed post bot

Post by Ger » Mon Mar 20, 2017 9:05 am

Kaffe wrote:
Sun Mar 19, 2017 11:48 am
What about the possibility to add the [Feed name] as a kind of prefix in the topic title to let readers separate between different feeds?

i.e

[BBC News] Donald Trump has resigned
[FOX News] Survey says: Carrots are healthier than cigarettes
[MSNBC] Bill Gates is the new CEO of Apple inc.
While it's a good idea, I can imagine this isn't something that everybody likes or wants. And while I was thinking about dropping the feed name completely, I guess I'll change that field to 'prefix" instead. Leaving it empty results in no prefix.

@thekraken: I just did a retry for funcom, it works for me. I removed the funcom feed from my feed list, re-added it and fetched it. I got 190 new items, just as specified in the XML.

Can you try some other ATOM feed, see if it works? Try phpBB's feed for example:

Code: Select all

https://www.phpbb.com/feeds/atom/
That one works for me as well.

Mesto
Registered User
Posts: 33
Joined: Mon Jul 27, 2009 12:29 am

Re: [3.1][3.2][BETA] Feed post bot

Post by Mesto » Mon Mar 20, 2017 10:23 am


User avatar
Ger
Registered User
Posts: 789
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Feed post bot

Post by Ger » Mon Mar 20, 2017 10:28 am

Mesto wrote:
Mon Mar 20, 2017 10:23 am
German Translation
Well thank you! I won't be adding translations to the main package at this point though, since things will probably change in the upcoming versions. I'll add a link from the TS to your post.

Mesto
Registered User
Posts: 33
Joined: Mon Jul 27, 2009 12:29 am

Re: [3.1][3.2][BETA] Feed post bot

Post by Mesto » Mon Mar 20, 2017 1:58 pm

Hello Ger,

unfortunately it doesn't work with me. Whatever I try, my forum keeps empty.

For test I've entered only the example phpbb.com. (https://www.phpbb.com/feeds/rss/)
Image

Log shows no error.
Image

SimpleXML at Server shows enabled.
Image

If I catch it manually with button it shows no error.
Image

For me it looks everything fine, but the forum keeps empty.
Image

I've deactivated the extension, I've changed User ID, I've changed the forum for publish, I've deleted production folder in the cache folder und I've deleted the cache over acp. What am I doing wrong?

Kind regards!

User avatar
Ger
Registered User
Posts: 789
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Feed post bot

Post by Ger » Mon Mar 20, 2017 2:37 pm

Can you go to the ACP -> PHP Information and check the value for allow_url_fopen?

Mesto
Registered User
Posts: 33
Joined: Mon Jul 27, 2009 12:29 am

Re: [3.1][3.2][BETA] Feed post bot

Post by Mesto » Mon Mar 20, 2017 4:24 pm

Also this looks good.
Image

phpBB 3.2.0, PHP 7.0.16, mysqli 5.5.52, SSL

I have not given up hope yet. :lol:

User avatar
Ger
Registered User
Posts: 789
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Feed post bot

Post by Ger » Mon Mar 20, 2017 4:33 pm

I must say, I haven't tested it on PHP 7+ yet. That shouldn't be a problem though - I think. Could you try to test it on a PHP 5.x version?
You'd need to remove and re-add the feeds to make it work.

Also, can you run this query for me and post the results?

Code: Select all

SELECT config_value FROM phpbb_config_text 
WHERE config_name = 'ger_feedpostbot_current_state';

Mesto
Registered User
Posts: 33
Joined: Mon Jul 27, 2009 12:29 am

Re: [3.1][3.2][BETA] Feed post bot

Post by Mesto » Mon Mar 20, 2017 11:23 pm

I've changed to PHP 5.6, deleted the rss entry, deactivated the extension, reactivated it, deleted both caches (ftp and acp) and saved the rss again, but it still doesn't works.

Regarding the database query.

Code: Select all

[{"url":"https:\/\/www.phpbb.com\/feeds\/rss\/","name":"https:\/\/www.phpbb.com\/feeds\/rss\/","forum_id":66,"user_id":"2","textlimit":0,"timeout":3,"curdate":0,"latest":{"link":"http:\/\/www.phpbb.com\/community\/viewtopic.php?f=14&t=2413581","pubDate":"Fri, 10 Mar 2017 09:31:50 +0000","guid":""}}]
EDIT: Now I've deactivated all others Extensions, but also this doesn't helps.

thekraken
Registered User
Posts: 8
Joined: Sat Mar 11, 2017 12:49 pm

Re: [3.1][3.2][BETA] Feed post bot

Post by thekraken » Tue Mar 21, 2017 8:06 am

Ger wrote:
Mon Mar 20, 2017 9:05 am
@thekraken: I just did a retry for funcom, it works for me. I removed the funcom feed from my feed list, re-added it and fetched it. I got 190 new items, just as specified in the XML.

Can you try some other ATOM feed, see if it works? Try phpBB's feed for example:

Code: Select all

https://www.phpbb.com/feeds/atom/
Ger - I removed the funcom/re-added - with the same end result. I tried adding another forum/phpbb atom feed - and it almost instantly populated with phpbb news. (10 posts).

I seen the referenced sql query/attempted to run on my DB and received the following:

Code: Select all

[{"url":"http:\/\/www.funcom.com\/rss","name":"http:\/\/www.funcom.com\/rss","forum_id":11,"user_id":"55","textlimit":0,"timeout":600,"curdate":0,"latest":{"link":"","pubDate":"","guid":""}}]
So appears your extension works - I am just not replicating the same results with the Funcom feed that you are :(.

**Update - I found a workaround that works at least in my situation. As the PHPBB atom feed worked/populated my forum - I decided to piggy back on the success and delete/re-add the Funcom feed and sure enough - it now pulls in the posts. I removed the temp forum and decided to re-add just the funcom feed - and low and behold - the same functionality I found to begin with (even though it claims success - nothing populates the forum). I re-add the phpBB atom feed, it re-adds the posts, I re-add the funcom feed (after the phpbb) and it then pulls the posts.

So - I simply have the phpbb feed disabled in the hopes that the funcom feed sticks/continues to pull/add posts beyond what it was able to do on the initial pull.

Greatly appreciate the work Ger - coffee will be inbound! :)
Last edited by thekraken on Tue Mar 21, 2017 8:46 am, edited 1 time in total.

User avatar
Ger
Registered User
Posts: 789
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Feed post bot

Post by Ger » Tue Mar 21, 2017 8:22 am

Mesto wrote:
Mon Mar 20, 2017 11:23 pm
I've changed to PHP 5.6, deleted the rss entry, deactivated the extension, reactivated it, deleted both caches (ftp and acp) and saved the rss again, but it still doesn't works.

Regarding the database query.

Code: Select all

[{"url":"https:\/\/www.phpbb.com\/feeds\/rss\/","name":"https:\/\/www.phpbb.com\/feeds\/rss\/","forum_id":66,"user_id":"2","textlimit":0,"timeout":3,"curdate":0,"latest":{"link":"http:\/\/www.phpbb.com\/community\/viewtopic.php?f=14&t=2413581","pubDate":"Fri, 10 Mar 2017 09:31:50 +0000","guid":""}}]
EDIT: Now I've deactivated all others Extensions, but also this doesn't helps.
Thanks, this gave me enough info I think.
It came down to the check for the latest fetched item for the feed. The phpBB feed doesn't return a guid for their items, a unique identifier. When comparing the latest guid in the current feed with the latest stored in the database, both are equally empty. :lol:

I pushed a fix to Github just now.

User avatar
Ger
Registered User
Posts: 789
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Feed post bot

Post by Ger » Tue Mar 21, 2017 8:25 am

thekraken wrote:
Tue Mar 21, 2017 8:06 am
So appears your extension works - I am just not replicating the same results with the Funcom feed that you are :(.
See my post above. The fix I pushed might also do the trick for you. You should remove and add the feed again to make sure you have a clean sheet.

thekraken
Registered User
Posts: 8
Joined: Sat Mar 11, 2017 12:49 pm

Re: [3.1][3.2][BETA] Feed post bot

Post by thekraken » Tue Mar 21, 2017 8:58 am

Ger wrote:
Tue Mar 21, 2017 8:25 am
thekraken wrote:
Tue Mar 21, 2017 8:06 am
So appears your extension works - I am just not replicating the same results with the Funcom feed that you are :(.
See my post above. The fix I pushed might also do the trick for you. You should remove and add the feed again to make sure you have a clean sheet.
I updated my last with a workaround I found to work - and it appears to still apply with your updated release. I started off with the funcom feed - no dice. I added the phpbb feed to same forum - it grabs from phpbb. I re-add funcom (post phpbb) and to the same forum, it pulls the funcom posts now.

**Enjoy the coffee! :)
Last edited by thekraken on Tue Mar 21, 2017 9:11 am, edited 1 time in total.

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: kinerity, lopoto, paulie, Puchahawa and 23 guests

cron