vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   RSS News Feed Hack (https://vborg.vbsupport.ru/showthread.php?t=60899)

sjau 02-01-2004 09:03 PM

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:

Quote:

<?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&amp;listID=103 8839602120&amp;openMenu=&amp;calledPageId=10390828 45263</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&amp;listID=103 7966282302&amp;openMenu=&amp;calledPageId=10390828 45263</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&amp;sto ryID=449853&amp;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&amp;st oryID=449780&amp;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&amp;sto ryID=449827&amp;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&amp;zulieferer=wp&amp;kategorie=POL&amp;rub rik=Welt&amp;region=National&amp;auftritt=WP&amp;d bserver=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 &quot;Verehrt und Verfemt - Chagall in Deutschland&quot; ist bis 18. April zu sehen. In der ...</description>
</item>

<item>
<title> Mydoom &quot; ?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&quot; 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&amp;listID=103 7966279508&amp;openMenu=&amp;calledPageId=10390828 45263</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 &quot;Queenie&quot;, 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&amp;listID=103 8816894055&amp;openMenu=1038816891802&amp;calledPa geId=1038816891802</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&amp;sto ryID=449806&amp;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:

Quote:

<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&amp;zulieferer=wp&amp;kategorie=POL&amp;rub rik=Welt&amp;region=National&amp;auftritt=WP&amp;d bserver=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&amp;listID=103 8816894055&amp;openMenu=1038816891802&amp;calledPa geId=1038816891802</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.

sjau 02-03-2004 06:04 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!

sjau 02-03-2004 11:30 AM

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:
PHP Code:

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:
PHP 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:
PHP Code:

        for($i count($rss_allItems) - 1$i >= 0$i--) {
            
$rss_allItems[$i][OLD] = true;
        } 


To that:
PHP Code:

        for($i count($rss_allItems) - 1$i >= 0$i--) {
            
$rss_allItems[$i][OLD] = false;
        } 


KuraFire 02-03-2004 11:54 AM

Quote:

Originally Posted by sjau
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 ;)

sjau 02-03-2004 11:59 AM

I think I've found the problem. Posted it into my previous post (didn't see KuraFire did already add another post).

sjau 02-03-2004 12:40 PM

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.

sjau 02-03-2004 10:01 PM

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

Code:

  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
Code:

$rss_title = str_replace("&apos;", "\'", $rss_title);
$rss_description = str_replace("&apos;", "\'", $rss_description);

and change it to:
Code:

        $rss_description=mysql_escape_string($rss_description);
        $rss_title=mysql_escape_string($rss_title);
//        $rss_title = str_replace("&apos;", "\'", $rss_title);
//        $rss_description = str_replace("'", "\'", $rss_description);

Essentially, this is the same thing, but for some reason the replace &apos; 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:
Code:

<?
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
Code:

*/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).

sjau 02-04-2004 03:57 PM

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
', '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

Quote:

Originally Posted by mcyates
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 :)

[high]* Natch does the dance of the jubilant monkey[/high]

Giveit2u43 02-12-2004 01:51 AM

quick fix for threadcounts.. find:

Code:

$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:

Code:

$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/...earch=corvette

Giveit2u43 02-12-2004 01:56 PM

Quote:

Originally Posted by mcyates
Where can i find news feeds for soccer/football

http://www.news4sites.com/service/ne...ech=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....8&postcount=59

killervette 02-12-2004 03:59 PM

Quote:

Originally Posted by Okiewan
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

Quote:

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

Quote:

Originally Posted by wolfstream
Code:

  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
Code:

$rss_title = str_replace("&apos;", "\'", $rss_title);
$rss_description = str_replace("&apos;", "\'", $rss_description);

and change it to:
Code:

        $rss_description=mysql_escape_string($rss_description);
        $rss_title=mysql_escape_string($rss_title);
//        $rss_title = str_replace("&apos;", "\'", $rss_title);
//        $rss_description = str_replace("'", "\'", $rss_description);

Essentially, this is the same thing, but for some reason the replace &apos; 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:
Code:

<?
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
Code:

*/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

Quote:

Originally Posted by dartmoore
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:

sjau 02-22-2004 05:43 PM

What rss_config.php ? There is none...

dartmoore 02-22-2004 06:10 PM

Quote:

Originally Posted by sjau
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..


All times are GMT. The time now is 06:21 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01597 seconds
  • Memory Usage 1,957KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code_printable
  • (4)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete