![]() |
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:
Missing items on the board: Quote:
Thx in advance, sjau |
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.
|
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.
|
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: PHP Code:
Altered code: PHP Code:
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:
To that: PHP Code:
|
Quote:
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. |
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.
|
Cron job is much safer and nicer to do this with :)
|
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. |
Code:
for($i = count($rss_allItems) - 1; $i >= 0; $i--) { 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("'", "\'", $rss_title); Code:
$rss_description=mysql_escape_string($rss_description); 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:
<? Code:
*/5 * * * * php /path/to/your/file/rssfeed.php 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!! |
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? |
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 :)
|
Where can i find news feeds for soccer/football
|
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 |
now my sites, stopped working. I'm running RC4
|
RC4 is already out? Hmmm......
It works for me on RC3... however not the auto-update yet... |
yeah, well it does say Powered by: vBulletin Version 3.0.0 Release Candidate 4 at the bottom of my forum.
|
Quote:
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] |
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'"); 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'"); |
|
Quote:
|
Can someone put together a file with all the modifications for this before I install this?
|
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 |
Quote:
|
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?
|
Quote:
|
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.
|
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? |
I'm also really excited to see this hack. Thanks very much for your work.
|
Anyone know how to uninstall this? IE: remove the database edits.
|
Quote:
|
There is no rss_config.php in the zip..did i miss something?
|
Quote:
|
What rss_config.php ? There is none...
|
Quote:
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|