[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!
Ideas Centre
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)
Locked
User avatar
sysz
Registered User
Posts: 278
Joined: Mon Jan 30, 2012 11:36 pm
Location: Sweden, Helsingborg
Name: Kimmy Lindell Ekström
Contact:

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

Post by sysz »

When i add http://www.bonappetit.com/feed/rss and then submit fetch all feeds manually i get this error.

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/ger/feedpostbot/classes/driver.php on line 228: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Start tag expected, '<' not found
[phpBB Debug] PHP Warning: in file [ROOT]/ext/ger/feedpostbot/classes/driver.php on line 228: simplexml_load_string() [function.simplexml-load-string]: �
[phpBB Debug] PHP Warning: in file [ROOT]/ext/ger/feedpostbot/classes/driver.php on line 228: simplexml_load_string() [function.simplexml-load-string]: ^

Warning: Cannot modify header information - headers already sent by (output started at /var/www/sailorsweden.net/secret/includes/functions.php:3262) in /var/www/sailorsweden.net/secret/includes/functions_acp.php on line 137

Warning: Cannot modify header information - headers already sent by (output started at /var/www/sailorsweden.net/secret/includes/functions.php:3262) in /var/www/sailorsweden.net/secret/includes/functions_acp.php on line 137

Warning: Cannot modify header information - headers already sent by (output started at /var/www/sailorsweden.net/secret/includes/functions.php:3262) in /var/www/sailorsweden.net/secret/includes/functions_acp.php on line 137
Currently working on the community
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

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

Post by Ger »

The error seems to indicate that the feed is invalid since the start tag is not found.
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
sysz
Registered User
Posts: 278
Joined: Mon Jan 30, 2012 11:36 pm
Location: Sweden, Helsingborg
Name: Kimmy Lindell Ekström
Contact:

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

Post by sysz »

I see, thanks for the clarification :)
Currently working on the community
midnytblu
Registered User
Posts: 2
Joined: Mon Sep 11, 2017 7:10 am

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

Post by midnytblu »

Hi,

I tried using your extension and it worked very well. Thanks alot!
I'm just having a little issue with the appended links.

It shows like this:

Image

The word SOURCE is in front of it and I can't click on it.
And the link looks like:
sourcehttp://news.tv-asahi.co.jp/news_society/articles/000109741.html?r=rss2&n=20170911151615
Is there a way to fix it?
Thanks!
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

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

Post by Ger »

In the language file there's a space appended, but it seems it doesn't get there for your language... Not sure why, but anyway: I've made a small change in the driver that enforces the space before the source link.
Checkout the latest version from 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-
midnytblu
Registered User
Posts: 2
Joined: Mon Sep 11, 2017 7:10 am

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

Post by midnytblu »

Ger wrote: Mon Sep 11, 2017 10:21 am In the language file there's a space appended, but it seems it doesn't get there for your language... Not sure why, but anyway: I've made a small change in the driver that enforces the space before the source link.
Checkout the latest version from github.
Hi Ger,

Tried the latest version and it's all good now.
Thanks!
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

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

Post by Ger »

Thanks for reporting back. :)
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
Edward572
Registered User
Posts: 183
Joined: Wed Aug 03, 2005 12:37 am
Location: Calgary, Alberta, Canada
Name: Edward
Contact:

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

Post by Edward572 »

Hello Ger,

Just to start off with hopefully not having "BUT", I would like to thank you on all your hard work on this EXT, and to say it is simple to install and very easy to add feed to anywhere in your forum. Ok sorry here comes the "BUT", which everyone know mean what was said before "BUT" was said means nothing, BUT :D in this case it's not true. Wow I think I got past the BUT.

Anyhow I noticed in Pre-Posts in this thread someone asked for the use of below:
Available attributes: (Feed Reader)

[sfnc_item_title], [sfnc_feed_name], [sfnc_item_link], [sfnc_item_description], [sfnc_feed_lastBuildDate], [sfnc_feed_image], [sfnc_feed_language], [sfnc_feed_copyright], [sfnc_item_author], [sfnc_item_creditLine], [sfnc_item_guid], [sfnc_item_pubDate], [sfnc_item_enclosure]
Other Version of Feed Reader has a way to layout the way the you want the post to look and a longer descriptions and actual copyright coverage since you can give credit to the feed suppliers (Watch Your Back).

Template used for post, if posting is enabled - RSS FEED Input & Post
Feed: [sfnc_feed_name]

Subject: [sfnc_item_title]
[sfnc_item_description]
[sfnc_item_enclosure]
[sfnc_feed_image]
Full Story Link:
[sfnc_item_link]
[sfnc_item_author]
[sfnc_feed_copyright]
[sfnc_feed_lastBuildDate]
OUTPUT of FEED Below (OLD)(not this EXT)

Feed: RSS Feed - CTVNews.ca - Top Stories - OneTopic

Subject: 'Not a lot left:' Ranch near Waterton burned up by wildfire
Members of a southern Alberta ranching family say they will rebuild after a wildfire swept through their property just outside Waterton Lakes National Park.
Fire damage to the Rocking Heart Ranch just outside Waterton Lakes National Park. (THE CANADIAN PRESS / HO-Sierra Garner)
Image
Full Story Link:
http://www.ctvnews.ca/canada/not-a-lot- ... -1.3587860

Copyright Bellmedia
Wed, 13 Sep 2017 23:57:23 -0400
Ok with all that above is there a way to edit to add all the possible variables from a RSS Feed Address to add inside Your Extension. I figure if you can make your Feed bot to strip as much information from the feed and be able to arrange it in any manner that you want little info or everything, adding copyright this tells the feed provider your not taking credit for the storey or the link.

Part 2 of the Question:
If it not your intention to have these options or that ability, what file do you use to layout the post that is feed and read and posted, is there a easy way to ADD?
Available attributes: (Feed Reader)

[sfnc_item_title], [sfnc_feed_name], [sfnc_item_link], [sfnc_item_description], [sfnc_feed_lastBuildDate], [sfnc_feed_image], [sfnc_feed_language], [sfnc_feed_copyright], [sfnc_item_author], [sfnc_item_creditLine], [sfnc_item_guid], [sfnc_item_pubDate], [sfnc_item_enclosure]
Sry for all the questions, but would you consider to ADD features so my RSS Feed Bot posts this below:
Current U.S. policy directs the American military not to defend Canada if it is targeted in a ballistic missile attack, says the top Canadian officer at the North American Aerospace Defence Command.


Source: http://www.ctvnews.ca/politics/u-s-poli ... -1.3589571
But I would like to see this as the same post by old Feed Reader
Feed: RSS Feed - CTVNews.ca - Top Stories - OneTopic

Subject: 'U.S. policy is not to defend Canada' from ICBMs
Current U.S. policy directs the American military not to defend Canada if it is targeted in a ballistic missile attack, says the top Canadian officer at the North American Aerospace Defence Command.


Lt. Gen. Pierre St-Amand in Ottawa on Sept. 14, 2017. (Sean Kilpatrick / THE CANADIAN PRESS)
Image
Full Story Link:
http://www.ctvnews.ca/politics/u-s-poli ... -1.3589571

Copyright Bellmedia
Thu, 14 Sep 2017 23:50:00 -0400
Anyhow hopefully something can be edited by me or maybe you could ADD this ability?

Thanks Again in Advance for all the hard work that you have already done on this EXT!

Cheers,
Ed
Cheers All, Have A Good One
StormerSoft.Com
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

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

Post by Ger »

Edward572 wrote: Fri Sep 15, 2017 7:13 am <snip>
Hello,

Well, I actually chose not to. I see the benefit in some cases, but one of my goals writing this extension was to keep things simple for the admin. Hassling with a template isn't quite simple for everyone.

As it is now, I already have quite some support questions from people who struggle with understanding the feed concept, the worldwide mayhem of sites that implement the feeds wrong, the concept of cron jobs, etc. It's already more complicated that I wanted it to be.

Now, if you want to, you can look up this part:
https://github.com/GerB/feedpostbot/blo ... #L352-L368

That's where the post content is build. You can change it to your liking.
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
Edward572
Registered User
Posts: 183
Joined: Wed Aug 03, 2005 12:37 am
Location: Calgary, Alberta, Canada
Name: Edward
Contact:

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

Post by Edward572 »

Ger wrote: Fri Sep 15, 2017 8:05 am
Edward572 wrote: Fri Sep 15, 2017 7:13 am <snip>
Now, if you want to, you can look up this part:
https://github.com/GerB/feedpostbot/blo ... #L352-L368

That's where the post content is build. You can change it to your liking.
Hello Ger,

Thank you very much for sharing the location of we're in the driver.php file posts the feed, this is perfect, but there but again it gives me more questions.

1. Is the driver.php just handle the read/store/post of the RSS feed, and if so do you store all the feed in arrays or variables? Or do you cherry pick the content that your original design posts.

2. The reason I'm asking is if the entire fed RSS feed is stored already somewhere in your driver.php file it should be simpler to follow how your currently laying out your posted content and add other things or any part of the original feed source.

I'm a php novice but do use Vb2017 to play... With that being said...
I realize that adding this to ext would be a pain, in the admin a user would have to play around with layout, which would add more q&a for you, plus it's most likely a lot of work for you. With that being said...

As a VB user I would have a subroutine that calls up a template, you would have the original template set as default, in the driver.php file instead of having that section to post the content, you call up another file say for your original setup, maybe the file is called default_layout.php. Now a user could simply change default_layout.php in the driver.php file to say to my_layout.php, copying the original file and renaming it to that and directing driver.php to post using an edited layout.php file.

In the default_layout.php their would be basic instructions to the stored variables or arrays, which ones hold what information, with a basic structure (Original) that you like.
The above would cost you some time, but you would not have to change anything to start with in admin, you would call your default layout. People like me could play by maybe add the entire feed, lay it out anyway they want, future if you saw the benefit to this you could add check mark boxes in the admin to choose basic layout, advanced layout, and the entire feed say. In this case a user just click a check box for the feed template he or she wants to use.

So you supply a few template files in ext, say: original_layout.php, advanced_layout.php, entire_layout.php. Now the user just picks what template for posting to pull up. Now advanced php users could just edit one of the called templates that he or she edited.

But all the above assumes you have all the original RSS feed stored in individual variables or arrays.

Now if we all know what each variable means in a REM statement, example in the driver.php file say:

' date$ = date of post
' decription$ = Decription

Etc, etc, then I could just follow your lead in the my_layout.php and edit driver.php file to pull that layout to post the feed.

Anyhow I'm playing with the code you sent me, and I going to give it a try and see if I can get a layout.

Thanks Again,
Edward

PS: Please consider what I proposed if you think this would not be a hard fix or upgrade, and if so I would be willing to donate, but not till the end of the month.

Cheers,
Ed

Lastly the check boxes in the admin ext page would simply call up different templates, example: checkbox1 tells the driver.php file to call up original_layout.php, and checkbox99 calls up super-awesome_layout.php, etc,etc

Sry one more thing, it took me longer to photo edit this admin picture, lol, anyhow picture this...

Image
Cheers All, Have A Good One
StormerSoft.Com
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

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

Post by Ger »

Edward572 wrote: Sun Sep 17, 2017 5:49 pm idea
I've thought about it a bit an I've looked at Smix's MOD where your idea seems to originate from. He had over 4 years of work into it, one of hist last posts in that topic being that the template part in combination with feeds not being standardized:
Smix wrote:If I'll summarize it, most problems there noticed are possibly related to templating and problematic formats of the feeds, which is not standardized. I do know, that there are some bugs related to the mod itself. But 99% of reporters didn't add any error messages from server error log, so I can only guess ... :(
That post is after he was developing almost 4 years.

He went on developing approximately 6 months longer and a year after the MOD was abandoned. I think it's save to say the whole thing grew too complicated. Like I wrote earlier, I want to prevent that since it's already become quite complicated. Even more: I'm hoping to submit this extension to the CDB soon so I don't want to add too many features and changes at this point.

Now, don't loose your hope. :)

There is the possibility to add events to an extension. I could add an event before and after building the post content. That would enable you (or others) to hook into those events and change the content to your liking. You would only need a small extension with an event listener and not much more. That way I think we're getting the best of both worlds: a standardized Feed post bot suitable for 90% of the users, and a way to tailor it to your liking for advanced users.
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: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

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

Post by Ger »

Update:

As mentioned above, I've added some events, more info in the second post.

@Edward572: I think that this will be enough for you to work with?
whocarez wrote: Thu Apr 13, 2017 8:02 amPoke instead of mention
This might interest you as well since you asked for something similar
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
Edward572
Registered User
Posts: 183
Joined: Wed Aug 03, 2005 12:37 am
Location: Calgary, Alberta, Canada
Name: Edward
Contact:

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

Post by Edward572 »

Hello again Ger,

I'm playing with php, and your direction, explanation of variables, etc, I should be able to muttal around until I get a RSS feed to post more information, ordered information, etc.

The IDEA, no matter who started it first it was an idea, to be honest I never saw the post your talking aboutn simx, it does not really matter where the idea comes, as long as is good.

As you have mentioned your trying to get this ext approved and you don't want to complicate it anymore than it needs to be. Makes sense to me, the idea is almost an ext in an ext. Having called up templates to arrange the posting of RSS feed. Anyhow as you said don't lose hope, so in the coming months when your bored you can if you want to play as I say, because I find this type of work play and not work, for me anyhow because I'm just learning.

The flow chart is their...

Anyhow thanks for your time and consideration, I will play around and see we're I get.

Thanks again & Cheers...
Ed
Cheers All, Have A Good One
StormerSoft.Com
User avatar
sysz
Registered User
Posts: 278
Joined: Mon Jan 30, 2012 11:36 pm
Location: Sweden, Helsingborg
Name: Kimmy Lindell Ekström
Contact:

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

Post by sysz »

On the latest version downloaded from the git i get this problem when i try to manually fetch all feeds via acp.

Code: Select all

General Error
SQL ERROR [ mysqli ]

Column 'topic_title' cannot be null [1048]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
Currently working on the community
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

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

Post by Ger »

Whoopsy, that seems to be a typo. Fix is being pushed as I write this post.
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-
Locked

Return to “Extensions in Development”