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-22-2004 06:13 PM

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

Quote:

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

Quote:

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

Quote:

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

nuke 02-25-2004 04:16 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.

dartmoore 02-25-2004 06:22 PM

Quote:

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

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

Replace:
Code:

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

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

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

Quote:

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

Quote:

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

Code:

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.

Code:

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

Quote:

Originally Posted by Shock.r
Guys, sjau posted a fix for this.

Find in /forum/includes/RSS/rss_update.php:
Code:

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

Replace:
Code:

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

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

require_once('./includes/RSS/rss_update.php');

I tried this and now get this error message when I try to run it in admincp:

Code:

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

Lurk 03-13-2004 10:54 PM

What style was used in the RSS feed screenshot?

Lurk 03-14-2004 12:47 AM

Quote:

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

Lurk 03-14-2004 01:25 PM

Quote:

Originally Posted by CdaKnight
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/

Lurk 03-14-2004 03:36 PM

is there a certain limit to how many feeds can be used?
do only certain feeds work?

ethics 03-15-2004 05:54 PM

Quote:

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

Quote:

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

Quote:

Originally Posted by himerus
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:
PHP Code:

$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

Quote:

Originally Posted by himerus

I had to add:
PHP Code:

$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


All times are GMT. The time now is 02:48 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.01676 seconds
  • Memory Usage 1,859KB
  • 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
  • (11)bbcode_code_printable
  • (2)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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