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
RSS News Feed Hack Details »»
RSS News Feed Hack
Version: 1.00, by Xyphen Xyphen is offline
Developer Last Online: Dec 2004 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-28-2004 Last Update: Never Installs: 34
 
No support by the author.

My friend made this hack, he owns http://www.liquidpro.net. Check him out.
You may contact him at liquidpro@neo.rr.com. Or you can IM him on AIM at LiquidPro10.

An example is shown at http://www.xtreme-forumz.net. Go to the Techno forum under the General category. Then the CNET News sub-forum.

RSS News Feed Hack for vB 3.0.0. 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!

Instructons:
Note: DON'T FORGET TO MAKE A BACKUP OF EACH FILE BEFORE YOU MODIFY IT!

Copy the files to your web server... keep the same directory structure as in the zip file.
Run the rss_install.php file to setup the RSS script.
If you're upgrading run the rss_upgrade.php file to setup the RSS script. Don't forget to remove all previous modifications (you can find them by searching for "LiquidPro")

#### open the /index.php script ####
Find this:

PHP Code:
require_once('./includes/functions_forumlist.php'); 
Add below it:

PHP Code:
require_once('./includes/RSS/rss_update.php'); 
#### open the /forumdisplay.php script ####
Find this:

PHP Code:
require_once('./includes/functions_forumdisplay.php'); 
Add below it:

PHP Code:
require_once('./includes/RSS/rss_update.php'); 
#### open the /admincp/index.php script ####

Find this:

PHP Code:
construct_nav_group("$vbphrase[styles] &amp; $vbphrase[templates]"'<hr />'); 
Add below it:

PHP Code:
// Manage Hacks
// by: Andrew Wickham
// LiquidPro Inc.
//
construct_nav_option('RSS News Feed''rss_admin.php''<br />');
construct_nav_group('Hacks');
//
// End Manage Hacks 
You're done, thanks for installing the hack.

Hack by: Andrew Wickham (http://www.liquidpro.net)
Hack for: Xtreme-Forumz (http://www.xtreme-forumz.net)

Show Your Support

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

Comments
  #2  
Old 01-29-2004, 05:21 AM
raxafarian raxafarian is offline
 
Join Date: Apr 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xyphen
My friend made this hack, he owns http://www.liquidpro.net. Check him out.
You may contact him at liquidpro@neo.rr.com. Or you can IM him on AIM at LiquidPro10.

An example is shown at http://www.xtreme-forumz.net. Go to the Techno forum under the General category. Then the CNET News sub-forum.

RSS News Feed Hack for vB 3.0.0 - RC2. 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!

Instructons:
Note: DON'T FORGET TO MAKE A BACKUP OF EACH FILE BEFORE YOU MODIFY IT!

The first thing that you have to do is upload the modifyTable.php file into the root directory (the directory that includes the forumdisplay.php) file. The next thing that you need to do is run the rss_modifyTable.php file, which will modify your SQL tables in order to make it complient with the RSS News Bot. Once you have successfully modified your tables, you should now open up the forumdisplay.php file in a regular text editor (such as Notepad).

Find the following in the forumdisplay.php file
Note: On an unmodified forumdisplay.php file this will be at line 416
PHP Code:
// get announcements
$announcebits '';
$announcements $DB_site->query("
SELECT
announcementid, startdate, title, announcement.views,
user.username, user.userid, user.usertitle, user.customtitle
FROM " 
TABLE_PREFIX "announcement AS announcement
LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = announcement.userid)
WHERE startdate <= " 
TIMENOW "
AND enddate >= " 
TIMENOW "
AND " 
fetch_forum_clause_sql($foruminfo['forumid'], 'forumid') . "
ORDER BY startdate DESC
iif($vboptions['oneannounce'], "LIMIT 1"));
while (
$announcement $DB_site->fetch_array($announcements))
{
if (
$announcement['customtitle'] == 2)
{
$announcement['usertitle'] = htmlspecialchars_uni($announcement['usertitle']);
}
$announcement['postdate'] = vbdate($vboptions['dateformat'], $announcement['startdate']);
if (
$announcement['startdate'] > $lastread)
{
$announcement['statusicon'] = 'new';
}
else
{
$announcement['statusicon'] = 'old';
}
$announcement['views'] = vb_number_format($announcement['views']);
$announcementidlink iif(!$vboptions['oneannounce'] , "&amp;announcementid=$announcement[announcementid]");
eval(
'$announcebits .= "' fetch_template('forumdisplay_announcement') . '";');

Once you have found that, put this immediately following it.

PHP Code:
// RSS News Feed Hack
// ------------------------------
// By: Andrew Wickham of
// LiquidPro Inc.
//
 
// get the rss settings
include("includes/rss_config.php");
 
// get the bot`s username
$rss_user_query $DB_site->query("SELECT * FROM " TABLE_PREFIX "user WHERE userid = '$rss_userid'");
$rss_user_data $DB_site->fetch_array($rss_user_query);
$rss_username $rss_user_data['username'];
$rss_posts $rss_user_data['posts'];
 
// display threads
if($forumid == $rss_forumid) {
$rss_data implode("",file($rss_source));
 
// include the RSS class
include($rss_pathToClass "/class.RSS.php");
$rss = new RSS($rss_data1);
$rss_allItems $rss->getAllItems();
// check and see what items are in the database, and mark the old ones as old
$rss_query $DB_site->query("SELECT * FROM " TABLE_PREFIX "thread WHERE rss_feed = '1'");
 
for(
$i 0$i count($rss_allItems); $i++) {
$rss_allItems[$i]['OLD'] = true;
}
 
// if there's no items in the database
if($DB_site->num_rows($rss_query) == 0) {
for(
$i 0$i count($rss_allItems); $i++) {
    
$rss_allItems[$i]['OLD'] = false;
}
}
 
// filter out the old items
while($rss_thread_data $DB_site->fetch_array($rss_query)) {
for(
$j 0$j count($rss_allItems); $j++) {
    if(
$rss_thread_data['title'] == $rss_allItems[$j]['TITLE'] && 
     
$rss_thread_data['rss_date'] == $rss_allItems[$j]['pubDate']) {
     
$rss_allItems[$j]['OLD'] = true;
    }
}
}
 
// insert the new items into the database
for($j 0$j count($rss_allItems); $j++) {
if(!
$rss_allItems[$j]['OLD']) {
    
// update the user profile
    
$rss_posts++;
 
    
$rss_title $rss_allItems[$j]['TITLE'];
    
$rss_dateline $rss_allItems[$j]['pubDate'];
    
$current_dateline time();
    
$rss_description $rss_allItems[$j]['DESCRIPTION'];
    
$rss_description .= "<br><br>[url="http://.%20$rss_allitems[$j]['link']%20./"]View the Entire Article[/url]\n";
 
    
$rss_title str_replace("&apos;""\'"$rss_title);
    
$rss_description str_replace("&apos;""\'"$rss_description);
 
    
// get the next available threadid
    
$rss_threadid_query $DB_site->query("SELECT * FROM " TABLE_PREFIX "thread ORDER BY threadid DESC");
    
$rss_threadid_data $DB_site->fetch_array($rss_threadid_query);
    
$rss_threadid $rss_threadid_data['threadid'] + 1;
 
    
// get the next available postid
    
$rss_postid_query $DB_site->query("SELECT * FROM " TABLE_PREFIX "post ORDER By postid DESC");
    
$rss_postid_data $DB_site->fetch_array($rss_postid_query);
    
$rss_postid $rss_postid_data['postid'] + 1;
 
    
$DB_site->query("INSERT INTO " TABLE_PREFIX "post (`threadid`, `username`, `userid`, `title`, `dateline`, `pagetext`, `allowsmilie`, `showsignature`, `visible`) VALUES ('$rss_threadid', '$rss_username', '$rss_userid', '$rss_title', '$current_dateline', '$rss_description', '1', '1', '1')");
    
$DB_site->query("INSERT INTO " TABLE_PREFIX "thread (`title`, `forumid`, `firstpostid`, `lastpost`, `open`, `postusername`, `postuserid`, `lastposter`, `dateline`, `visible`, `rss_feed`, `rss_date`) VALUES ('$rss_title', '$rss_forumid', '$rss_postid', '$current_dateline', '1', '$rss_username', '$rss_userid', '$rss_username', '$current_dateline', '1', '1', '$rss_dateline')");     
}
}
// update the posts in the database
$DB_site->query("UPDATE " TABLE_PREFIX "user SET posts = '$rss_posts' WHERE userid = '$rss_userid'"); 
}
 
//
// ------------------------------
// End of RSS News Hack 
Save your forumdisplay.php file

Open the rss_config.php file included with this zip, and edit the settings to your likings. Make sure you create the specified user or you'll have some major problems.

Copy the rss_config.php file to the "includes" directory on your server.

That's it for the hacking! For the thread you put this hack on, I suggest that you have it so that users other than the bot can't post new threads, only post replies. That way they can post comments on the news feed.

Hack by: Andrew Wickham (http://www.liquidpro.net)
Hack for: Xtreme-Forumz (http://www.xtreme-forumz.net)
I get this error on RC3:

PHP Code:
Database error in vBulletin 3.0.0 Release Candidate 3:

Invalid SQLINSERT INTO post (`threadid`, `username`, `userid`, `title`, `dateline`, `pagetext`, `allowsmilie`, `showsignature`, `visible`) VALUES ('155''Scuba NewsHound''16''Raich wins men's slalom in Alpine skiing World Cup', '1075360929', 'English.eastday.com Wed Jan 2804:02 am GMT<br><br>[url=http://english.eastday.com/epublish/gb/paper1/1161/class000100002/hwz179171.htm]View the Entire Article[/url]
', '1', '1', '1')
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '
s slalom in Alpine skiing World Cup', '1075360929', 'English.ea

mysql error number
1064

Date
Thursday 29th of January 2004 01:22:09 AM
Script
: [url]http://www.wildaboutscuba.com/forums/forumdisplay.php?f=102[/url] 
102 is the correct 'news' forum.
Reply With Quote
  #3  
Old 01-29-2004, 08:06 AM
ChrisSy ChrisSy is offline
 
Join Date: Mar 2002
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any chance of a screenshot? your board requires registration to view forums
Reply With Quote
  #4  
Old 01-29-2004, 08:27 AM
surfhog's Avatar
surfhog surfhog is offline
 
Join Date: Aug 2003
Location: England
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sounds really kool Xyphenscreenshot would be nice though please, seems a bit silly to me - signing up to a forum, just to view a modification. hehe! we spent all day signing up to boards and waisting everybodies time LOL

:tired:
Reply With Quote
  #5  
Old 01-29-2004, 09:01 AM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when your forum is closed for guests please provide a login for vB.org users or please make screenshots!

Like me many user wount register only to see the hack in action!

Greetings

Star
Reply With Quote
  #6  
Old 01-29-2004, 09:04 AM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well i just added a basic link to the external.php rss feed on my forum, had it vailadted first then just used that.

have a look on www.artorg.co.uk/index.php , i just added it to the portal
Reply With Quote
  #7  
Old 01-29-2004, 09:43 AM
Xyphen's Avatar
Xyphen Xyphen is offline
 
Join Date: Dec 2002
Location: ON, Canada
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

raxafarian thank you for the error update. This is probably because it's RC3. I notice that it's a single quote that's causing the problem. I'll download RC3 and look into it further. Thank you.

Everyone else: I attached a screen shot of it. Enjoy!
Reply With Quote
  #8  
Old 01-29-2004, 11:30 AM
sjau sjau is offline
 
Join Date: Apr 2003
Location: Switzerland
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would be nice to have it run on RC3...

One more thing:

what about the files in the /include/RSS folder?

You did not mention anything there.
Reply With Quote
  #9  
Old 01-29-2004, 12:19 PM
Xyphen's Avatar
Xyphen Xyphen is offline
 
Join Date: Dec 2002
Location: ON, Canada
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You create a folder called RSS in the includes folder, and then upload those files into it. The files in that are the main RSS class files.

And like I said, I'm going to download RC3 tonight and get it working for it also.
Reply With Quote
  #10  
Old 01-29-2004, 12:47 PM
raxafarian raxafarian is offline
 
Join Date: Apr 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xyphen
You create a folder called RSS in the includes folder, and then upload those files into it. The files in that are the main RSS class files.

And like I said, I'm going to download RC3 tonight and get it working for it also.
the problem is the apostrophe in the headline it was trying to grab....
Quote:
'Raich wins men's slalom in........
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 03:54 PM.


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.06496 seconds
  • Memory Usage 2,375KB
  • Queries Executed 23 (?)
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
  • (9)bbcode_php
  • (3)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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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