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
  #192  
Old 05-12-2004, 08:40 PM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a display problem when it comes to showing TITLES of threads created from the RSS from scifi.com

http://www.scifi.com/scifiwire/rss/index.xml

The threads titles appear like this:

&apos;Potter&apos; Designer Talks Challenges

THE ORGINAL TEXT IS: 'Potter' Designer Talks Challenges

Now I fixed my display problems in the thread with replacement for "&apos;" to " ' " and those are showing fine.. however the thread titles are not.. What can I do to fix this?

Aceman

Link to my news forum: http://www.scifi-meshes.com/forums/f...splay.php?f=90
Reply With Quote
  #193  
Old 05-12-2004, 08:46 PM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm a duffis.. I fixed it buy using the code you placed eariler:

$rss_title = str_replace("&apos;", "'", $rss_title);
$rss_description = str_replace("&apos;", "'", $rss_description);
Reply With Quote
  #194  
Old 05-12-2004, 11:37 PM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting duplicated threads when the rss runs on the hour. I checked the (scifi.com) rss link and it DOES have a pubdate.

<pubDate>Wed, 12 May 2004 12:26:39 EST</pubDate>

Yet I still have duplicates?? Any suggestions.
Reply With Quote
  #195  
Old 05-12-2004, 11:41 PM
Slapyo Slapyo is offline
 
Join Date: Feb 2004
Location: Rancho Cucamonga
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

newest version: 1.25 (PHP > 4.3.0) and 1.25a (PHP < 4.3.0)

this update fixes the problems with &quot; and it also will insert into the scheduled task log if you have it turned on ... atleast it should. heh, of course any problems let me know.

files changed are: rss.php and rss_update.php ... so if you want to make the changes yourself, or just upload those 2 files ... that's fine.

in rss.php FIND:
Code:
?>
ABOVE ADD:
Code:
log_cron_action('RSS News Feed Posted', $nextitem);
in rss_update.php FIND:
Code:
				// Setup the thread
ABOVE ADD:
Code:
$rss_title = str_replace("&quot;", "\"", $rss_title);
$rss_description = str_replace("&quot;", "\"", $rss_description);
$rss_title = str_replace("&apos;", "'", $rss_title);
$rss_description = str_replace("&apos;", "'", $rss_description);
Reply With Quote
  #196  
Old 05-12-2004, 11:50 PM
Slapyo Slapyo is offline
 
Join Date: Feb 2004
Location: Rancho Cucamonga
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Aceman
I'm getting duplicated threads when the rss runs on the hour. I checked the (scifi.com) rss link and it DOES have a pubdate.

<pubDate>Wed, 12 May 2004 12:26:39 EST</pubDate>

Yet I still have duplicates?? Any suggestions.
i think the problem lies within the &quot; and &apos; problem. if there is a " or ' in the title it is changed and then in the database it is checked.

" != &quot;
' != &apos;

so it thinks it's a new title and it then posts. 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.
Reply With Quote
  #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
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 02:05 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.06530 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
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
  • (5)bbcode_code
  • (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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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