The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
NEW Modified RSS News Feed Hack Details »» | |||||||||||||||||||||||||
Hack originally posted by: Xyphen - RSS News Feed Hack
Modified by: wolfstream - Modified RSS News Feed Hack I am posting this up as a new hack because of the major changes made to how the script works. Also, I didn't want people to get confused as to which one to download since there were 3 different versions on the original post. Xyphen released the original version, then wolfstream modified the script and corrected some errors. After that, I modified wolfstreams version to change how posts were inserted. Now the post count will increase, posts will be able to be searched, and similiar threads will work. RSS News Feed Hack for vB 3.0.x. As long as vBulletin doesn't change the database structure much, this should be good for the next release also, and those to come. Allows you to have a live RSS news feed (such as one from Google or CNET) in a forum. The user that posts it will basically be a bot, which *should* only be used for posting the news, but you can even make it for a regular user. Comments are welcome! Support provided through this thread. Latest Version: - 1.26 - for PHP 4.3.0 & above - 1.26a - for PHP prior to 4.3.0 vBulletin Versions: - 3.0.0 - 3.0.1 PHP Versions: - > 4.3.0 - < 4.3.0 Installation Overview: - Files to edit: (2) /admincp/index.php, /includes/functions_newpost.php - Files to upload: (4) rss.php, admincp/rss_admin.php, includes/RSS/class.RSS.php, includes/RSS/rss_update.php - Queries to run: (4) in rss_install.php History: Version 1.26 (23 June 2004 - Slapyo, Natch) - listing of bot's more intuitive (Natch) - hopefully fixed duplicate problem (Slapyo) - stripped html tags from title and description (Slapyo) Version 1.25 (12 May 2004 - Slapyo) - fix for " showing up - logs action in scheduled task log if turned on Version 1.24 (20 April 2004 - Slapyo) - posts now deleted with delete_thread function - post counts updated when using delete all news Version 1.23 (14 April 2004 - Slapyo) - added ability to delete bots - cleaned up includes - fix for PHP versions prior to 4.3.0 calling html_entity_decode() Version 1.22 (13 April 2004 - Slapyo) - duplicate posts problem fixed - fix for problem with ' appearing as \' Version 1.21 (12 April 2004 - Slapyo) - bot will not be subscribed to posts now Version 1.2 (11 April 2004 - Slapyo) - posts now inserted with build_new_post function Version 1.1 (28 March 2004 - wolfstream) - file edits taken down to 1 - cron script included Version 1.0 (28 January 2004 - Xyphen) - original release Common RSS Feeds: - Yahoo! - CNET.com - BBC - Wired News - The Register - Ars Technica - All Headline News Show Your Support
|
Comments |
#347
|
|||
|
|||
Quote:
What message should appear if you run it manually from the admincp? And where can I change that "View entire article"? |
#348
|
|||
|
|||
Would someone be able to help with this:
I'm getting the following errors whe I tr to run the schedule task: Warning: main(./rss.php): failed to open stream: No such file or directory in /homepages/4*/d********/htdocs/forum/admincp/cronadmin.php on line 56 Fatal error: main(): Failed opening required './rss.php' (include_path='.:/usr/local/lib/php') in /homepages/4*/d*******/htdocs/forum/admincp/cronadmin.php on line 56 This is what I have on line 56: require_once($nextitem['filename']); and I'm getting this on the rss.php: Fatal error: Call to undefined function: log_cron_action() in /homepages/4*/d********/htdocs/forum/Rss.php on line 7 Which is: log_cron_action('RSS News Feed Posted', $nextitem); Any Help would be appriciated |
#349
|
|||
|
|||
Quote:
|
#350
|
|||
|
|||
So does this work on 3.03? I'm thinking about installing, but want to be sure before I do!
|
#351
|
|||
|
|||
check to see if the BBC news feed changed their format. if they have that might be the cause of the problem.
@notorious, the only thing i can tell you is to double and triple check that you uploaded the files to the proper locations as well as made the proper file edits. @RS25.com, it should work on 3.03 ... as long as there are no major changes to the forum it should work on any 3.x i'm thinking. |
#352
|
|||
|
|||
@ slapyo
all I can say is that it fetched the first time data from "my" news feed and never since on 3.0.2. Not even when triggered manually from the admin center. Furthermore where can I change that text "View entire article?"? |
#353
|
||||
|
||||
i have the same problem with it not updating too.
i have tried 2 different feeds from the bbc news website and another feed from a different site. the first time you get the news it works very well, but it doesn't update anymore. i have checked the bbc feeds and they have been updated and i tried another feed with news on it and that didn't work at all. |
#354
|
|||
|
|||
hrm, i'm not sure. everything should be working fine as no major updates have been done to anything that would affect the script. i'll look at it some more.
@sjau, you can edit the View entire article in rss_update.php |
#355
|
|||
|
|||
Here's a workaround that I did to parse VB RSS2 streams (item titles with CDATA):
Open <forum dir>/includes/RSS/class.RSS.php (please backup original first) Look for: Code:
$channelCount = preg_match_all("|<channel>(.*)</channel>|iUs",$data,$channels,PREG_SET_ORDER); Code:
$channelCount = preg_match_all("|<channel*>(.*)</channel>|iUs",$data,$channels,PREG_SET_ORDER); Code:
if(preg_match_all("|<title>(.+)</title>|iUs",$itemData,$match,PREG_SET_ORDER)) { $title = $match[0][1]; $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "$title"; } else { $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = ""; } Code:
if(preg_match_all("|<title><\!\[CDATA\[(.+)\]\]></title>|iUs",$itemData,$match,PREG_SET_ORDER)) { $title = $match[0][1]; $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "$title"; } else { if(preg_match_all("|<title>(.+)</title>|iUs",$itemData,$match,PREG_SET_ORDER)) { $title = $match[0][1]; $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "$title"; } else { $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = ""; } } Code:
$itemCount = preg_match_all("|<item>(.*)</item>|iUs",$channelData,$items,PREG_SET_ORDER); Code:
$itemCount = preg_match_all("|<item*>(.*)</item>|iUs",$channelData,$items,PREG_SET_ORDER); Regards. |
#356
|
||||
|
||||
it seems to be only "BBC News" feeds that are not updating. i'm using a reuters feed now and it's working perfectly
|
#357
|
|||
|
|||
Hello,
First I'd like to thank everyone invoilved in this hack, very nice work. Secondly I have a question. I am using the hack flawlessly to post from a custom rss feed from my own site which delivers the entire article, not just a link to it. The problem is the bot delivers the article in one large block of text without formatting it onto paragraphs and line breaks. When the rss feed is viewed in a reader such as Sharpreader it formats fine. Is there any way to get this to format in a more user friendly fashion for those us of who actually have live rss feeds with the entire story inside them? If someone is willing to take a look I will PM the feed url to you as well as my site url. Thanks for your time. |
#358
|
|||
|
|||
you can PM me the feed if you like or you can just post it on here. i'm sure anyone that can help will.
|
#359
|
|||
|
|||
OK, thanks for the reply.
Rather than get into a PM exchange, I'll just post the info here since it may help others as well. :nervous: The site I run is Xbox Solution located at http://www.xboxsolution.com We have two rss feeds, one that will post a link and another that will write out the story. First RSS Feed (Link Only): http://www.xboxsolution.com/backend.php Second RSS Feed (Full Story):http://www.xboxsolution.com/index.rss I am using the second RSS feed for the bot - and all is well except that when the bot posts the story it posts everything in one block, no line breaks. If you point an rss reader such as Sharpreader to http://www.xboxsolution.com/index.rss you will see that the output is fine, with line breaks where needed, Just wondering if there is any way to resolve this. The forum that my bot posts in is here: http://talk.xboxsolution.com/forumdisplay.php?f=48 The bot's user ID is here: http://talk.xboxsolution.com/member.php?userid=28095 Thanks for the help! |
#360
|
|||
|
|||
here is where i ran into the same problem when coding this. i couldn't find out how to insert a breakline. everytime i put in /r/n it would actually put those characters into it. this was for inserting the description then 2 lines down putting the link. i had to come up with a work around for that.
Code:
Open up your replacement variable manager (in admincp -> styles & templates -> replacement variable manager) and add the following entry: Style: [select whichever style you are using] Search for text: {br} Replace with text: <br /> |
#361
|
|||
|
|||
looks like a kewl hack... i will giive it a try!!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|