View Full Version : RSS News Feed Hack
Xyphen
01-28-2004, 10:00 PM
My friend made this hack, he owns http://www.liquidpro.net (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 (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:
require_once('./includes/functions_forumlist.php');
Add below it:
require_once('./includes/RSS/rss_update.php');
#### open the /forumdisplay.php script ####
Find this:
require_once('./includes/functions_forumdisplay.php');
Add below it:
require_once('./includes/RSS/rss_update.php');
#### open the /admincp/index.php script ####
Find this:
construct_nav_group("$vbphrase[styles] & $vbphrase[templates]", '<hr />');
Add below it:
// 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 (http://www.liquidpro.net/))
Hack for: Xtreme-Forumz (http://www.xtreme-forumz.net (http://www.xtreme-forumz.net/))
raxafarian
01-29-2004, 05:21 AM
My friend made this hack, he owns http://www.liquidpro.net (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 (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
// 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'] , "&announcementid=$announcement[announcementid]");
eval('$announcebits .= "' . fetch_template('forumdisplay_announcement') . '";');
}
Once you have found that, put this immediately following it.
// 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_data, 1);
$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>View the Entire Article (http://.%20$rss_allitems[$j]['link']%20./)\n";
$rss_title = str_replace("'", "\'", $rss_title);
$rss_description = str_replace("'", "\'", $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 (http://www.liquidpro.net/))
Hack for: Xtreme-Forumz (http://www.xtreme-forumz.net (http://www.xtreme-forumz.net/))
I get this error on RC3:
Database error in vBulletin 3.0.0 Release Candidate 3:
Invalid SQL: INSERT 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 28, 04:02 am GMT<br><br>View the Entire Article (http://english.eastday.com/epublish/gb/paper1/1161/class000100002/hwz179171.htm)
', '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: http://www.wildaboutscuba.com/forums/forumdisplay.php?f=102
102 is the correct 'news' forum.
ChrisSy
01-29-2004, 08:06 AM
any chance of a screenshot? your board requires registration to view forums
surfhog
01-29-2004, 08:27 AM
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:
StarBuG
01-29-2004, 09:01 AM
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
colicab-d
01-29-2004, 09:04 AM
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 :p
Xyphen
01-29-2004, 09:43 AM
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!
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.
Xyphen
01-29-2004, 12:19 PM
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.
raxafarian
01-29-2004, 12:47 PM
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....
'Raich wins men's slalom in........
Sooner95
01-29-2004, 02:37 PM
this is a good idea... nice one. Hope this canbe made to work on the Gold version when its released...
raxafarian
01-29-2004, 05:03 PM
the problem is the apostrophe in the headline it was trying to grab....
turning magicquotes on took care of this problem. I got it to work with one feed, but most of what I can use are not ver.91. A few feeds seem to include image tags which makes them not function. Here is one of those:
http://p.moreover.com/cgi-local/page?feed=30770&o=rss
Xyphen
01-29-2004, 06:28 PM
Yea that'd fix it, because on my server it's not having a problem with apostrophe's in the titles. That example you posted isn't a very good news feed. Under the description it has the date and such, where my script is made to have the description as a short version of the article. I'd steer away from using that one, not to mention it doesn't have a pubdate field, so that'd cause some errors with the program.
I designed it with CNET News in mind.
an excellent looking hack m8 - would it be possible to expand it so that you can have different feeds posting in different forums?
Xyphen
01-29-2004, 07:26 PM
Hm, be a little more complicated and I'd have to convert it over to SQL based instead of file-based configuration. However, it could be done... I will look at that for the next version I put out (which will probably be here in the next couple weeks). Thanks for the input.
mitchjaz
01-29-2004, 09:23 PM
Looks great. I am anxious for it to ready for RC3
LLFan
01-29-2004, 09:47 PM
Got it working just fine, great hack.
1 question though, as posts have been made by the bot they are not upping the forum post count. I setup a new forum just for the rss feed but people will never be able to see when new news arrives unless they physically go into the forum. Is there a fix?
Xyphen
01-30-2004, 01:13 AM
Well, I could, but it'd slow down your load time for the main page. You'd have to be willing to sacrifice that.
raxafarian
01-30-2004, 01:18 AM
by the way... I got that feed working. I had to delete the two RSS entries in the thread table, then reinstall them.
Seems to be working well
thanks
LLFan
01-30-2004, 01:58 AM
Well, I could, but it'd slow down your load time for the main page. You'd have to be willing to sacrifice that.
Please explain...how would this slow down the load time?
Serge
01-30-2004, 03:08 AM
Great idea. I would think maybe a cron script would be better? You could make it so it would check the feed and make a new post everytime something new came?
I don't know about that I was just thinking out loud maybe I will try and see what I can do.
Xyphen
01-30-2004, 09:56 AM
LLFan, I mean... that every time someone loaded the main page it would have to access an outside source (the RSS news feed) and check if there's any new updates
mitchjaz
01-30-2004, 01:39 PM
I'm running vb3 RC3. I get a mysql error due to the apostrope's in tome headlines. If I turn on magic quotes,that conflicts with other programs on my site. Is there a way to get around this? Maybe with .htaccess?
Xyphen
01-30-2004, 06:28 PM
Hm, I'm not entirely sure, I don't do much with .htaccess. Maybe there's some work-around for it. I'll look into that.
Also, do you guys mind posting the URLs that you are using it on? I'd like to see it in action as a user, not the creator.
When does the script now update the RSS feed?
Xyphen
01-30-2004, 11:21 PM
It now updates it only when you visit the specified forum. I re-wrote it tonight, and I'm going to release it probably tomorrow evening, v1.1. It has Admin Panel support now too, so it'll be a lot easier.
raxafarian
01-30-2004, 11:26 PM
It now updates it only when you visit the specified forum. I re-wrote it tonight, and I'm going to release it probably tomorrow evening, v1.1. It has Admin Panel support now too, so it'll be a lot easier.
I'm pretty sure this is due to the crappy feed I posted above, but mine will not update. If I remove the two 'rss' tables and reinsert them, it pulls new headlines. If not, it doesn't do anything.
Also changing to another feed won't update...I still need to blow those 2 entries away and put them back.... then the new feed works... once.
mitchjaz
01-31-2004, 03:05 AM
If anyone knows a workaround so it can operate with magic quotes turned off, that would be great. Also, the ability to receive image tags would be a nice feature for later as well. Here's a feed from the front of my site that I pipe in via RSS through vbindex and a server side include.
http://www.dphoto.us/forum/index.php?section=digital_camera_news
techglitch
01-31-2004, 05:35 AM
What about doing multi feeds for multi forms? For those who want to categorize more feeds..
Xyphen
01-31-2004, 02:47 PM
Thanks for all the input guys. And the multi-feeds and multi-forms thing is going to be included in v1.1. I like the idea, that was the original plan but I decided not to do it for some reason. About the <img> tag. You'd have to make sure that your forum allows you to post HTML tags, or it won't work, just for future reference.
I'm pretty sure this is due to the crappy feed I posted above, but mine will not update. If I remove the two 'rss' tables and reinsert them, it pulls new headlines. If not, it doesn't do anything.
Also changing to another feed won't update...I still need to blow those 2 entries away and put them back.... then the new feed works... once.
The same happens for me. I installed it yesterday and it got those news:
Bewertung Thema / Autor Letzter Beitrag Antworten Hits
Free-software guru meets Indian president
News-Bot Gestern 20.53
von News-Bot 0 1
Sun urges Eclipse to unify Java world
News-Bot Gestern 20.53
von News-Bot 0 1
Dutch judge blocks Lindows over trademark issue
News-Bot Gestern 20.53
von News-Bot 0 1
Week in review: Virus king
News-Bot Gestern 20.53
von News-Bot 0 1
Lindows offers software for free over P2P
News-Bot Gestern 20.53
von News-Bot 0 1
But nothing since then.
Maybe instead of making it update when the forum is visited that you can set a cron to do the update like every 15 min.
If you write an admin panel it would be great if you could choose like update when the forum is visited OR every xxx min.
Xyphen
01-31-2004, 09:57 PM
OK, v1.1's official out! It's updated as of right now, support for v1.0 is no longer.
*download*
Would it be possible to add the RSS-Bot postings also to the posting counts?
wolfstream
02-01-2004, 07:36 AM
hmm, no updates?
Seems that I cant get a single update, no matter how often I visit the forum.
I entered one rss feed in, checked the forum and it was fine. After entering the second in though, it didn't do anything at all.. I thinks this is (almost) a decent hack, but it needs some other method of updating things.
Sure, I could delete and recreate it, but that'd make no sense now. SO, what seems to be the problem here?
Wolfstream, download the version 1.1. With that the update works when you visit the forum.
AddOn:
Some Google RSS Feeds can be found here
http://googlenews.74d.com/
Using right now the one from Google Germany:
http://wsjb78.com/forums/forumdisplay.php?f=2
wolfstream
02-01-2004, 07:58 AM
Wolfstream, download the version 1.1. With that the update works when you visit the forum.
AddOn:
Some Google RSS Feeds can be found here
http://googlenews.74d.com/
Using right now the one from Google Germany:
http://wsjb78.com/forums/forumdisplay.php?f=2
Unless there's ANOTHER version of this floating around somewhere, I've already got it downloaded. It just doesn't work, go figure. I downloaded the zip, nothing is updating at all.
It's not the RSS, it's impossible for every feed I try to actually not work, really. The feeds are great, the hack doesn't work from what I've seen.
When did you download it? Xyphen added this night (for me) the version 1.1... something like 12h ago...
If you've downloaded your version before that you're still using the old one. :)
Do you have in your Admin CP a new Nav entry for the RSS Feeds? If not you're using the old version.
wolfstream
02-01-2004, 10:18 AM
Again,
I know how to read. The file I'm using IS the latest version but does NOT work, no matter what the author claims. I've yet to see the results from the second feed, and the first just hasn't even left the first day (though it's been less than 6 hours ).
Ups, wolfstream you're right. It's not updating for me either.
I was sure this morning when I got up that there were more entries than when I installed it this night.
Xyphen
02-01-2004, 06:20 PM
Guys, make sure you have the bots enabled! If they're not enabled they will not update. It works for me on my forum and on my testing forum. I came up with a fix for the single quotes problem, I will update the main post in a little bit for it.
Also, please note that news updates aren't in the exact order that they are on the news feed, this is due to the XML parsing. Anyways, all news updates that are on the news feed, will be on the forum... just in a different order. If all else fails, disable the rss feed. Then delete all news. Then re-enable it.
Hmmm, I have enabled the bot as well as the RSS-feeds themselves.
I've just checked the current xml file that will be retrieved and it contains a few items that are not being displayed.
The current xml file:
<?xml version="1.0"?>
<rss version="0.92">
<channel>
<title>Google Deutschland</title>
<link>http://news.google.com/news/de/de/nation.html</link>
<description>Google Deutschland, updated every 15 minutes</description>
<item>
<title>K?lnerin ist Deutschlands Sch?nste (K?lnische Rundschau)</title>
<link>http://www.rundschau-online.de/kr/page.jsp?ksArtikel.id=1074875540282&listID=1038839 602120&openMenu=&calledPageId=1039082845263</link>
<description>RUST / K?LN. Damit habe ich absolut nicht gerechnet! Claudia Hein sagt dies im Oktober, als sie nach ihrer Wahl zur Miss K?ln die Lokalredaktion der K?lnischen Rundschau besucht. Nicht anders ?u?ert sich die 24-J?hrige Mitte Januar: ...</description>
</item>
<item>
<title>Beratervertr?ge der Ministerien im Visier (K?lnische Rundschau)</title>
<link>http://www.rundschau-online.de/kr/page.jsp?ksArtikel.id=1074875540248&listID=1037966 282302&openMenu=&calledPageId=1039082845263</link>
<description>BERLIN. Nach der Aff?re bei der Bundesagentur f?r Arbeit (BA) und der Entlassung von Beh?rdenchef Florian Gerster sind die gesamten Beratervertr?ge der Bundesregierung in den Blickpunkt ger?ckt. Der Bundesrechnungshof habe die Absicht, die ...</description>
</item>
<item>
<title>Vorsichtige Ann?herung im Streit ?ber das Zuwanderungsgesetz (Reuters Deutschland)</title>
<link>http://www.reuters.de/newsPackageArticle.jhtml?type=politicsNews&storyID =449853&section=news</link>
<description>Beide Seiten signalisierten am Wochenende bei Kernstreitpunkten Kompromissbereitschaft. Die Union lie? erkennen, dass sie nicht mehr unter allen Umst?nden darauf beharrt, dass der Anwerbestopp f?r ausl?ndische Arbeitskr?fte generell bestehen bleibt. </description>
</item>
<item>
<title>Eichel rechnet 2004 mit geringerem Staatsdefizit (Reuters Deutschland)</title>
<link>http://www.reuters.de/newsPackageArticle.jhtml?type=economicsNews&storyI D=449780&section=news</link>
<description>Berlin (Reuters) - Bundesfinanzminister Hans Eichel (SPD) rechnet im laufenden Jahr mit einem geringeren Staatsdefizit als bislang angenommen. </description>
</item>
<item>
<title>BA-Vorstand Weise verteidigt sich gegen Vorw?rfe (Reuters Deutschland)</title>
<link>http://www.reuters.de/newsPackageArticle.jhtml?type=politicsNews&storyID =449827&section=news</link>
<description>Berlin (Reuters) - Der Finanzvorstand der Bundesagentur f?r Arbeit (BA), Frank-J?rgen Weise, hat Vorw?rfe zur?ckgewiesen, er habe ein f?r den inzwischen entlassenen BA-Chef Florian Gerster entlastendes Papier zur?ckgehalten. </description>
</item>
<item>
<title>Ber?hrt vom Flei? der Afghanen Bundeswehr als Friedensh?ter in Kundus (Westfalenpost)</title>
<link>http://www.westfalenpost.de/wp/wp.politik.volltext.php?kennung=on4wpPOLWelNationa l38017&zulieferer=wp&kategorie=POL&rubrik=Welt&reg ion=National&auftritt=WP&dbserver=1</link>
<description>Kundus. (dpa) Die Kinder stehen winkend am Stra?enrand und strahlen. Sie stehen in der K?lte barfu? im Schlamm. Viele werden nicht ?berleben, wissen die Soldaten, die seit Oktober das deutsche Wiederaufbauteam (PRT) in der nordafghanischen Provinz ...</description>
</item>
<item>
<title>Blutige Terrorserie zum Beginn des Opferfestes (Spiegel Online)</title>
<link>http://www.spiegel.de/politik/ausland/0,1518,284560,00.html</link>
<description>Eine regelrechte Kaskade von Selbstmordanschl?gen, Bombenexplosionen und Raktenangriffen hat heute weit mehr als 100 Menschen im Irak get?tet. Die verheerendsten Attacken richteten sich gegen B?ros kurdischer Parteien im Nordirak - dabei starben ...</description>
</item>
<item>
<title>Stichwort: W?chterrat (Deutsche Welle)</title>
<link>http://www.dw-world.de/german/0,3367,1491_A_1102079_1_A,00.html</link>
<description>In der Islamischen Republik Iran, in der Geistliche auch an den Schalthebeln der politischen Macht sitzen, ist der W?chterrat ein m?chtiges Kontrollorgan. </description>
</item>
<item>
<title>Ausstellung ?ber Chagall und Deutschland im J?dischen Museum (Deutsche Welle)</title>
<link>http://www.dw-world.de/german/0,3367,1534_A_1102282_1_A,00.html</link>
<description>Im J?dischen Museum Frankfurt ist von Montag (2.2.2004) an eine Ausstellung ?ber das schwierige Verh?ltnis der Deutschen zu dem Maler Marc Chagall zu sehen. Die Schau "Verehrt und Verfemt - Chagall in Deutschland" ist bis 18. April zu sehen. In der ...</description>
</item>
<item>
<title> Mydoom " ?berrennt SCO - Server (Handelsblatt)</title>
<link>http://www.handelsblatt.com/pshb/fn/relhbi/sfn/buildhbi/cn/GoArt!200104,204016,708795/SH/0/depot/0/</link>
<description>Der Computervirus Mydoom" hat es geschafft: Er legte am Sonntag wie bef?rchtet die Website des US-Softwareunternehmens SCO lahm. Der Angriff mit Millionen sinnloser E-Mails setzte den Server der Firma schachmatt. </description>
</item>
<item>
<title>PDS will endlich wieder geil sein (taz)</title>
<link>http://www.taz.de/pt/2004/02/02/a0128.nf/text.ges,1</link>
<description>Aber wie anstellen? Mit dem Kampf f?r ein anderes, soziales Europa? Parteichef Lothar Bisky nutzt den Europaparteitag, um den Genossen Selbstgerechtigkeit vorzuwerfen. Sahra Wagenknecht k?mpft sich im Gegenzug auf die Europaliste der Partei ...</description>
</item>
<item>
<title>Todesopfer und schwere Sch?den nach Sturm (K?lnische Rundschau)</title>
<link>http://www.rundschau-online.de/kr/page.jsp?ksArtikel.id=1074857221434&listID=1037966 279508&openMenu=&calledPageId=1039082845263</link>
<description>Hamburg - Nach orkanartigen B?en in Teilen Deutschlands am Wochenende wird es in den n?chsten Tagen fr?hlingshaft mild. Bis zu 17 Grad sagen die Experten des Wetterdienstes Meteomedia zur Wochenmitte voraus. Sturmtief "Queenie", das in der Nacht zum ...</description>
</item>
<item>
<title>Reformen ohne Hin und Her (n-tv)</title>
<link>http://www.n-tv.de/5210316.html</link>
<description>In der Regierungskoalition gibt es weiter Unstimmigkeiten, wie schnell Reformen in Deutschland angegangen werden sollen. Au?enminister Joschka Fischer und andere f?hrende Gr?nen-Politiker sprachen sich daf?r aus, am Reformkurs festzuhalten. Dagegen ...</description>
</item>
<item>
<title>200 Menschen nach Schiffsungl?ck vermisst (Die Welt (Abonnement))</title>
<link>http://www.welt.de/data/2004/02/01/231474.html</link>
<description>?berladene F?hre geriet auf dem Kongo in Brand und sank. Passagiere k?nnten alleine weitergereist oder ums Leben gekommen sein ...</description>
</item>
<item>
<title>KOMMENTAR: Reformern auf die Finger blicken (K?lnische Rundschau)</title>
<link>http://www.rundschau-online.de/kr/page.jsp?ksArtikel.id=1074875540326&listID=1038816 894055&openMenu=1038816891802&calledPageId=1038816 891802</link>
<description>Das hat gerade noch gefehlt: Die Kultusministerkonferenz wird ?ber den Vorschlag beraten, die Verantwortung f?r die Weiterentwicklung der Rechtschreibreform auf die beim Institut f?r Deutsche Sprache in Mannheim angesiedelte Zwischenstaatliche ...</description>
</item>
<item>
<title>Chemische Keule f?r Koch (taz)</title>
<link>http://www.taz.de/pt/2004/02/02/a0200.nf/text.ges,1</link>
<description>So viel Unverfrorenheit war selten und so viel Sturheit noch dazu. Auf der einen Seite setzt sich der hessische Ministerpr?sident Roland Koch (CDU) vehement f?r den Erhalt der Arbeitspl?tze bei Aventis ein und warnt vor der ?bernahme der Pharmafirma ...</description>
</item>
<item>
<title>244 Pilger sterben bei Opferfest (taz)</title>
<link>http://www.taz.de/pt/2004/02/02/a0116.nf/text.ges,1</link>
<description>MINA/SAUDI-ARABIEN ap/dpa Eine Massenpanik w?hrend der muslimischen Pilgerfahrt Hadsch hat gestern mindestens 244 Menschen das Leben gekostet, etwa genau so viele wurden verletzt. Die Menschen wurden w?hrend der symbolischen Steinigung der Versuchung ...</description>
</item>
<item>
<title>Druck auf Unionsf?hrung in Bundespr?sidenten-Debatte h?lt an (Reuters Deutschland)</title>
<link>http://www.reuters.de/newsPackageArticle.jhtml?type=politicsNews&storyID =449806&section=news</link>
<description>Berlin (Reuters) - In der Union h?lt der Druck auf die Parteif?hrung an, einen eigenen Kandidaten f?r das Amt des Bundespr?sidenten zu nominieren. </description>
</item>
<item>
<title>CSU zu weiterem Steuer-Zugest?ndnis an die CDU bereit Zweite Zusammenfassung (Solms-Braunfelser)</title>
<link>http://www.solms-braunfelser.de/ap/apnews.php?code=20040201APD7201</link>
<description>Berlin (AP) Im Streit der Union ?ber ihr gemeinsames Steuerkonzept ist die CSU zu einem weiteren umfassenden Zugest?ndnis an die CDU bereit. Unmittelbar vor der Verabschiedung des CSU-Modells am (morgigen) Montag im Parteivorstand machte der bayerische ...</description>
</item>
<item>
<title>Chinesische Asylbewerberin Mutter des M?dchens (Spiegel Online)</title>
<link>http://www.spiegel.de/panorama/0,1518,284491,00.html</link>
<description>Die Mutter des neugeborenen M?dchens, das ein Spazierg?nger tot in einem Bach gefunden hatte, ist identifiziert. Nach der Geburt war sie einen Freund besuchen gegangen. </description>
</item>
</channel>
</rss>
Missing items on the board:
<item>
<title>Ber?hrt vom Flei? der Afghanen Bundeswehr als Friedensh?ter in Kundus (Westfalenpost)</title>
<link>http://www.westfalenpost.de/wp/wp.politik.volltext.php?kennung=on4wpPOLWelNationa l38017&zulieferer=wp&kategorie=POL&rubrik=Welt&reg ion=National&auftritt=WP&dbserver=1</link>
<description>Kundus. (dpa) Die Kinder stehen winkend am Stra?enrand und strahlen. Sie stehen in der K?lte barfu? im Schlamm. Viele werden nicht ?berleben, wissen die Soldaten, die seit Oktober das deutsche Wiederaufbauteam (PRT) in der nordafghanischen Provinz ...</description>
</item>
<item>
<title>Stichwort: W?chterrat (Deutsche Welle)</title>
<link>http://www.dw-world.de/german/0,3367,1491_A_1102079_1_A,00.html</link>
<description>In der Islamischen Republik Iran, in der Geistliche auch an den Schalthebeln der politischen Macht sitzen, ist der W?chterrat ein m?chtiges Kontrollorgan. </description>
</item>
<item>
<title>PDS will endlich wieder geil sein (taz)</title>
<link>http://www.taz.de/pt/2004/02/02/a0128.nf/text.ges,1</link>
<description>Aber wie anstellen? Mit dem Kampf f?r ein anderes, soziales Europa? Parteichef Lothar Bisky nutzt den Europaparteitag, um den Genossen Selbstgerechtigkeit vorzuwerfen. Sahra Wagenknecht k?mpft sich im Gegenzug auf die Europaliste der Partei ...</description>
</item>
<item>
<title>KOMMENTAR: Reformern auf die Finger blicken (K?lnische Rundschau)</title>
<link>http://www.rundschau-online.de/kr/page.jsp?ksArtikel.id=1074875540326&listID=1038816 894055&openMenu=1038816891802&calledPageId=1038816 891802</link>
<description>Das hat gerade noch gefehlt: Die Kultusministerkonferenz wird ?ber den Vorschlag beraten, die Verantwortung f?r die Weiterentwicklung der Rechtschreibreform auf die beim Institut f?r Deutsche Sprache in Mannheim angesiedelte Zwischenstaatliche ...</description>
</item>
<item>
<title>Chemische Keule f?r Koch (taz)</title>
<link>http://www.taz.de/pt/2004/02/02/a0200.nf/text.ges,1</link>
<description>So viel Unverfrorenheit war selten und so viel Sturheit noch dazu. Auf der einen Seite setzt sich der hessische Ministerpr?sident Roland Koch (CDU) vehement f?r den Erhalt der Arbeitspl?tze bei Aventis ein und warnt vor der ?bernahme der Pharmafirma ...</description>
</item>
<item>
<title>244 Pilger sterben bei Opferfest (taz)</title>
<link>http://www.taz.de/pt/2004/02/02/a0116.nf/text.ges,1</link>
<description>MINA/SAUDI-ARABIEN ap/dpa Eine Massenpanik w?hrend der muslimischen Pilgerfahrt Hadsch hat gestern mindestens 244 Menschen das Leben gekostet, etwa genau so viele wurden verletzt. Die Menschen wurden w?hrend der symbolischen Steinigung der Versuchung ...</description>
</item>
I'd really love to get those feeds starting. Could I eventually give you access to the server and you check it out?
Thx in advance,
sjau
wolfstream
02-02-2004, 12:02 AM
Same here. As soon as I removed these, the 1st came up again. Now, see, that's not something that should have to be done. There's most definitely a problem with this somewhere.
Xyphen
02-03-2004, 02:19 AM
Yea, guys... I'm definitely checking that out. I just started having the same problem as well on my test board. I'm releasing v2.0 very soon. I had a friend write his own XML parsing class for this, which will allow you to specify what the date field is, because some feeds use "pubdate" and others use "date" and so forth, so there's going to be some more added. Not to mention I'm fixing the quotes and approstrophe's problem. Sorry for the hold up.
wolfstream
02-03-2004, 02:29 AM
You might want to consider looking into the multi-feed support issue too. i don't know if that's wrapped up in the same thing or what, but it could very well be.
I'm just playing now with the idea of using a vB cron for periodic update of the feeds. I tend to think that on larger boards it's not a good idea to query the RSS file like ever 10-20 seconds just when someone goes in the according forum. I guess you could end up your IP being blocked!
Btw,
I'm just studying your code now and I just made the comparison between old entries and new RSS items visible by having the array values displayed.
Array display function:
function displayArray($aArray) {
if (is_array($aArray) && (count($aArray) > 0)) {
print("<table border=1>");
print("<tr><th>Key</th><th>Value</th></tr>");
foreach ($aArray as $aKey => $aValue) {
print("<tr>");
if (!is_array($aValue)) {
if (empty($aValue)) {
print("<td>$aKey</td><td><i>$aValue</i></td>");
} else {
print("<td>$aKey</td><td>$aValue</td>");
}
} else {
print("<td>$aKey(array)</td><td>");
displayArray($aValue);
print("</td>");
}
print("</tr>");
}
print("</table>");
} else {
print("<i>empty or invalid</i>");
}
}
Altered code:
// if there's no items in the database
if($DB_site->num_rows($rss_query) == 0) {
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = false;
}
}
displayArray($rss_allItems);
// filter out the old items
$rss_thread_data = $DB_site->fetch_array($rss_query);
while($rss_thread_data = $DB_site->fetch_array($rss_query)) {
for($j = count($rss_allItems) - 1; $j >= 0; $j--) {
$rss_thread_data2[$j][title] = $rss_thread_data[title];
$rss_thread_data2[$j][rss_date] = $rss_thread_data[rss_date];
}
}
echo "<br><br>";
displayArray($rss_thread_data2);
And the rest is all commented out.
The result I'm getting is that:
- No date is set
it seems that the database still should be filled...
Looking more into this matter :)
http://wsjb78.com/forums/
Edit: I know my code is not quite right yet to display them accordingly
Actually forget all of the above settings. I found the problem:
Change this in your /forum/includes/RSS/rss_update.php:
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = true;
}
To that:
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = false;
}
KuraFire
02-03-2004, 11:54 AM
I'm just playing now with the idea of using a vB cron for periodic update of the feeds. I tend to think that on larger boards it's not a good idea to query the RSS file like ever 10-20 seconds just when someone goes in the according forum. I guess you could end up your IP being blocked!
Yup, many sites, especially larger ones, will block your IP (some do it for an hour, some for a day, some for a week, others permanently until you contact them) if you make more than one request per 30 / 60 minutes.
So having it fetch the XML/RSS feeds every time the forum page is loaded is Really likely to get your server ip banned from that xml/rss feed. And then you'll be complaining here that it doesn't work and cause insanity for poor Xyphen who's going through his code to see why that is ;)
I think I've found the problem. Posted it into my previous post (didn't see KuraFire did already add another post).
Ok, I've tested this now several times and my modification seems to work without problems.
Further more I did remove the require code from the index.php and forumdisplay.php and copied the supplied two rss files from ./includes/RSS to ./includes/cron and setup a cron for them.
It seems that works also.
Xyphen
02-03-2004, 07:46 PM
Yes, that definitely seemed to be a problem... in v2.0 there's a completely new RSS class, so that problem is definitely fixed. I see what you mean about the CRON job and such, I will look into it.
KuraFire
02-03-2004, 08:02 PM
Cron job is much safer and nicer to do this with :)
NuclioN
02-03-2004, 08:36 PM
Is there a way to pull the news from RSS into the postbit itself when you click a link? I've seen it before but i don't know how they do that.
Xyphen:
I have another three things in mind:
1.) Add in the admin section a name to each feed so that you only have to create one user-bot but you can distinguish them by the name given in the AdminCP and the name given in the AdminCP should then also be used as username when wwriting data to mysql.
e.g. I currently pull data from NZZ Online, from NZZ Wirtschaft, 20min Ausland, AltaVista and Google.de
I currently have for each news service another user setup but I think I should be able to do it with one user only that can be distinguished in the admin and forum section.
2.) You use in in code "<br><br>" do make row breaks. Maybe you could check whether on this board HTML is enabled and if not use "\n\n" instead and "View full article" could be a phrase so that it can be translated easily into other languages.
3.) Increase forum counts when news are added and decrease forum counts when they are deleted.
Maybe adding also a feature that deletes news older than xx days.
Anyway, great work so far and I would help you out but my skills aren't as advanced as yours although I'm learning.
wolfstream
02-04-2004, 07:47 AM
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = false;
}
That fixed the problem right up, indeed.
Now, there are a couple more things that are issues. For one there's no check for mysql_escape_string which will be bad if you actually grab rss feeds from, say a site that uses " or '. I've already run into this one tonight;
Fix:
In includes/RSS/rss_update.php, look for
$rss_title = str_replace("'", "\'", $rss_title);
$rss_description = str_replace("'", "\'", $rss_description);
and change it to:
$rss_description=mysql_escape_string($rss_descript ion);
$rss_title=mysql_escape_string($rss_title);
// $rss_title = str_replace("'", "\'", $rss_title);
// $rss_description = str_replace("'", "\'", $rss_description);
Essentially, this is the same thing, but for some reason the replace ' doesn't work as it should, in the longrun. I noticed this when I got feedback from the next script which I'll post:
In response to the cron thing, it's really a simple thing to do (until this is officially added to the cron somehow). Create a file in your public_html, call it rssfeed.php (or whatever), and in it, just add:
<?
require_once('./global.php');
require_once('./includes/functions_bigthree.php');
require_once('./includes/functions_forumlist.php');
require_once('./includes/RSS/rss_update.php');
?>
and for a cron entry, just call
*/5 * * * * php /path/to/your/file/rssfeed.php
This will update the news feeds every 5 minutes, rather than every time someone visits the forum, which would be more efficient. 5 minutes may (still) be too much, but I doubt it.
BTW, i've integrated this into vbadvanced, for those wanting info on how, let me know and if there's enough interest I'll post it here.
As far as forums and counts, I agree this is something that shouldn't be updated. However, if you (really) want to update your forums and posts, having this count in them, you can update your postcounts from admincp. This will fix that problem. Hopefully, I'll be able to come up with a workaround for that in the near future, but who knows.
Great code, glad to see it finally working!!
wsjb78
02-04-2004, 08:01 AM
I'd be interested to know how you did that integrate into vbAdvanced. I've installed now vbIndex 3.0.x and also vbAdvanced but I only have troubles with certain things in vbIndex so I assumbe I'll stick to vBadvanced.
Btw, my code change (true --> false) was quite simple if you look at the logic of what is approved and not. I was looking first at the wrong spot either but basically if you set it to "true" it marks all fetched news items from the feed as [old], then if there are no items in the db it markes them all as [new], and then it fetches the items from the database and marks duplicate entries as [old] (which they already were).
Regarding the Cron:
How does it work? Those vB crons aren't really added to the system crontab right?
Does it check everytime when a vB page is called whether one of the specified crons if overdue and then execute it?
wolfstream
02-04-2004, 08:15 AM
I'll get together tonight or in the next couple of days and put a hack together. It certainly wasn't a 3 or 4 line edit and I'm almost positive I missed something in there. Once I'm sure it works, I'll post it.
As far as cron, it's not added to the user's crontab (vbulletin isn't), no. In fact, I'd bet you'd run into the same problem there too, because it is called every time the page updates, so your best answer would be to create the file and call it via cron however often you want it to. I'm only a beginning hack however (as far as vb is concerned), haven't played with the cron stuff too much (yet).
you're code works fine :)
mcyates
02-07-2004, 08:33 PM
Where can i find news feeds for soccer/football
mcyates
02-08-2004, 08:10 AM
When the news is updating i always get this error. Obviously with a different storyline.
Database error in vBulletin 3.0.0 Release Candidate 4:
Invalid SQL: INSERT INTO post (`threadid`, `username`, `userid`, `title`, `dateline`, `pagetext`, `allowsmilie`, `showsignature`, `visible`) VALUES ('21596', 'News Poster', '3137', 'Stevenage 0-1 Telford', '1076235015', 'Stevenage's hopes of closing the gap on the play-off places suffered a blip as they crashed 1-0 at home to Telford.<br><br>View the Entire Article (http://news.bbc.co.uk/go/click/rss/0.91/public/-/sport2/hi/football/eng_conf/3447699.stm)
', '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 hopes of closing the gap on the play-off places suffered a bl
mysql error number: 1064
Date: Sunday 08th of February 2004 05:10:18 AM
Script: http://www.myfootballforum.com/forumdisplay.php?f=318
Referer: http://www.myfootballforum.com/index.php?
Username: boro_boy
IP Address: 62.254.64.9
mcyates
02-08-2004, 08:32 AM
now my sites, stopped working. I'm running RC4
wsjb78
02-08-2004, 08:43 AM
RC4 is already out? Hmmm......
It works for me on RC3... however not the auto-update yet...
mcyates
02-08-2004, 09:27 AM
yeah, well it does say Powered by: vBulletin Version 3.0.0 Release Candidate 4 at the bottom of my forum.
Natch
02-10-2004, 01:39 AM
yeah, well it does say Powered by: vBulletin Version 3.0.0 Release Candidate 4 at the bottom of my forum.
Damn - this is great - thanks to all those who have helped to get this thing so slick :) :)
Once I have a new bot installed and configured to run this thing, it's gonna make news gathering so damn simple :) w00taH!
It was the alistapart.com RSS feed that brought this to the fore for me - so thanks to all involved :) the alterations sugegsted, and the cron job tips have made this just awesome :)
* Natch does the dance of the jubilant monkey
Giveit2u43
02-12-2004, 01:51 AM
quick fix for threadcounts.. find:
$DB_site->query("UPDATE " . TABLE_PREFIX . "forum SET lastpost = '$current_dateline', lastposter = '$rss_username', lastthread = '$rss_title', lastthreadid = '$rss_threadid' WHERE forumid = '$rss_forumid'");
and replace with:
$DB_site->query("UPDATE " . TABLE_PREFIX . "forum SET threadcount = threadcount + 1,lastpost = '$current_dateline', lastposter = '$rss_username', lastthread = '$rss_title', lastthreadid = '$rss_threadid' WHERE forumid = '$rss_forumid'");
killervette
02-12-2004, 01:28 PM
Doesnt work for me.
i use this
http://www.xmlmania.com/development/googlenews/?search=corvette
Giveit2u43
02-12-2004, 01:56 PM
Where can i find news feeds for soccer/football
http://www.news4sites.com/service/newsfeed.php?tech=rss&id=841
mharmon
02-12-2004, 03:16 PM
Can someone put together a file with all the modifications for this before I install this?
Okiewan
02-12-2004, 03:28 PM
Installed ... everything went well, however, once I set up a bot, and enabled it, it brought my server to it's knees! This is a dual cpu box with a gig of ram, used it all!
I used an existing news forum id.
Any idea what's causing this? (RC3)
Update: Getting the same mySQL error as in this post: https://vborg.vbsupport.ru/showpost.php?p=474298&postcount=59
killervette
02-12-2004, 03:59 PM
Installed ... everything went well, however, once I set up a bot, and enabled it, it brought my server to it's knees! This is a dual cpu box with a gig of ram, used it all!
I used an existing news forum id.
Any idea what's causing this? (RC3)
me too!! slowed down extremely
Giveit2u43
02-12-2004, 05:24 PM
have done a lot of playing around with this now, have got it working and posting well, but I don`t like having html enabled for the posts so I`ve been trying to parse the html into bbcode but not having much luck.. anybody been succesfull at getting the script to dp that?
Milez
02-18-2004, 05:56 PM
Installed ... everything went well, however, once I set up a bot, and enabled it, it brought my server to it's knees! This is a dual cpu box with a gig of ram, used it all!
Anyone else having this problem? I dont want to install it if that is the case.
Mr. Brian
02-18-2004, 07:59 PM
I thought I'm the only one encounterd such problem but littlt then I expect to see there's so many people having the same case.
Milez
02-18-2004, 08:17 PM
I installed it just to see. It does gobble up memory and CPU. Way too much.
My problem though is all my feeds show up as a link that says 'view full article' which takes me to the sources webpage. Anyone know why?
bradsears
02-19-2004, 02:42 AM
I'm also really excited to see this hack. Thanks very much for your work.
Milez
02-19-2004, 07:35 PM
Anyone know how to uninstall this? IE: remove the database edits.
Shock.r
02-22-2004, 06:36 AM
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = false;
}
That fixed the problem right up, indeed.
Now, there are a couple more things that are issues. For one there's no check for mysql_escape_string which will be bad if you actually grab rss feeds from, say a site that uses " or '. I've already run into this one tonight;
Fix:
In includes/RSS/rss_update.php, look for
$rss_title = str_replace("'", "\'", $rss_title);
$rss_description = str_replace("'", "\'", $rss_description);
and change it to:
$rss_description=mysql_escape_string($rss_descript ion);
$rss_title=mysql_escape_string($rss_title);
// $rss_title = str_replace("'", "\'", $rss_title);
// $rss_description = str_replace("'", "\'", $rss_description);
Essentially, this is the same thing, but for some reason the replace ' doesn't work as it should, in the longrun. I noticed this when I got feedback from the next script which I'll post:
In response to the cron thing, it's really a simple thing to do (until this is officially added to the cron somehow). Create a file in your public_html, call it rssfeed.php (or whatever), and in it, just add:
<?
require_once('./global.php');
require_once('./includes/functions_bigthree.php');
require_once('./includes/functions_forumlist.php');
require_once('./includes/RSS/rss_update.php');
?>
and for a cron entry, just call
*/5 * * * * php /path/to/your/file/rssfeed.php
This will update the news feeds every 5 minutes, rather than every time someone visits the forum, which would be more efficient. 5 minutes may (still) be too much, but I doubt it.
BTW, i've integrated this into vbadvanced, for those wanting info on how, let me know and if there's enough interest I'll post it here.
As far as forums and counts, I agree this is something that shouldn't be updated. However, if you (really) want to update your forums and posts, having this count in them, you can update your postcounts from admincp. This will fix that problem. Hopefully, I'll be able to come up with a workaround for that in the near future, but who knows.
Great code, glad to see it finally working!!
cron job thing works perfect so far! ive got it updating every hour.
dartmoore
02-22-2004, 06:44 AM
There is no rss_config.php in the zip..did i miss something?
dartmoore
02-22-2004, 05:16 PM
There is no rss_config.php in the zip..did i miss something?
Does anyone the rss_config.php for this hack..Not in the zip..This should be moved out of the full releases section.. :disappointed:
What rss_config.php ? There is none...
dartmoore
02-22-2004, 06:10 PM
What rss_config.php ? There is none...
From post#2,
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)
this says there is.. and i get sql error cannot find rss_config.php..
Hmmm, maybe a new version was developped meanwhile but the only file I have in the includes folder is the rss_update.php
dartmoore
02-22-2004, 09:57 PM
Hmmm, maybe a new version was developped meanwhile but the only file I have in the includes folder is the rss_update.php
My bad..I was not only doing the changes in the zip but also on this thread..had it all hosed up..can't u tell i'm a noob? :o
got it working now..will post a demo when all setup..thnx
TomokiG
02-23-2004, 10:32 PM
After installing and testing the hack I had a very big problem... I used a very slow RSS (I think their server lagged) and my database nearly broke down...
I think that more users were at the same time checking the test-RSS and got into a conflict...
At that point I began remodelling your Hack, removing your modifications at index.php and forumdisplay.php and creating a cron-job (which vB3 provides).
That way I solved two annoying problems:
1. The slowdown by getting the RSS every time forumdisplay or index is used
2. Reduction of traffic
3. Reducing the risk of IP-Banning
@Xyphen:
I'll send you the cron-version... feel free to use it ^^
°TomokiG°
Dontom
02-24-2004, 03:45 AM
Anyone know how to uninstall this? IE: remove the database edits.
just look at rss_install.php and undo all the things done there (easy with phpmyadmin ...)
Tom
dartmoore
02-24-2004, 10:44 PM
After installing and testing the hack I had a very big problem... I used a very slow RSS (I think their server lagged) and my database nearly broke down...
I think that more users were at the same time checking the test-RSS and got into a conflict...
At that point I began remodelling your Hack, removing your modifications at index.php and forumdisplay.php and creating a cron-job (which vB3 provides).
That way I solved two annoying problems:
1. The slowdown by getting the RSS every time forumdisplay or index is used
2. Reduction of traffic
3. Reducing the risk of IP-Banning
@Xyphen:
I'll send you the cron-version... feel free to use it ^^
?TomokiG?
I could use this also if u could post it for me plz..
I too noticed refresh was taking longer as I added more feeds..needs to refresh from the cron only.. which when i run the rssupdate no new post are posted..i have one from worldpress that updates every 30 mins but doesn't after initially getting first load..the rss_update says completed but no new entries..
here is my site in it's infancy, http://www.newsoutlet.info/forums/index.php you can view the site..if not let me know..
I like the admincp option..would like to see this expanded on, for instance to have the ability to delete a bot..deleting the user does not delete the bot and u will get db errors unless u phpadmin in and manually make changes..
Would like to see if there is a way having to create a new user for each feed..have tried to create 2 bots using same user but post in different forums..the first bot will post but not the second..so have to create a new user for each bot..
I can live with everything except the updating issue..is anyone else getting regular updates?
This is still an awesome hack with alot of potential..just wish I was a coder, to exploit the potential..
Well any help or pointers would be appreciated
So does the hack run in RC4 or not? I included him but i can´t set the hole hack to enabled, he always sets it back to No when I choose Yes and save.
dartmoore
02-25-2004, 06:22 PM
So does the hack run in RC4 or not? I included him but i can?t set the hole hack to enabled, he always sets it back to No when I choose Yes and save.
Yes I have it running in RC4, but still not updating posts after the first time..unless I delete all news and update then it will post..
The first time I installed it, it was enabled, I disabled it til I was ready in case I had to do an emergency shutdown due to server overload ..Well it wouldn't enable..I thought it was because of the code changes I made that were posted in this thread on top of the changes in the zip..Since my site is in it's infancy, and I'm not a coder, yet. I just started from scratch and reinstalled everything and just used the changes in the zip and it stayed enabled..Haven't disabled it since..The only other changes I made was TomokiG's in the index.php and forumdisplay.php and that stopped the update running every time you went in the forum..
Some thoughts,
1. The ability to delete a bot and all references to it..As it is now, unless you reassign the bot to another user before deleting the user, you will get database errors when you run the update.. maybe deleting the forumid and userid in the bot will delete it, not sure and I don't have my test server reloaded yet to test..
2. The ability to have 1 userid to multitask, for instance, a yahoo bot for each topic with one userid that will update each topic with their respective feed..I tried it and it will post the first topic but not any other..
3. I guess the biggest thing is getting the update to work without deleting old news..no one has said they are updating their forums, just that they can get the update to run from a cron. I too can get it to run, or so it says. For some reason there is no log entry that it has run, and the timestamp for the next run has moved up to the next hour..and still no new posts..I don't wanna delete thenews everytime to get new headlines, cause then if someone posts a reply to a particular thread, the subject of the thread is gone and anyone just coming in would not understand what is being discussed..
Xyphen, awesome job on this..Noone has come close to what you have accomplished with this hack..can hardly wait for 2.0 to come out..thnx
:up:
webrats
02-26-2004, 06:06 PM
mine is not updateing after the first time either
mine uses this feed
http://ripper.webrats.com/cache/rss_links.xml
Shock.r
02-26-2004, 06:40 PM
Guys, sjau posted a fix for this.
Find in /forum/includes/RSS/rss_update.php:
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = true;
}
Replace:
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = false;
}
Also for updating, wolfstream posted a cron job for this!
Put the following code in wordpad and save as rssfeed.php then put it in your includes/cron/ folder.
Then in your admin control panel under "Scheduled Tasks" then click "Add New Scheduled Task" Give it a name, then under "Minute" I put mine on 59 so it updates ever 59 mins!
Then for file name put ./includes/cron/YOUR PHP FILE.php
<?
require_once('./global.php');
require_once('./includes/functions_bigthree.php');
require_once('./includes/functions_forumlist.php');
require_once('./includes/RSS/rss_update.php');
?>
Also, don't forget to remove following from /forumdisplay.php and /index.php:
require_once('./includes/RSS/rss_update.php');
dartmoore
02-26-2004, 11:08 PM
YES, ty, ty ,ty, I saw that fix earlier but wasn't sure which one as there are 2 instances so i went on the assumption that it was the first and it did add new posts..but will know for sure in a hour
thnx again
dartmoore
02-26-2004, 11:55 PM
working so far here is link if ne1 wants to browse,
https://www.ssmallard.com/forums/index.php
vbhome
https://www.ssmallard.com
ixian
02-29-2004, 03:38 AM
I have this working - thanks for all the fixes posted here!
One question: I don't want HTML enabled in the forums I have the feeds post to, because I do want users to be able to reply and comment on news items. What's the line break code I can use so vb knows to insert a line break if html is disabled? "/n/n" doesn't work.
Thanks!
Mr. HillBilly
03-01-2004, 12:40 AM
when you hit the view new posts it shows all of his posts also. and i bet if you do a search, it'll query his posts
Also, in the forums that have the news posted the stats say for example: 64 threads and 64 posts when no one has posted there. :|
Fi_InCogNiTo
03-01-2004, 04:27 PM
Also, in the forums that have the news posted the stats say for example: 64 threads and 64 posts when no one has posted there. :|
I believe when you post a thread. It still counts as a post ;)
ethics
03-01-2004, 04:33 PM
Heh, it works great for me but posts are being double posted by the bot.
Mr. HillBilly
03-01-2004, 08:53 PM
I believe when you post a thread. It still counts as a post ;)
a Post = reply.
TerroRize
03-05-2004, 02:05 AM
Just want to post a Thank youfor a great Hack.
I ran into a few problems but it turned out it was my fault.
cscgal
03-11-2004, 06:39 AM
Every time I try to run a php script which includes rss_update.php, I get the following error
Warning: main(class.RSS.php) [function.main]: failed to create stream: No such file or directory in /home/www/daniweb/techtalkforums/includes/RSS/rss_update.php on line 17
Fatal error: main() [function.main]: Failed opening required 'class.RSS.php' (include_path='') in /home/www/daniweb/techtalkforums/includes/RSS/rss_update.php on line 17
Running latest RC of vB3
NameWolf
03-13-2004, 02:54 AM
Hello Guys,
Is there any way we can hide the newsbots' post from the new/latest thread posts functions. These functions are now rendered useless as they are fully cluttered by the newsbots posts.
Thanks in advance.
NW
clangrounds.com
03-13-2004, 04:32 PM
I'm having trouble installing this hack.
1. My index.php (main root forum file) is actually forum.php since I use vBindex as index.php to display when my domain name is typed in.
2. The error I get when trying to use the code snippet from instruction step #1 in forum.php is:
Fatal error: Call to undefined function: can_administer() in /home/myusername/public_html/forum.php on line 30
3. Of course I tried to install a bot in a new forum to see if that was the problem, but then all the forumdisplay.php pages from the forum generated mysql errors.
Database error in vBulletin 3.0.0 Release Candidate 3:
Invalid SQL: INSERT INTO post (`threadid`, `username`, `userid`, `title`, `dateline`, `pagetext`, `allowsmilie`, `showsignature`, `visible`) VALUES ('2209', '', '0', 'Are Two Screens Better Than One?', '1079202398', 'Nintendo touts its latest portable video game, a dual-screen system that lets players view the action from different perspectives. Will it be a worthy rival to Sony's PSP?<br><br>View the Entire Article (http://www.wired.com/news/games/0,2101,62001,00.html?tw=rss.GAM)
', '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 PSP?<br><br>http://www.clangrounds.com/forumdisplay.php?f=3 (http://www.wired.com/news/games/0,2101,62001
mysql error number: 1064
Date: Saturday 13th of March 2004 12:26:39 PM
Script: [url)
Referer:
Username: Rebel
IP Address: edited
4. The first news feed I was testing was from Wired News Gaming (http://www.wired.com/news/feeds/rss2/0,2610,74,00.xml)
Any assistance rendered is greatly appeciated, thank you. :)
clangrounds.com
03-13-2004, 05:04 PM
Guys, sjau posted a fix for this.
Find in /forum/includes/RSS/rss_update.php:
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = true;
}
Replace:
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = false;
}
Also for updating, wolfstream posted a cron job for this!
Put the following code in wordpad and save as rssfeed.php then put it in your includes/cron/ folder.
Then in your admin control panel under "Scheduled Tasks" then click "Add New Scheduled Task" Give it a name, then under "Minute" I put mine on 59 so it updates ever 59 mins!
Then for file name put ./includes/cron/YOUR PHP FILE.php
<?
require_once('./global.php');
require_once('./includes/functions_bigthree.php');
require_once('./includes/functions_forumlist.php');
require_once('./includes/RSS/rss_update.php');
?>
Also, don't forget to remove following from /forumdisplay.php and /index.php:
require_once('./includes/RSS/rss_update.php');
I tried this and now get this error message when I try to run it in admincp:
Database error in vBulletin 3.0.0 Release Candidate 3:
Invalid SQL: INSERT INTO post (`threadid`, `username`, `userid`, `title`, `dateline`, `pagetext`, `allowsmilie`, `showsignature`, `visible`) VALUES ('2209', '', '0', 'Are Two Screens Better Than One?', '1079204704', 'Nintendo touts its latest portable video game, a dual-screen system that lets players view the action from different perspectives. Will it be a worthy rival to Sony's PSP?<br><br>View the Entire Article (http://www.wired.com/news/games/0,2101,62001,00.html?tw=rss.GAM)
', '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 PSP?<br><br>http://www.clangrounds.com/admincp/cronadmin.php?do=runcron&cronid=16 (http://www.wired.com/news/games/0,2101,62001
mysql error number: 1064
Date: Saturday 13th of March 2004 01:05:05 PM
Script: [url)
Referer:
Username: Rebel
IP Address: edited
CdaKnight
03-13-2004, 06:42 PM
Hey, I had a question. I briefly skimmed through the thread (I'm trying to multi-task getting ready with this), and I didn't find the answer.
Has this script been modified to be more "cron" like? Does it check the RSS feed every time a page is loaded, or is there any way that another cron can be created so that each bot runs at a certain time during a non-busy period? (Like say... I want a Cnet bot to run at 4am, and another RSS feed bot to run at 5am, etc)
Sorry if this has been answered and I missed it
What style was used in the RSS feed screenshot?
What style was used in the RSS feed screenshot?
what is the style used in this screenshot?
http://lurkcorp.com/pubsighost/screencap.gif
I really want to know...
if someone knows, please post or pm me what it is and/or where to find it.
CdaKnight
03-14-2004, 02:44 AM
I would assume its one the guy designed himself.
I would assume its one the guy designed himself.
i finally know it, it's a $40 style.
It's called GelTech
http://www.insidethepixel.com/demo/
is there a certain limit to how many feeds can be used?
do only certain feeds work?
ethics
03-15-2004, 05:54 PM
Hey, I had a question. I briefly skimmed through the thread (I'm trying to multi-task getting ready with this), and I didn't find the answer.
Has this script been modified to be more "cron" like? Does it check the RSS feed every time a page is loaded, or is there any way that another cron can be created so that each bot runs at a certain time during a non-busy period? (Like say... I want a Cnet bot to run at 4am, and another RSS feed bot to run at 5am, etc)
Sorry if this has been answered and I missed it
Vie scheduled tasks you can break up the time all bots are done via different lists that you can specify.
jluerken
03-21-2004, 01:03 PM
When will you release version 2?
cscgal
03-21-2004, 08:24 PM
Yes I am very curious too.
SnowBot
03-22-2004, 06:03 AM
is this working for gold?
jluerken
03-22-2004, 06:57 AM
is this working for gold?
I managed it ones that some RSS posts were done but I don't know how I did and today I got no new posts.
I am waiting for version 2 which should run with vb3 gold :D
himerus
03-22-2004, 07:27 AM
I would like to see a new version, but I would love to get this installed ASAP... I think it will be a great additon for my board, and that my users will use it...
I noticed on one of the example boards that the RSS posts were of course very short with a link for the full article. Will the new version support RSS2, and longer descriptions?
When will the version 2 be available?
TIA
jluerken
03-22-2004, 07:49 AM
I would like to see a new version, but I would love to get this installed ASAP... I think it will be a great additon for my board, and that my users will use it...
I noticed on one of the example boards that the RSS posts were of course very short with a link for the full article. Will the new version support RSS2, and longer descriptions?
When will the version 2 be available?
TIA
It would also be nice if all users subscribed to this thread can post their RSS Feed Links and maybe a short description what they are about :D
PlenoJure
03-22-2004, 02:34 PM
Installed & working nicely on Gold :)
himerus
03-22-2004, 06:26 PM
Installed fine on Gold at www.myispforum.com
I had to add:
$rss_description = str_replace("<br>", "\n", $rss_description);
$rss_description = str_replace("<br />", "\n", $rss_description);
Before the thread was submitted... I started with a simple CNET News feed, and had the <br> tags in the thread, so that fixed that...
What about other options like polling intervals? Slashdot requires a longer wait than most I think...
Is it querying the feeds each time that the index or forumdisplay is loaded, or is it set on an internal update timer?
I haven't really torn the code apart yet, but it looks nice...
I would really like to see the RSS2 implementation, and how that post looks...
Does anyone have a good Internet News Feed that is RSS2? something like Internet Security, Networking, etc.
TIA
himerus
03-23-2004, 01:11 AM
I can't find in the code how often it is running... The first feed I added worked fine on the first update, but it hasn't updated since, and I've added a few more feeds, and none of them have updated either.
exodus
03-23-2004, 06:41 AM
I had to add:
$rss_description = str_replace("<br>", "\n", $rss_description);
$rss_description = str_replace("<br />", "\n", $rss_description);
where did you add that?
himerus
03-23-2004, 07:30 AM
I added it just before the post is inserted... if you need, I'll find the line #
himerus
03-23-2004, 09:24 PM
I haven't been able to get the Feeds to update... it will work when I run it for the first time, but after that, it's not updating on subsequent page loads
cscgal
03-23-2004, 10:02 PM
I was having the same problem but I found a post on page 6 or so with a quick fix. So I did the fix and then it all worked but every so often it would repost the same thread upon every single update (every 15 mins). Finally I just gave up and uninstalled the hack. I'll try again when version 2 of the hack comes out, whenever that may be.
rockergrrl
03-27-2004, 07:57 PM
I just installed this on my board....
When I added in the news feed in the admincp, I accidently put the wrong forum ID/user ID (reversed the ID #s).
But its not showing up in the Modify Bots page....
So I added in what the ID # should be in a new bot.
Still not showing up under Modify Bots.
So I clicked on Delete All News (so so I thought).
Well they were deleted, but when I added in the new bot (where it should've been), it added it back into the two threads that they were in before (the reversed #s one and the correct #).
*sigh*
And when I try to delete the feeds from the bad forum, they reappear. :/
Any suggestions?
I just installed this on my board....
When I added in the news feed in the admincp, I accidently put the wrong forum ID/user ID (reversed the ID #s).
But its not showing up in the Modify Bots page....
So I added in what the ID # should be in a new bot.
Still not showing up under Modify Bots.
So I clicked on Delete All News (so so I thought).
Well they were deleted, but when I added in the new bot (where it should've been), it added it back into the two threads that they were in before (the reversed #s one and the correct #).
*sigh*
And when I try to delete the feeds from the bad forum, they reappear. :/
Any suggestions?
I finally found out the problem with my board....
Each RSS bot has to have a seperate user name.
for example:
it doesn't work if more than one bot uses the user id of 1..
rockergrrl
03-27-2004, 10:30 PM
That wasn't the case....
I switched the forum id with the user id (I had a *dislexic* moment at the time)
So instead of forum id: 72, and member id: 27...
I had forum id: 27, and member id: 72 (which didn't exist)
So I made a new bot entry with the correct ids.
And the one with the wrong forum/member id never showed up (nor did the correct one).
And when I tried deleted everything to start over, and deleted the posted feeds in the wrong forum, and correctly added what the ID #s were suppose to be... The old bot was still posting feeds in the wrong forum - as well as the correct forum.
Messed up.... :/
Should I just replace the files that were edited, etc? and start over?
Or will it still do it?
Gracias!
That wasn't the case....
I switched the forum id with the user id (I had a *dislexic* moment at the time)
So instead of forum id: 72, and member id: 27...
I had forum id: 27, and member id: 72 (which didn't exist)
So I made a new bot entry with the correct ids.
And the one with the wrong forum/member id never showed up (nor did the correct one).
And when I tried deleted everything to start over, and deleted the posted feeds in the wrong forum, and correctly added what the ID #s were suppose to be... The old bot was still posting feeds in the wrong forum - as well as the correct forum.
Messed up.... :/
Should I just replace the files that were edited, etc? and start over?
Or will it still do it?
Gracias!
yeah, i think you should...
wolfstream
03-28-2004, 07:21 AM
Actually, it is very possible to have the same bot posting news in multiple forums. I had this going on for quite some time.
As far as the news not updating, others have posted a fix for it. Make sure to read the whole thread, because there's a few things regarding cron that should be paid attention too. If you've got a forum that's heavily used, updating the rss feeds every time you have a page view is a very bad idea.
Actually, it is very possible to have the same bot posting news in multiple forums. I had this going on for quite some time.
As far as the news not updating, others have posted a fix for it. Make sure to read the whole thread, because there's a few things regarding cron that should be paid attention too. If you've got a forum that's heavily used, updating the rss feeds every time you have a page view is a very bad idea.
oh?
well, when i used the same user for multiple feeds and forums.. it didn't work :(
Dean C
03-28-2004, 01:24 PM
Wow I can't believe I missed this one - it looks great :)!
croft
03-28-2004, 03:39 PM
I have been browsing this thread now for a while trying to find and answer.
Have anyone fixed the html tag problem that can occure when the rss feed have images and links and such ?
And could some one in detail explain to me how to fix the postcounts.
And about the cron job. Im very scared to do anything with my db cron jobs ar anything like that. I feel like everything is gonna break when i hit my cpanel link LOL.
why doesn't it say the number of threads and posts? on the categories where i have rss feeds
croft
03-28-2004, 10:07 PM
Im having a bit of problems.
The feed wont update and add new items ???
it added 2 the first time i executed the feed but not anymore.
Can i have a bit of help here guys ?
wolfstream
03-28-2004, 10:33 PM
Im having a bit of problems.
The feed wont update and add new items ???
it added 2 the first time i executed the feed but not anymore.
Can i have a bit of help here guys ?
Known problem, read through the thread, there's a fix there.
himerus
03-28-2004, 11:50 PM
Known problem, read through the thread, there's a fix there.
Could you link to the post? I'm having the same problem, and some of these longer threads are hard to read word for word searching for the right bit of text.
:)
Thanks!!!
(I am having the same problem by the way)
wolfstream
03-28-2004, 11:59 PM
https://vborg.vbsupport.ru/showthread.php?t=60899&page=4&pp=15
Read through that page, the whole page, the bugfixes are explained in there.
Perhaps the author should start supporting his own hack like he agreed to though;)
himerus
03-29-2004, 12:48 AM
https://vborg.vbsupport.ru/showthread.php?t=60899&page=4&pp=15
Read through that page, the whole page, the bugfixes are explained in there.
Perhaps the author should start supporting his own hack like he agreed to though;)
yeah... none of that still works for me... too many bugs... not enough good code.
I'll try again when a new release of this comes out, or someone else re-releases it with new updates.
Thanks
wolfstream
03-29-2004, 01:02 AM
If it didn't work, make sure you haven't been banned from the feed itself. Those fixes WILL fix the problem of not updating, I know, I had the very same problem myself. There are 2, maybe 3 fixes that should be made.
As far as releases, well, who knows. The code works if you apply the fixes, but you've got to apply them all to get it to work;)
wolfstream
03-29-2004, 04:50 AM
Ok, I just took a few minutes and put together a WORKING install of this.
The file edits have been taken down to 1 and the cron script IS included.
The only thing different between this and the first zip is the file edits and the bugs have been fixed in rss_update.php.
I just tested this, and installed it on vb3 gold. There's no question in my mind it's working.
When you design the forums for these, you'll want to make sure that the forum handles html, otherwise you'll have a problem.
Action-N
03-29-2004, 04:50 AM
I installed this one an managed to get it to update three times. Not sure what it takes to get it to update, but it does work. I do think it makes a difference on which feed you use. The CNET 5 news is what is working for me, the Yahoo news feed is one I found scary. Loaded the forum with about three pages of posts, stupid crap. So that forum is gone. Now I wanted to ask how I can I allow only the bot to post, with forum closed to all other users.
P.S. The really need to move this one to Beta releases, sorry Xyphen.
MrNase
03-31-2004, 11:07 AM
Funny, it's not working with the vB3 newsfeeds :(
Going to install it today on vB3 Gold and checking how it works... have it running fine on RC3
LoOnEyToOnZ
04-02-2004, 01:42 PM
Guys... how can i get Yahoo RSS feed unto my forums with this ? I already installed this hack, just dunno how to use Yahoo RSS
rockergrrl
04-02-2004, 02:19 PM
Yahoo RSS is located here:
http://news.yahoo.com/rss/
Find the topic that you want and copy the URL to the feed.
It will update (works for me).
LoOnEyToOnZ
04-02-2004, 03:01 PM
ic... Tonya do you just copy the url like http://news.yahoo.com/rss/tech/ ?
Or does it have to end with a .xml ?
Also... please check out my forums www.sgwhz.com and under Industry News.... you see the RSS by Yahoo! Tech. When you click on the view full article link it comes out to a error page on Yahoo....any idea why it happens ?
dethfire
04-02-2004, 05:06 PM
I installed the new version and when I run the cron I get this error:
Warning: mysql_query(): Unable to save result set in /htdocs/www/includes/db_mysql.php on line 212
Invalid SQL: SELECT * FROM post ORDER By postid DESC
mysql error: MySQL client run out of memory
mysql error number: 2008
I only added two bots :(
Vb-Hispano
04-02-2004, 05:59 PM
Thanks very much for your work ;)
rockergrrl
04-02-2004, 06:46 PM
ic... Tonya do you just copy the url like http://news.yahoo.com/rss/tech/ ?
Or does it have to end with a .xml ?
For Yahoo tech feeds use this url:
http://rss.news.yahoo.com/rss/tech
http://news.yahoo.com/rss/tech/ is just the general list of Feeds that are available. Copy the URL next to the subject you want listed.
PlenoJure
04-02-2004, 09:17 PM
LoOnEyToOnZ, the reason that happens is because of an html decoding bug, here's what I did to fix it:
In ./includes/RSS/rss_update.php Find:$rss_description .= "\n\nView the Entire Article ( . $rss_allItems[$j][LINK] . )\n";UNDER that ADD:$rss_description = html_entity_decode($rss_description);
$rss_title = html_entity_decode($rss_title);That fix is running on 2 forums and seems to work well.
dethfire
04-02-2004, 09:27 PM
I installed the new version and when I run the cron I get this error:
Warning: mysql_query(): Unable to save result set in /htdocs/www/includes/db_mysql.php on line 212
Invalid SQL: SELECT * FROM post ORDER By postid DESC
mysql error: MySQL client run out of memory
mysql error number: 2008
I only added two bots :(
anyone got a suggestion for my problem?
I installed the new version and when I run the cron I get this error:
Warning: mysql_query(): Unable to save result set in /htdocs/www/includes/db_mysql.php on line 212
Invalid SQL: SELECT * FROM post ORDER By postid DESC
mysql error: MySQL client run out of memory
mysql error number: 2008
I only added two bots :(
Same error here.
And also, the posts doesn't show up.
dethfire
04-03-2004, 10:20 PM
no posts because mysql runs out of memory
dethfire
04-05-2004, 01:59 AM
bummer, this is a great idea, too bad it just doesn't work :(
wolfstream
04-05-2004, 02:20 AM
I installed the new version and when I run the cron I get this error:
Warning: mysql_query(): Unable to save result set in /htdocs/www/includes/db_mysql.php on line 212
Invalid SQL: SELECT * FROM post ORDER By postid DESC
mysql error: MySQL client run out of memory
mysql error number: 2008
I only added two bots :(
That's an issue with your provider, not with the individual hack. Error codes are a good thing to read and pay attention to. Your mysql client ran out of memory, which is far from something that's hack related:)
Funny, it's not working with the vB3 newsfeeds
This hack works wonderfully on vb3 gold, and the second version makes it a lot easier to install.
That fix is running on 2 forums and seems to work well.
I'll update my zip to include that fix if it doesn't, later tonight:) Thanks for posting that.
I'm really not sure what happened to the original author, I'm certainly not trying to take over his project, just trying to provide working code that others can use.
dethfire
04-05-2004, 02:49 AM
wolfstream, our mysql has a memory of 40mb, your telling me the 2 yahoo rss files take up that much memory? :nervous:
wolfstream
04-05-2004, 03:02 AM
No, what I'm telling you is that your server's too loaded down. It's a common problem. Like I said, the error says it all right there.
mysql error: MySQL client run out of memory
Your MySQL client has no memory left, so it's bailing on you. This isn't a hack problem, this either is a memory problem or a server problem.
dethfire
04-05-2004, 03:05 AM
Ok I understand that, however it still doesn't make sense. My forum is large, avg 300 people online. I would think that would crash the server more quickly than inserting a couple RSS files into the database. Wouldn't you think?
jluerken
04-05-2004, 08:22 AM
Waht about version 2 of the RSS Hack? The hack is working fine but I still have the problem that I have to delete all news manually before new are posted.
rockergrrl
04-05-2004, 06:41 PM
Bah.... for the last 3 days, its been reposting the same news feed. I have about 10 of the same topic/title - at its not the latest feed... its an previous one from before the last one posted.
And none of the others are updating anymore... :/
LoOnEyToOnZ
04-06-2004, 03:26 AM
My yahoo RSS screwed up, post 100s of threads at 1 time..i had to disable yahoo feed in the end :(
Entourage
04-06-2004, 02:27 PM
Installed it, works perfect. got 3 news feeds working lovely.
Have only a 2 questions:
- Is it possible to delete a complete bot?
- Possible to filter out the HTML tags?
dethfire
04-06-2004, 03:00 PM
doesn't look like this hack is supported anymore
Installed it, works perfect. got 3 news feeds working lovely.
Have only a 2 questions:
- Is it possible to delete a complete bot?
- Possible to filter out the HTML tags?
How do you mean to delete a complete bot?
Filter out HTML - You can use php replace tags for that
Entourage
04-06-2004, 05:15 PM
How do you mean to delete a complete bot?
Well I added three bots now, I want to delete a bot from the Motify bot list.
jluerken
04-07-2004, 05:33 AM
Well I added three bots now, I want to delete a bot from the Motify bot list.
I had the same problem Entourage and deleted the bot with phpMyAdmin directly from the DB. There is no build in option to do so.
I have also a question. The news feed is working well but only if there aren't already posts in the forum.
How can I use the sheduled task option to prune all posts from a special forum at a explicit time?
pgowder
04-08-2004, 01:35 PM
When and how do the posts to the forum happen?
I've installed it and added a bot, when will the posts show up?
PranK
04-08-2004, 02:25 PM
hooooolllleeeeey crap!
I installed this and I have never seen my server load and mem usage go so high before!!!
any ideas why?
Thanks.
Christian
Okiewan
04-08-2004, 02:34 PM
hooooolllleeeeey crap!
I installed this and I have never seen my server load and mem usage go so high before!!!
any ideas why?
Thanks.
Christian
I uninstalled it for the same reason.
pgowder
04-09-2004, 12:59 PM
When and how do the posts to the forum happen?
I've installed it and added a bot, when will the posts show up?
Can anyone help? The source I'm using is:
http://IndianCountry.com/rss/index.php
rockergrrl
04-09-2004, 01:44 PM
Did you remember to add a cron to the rss.php file ??
As the instructions say:
Open up your cron manager (in admincp->scheduled tasks -> add scheduled task) and add an entry for rss.php. You should update every hour at the most. The filename for this is ./rss.php.
pgowder
04-09-2004, 03:25 PM
Did you remember to add a cron to the rss.php file ??
As the instructions say:
Open up your cron manager (in admincp->scheduled tasks -> add scheduled task) and add an entry for rss.php. You should update every hour at the most. The filename for this is ./rss.php.
I think I missed that!
pgowder
04-09-2004, 03:27 PM
Did you remember to add a cron to the rss.php file ??
As the instructions say:
Open up your cron manager (in admincp->scheduled tasks -> add scheduled task) and add an entry for rss.php. You should update every hour at the most. The filename for this is ./rss.php.
I just downloaded the zip again, where did you see that?
This is what I have in the instructions:
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.
#### open the /index.php script ####
Find this:
require_once('./includes/functions_forumlist.php');
Add below it:
require_once('./includes/RSS/rss_update.php');
#### open the /forumdisplay.php script ####
Find this:
require_once('./includes/functions_forumdisplay.php');
Add below it:
require_once('./includes/RSS/rss_update.php');
#### open the /admincp/index.php script ####
Find this:
construct_nav_group("$vbphrase[styles] & $vbphrase[templates]", '<hr />');
Add below it:
// 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.
pgowder
04-09-2004, 03:31 PM
And I don't have a rss.php file in my unzipped directory???
Slapyo
04-09-2004, 04:19 PM
ok, here is the code to use the build_new_post function in vB to insert the data. this will make the post number increase automatically, make the posts searchable, make similar threads work. however, there is one tiny problem.
- the posts have \n\n in them, when they should be actual new lines. anyone know how to fix this?
other than that, it works just fine. i just need to figure this last thing out.
original authors code commented out:
<?php
require('./global.php');
require('./includes/functions_newpost.php');
// RSS News Feed Hack
// ------------------------------
// By: Andrew Wickham of
// LiquidPro Inc.
//
// get the rss settings
$query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "rss_settings");
$data = $DB_site->fetch_array($query);
$rss_enabled = $data[enabled];
if($rss_enabled == 1) {
// include the RSS class
require_once('class.RSS.php');
$query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "rss_user WHERE enabled = '1'");
while($data = $DB_site->fetch_array($query)) {
$rss_source = $data[source];
$rss_forumid = $data[forumid];
$rss_userid = $data[userid];
$foruminfo = fetch_foruminfo($rss_forumid);
$bbuserinfo = fetch_userinfo($rss_userid);
//$query2 = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = '$rss_userid'");
//$data2 = $DB_site->fetch_array($query2);
//$rss_user_data[username] = $data2[username];
//$rss_user_data[posts] = $data2[posts];
// 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];
$rss_data = implode("",file($rss_source));
$rss = new RSS($rss_data, 1);
$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' AND postuserid = '$rss_userid'");
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = false;
}
// if there's no items in the database
if($DB_site->num_rows($rss_query) == 0) {
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = false;
}
}
// 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;
}
}
}
// insert the new items into the database
for($j = count($rss_allItems) - 1; $j >= 0; $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 .= "\r\n\r\nView the Entire Article ( . $rss_allItems[$j][LINK] . )\r\n";
// change <br> tags to newline
$rss_description = str_replace("<br>", \n, $rss_description);
$rss_description = str_replace("<br />", \n, $rss_description);
$rss_title = html_entity_decode($rss_title, ENT_NOQUOTES);
$rss_description = html_entity_decode($rss_description, ENT_NOQUOTES);
/*
//$rss_title = str_replace("'", "\'", $rss_title);
//$rss_description = str_replace("'", "\'", $rss_description);
//$rss_title = str_replace("?", "--", $rss_title);
//$rss_description = str_replace("?", "--", $rss_description);
//$rss_title = str_replace("$", "\$", $rss_title);
//$rss_description = str_replace("$", "\$", $rss_description);
//sql and php don't recognize the html escape strings.
*/
$rss_description=mysql_escape_string($rss_descript ion);
$rss_title=mysql_escape_string($rss_title);
// 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')");
//$DB_site->query("UPDATE " . TABLE_PREFIX . "forum SET lastpost = '$current_dateline', lastposter = '$rss_username', lastthread = '$rss_title', lastthreadid = '$rss_threadid' WHERE forumid = '$rss_forumid'");
// Setup the thread
$post['signature'] = true;
$post[title] = $rss_title;
$post[message] = $rss_description;
$post[poststarttime] = TIMENOW;
$post[posthash] = md5($post[poststarttime] . $bbuserinfo['userid'] . $bbuserinfo['salt']);
// build the thread
build_new_post('thread', $foruminfo, array(), 0, $post, $errors, $rss_userid);
}
}
// 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
?>
and in functions_newpost.php i added a variable into the function and wrapped the global statement around an IF/ELSE:
// ###################### Start newpost #######################
function build_new_post($type = 'thread', $foruminfo, $threadinfo, $parentid, &$post, &$errors, $rss_userid = '0')
{
//NOTE: permissions are not checked in this function
// $post is passed by reference, so that any changes (wordwrap, censor, etc) here are reflected on the copy outside the function
// $post[] includes:
// title, iconid, message, parseurl, email, signature, preview, disablesmilies, rating
// $errors will become any error messages that come from the checks before preview kicks in
if ($rss_userid == '0')
{
global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST;
}
else
{
global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST;
$bbuserinfo = fetch_userinfo($rss_userid);
}
pgowder
04-09-2004, 05:49 PM
Ok, went back and installed the new version posted in the thread. It seems to be working better.
Couple of questions now.
Will thread views increase??
Only one of my feeds is working. I have all of them going to the same forum with the same userid, is that a problem??
Here are all of my feeds:
http://IndianCountry.com/rss/index.php
http://rss.news.yahoo.com/rss/mostemailed
http://groups.yahoo.com/group/nativenewsrss/messages?rss=1
http://www.nativenationsnet.net/backend.php
The 2nd one is the only one that shows up in the forum.
When I run the cron job by hand through Admin CP I get this error:
Error:
Warning: file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/virtual/site2/fst/var/www/html/gathering/includes/RSS/rss_update.php on line 36
Warning: file(http://www.nativenationsnet.net/backend.php): failed to open stream: Resource temporarily unavailable in /home/virtual/site2/fst/var/www/html/gathering/includes/RSS/rss_update.php on line 36
Warning: implode(): Bad arguments. in /home/virtual/site2/fst/var/www/html/gathering/includes/RSS/rss_update.php on line 36
I thin kit is a great great hack but I've a Problem with it.
If i let i generate the link from a backend.php it looks like this:
http://www.wavebone.net/modules.php?op=modload&name=News&file=article&sid= 118
But the real link is
http://www.wavebone.net/modules.php?op=modload&name=News&file=article&sid=118&mode=thread&order=0&thold=0
So it wont work for me.
How can i fix it?
Thanks in advance,
regardly
v7
dethfire
04-10-2004, 02:46 PM
someone just needs to rewrite this :(
Slapyo
04-10-2004, 02:58 PM
that is what i am trying to do. i am at the last step basically. i just need to figure out how to insert the post with newlines. the way i wrote it uses vB's build_new_post function so that it works. look at post #174 in this thread. here is the code i have been working with. i just need to find out how i can insert the post with actual newlines, instead of viewing \n\n on the post. otherwise it works just fine and it uses vB's build_new_post function which means it will be searchable, post counts go up, similiar threads will work ... everything.
modified rss_update.php, my new way to insert the post:
<?php
require('./global.php');
require('./includes/functions_newpost.php');
// RSS News Feed Hack
// ------------------------------
// By: Andrew Wickham of
// LiquidPro Inc.
// Updated By: Donnie La Curan
//
// get the rss settings
$query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "rss_settings");
$data = $DB_site->fetch_array($query);
$rss_enabled = $data[enabled];
if($rss_enabled == 1) {
// include the RSS class
require_once('class.RSS.php');
$query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "rss_user WHERE enabled = '1'");
while($data = $DB_site->fetch_array($query)) {
$rss_source = $data[source];
$rss_forumid = $data[forumid];
$rss_userid = $data[userid];
$foruminfo = fetch_foruminfo($rss_forumid);
$bbuserinfo = fetch_userinfo($rss_userid);
$rss_data = implode("",file($rss_source));
$rss = new RSS($rss_data, 1);
$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' AND postuserid = '$rss_userid'");
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = false;
}
// if there's no items in the database
if($DB_site->num_rows($rss_query) == 0) {
for($i = count($rss_allItems) - 1; $i >= 0; $i--) {
$rss_allItems[$i][OLD] = false;
}
}
// 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;
}
}
}
// insert the new items into the database
for($j = count($rss_allItems) - 1; $j >= 0; $j--) {
if(!$rss_allItems[$j][OLD]) {
$rss_title = $rss_allItems[$j][TITLE];
$rss_dateline = $rss_allItems[$j]['pubDate'];
$current_dateline = time();
$rss_description = $rss_allItems[$j][DESCRIPTION];
$rss_description .= "\r\n\r\nView the Entire Article ( . $rss_allItems[$j][LINK] . )\r\n";
// change <br> tags to newline
$rss_description = str_replace("<br>", \n, $rss_description);
$rss_description = str_replace("<br />", \n, $rss_description);
$rss_title = html_entity_decode($rss_title, ENT_NOQUOTES);
$rss_description = html_entity_decode($rss_description, ENT_NOQUOTES);
$rss_description=mysql_escape_string($rss_descript ion);
$rss_title=mysql_escape_string($rss_title);
// Setup the thread
$post['signature'] = true;
$post[title] = $rss_title;
$post[message] = $rss_description;
$post[poststarttime] = TIMENOW;
$post[posthash] = md5($post[poststarttime] . $bbuserinfo['userid'] . $bbuserinfo['salt']);
// build the thread
build_new_post('thread', $foruminfo, array(), 0, $post, $errors, $rss_userid);
}
}
}
}
//
// ------------------------------
// End of RSS News Hack
?>
and in functions_newpost.php i did this:
FIND:
function build_new_post($type = 'thread', $foruminfo, $threadinfo, $parentid, &$post, &$errors)
REPLACE WITH:
function build_new_post($type = 'thread', $foruminfo, $threadinfo, $parentid, &$post, &$errors, $rss_userid = '0')
FIND:
// $errors will become any error messages that come from the checks before preview kicks in
global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST;
REPLACE WITH:
// $errors will become any error messages that come from the checks before preview kicks in
if ($rss_userid == '0')
{
global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST;
}
else
{
global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST;
$bbuserinfo = fetch_userinfo($rss_userid);
}
If i do it your way i get just cryprtical signs on index.php
Slapyo
04-10-2004, 06:58 PM
If i do it your way i get just cryprtical signs on index.php
what do you mean? i have no problems with it at all and i didn't touch index.php ... what are these cryptical signs you are talking about? do you have a screenshot or link so we can see. but like i said, i've made these changes and have had no problems at all with the bot making posts, users making posts/polls. the only problem i am running into, is pretty much getting the newlines to actually be newlines instead of just the text \n\n in the posts.
dethfire
04-10-2004, 07:57 PM
Slapyo, thanks! Can you zip your final version?
Slapyo, thanks! Can you zip your final version?
This should work to correct the newline problem. Create a replacement var.
{br} as the tag and text to replace with <br />.
I have a similiar tag for use when posting code on one of my forums. It will act as the break tag even in a forum that doesn't have html enabled.
rockergrrl
04-11-2004, 04:39 AM
How would I got about replacing the tags in the post feeds
I tried putting something like " - " put it doesn't want to take.
or even " " with a space - nothing.
Suggestions?
Thanks
Slapyo
04-11-2004, 05:11 AM
@aws ... thanks, i will look into this and see if it works. from the sounds of it, it should! how exactly would i go about making a replacement variable? forgive the silly question, i just bought vB and am very new to it.
@rockergrrl ... this function should replace all those.
$rss_title = html_entity_decode($rss_title, ENT_NOQUOTES);
$rss_description = html_entity_decode($rss_description, ENT_NOQUOTES);
rockergrrl
04-11-2004, 05:35 AM
I have that already in the rss_update.php file...
Still getting tags showing up in posts. :/
Check attachment
Slapyo
04-11-2004, 06:15 AM
what about this?
$rss_title = str_replace(" ", " ", $rss_title);
$rss_description = str_replace(" ", " ", $rss_description);
redlabour
04-11-2004, 12:00 PM
And when is the Version 2 coming ?
If i use : http://www.redlabour.de/vbulletin/includes/RSS/rss_update
i get
Fatal error: Call to a member function on a non-object in /is/htdocs/53751/www.redlabour.de/vbulletin/includes/RSS/rss_update.php on line 10
on line 10 is : $query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "rss_settings");
And i even have the Problem with no updates for the Feeds.
Can somebody post a new install.txt or post a complete *.zip with all corrections for this Hack ? :tired:
Slapyo
04-11-2004, 12:54 PM
And when is the Version 2 coming ?
If i use : http://www.redlabour.de/vbulletin/i.../RSS/rss_update
i get
Fatal error: Call to a member function on a non-object in /is/htdocs/53751/www.redlabour.de/vbulletin/includes/RSS/rss_update.php on line 10
on line 10 is : $query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "rss_settings");
And i even have the Problem with no updates for the Feeds.
Can somebody post a new install.txt or post a complete *.zip with all corrections for this Hack ? :tired:
i might have something ready tonight. i'm not at my machine so i can test the final thing out. but i will be out there later tonight and can give it a shot. if everything is good, i will package it up and include a install.txt file as well.
what do you mean? i have no problems with it at all and i didn't touch index.php ... what are these cryptical signs you are talking about? do you have a screenshot or link so we can see. but like i said, i've made these changes and have had no problems at all with the bot making posts, users making posts/polls. the only problem i am running into, is pretty much getting the newlines to actually be newlines instead of just the text \n\n in the posts.
In the description of the first post are Modifications at the index.php.
Why do you wrote
i have no problems with it at all and i didn't touch index.php ... ?
I've mixed up your edits and the Hack from the #1 Post. Wrong?
If i only do yours there is no abilty do the options in the acp?
I'm so confused now. Please tell it me slowly :disappointed:
rockergrrl
04-11-2004, 02:35 PM
what about this?
$rss_title = str_replace(" ", " ", $rss_title);
$rss_description = str_replace(" ", " ", $rss_description);
Nope, that didn't work :/
Now I have a problems with bold and italics in posts as well...
I tried:
// change <b> tags
$rss_description = str_replace("<b>", "", $rss_description);
$rss_description = str_replace("</b>", "", $rss_description);
// change <i> tags
$rss_description = str_replace("<i>", "", $rss_description);
$rss_description = str_replace("</i>", "", $rss_description);
But that didn't work. Should I just do a replacement var for those?
Thanks again!
redlabour
04-11-2004, 03:03 PM
I wrote a PM to Xyphen - maybe he can tell us when V2 is coming out.
For the first i uninstall this Hack - i wait for a stable version or some stable feedbacks from other Users of the changes from "Slapyo" !
redlabour
04-11-2004, 03:41 PM
In the description of the first post are Modifications at the index.php.
Why do you wrote
?
I've mixed up your edits and the Hack from the #1 Post. Wrong?
If i only do yours there is no abilty do the options in the acp?
I'm so confused now. Please tell it me slowly :disappointed:
:rolleyes:
Hey is not the Coder of the first posting !
The original ist from 'Xyphen' - his name is 'Slapyo' !! :tired:
redlabour
04-11-2004, 03:52 PM
Sorry - me again :
Did i understand your rigtht @Slapyo - with your changes to the Code this Hack is automatically posting new News from the Feeds without deleting the new ones ?
Or is it overwriting the old ones ?
And is there a option to delete one of my Feeds in the AdminCP ?
Slapyo
04-11-2004, 05:03 PM
@vau7 ... my changes were to the rss_update.php and functions_newpost.php, that's it. i think the original coder had changes in other files. here is the post that includes the file that i downloaded and have been working with.
https://vborg.vbsupport.ru/showpost.php?p=492109&postcount=139
when i get home tonight i will throw together a package that will include everything that i have done and give the install. it will be a complete package.
just the code i have shown will not work just by itself. you have to have everything else installed properly. see the link i posted for the files that i used to install.
@rockergrrl ... that should work actually. i noticed you have 2 $rss_descriptions for each one. i think that's my fault for some code i posted for you. this should work because when inserting the data it uses the url tags to make the link.
// change <b> tags
$rss_title = str_replace("<b>", "", $rss_title);
$rss_description = str_replace("</b>", "", $rss_description);
// change <i> tags
$rss_title = str_replace("<i>", "", $rss_title);
$rss_description = str_replace("</i>", "", $rss_description);
@redlabour ... my changes in code only change the way the actual post is made. instead of manually inserting the post (original), my code uses vB's built in function to insert the post enabling searching, similiar threads, and correct post counts.
if you installed the code properly there is a link in the admincp to HACKS which has RSS News Bot under that. you can add, edit, or delete a bot. if you don't want to delete it, you can just turn it off. however, this is all part of the original code. i make no changes to the way the bot collects the data, or admincp changes, just how the data is posted.
rockergrrl
04-11-2004, 05:25 PM
Oy....
Can't get it to work.. even updated threads... no go... :ermm:
I can't ge the   problem fixed either.....
And then changing the bold and italics tags it puts ".<br><i>" in the posts. :ermm:
Thanks again for all your help, I greatly appreciate it!
Screens...
redlabour
04-11-2004, 05:30 PM
@Slapyo - no in the Admin CP you can only edit the Feeds - there is no "Delete" Funktion.
And sorry - i have to ask again (i know i have written it a little bit confusing before !) :
If the Hack is working correctly does the robot post the News and overwrite them if there are new ones or does he add all of them - means old and new News. I can?t know it by now because it did only worked one time with no more update of the News. ;)
Can somebody tell me this ? (Sorry - my english is a little bit untrained - i work on it again ! ;)
Slapyo
04-11-2004, 06:33 PM
oh, ok i though there was a way to delete a bot in there...wasn't sure.
the way it works is this. when the bot grabs the news it will check all the news articles. if there is a new one, it will skip that news article. sometimes i have noticed that with Yahoo! news i get repeated titles, but the content of the article is different, so they are different posts. but it should not repeat an article, it will just goto the next one.
new news, will be new posts and the old news will be kept, no posts are deleted. but no repeat posts should be made.
redlabour
04-11-2004, 06:51 PM
That was something i understand no definitely !! ;) Thanx ...
Slapyo
04-11-2004, 10:36 PM
ok, here it is. i just ran it on my server and it worked fine. there are a couple things...
1 - might be a cleaner/neater way to convert the ASCII to normal characters
2 - might not convert all the ASCII to normal characters
so you may end up with like ' or or
.... whatever it may be ... if someone wants to look at the code and see if they could clean it up that would be great. that code is in /includes/RSS/rss_update.php ... it's towards the bottom.
i have it running on my forums that i just started up ... you can see it here, http://www.sportsbabble.net
Host Visions
04-12-2004, 12:33 AM
if anyone would help me get these RSS feeds running on my vb3 I will gladly pay you funds via paypal! If interested, please PM me here.
mirdin
04-12-2004, 05:28 PM
ok, here it is. i just ran it on my server and it worked fine. there are a couple things...
Great work! Thanks!
I have one minor issue though.
I've set the user id in rss_admin, but the threads show a different user id as the poster.
EDIT:
Actually it seems to be a random user id every time the rss feeds are posted...
Slapyo
04-12-2004, 06:28 PM
Great work! Thanks!
I have one minor issue though.
I've set the user id in rss_admin, but the threads show a different user id as the poster.
EDIT:
Actually it seems to be a random user id every time the rss feeds are posted...
my problem use to be that it would post the news as whoever the person was that triggered the cron script. but i fixed that, and have had other users, and visitors trigger the script and it always posts as my bot.
after thinking about your problem some, it sounds like the problem that i had before. did you make the changes in your functions_newpost.php? it should change the build_new_post function and then change the global variables just below that in the function.
mirdin
04-12-2004, 07:38 PM
after thinking about your problem some, it sounds like the problem that i had before. did you make the changes in your functions_newpost.php? it should change the build_new_post function and then change the global variables just below that in the function.
You hit the nail on the head :)
I did make the changes to functions_newpost.php, but guess what? I forgot to upload it :o
It seems to work correctly now :)
mirdin
04-12-2004, 08:09 PM
hmm..I seem to get double posts from the yahoo feed
The second time the cronjob ran it posted all the articles again. The articles are identical.
Slapyo
04-12-2004, 08:16 PM
are you sure they are complete doubles? because i noticed that too from yahoo, but when looking at it closer, the news article has the same title, but the description and/or link are a little different, so it shows up as a completely new article. atleast that is how i understand it.
mirdin
04-12-2004, 08:23 PM
Yes, they are identical, the first time it added 50 articles. The second run, it added the same 50.
How does it exactly check for doubles?
Is it this 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;
Slapyo
04-12-2004, 09:20 PM
ya, that looks like it. that was from the original author. i made no changes to the way it retrieves the articles or checks the articles to see if they are old or not. it appears to be checking the title and the date. if both the title and the date of the article are the same then it marks it as old and doesn't enter it.
maybe it could be yahoo updating a news article so the title, link, description are all the same, but since the news was updated the date was different. maybe load up the rss file in your browser and check the pub dates, then check em again later on. see if duplicate titles, descriptions, links have different pub dates.
i know i get a couple repeat articles from yahoo as well.
dethfire
04-12-2004, 11:41 PM
Warning: file(): URL file-access is disabled in the server configuration in /htdocs/www/includes/RSS/rss_update.php on line 32
Warning: file(http://rss.news.yahoo.com/rss/topstories): failed to open stream: no suitable wrapper could be found in /htdocs/www/includes/RSS/rss_update.php on line 32
Warning: implode(): Bad arguments. in /htdocs/www/includes/RSS/rss_update.php on line 32
Slapyo
04-13-2004, 12:39 AM
i started a new thread with the new file so people wouldn't get confused as to which one they should download in this thread. all support for the hack will be handled over in that thread.
@dethfire ... that error sounds like it is problem with your server config. did the script work for you before, or is this the first time you are using it?
pgowder
04-13-2004, 05:28 PM
i started a new thread with the new file so people wouldn't get confused as to which one they should download in this thread. all support for the hack will be handled over in that thread.
@dethfire ... that error sounds like it is problem with your server config. did the script work for you before, or is this the first time you are using it?
Can you post a link to the new thread?
Slapyo
04-14-2004, 03:40 PM
Can you post a link to the new thread?
that would help wouldn't it .... sorry bout that.
https://vborg.vbsupport.ru/showthread.php?t=63798
P.Jackson
04-14-2004, 04:58 PM
a list of some rss feeds and urls would be cool :)
Host Visions
04-15-2004, 12:24 PM
How do I exclude the newsfeed forums from the 'view new posts' option?
Thanks
MaxScript
04-29-2004, 12:31 AM
question , i notice when i install this that one forum shows up ? is it that i have to wait 24 hours for my other rss to work ?
wolfstream
04-29-2004, 12:49 AM
question , i notice when i install this that one forum shows up ? is it that i have to wait 24 hours for my other rss to work ?
This doesn't create the forum for you, you must have the forum and the user created in order to get this working.
As far as the feeds, they update independently, apart from each other. Some feeds update every few days, some every few hours, some every few minutes. It all depends on the feed itself>
MaxScript
04-29-2004, 12:54 AM
This doesn't create the forum for you, you must have the forum and the user created in order to get this working.
As far as the feeds, they update independently, apart from each other. Some feeds update every few days, some every few hours, some every few minutes. It all depends on the feed itself>
thats what i did, so is up the feed itself ... ok thanks
Pseudomizer
07-28-2004, 04:03 PM
None of the board links on the first posting work. Why ? I would like to see this in action and not to see a screenshot. Any help would be welcome.
Cheers,
Ming Keong
07-29-2004, 10:57 AM
None of the board links on the first posting work. Why ? I would like to see this in action and not to see a screenshot. Any help would be welcome.
Cheers,
I'm using this hack to post at http://www.pdatrends.com/forumdisplay.php?f=7
rex_b
07-30-2004, 05:13 PM
I keep getting this error after installing:
Parse error: parse error, unexpected T_IF in /home/rexb2/public_html/forum/index.php on line 66
what gives???
DWard
10-12-2004, 07:12 PM
Do old news feeds get removed after a set time??
DWard
10-14-2004, 12:39 PM
????
Sooner95
10-15-2004, 01:53 PM
i think this died or something..lol
Sooner95
10-15-2004, 01:59 PM
is this thread dead?
kadafi_alive
01-20-2005, 08:24 AM
Anyone know how to uninstall it?
zurih
01-20-2005, 05:31 PM
the hack uses 6 queries!!!
too much I think, no?!
phantomatvietna
10-06-2005, 11:36 AM
May be i'll make a back-up before hacking this mods ! Thanks so much !
Snyper
03-04-2006, 11:36 PM
Hello,
is a a new Version for vB 3.5.x avaible of follow ?
Greets
dartho
05-24-2006, 12:23 PM
Xyphen hasn't been online for a couple years :(
Anyone able to port it to 3.5.x as a plugin or know of a diff plugin that does the same/similar?
project-Buckfas
07-24-2006, 04:48 PM
I need this for 3.5.4 also as a plugin.
Any takers?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.