Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
NEW Modified RSS News Feed Hack Details »»
NEW Modified RSS News Feed Hack
Version: 1.00, by Slapyo Slapyo is offline
Developer Last Online: Apr 2013 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 04-12-2004 Last Update: 06-22-2004 Installs: 146
 
No support by the author.

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 &quot; 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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #197  
Old 05-13-2004, 12:51 AM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure if this was the fix YET.. but I did notice something about code..

Code:
// filter out the old items
		while($rss_thread_data = $DB_site->fetch_array($rss_query)) {
			for($j = count($rss_allItems) - 1; $j >= 0; $j--) {
				if($rss_thread_data[title] == $rss_allItems[$j][TITLE] &&
				   $rss_thread_data[rss_date] == $rss_allItems[$j]['pubDate']) {
					$rss_allItems[$j][OLD] = true;
				}
			}
		}
Around pubDate there was NO ' ' so I put them in.. seems to be working.. but I'm still testing.. I'll post soon.. if you already know (cause your a php pro) that this isn't the solution.. please tell me.. cause I'm definately NOT a php pro..

Aceman

***UPDATE*** This did NOT fix my duplication problem. I'm getting ALOT of duplicated threads.. help me!
Reply With Quote
  #198  
Old 05-13-2004, 04:46 PM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Slapyo
... could you please check in phpMyAdmin and see if it is storing the data for the title with the &quot; or &apos; .... unfortunately i have not seen this in my news articles yet so i can't verify this.
I just checked my phpMyAdmin and this is how threads that are replicated are having their TITLES stored in the database.

New &quot;Mobile Console&quot; Plays PC Games

Does this help? is their a fix?

Certain threads ARE still duplicating.. and I reuploaded your files to my server again to make sure it wasn't something I'd screwed up. I'm using 1.25 as my version of PHP is higher then 4.3.0.

Aceman
Reply With Quote
  #199  
Old 05-13-2004, 05:45 PM
Slapyo Slapyo is offline
 
Join Date: Feb 2004
Location: Rancho Cucamonga
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ya ok, then it is what i think it is and this should be fixed by my update i am hoping. i made it fix the titles with " and ' in them instead of having &quot; or &apos; they will have " and ' .... here is the problem:

New &quot;Mobile Console&quot; Plays PC Games

does not equal

New "Mobile Console" Plays PC Games

when compared to each other the " and ' are not converted to &quot; or &apos; ... or vice versa. the literal strings do not match each other even though to me and you they are the same. let it run for a little bit on the new 1.25 and let me know if this fixes the problem with the multiple posts.
Reply With Quote
  #200  
Old 05-15-2004, 10:34 PM
P.Jackson P.Jackson is offline
 
Join Date: Sep 2003
Location: Newcastle,Uk
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any ideas why the thread and post count isnt updating in subforums?
Reply With Quote
  #201  
Old 05-17-2004, 02:35 AM
Slapyo Slapyo is offline
 
Join Date: Feb 2004
Location: Rancho Cucamonga
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it should. the newest version takes care of that. make sure you have the latest version. it updates on mine and i am running the same version i have uploaded here, no changes.
Reply With Quote
  #202  
Old 05-17-2004, 07:09 PM
P.Jackson P.Jackson is offline
 
Join Date: Sep 2003
Location: Newcastle,Uk
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any ideas why the bots post as different users now since upgrade? was working ok before..
Reply With Quote
  #203  
Old 05-17-2004, 11:33 PM
Slapyo Slapyo is offline
 
Join Date: Feb 2004
Location: Rancho Cucamonga
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

there were no changes in the code that has to do with making the post. all of that stayed the same, just quotes were changed and then it was recorded in the scheduled tasks log if you have it turned on. mine is still posting with the bot and nobody else and i use v1.25 off this upload.
Reply With Quote
  #204  
Old 05-18-2004, 03:53 PM
P.Jackson P.Jackson is offline
 
Join Date: Sep 2003
Location: Newcastle,Uk
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tried that and still messed up is posting from the user that views the thread yet its meant to post the news every hour only
Reply With Quote
  #205  
Old 05-19-2004, 01:28 AM
peterjun peterjun is offline
 
Join Date: Apr 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone help me trouble shoot this error message? I've installed per directons and when i run rss.php manually, I get this:

Warning: main(class.RSS.php): failed to open stream: No such file or directory in /home/peterjun/public_html/includes/RSS/rss_update.php on line 28

Fatal error: main(): Failed opening required 'class.RSS.php' (include_path='') in /home/peterjun/public_html/includes/RSS/rss_update.php on line 28

Interestingly, I also don't have the configuration panel (admincp -> hacks -> rss news feed) in my admincp and had to manually point my webpage to that php file. Thanks for any help!
Reply With Quote
  #206  
Old 05-19-2004, 02:57 AM
Slapyo Slapyo is offline
 
Join Date: Feb 2004
Location: Rancho Cucamonga
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did you make the file edits? there are 2 files that you have to edit. read the instructions.txt and you will see the files you need to edit and what changes need to be made.
Reply With Quote
  #207  
Old 05-19-2004, 03:54 PM
P.Jackson P.Jackson is offline
 
Join Date: Sep 2003
Location: Newcastle,Uk
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

fixed my prob slapya i hope
Reply With Quote
  #208  
Old 05-19-2004, 09:13 PM
Slapyo Slapyo is offline
 
Join Date: Feb 2004
Location: Rancho Cucamonga
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

everything running like it should now?
Reply With Quote
  #209  
Old 05-20-2004, 02:36 AM
peterjun peterjun is offline
 
Join Date: Apr 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Slapyo. I solved the problem with the admincp by editing the file.. I edited the other files, but still get the same error message.

Warning: main(class.RSS.php): failed to open stream: No such file or directory in /home/peterjun/public_html/includes/RSS/rss_update.php on line 28

Fatal error: main(): Failed opening required 'class.RSS.php' (include_path='') in /home/peterjun/public_html/includes/RSS/rss_update.php on line 28

I'll delve more, but was wondering if you knew any quick solutions.
Reply With Quote
  #210  
Old 05-20-2004, 12:25 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good job. I'm running this as a cron job on my server - I just removed the log cron action function from the rss.php file. It works well. Thanks!
Reply With Quote
  #211  
Old 05-20-2004, 02:19 PM
proxyMX's Avatar
proxyMX proxyMX is offline
 
Join Date: Jun 2002
Location: Seven of Nine is hot! :do
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mirdin
You'll have to ask your host to upgrade to a more recent version of PHP.

Or if you follow the link to the php function I posted before, it shows this code:

PHP Code:
// For users prior to PHP 4.3.0 you may do this:
function unhtmlentities($string
{
   
$trans_tbl get_html_translation_table(HTML_ENTITIES);
   
$trans_tbl array_flip($trans_tbl);
   return 
strtr($string$trans_tbl);
}

$c unhtmlentities($a);

echo 
$c// I'll "walk" the <b>dog</b> now

?> 
If upgrading PHP is not possible for you then you could try to replace the html_entity_decode function using this example.


By the way, has anyone managed to fix the double post issues? I have these issues with both yahoo and bbc feeds.
Sorry, call me stupid, but how do you actually get an RSS feed?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:06 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09347 seconds
  • Memory Usage 2,374KB
  • Queries Executed 30 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete