MyBB Community Forums

Full Version: Create threads from RSS feeds
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
It's not in the plugin but you can modify the task file a bit to add signatures to the posts:

In /inc/tasks/rssfeedposter.php, search:
								$new_thread = array(
									"fid" => $feed['fid'],
									"subject" => $feed['topicprefix'] . $msg_title,
									"icon" => '',
									"uid" => $feed['uid'],
									"username" => $feed['postername'],
									"message" => '[b]' . $msg_title . "[/b]\n\n" . $msg_body,
									"ipaddress" => '127.0.0.1',
									"posthash" => ''
								);

and replace with:
								$new_thread = array(
									"fid" => $feed['fid'],
									"subject" => $feed['topicprefix'] . $msg_title,
									"icon" => '',
									"uid" => $feed['uid'],
									"username" => $feed['postername'],
									"message" => '[b]' . $msg_title . "[/b]\n\n" . $msg_body,
									"ipaddress" => '127.0.0.1',
									"posthash" => '',
									"signature" => 1
								);

This will enable the signature for all new posts. If you wish to add the signature to existing posts, login with the rssbot user and go to UserCP > Edit signature and mark "Enable my signature in all of my existing posts." and save the signature.
Thanks Aries-Belgium, I think that worked, Im just waiting for the next cycle of auto posts

Ideally, is there any way to put the signature into the actual post. See image attached. Also would it be possible to add READ MORE or something like that before the URL in the post. Would this all be done in rssfeedposter.php file or in some template?

Hi Aries-Belgium, I added in "signature" => 1 to the file but that didn't seem to work, the bot just stopped posting for a few days. When I removed the code it worked again fine
I'm sorry but does anyone actually RSS threads? Forum-goers and RSS-users seem to appeal to different niches. Not only that, but the thought of creating an RSS on a thread is rather peculiar in itself. People usually do so for blogs.

So to those with successful forums, how many people really use RSS in your forum?
(2011-04-29, 02:18 AM)GFN Wrote: [ -> ]Hi Aries-Belgium, I added in "signature" => 1 to the file but that didn't seem to work, the bot just stopped posting for a few days. When I removed the code it worked again fine

You need to make sure that you add a comma to the last item in the array before adding the item. That's the only thing I can think of what is going wrong.

"posthash" => '', // <-------- here must be comma after the item
"signature" => 1

Even if the post datahandler doesn't understand the signature parameter (which it actually does) there shouldn't be a problem.
Ah oops sorry about that mate Blush that explains it, I missed the comma. I will let you know if the next cycle of posts show the sig Smile

Also would it be possible to add READ MORE or something like that before the URL link in the post. Would this all be done in rssfeedposter.php file or in some other file or template?

Quote:I'm sorry but does anyone actually RSS threads?

Actually its the other way around, threads are created automatically on the forum from RSS news feeds (such as BBC or CNN) then I post a reply in the thread and hopefully it creates a discussion. I have it set for just 2 threads per day, so its not excessive
Quote:I will let you know if the next cycle of posts show the sig

Next cycle of posts just got posted, unfortunately no sig. I made sure that the comma was included
Looking for the same as you... did you solve the problem with signature and "Read more" feature instead of the http:// source link? If yes, can you share with me? Smile
Pages: 1 2