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)

Slapyo 04-15-2004 04:31 AM

what are the other feeds you are using? the only thing i can think of is in the feed that isn't working, the date field is called dc:date ... but in the script it is looking for pubDate.

what are the errors, or are there no errors showing up at all?

Dontom 04-15-2004 05:18 AM

no errors at all - just a blank page if i call rss.php

Slapyo 04-15-2004 05:46 AM

i think the problem is in the name of the date field. what is the url of the other news feeds you us?

SnowBot 04-15-2004 05:47 AM

All works fine on vb 3.0.1 if anyone wonders.

jluerken 04-15-2004 06:18 AM

Quote:

Originally Posted by SnowBot
All works fine on vb 3.0.1 if anyone wonders.

I am using php 4.2.2 and changes the lines in /includes/RSS/rss_update.php like described but starting the task will result in the following error:

Fatal error: Cannot redeclare fix_unhtmlentities() (previously declared in /home/www/web1/html/forum/includes/RSS/rss_update.php:76) in /home/www/web1/html/forum/includes/RSS/rss_update.php on line 76

ckaosII 04-15-2004 07:06 AM

Donton wrote:
Quote:

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
I have also problems with all news feeds containing:

<?xml version="1.0" encoding="ISO-8859-1" ?>
- <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:hr="http://www.w3.org/2000/08/w3c-synd/#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">

I only got feeds containing:

<rss version="x.x">

to work 100%



Looks like it's only able to read: "RSS feeds" and NOT "RDF feeds" ?!

Is it possible to add support for RDF feeds to?

Slapyo 04-15-2004 01:14 PM

maybe later on ckaos ... i'll look into it.

i am still having a problem with the users who have a version of PHP prior to 4.3.0 ... the odd thing is the error that they get. it tells you that you can't redeclare the function, yet this is the only place the function is setup/called. you can changed the name to anything you want and it still gives this error. so i am not sure as to how i am redeclaring something even though it is the only time i have declared it. still working on it.

rocket98 04-15-2004 07:07 PM

Quote:

Originally Posted by Slapyo
maybe later on ckaos ... i'll look into it.

i am still having a problem with the users who have a version of PHP prior to 4.3.0 ... the odd thing is the error that they get. it tells you that you can't redeclare the function, yet this is the only place the function is setup/called. you can changed the name to anything you want and it still gives this error. so i am not sure as to how i am redeclaring something even though it is the only time i have declared it. still working on it.

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

Slapyo, u fixed it for me. Moving the function outside the other else/if statements stopped the loop declaration. I still have the 4 bots running every 4 hours, but will set them to run every hour and see what happens. So far so good.

Thank you for your work on this one.

rocket98

Slapyo 04-15-2004 07:17 PM

ok, i am pretty sure i have the fix for users with a PHP version prior to 4.3.0. the only differences between the 2 sets of files i have uploaded are some comments.

- rss_bot_#.##.zip - download this if you have PHP 4.3.0 & above
- rss_bot_#.##a.zip - download this if you have PHP prior to 4.3.0

Acido 04-15-2004 08:17 PM

Quote:

Originally Posted by Slapyo
ok, i am pretty sure i have the fix for users with a PHP version prior to 4.3.0. the only differences between the 2 sets of files i have uploaded are some comments.

- rss_bot_#.##.zip - download this if you have PHP 4.3.0 & above
- rss_bot_#.##a.zip - download this if you have PHP prior to 4.3.0

BIG THANX Slapyo !

Now i have not more problems with Quotes \" and not more duplications.

I'm using rss_bot1.23a with PHP 4.3.4

;)

Slapyo 04-15-2004 08:49 PM

actually rss_bot_1.23a is for people with a PHP version prior to 4.3.0 and you have PHP above 4.3.0 ... you should use rss_bot_1.23 .... but either way, it is working. they should work, it's just that the in rss_bot_1.23 i use a function that was not introduced till 4.3.0 and so i had to insert a workaround.

rss_bot_1.23 - normal
rss_bot_1.23a - workaround for PHP prior to 4.3.0

the workaround obviously works for either PHP above and below 4.3.0.

Aleksey 04-16-2004 12:30 AM

I don't get it... what do I put for "Source"?

Slapyo 04-16-2004 12:39 AM

you find a rss news feed. in my first post announcing this hack i listed a few different rss news feeds.

https://vborg.vbsupport.ru/showthread.php?t=63798

i'm using the yahoo sports news feed for my site. but you can use whatever feed(s) you would like to on your site. you can have more than one.

Aleksey 04-16-2004 12:49 AM

I mean like do I put in "Yahoo!" or I put in url?

Slapyo 04-16-2004 12:54 AM

oh, you would put in the URL to the RSS feed.

Aleksey 04-16-2004 12:56 AM

Would that be http://rss.news.yahoo.com/rss/music or http://rss.news.yahoo.com/rss

Slapyo 04-16-2004 12:58 AM

the music one. it has the data that you want. you can tell when you open the link to the rss feed up in the browser.

Aleksey 04-16-2004 01:00 AM

Alright and it runs every hour, is there anyway I can manualy run it so I can see if it works or not?

EDIT: Sorry for all these question, I'm kind of retarded.

Slapyo 04-16-2004 01:03 AM

yes, once you have set up your cron job in the scheduled tasks manager. you can open up the scheduled tasks manager and tell the cron job to run now. there is a button to the far right on every line for every cron job.

Aleksey 04-16-2004 01:20 AM

thanks a lot

Aleksey 04-16-2004 01:32 AM

Another thing, is there anyway to make it post whole article? Like look http://www.digitalwebforums.com/forumdisplay.php?f=19 it posts just stupid 2 lines of news and then says "View whole article here" I want it to post whole articles without those links, is that possible?

Slapyo 04-16-2004 01:38 AM

nope. the news feed would have to have the entire article in it. that leaves it up to the website producing the news feed. some news feeds have longer descriptions than others. but most don't include the whole article.

Aleksey 04-16-2004 01:39 AM

Ehh then this is useless...

dethfire 04-16-2004 02:40 AM

I still get duplicates from yahoo rss, using 1.23

Slapyo 04-16-2004 03:05 AM

hm, i'm not getting duplicates and i am using yahoo. which feed are you using from yahoo?

dethfire 04-16-2004 03:06 AM

world news and politics

Slapyo 04-16-2004 03:11 AM

can you look in your database in the vb3_thread table and see if it is filling the rss_feed and rss_date fields?

it should be filling them and then it checks the date in the rss_date field against the dates in the feeds.

dethfire 04-16-2004 03:26 AM

yeah it fills just fine, it's not like it duplicates right away, it seems to run but run a few times

Slapyo 04-16-2004 03:38 AM

could it be the news articles are closely related? maybe try getting a copy of the rss feeds when it runs, then get more copies later on and compare them. that's what i would try to do.

the script checks the article title and the pubdate of the article. if both are the same, it is marked as old and not posted.

PranK 04-16-2004 03:43 AM

Quote:

Originally Posted by mirdin
Not likely. I believe the old hack would fetch the rss feed every time someone would enter the forum.

For this one you have to set a cronjob.


fantastic! thanks!

will_lean 04-16-2004 05:35 AM

HELP i installed this hack and it doesnt seem to post to the forum?
ived tried yahoo,slashdot and a few others and none of them seem to be working.
If i call rss.php i get a blank page,in adminCP i try to "run cron job"n as a test and it shows me a page with "rss" on it?
any ides what would be causing this to not display anything?

Slapyo 04-16-2004 05:41 AM

did you run the install file?
what version of php do you have?
whats the url of the rss feeds you are trying to use?
do you have the bots set up properly with the right user id and forum id?
is the cron job set up correctly in the scheduled tasks manager?

will_lean 04-16-2004 05:44 AM

yes i ran install fine,im using php 4.3.3
im using the yahoo and slashdot feeds from your intro post as well as a few other music site feeds.
I set the forum id to my news forum and have also tried the music forum but both dont show any news and rss.php is blank?

heres a feed i tried to use
http://rapdirt.com/newsrss10.php

i also have cron job set to 1 hour and have tested it but it shows a blank page with the letters rss at the top

Slapyo 04-16-2004 05:59 AM

that feed won't work because it is a rdf feed....for now this only works with rss feeds. however the yahoo feeds and slashdot feeds are rss and will work.

could you post the info in your scheduled task, and possibly a screen shot of the page with rss at the top.

when you make the script run from the scheduled task manager, all you should see is the name you gave the task.

will_lean 04-16-2004 06:05 AM

hmmm it seems as though it was the feed i was using they were RDF,ive tried another feed and it seems to work :)
but the posts seem to be formatted as so:
Quote:

<![CDATA[<p>Late last year, the RIAA confiscated up to 1,000 mixed CD's from Alan Berry's Indianapolis stores -forcing him to close the famed Hip-Hop franchise a few months later. Now, Berry is taking his RIAA fight to the hip-hop streets and calling artists like <b>50 Cent</b>, <b>Jay-Z</b> and <b>Eminem</b> to his defense.</p>]]>
any idea how i can get rid of the tags or is it the feeds im using?

Slapyo 04-16-2004 06:19 AM

that is happening because of the feed you are using. some have the CDATA tags in front and behind. i'm not sure if this will work. it should. it is just replacing the things you don't want with what they should be, or in some cases nothing.

in rss_update.php FIND:
// Setup the thread

ABOVE ADD:
PHP Code:

$rss_title str_replace("<![CDATA[["""$rss_title);
$rss_description str_replace("<![CDATA[["""$rss_description);
$rss_title str_replace("]]"""$rss_title);
$rss_description str_replace("]]"""$rss_description);
$rss_title str_replace("<p>"""$rss_title);
$rss_description str_replace("<p>"""$rss_description);
$rss_title str_replace("</p>"""$rss_title);
$rss_description str_replace("</p>"""$rss_description);
$rss_title str_replace("<b>""[b]"$rss_title);
$rss_description str_replace("<b>""[b]"$rss_description);
$rss_title str_replace("</b>""[/b]"$rss_title);
$rss_description str_replace("</b>""[/b]"$rss_description); 


Mobile 04-16-2004 07:59 AM

is there anyway to remove these posts from the search option because i've got a massive rss feed with about 400 posts and it gets too much looking through all the posts.

Mobile

Slapyo 04-16-2004 01:00 PM

actually the 2nd news feed by wolfstream did this. try this: https://vborg.vbsupport.ru/showpost....&postcount=139

they were manually inserted into the database so post count doens't go up for those threads, similiar threads won't work for the posts, and you won't be able to search them at all. however, i don't offer any support for that version.

SnowBot 04-16-2004 03:02 PM

Any news on fixing my problem yet ?

AWS 04-16-2004 03:10 PM

The problem with dupe posts seems to be a problem with vbulletin cron. If I run the script manually it does not post duplicates. If it runs via cron.php it runs more than once and posts duplicates. The script will run until it times out when it reaches the php timeout or until the next scheduled task is to run.
Whne I figure out a fix I'll post it.


All times are GMT. The time now is 02:07 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.02720 seconds
  • Memory Usage 1,831KB
  • 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
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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