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)
-   -   NEW Modified RSS News Feed Hack (https://vborg.vbsupport.ru/showthread.php?t=63798)

SnowBot 04-13-2004 09:52 PM

Yes done that

rss feed =
Code:

http://news.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss091.xml
.xml

Slave 04-13-2004 09:55 PM

[high]* Slave clicks install ..
[/high]

Works brill .. :) .. One user (News Bot) in 3 forums ..

SnowBot 04-13-2004 09:57 PM

Quote:

Originally Posted by Slapyo
i assume you have made a bot and given it the proper user id?

I set up a new usergroup just for bots and added a new user to that group. In the RSS News feed menu i added a bot with the forum id as 29

HTML Code:

[url="http://www.synergyforums.com/forum/forumdisplay.php?f=29"]http://www.synergyforums.com/forum/forumdisplay.php?f=29[/url]
Added the user id as

276 and that feed

Slapyo 04-13-2004 10:05 PM

Quote:

Originally Posted by SnowBot
I set up a new usergroup just for bots and added a new user to that group. In the RSS News feed menu i added a bot with the forum id as 29

HTML Code:

[url="http://www.synergyforums.com/forum/forumdisplay.php?f=29"]http://www.synergyforums.com/forum/forumdisplay.php?f=29[/url]
Added the user id as

276 and that feed

ok

forum id: 29
user id: 276
source: http://news.bbc.co.uk/rss/newsonline...age/rss091.xml

and you ran the rss_install.php file too correct?

everything sounds like you have it set up correctly. what version of PHP do you have?

SnowBot 04-13-2004 10:09 PM

Yep i ran the script, if i try running it again i get this

Code:

Database error in vBulletin 3.0.0:
Invalid SQL: CREATE TABLE `rss_settings` (`enabled` tinyint(1) NOT NULL default '1' );
mysql error: Table 'rss_settings' already exists
mysql error number: 1050
Date: Tuesday 13th of April 2004 07:07:38 PM
Script: http://www.synergyforums.com/forum/rss_install.php
Referer:
Username: Snowy
IP Address: **.**.**.**

PHP version 4.3.5

Slapyo 04-13-2004 10:11 PM

is your scheduled task is set up like this?

filename: ./rss.php

the other fields depend upon you, whatever you want to call it and whenever you want the script to run. but the file name should look like that.

SnowBot 04-13-2004 10:19 PM

Yep

Slapyo 04-13-2004 10:28 PM

wow, that's weird. it looks like it is just printing out part of the code from class.RSS.php and from rss_update.php ... but i don't know why it is doing this. lemme look some more.

SnowBot 04-13-2004 10:32 PM

Just a note, if i try and run the upgrade script i get this error

Code:

Database error in vBulletin 3.0.0:
Invalid SQL: ALTER TABLE rss_settings DROP forumid, DROP userid, DROP source
mysql error: Can't DROP 'forumid'. Check that column/key exists
mysql error number: 1091
Date: Tuesday 13th of April 2004 07:30:18 PM
Script: http://www.synergyforums.com/forum/rss_upgrade.php
Referer:
Username: Snowy

How would i unistall the script and then try running it again ? Maybe that may fix it ? ? I dunno, i guess im just guessing here now :(

Slapyo 04-13-2004 11:40 PM

delete these tables:
vb3_rss_settings
vb3_rss_user

modify the vb3_thread table, delete these 2 fields:
rss_feed
rss_date

** Note: the table prefix might be different for you, but my table prefix is vb3_

remove these files:
rss.php
rss_install.php
rss_upgrade.php
/admincp/rss_admin.php
/includes/RSS/class.RSS.php
/includes/RSS/rss_update.php

then download the newest version, 1.22, and install it. hopefully this works.

ConqSoft 04-13-2004 11:56 PM

Well, I just installed for the first time, using the latest 1.22 ZIP and I have a couple of issues.

1) I'm getting duplicates. :( Any ideas? (Using the Yahoo! News Oddly Enough feed only, for now.)

2) If a " is in the title, it shows up as "

Slapyo 04-14-2004 12:01 AM

you shouldn't get duplicates. the newest version checks for duplicates. check your vb3_thread table and see if the bot posts have entries in the rss_feed and rss_date fields. i am using a yahoo news feed myself and don't get the duplicates. another person using the BBC news feeds was getting duplicates, but then says that problem is gone with the new version.

the function in the rss hack checks to see if the title & pubDate are the same. if both are the same, it is considered old.

PHP Code:

$rss_title html_entity_decode($rss_titleENT_NOQUOTES);
$rss_description html_entity_decode($rss_descriptionENT_NOQUOTES); 

that SHOULD take care of converting the " to ". that is the purpose of the function according to PHP. however, if that doesn't work then you can insert this code just below the code i posted above.

Code:

$rss_title = str_replace(""", "\"", $rss_title);
$rss_description = str_replace(""", "\"", $rss_description);


ConqSoft 04-14-2004 12:12 AM

Ok, that fixed the quote problem. Thanks!

I'll let it run for a while again now and see if the dupes show up.

Thanks again.

ConqSoft 04-14-2004 12:20 AM

Ok. I verified that the rss_date field is being updated.

So, I went to the RSS manager and deleted all news.

Then I manually ran the cron job using the Run Now button in my scheduled task manager.

And it pulls in several copies of each message for some reason. The duplicates aren't right next to each other in the list. It's just like it pulled the RSS feed twice for some reason, and didn't catch the dupes. I dunno...

I tried it a couple of times with the same results...

SnowBot 04-14-2004 12:21 AM

OK i did all that, i run the task again and this time i DIDNT get that error but no post :( hehe it just dont like me i guess :(

ConqSoft 04-14-2004 12:27 AM

Nevermind. :( I think it's just the feed itself repeating articles.

Thanks!

SnowBot 04-14-2004 12:40 AM

:( Well the user i set up still has NOT appeared on whois online or posted :(

No db errors

Nothing, i have rechecked my install / file edits and everything is correct as far as i can see, just nothing is happening.

Any ideas?

Want me to set up an admin login so you can check ?

dethfire 04-14-2004 01:17 AM

I have my cron set to every 20 hours, however once that 20 hours comes around the script seems to run 3 times creating 3 sets of duplicated

rocket98 04-14-2004 01:42 AM

Quote:

Originally Posted by Slapyo
ok, i have fixed the duplicate post problem. it now inserts the data into the rss_feed and rss_date fields. it should check the post and not post it if it is a duplicate.

also, i have included in the rss_update.php file a section of commented code. if you use a version of PHP prior to 4.3.0 you will need to uncomment this section out, and then comment the 2 lines above it.

I will try this, thank you Slapyo !!!!

rocket98

----------------------------------------

I am at a complete loss ... I was playing and playing and then I uploaded the attached file and for some reason I got a BBC feed immediately after doing a manual run, no dups nothing just a BBC feed with 30 threads.

I think this was from the original hack. I found it on hotscripts today when i was looking around at all things RSS.

I honestly don't know what is different from your edits to the original hack. No PHP problems to speak of. Not sure if this works for others but i tried it and it seems to go ...

Here is my forum

SnowBot 04-14-2004 01:56 AM

over an hour later and still nothing..... im at a loss now

Slapyo 04-14-2004 04:41 AM

Quote:

Originally Posted by SnowBot
:( Well the user i set up still has NOT appeared on whois online or posted :(

No db errors

Nothing, i have rechecked my install / file edits and everything is correct as far as i can see, just nothing is happening.

Any ideas?

Want me to set up an admin login so you can check ?

snowbot, the bot will not appear in the who's online. the bot never actually logs into the system, it just uses the user info to make the post. if you want i can take a look at it for you, no promises that i will find the error.

but you uninstalled it, then reinstalled the latest version correct? just want to make sure of that before i looked at anything. go ahead and PM me the information. then i will get back to you if i find anything. thanks.

Slapyo 04-14-2004 04:45 AM

Quote:

Originally Posted by rocket98
I will try this, thank you Slapyo !!!!

rocket98

----------------------------------------

I am at a complete loss ... I was playing and playing and then I uploaded the attached file and for some reason I got a BBC feed immediately after doing a manual run, no dups nothing just a BBC feed with 30 threads.

I think this was from the original hack. I found it on hotscripts today when i was looking around at all things RSS.

I honestly don't know what is different from your edits to the original hack. No PHP problems to speak of. Not sure if this works for others but i tried it and it seems to go ...

Here is my forum

http://bocastown.com/forum/forumdisplay.php?f=51

rocket98, that appears to be the original script. the problem i found with the original script is that when submitting the post, it is done manually. that way you will not be able to search the threads, similar threads won't work, and post counts will not increase properly.

what are the errors you are getting. if you want, PM me your email address and i will send you the rss_update.php file that you need. i read back and see that you need the one that is compatible with a version of PHP prior to 4.3.0 ... lemme know, i will send it to you.

Slapyo 04-14-2004 04:46 AM

Quote:

Originally Posted by dethfire
I have my cron set to every 20 hours, however once that 20 hours comes around the script seems to run 3 times creating 3 sets of duplicated

what is your feed that you are using? i haven't seen this error before, but that doesn't mean it isn't happening. it should load the rss file once then parse it, that's it.

rocket98 04-14-2004 05:15 AM

Quote:

Originally Posted by Slapyo
rocket98, that appears to be the original script. the problem i found with the original script is that when submitting the post, it is done manually. that way you will not be able to search the threads, similar threads won't work, and post counts will not increase properly.

what are the errors you are getting. if you want, PM me your email address and i will send you the rss_update.php file that you need. i read back and see that you need the one that is compatible with a version of PHP prior to 4.3.0 ... lemme know, i will send it to you.

I'm hosted for Free on 1and1. On this particular server they are running php 4.2.3. After a couple of enquiries to support there I'm sad to say "non paying" customers have to put up with what they get for the free accounts.

I still had errors with redeclaring of htmlentities as shown here after following the instructions you provided in the update.

Fatal error: Cannot redeclare unhtmlentities() (previously declared in /homepages/23/d95339147/htdocs/public_html/forum/includes/RSS/rss_update.php:76) in /homepages/23/d95339147/htdocs/public_html/forum/includes/RSS/rss_update.php on line 76

I would like to have this work and do appreciate your efforts.

Thank you
rocket98

Michael Morris 04-14-2004 08:39 AM

I tried to run this and got this error message...

Warning: file(http://www.wizards.com/rss.asp?x=dnd): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /http/forums/includes/RSS/rss_update.php on line 32

Warning: implode(): Bad arguments. in /http/forums/includes/RSS/rss_update.php on line 32

All Done

mirdin 04-14-2004 09:02 AM

Quote:

Originally Posted by Slapyo
Code:

$rss_title = str_replace(""", "\"", $rss_title);
$rss_description = str_replace(""", "\"", $rss_description);


Also had the same issue with " showing up, now I've added these lines, hope that works :)

Apart from that everything seems to work nicely so far.
Great job!

Slapyo 04-14-2004 01:44 PM

Quote:

Originally Posted by Michael_Morris
I tried to run this and got this error message...

Warning: file(http://www.wizards.com/rss.asp?x=dnd): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /http/forums/includes/RSS/rss_update.php on line 32

Warning: implode(): Bad arguments. in /http/forums/includes/RSS/rss_update.php on line 32

All Done

that rss feed appears to not work for me. when i follow that link i just get a blank page. that might be the cause of your problem. in fact, i went through all of their RSS feed links and none of them would load up for me. the reason it is not working, is more that likely something on their end. none of their rss feeds will load up.

VodkaFish 04-14-2004 02:31 PM

Is this hack for a single rss feed?

Slapyo 04-14-2004 02:48 PM

you can set up as many bots/rss feeds as you want.

you could use the same bot over and have it post a different feed in a different forum. or whatever you want.

Morrus 04-14-2004 05:13 PM

Quote:

Originally Posted by Slapyo
you can set up as many bots/rss feeds as you want.

you could use the same bot over and have it post a different feed in a different forum. or whatever you want.

This hack seems to be working fine!

Is there a way to change the formating of the output, though? Rather than a line break and then "View the entire article", can it be set to just append "(Read more...)" at the end of the text (no line breaks)?

ConqSoft 04-14-2004 05:16 PM

Suggestion for a future version: Ability to give a descriptive name to the feed. If you use the same userid to post multiple feeds, they all show up the same in the dropdown. :(

Also, ability to delete a feed would be nice. :)

Good work!

gmarik 04-14-2004 05:24 PM

This seems even better...

Slapyo 04-14-2004 06:22 PM

Quote:

Originally Posted by Morrus
This hack seems to be working fine!

Is there a way to change the formating of the output, though? Rather than a line break and then "View the entire article", can it be set to just append "(Read more...)" at the end of the text (no line breaks)?

if you want to change the output of the feed, just open up rss_update.php

FIND:
PHP Code:

$rss_description $rss_allItems[$j][DESCRIPTION];
$rss_description .= "{br}{br}[url=" $rss_allItems[$j][LINK] . "]View the Entire Article[/url]{br}"

REPLACE WITH:
PHP Code:

$rss_description $rss_allItems[$j][DESCRIPTION];
$rss_description .= " [url=" $rss_allItems[$j][LINK] . "](Read more...)[/url]{br}"

you can format it however you like. but this is the section where you would modify the formatting of the post itself. note, you use the {br} tag to create breaklines, not the standard <br /> tag.

Slapyo 04-14-2004 06:23 PM

Quote:

Originally Posted by ConqSoft
Suggestion for a future version: Ability to give a descriptive name to the feed. If you use the same userid to post multiple feeds, they all show up the same in the dropdown. :(

Also, ability to delete a feed would be nice. :)

Good work!

ya, i noticed this problem too ... but now that i pretty much have the insertion of the post going good i can work on additional features for it.

sjau 04-14-2004 08:04 PM

Hmmmm, good work to have opened a new thread with a fixed version :)

ckaosII 04-14-2004 08:38 PM

Ehhh,

Sorry for not being an expert her..

I'm new to this stuff :rolleyes:

I've followed your install instruction, and now what? How do I get to work? Can I use other rss feeds?

I've noticed a Hacks section in my admincp containing: RSS News Feed but don't know how to configure it, would have been nice with a COMPLETE install/configure instruction for dummies like me :nervous:

ckaosII 04-14-2004 09:18 PM

Hello,


Woahh, got it to work all by my self :rolleyes:

SnowBot 04-14-2004 11:01 PM

Well i just cant understand this at all, i have it working fine on one of my boards, mostly un-hacked as its a new project.

www.thepremierleague.co.uk

But its still not working on

www.synergyforums.com I have done the exact thing but still doesnt work. I get no errors but nothing is being posted, all i can think of is that its another hack thats messing this up. synergyforums is hacked and modded a great deal.

I will PM you an admin login like was said and see if you can figure something out. Maybe you can tell what hack maybe stopping this from posting the feed.

Slapyo 04-15-2004 03:06 AM

i have added in the ability to delete bots. until i can add in the ability to give a bot a description, i include the bot id next to the bot's name. hopefully this will help clear up some confusion as to the bots.

the only file edited was /admincp/rss_admin.php if you want to just upload that file.

Dontom 04-15-2004 04:07 AM

Quote:

Originally Posted by Slapyo
i have added in the ability to delete bots. until i can add in the ability to give a bot a description, i include the bot id next to the bot's name. hopefully this will help clear up some confusion as to the bots.

the only file edited was /admincp/rss_admin.php if you want to just upload that file.

perfect - thank you!
I have a problem with one feed - it just wont work (other feeds worked for me)
Can someone tell me whats wrong with this one?
http://www.procycling.de/news/news_rss.php

Thank you
Tom


All times are GMT. The time now is 02:13 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.01615 seconds
  • Memory Usage 1,854KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_html_printable
  • (3)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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