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)

rsuplido 06-09-2004 02:47 PM

Anyone having the problem of the last entry getting added again and again?

Intex 06-09-2004 03:04 PM

Yep, I'm having that problem but only with some RSS feeds that I pull into certain forums. I think it might be something to do with the website itself and the way they are presenting the information. For instance, if they update the date of a particular news heading, it's classed as new by the RSS hack script.

Slapyo - I know you built some form of checking into your script. Is this based on thread title, date or both. I would recommend it's changed to search for the title, so a search is done beforehand on existing forum threads. That way, dupilcation could be avoided. Maybe when you've finished your studies :).

rsuplido 06-09-2004 04:56 PM

Quote:

Originally Posted by Intex
Yep, I'm having that problem but only with some RSS feeds that I pull into certain forums. I think it might be something to do with the website itself and the way they are presenting the information. For instance, if they update the date of a particular news heading, it's classed as new by the RSS hack script.

Slapyo - I know you built some form of checking into your script. Is this based on thread title, date or both. I would recommend it's changed to search for the title, so a search is done beforehand on existing forum threads. That way, dupilcation could be avoided. Maybe when you've finished your studies :).

well, I tried changing that line to just check for the title and still I'm getting duplicates whenever the script runs. I was going to put this rss feature on live at my site but this bug just hinders me from doing so. :(

Slapyo 06-10-2004 03:55 AM

Quote:

Originally Posted by Deimos
Hmm i've got a problem here :(
After it's all installed, no errors show up, but when I goto Enable the mod, every user (Including me) who accesses the forums shows logged in AS the news bot? And the forum listing doesn't show up AT ALL
If I disable the mod, it returns to normal................!?

did you make sure that you modified the files like noted in the installation file? i haven't noticed this problem with the script myself.

Slapyo 06-10-2004 03:56 AM

Quote:

Originally Posted by Intex
Yep, I'm having that problem but only with some RSS feeds that I pull into certain forums. I think it might be something to do with the website itself and the way they are presenting the information. For instance, if they update the date of a particular news heading, it's classed as new by the RSS hack script.

Slapyo - I know you built some form of checking into your script. Is this based on thread title, date or both. I would recommend it's changed to search for the title, so a search is done beforehand on existing forum threads. That way, dupilcation could be avoided. Maybe when you've finished your studies :).

the rss script which goes through and checks for old posts checks for the title and the date. i haven't touched this from the original script. but i do know that it checks the title and the date.

Deimos 06-10-2004 09:17 AM

Quote:

Originally Posted by Slapyo
did you make sure that you modified the files like noted in the installation file? i haven't noticed this problem with the script myself.

Yep, I went through it all step by step. :(

Deimos 06-10-2004 09:37 AM

Ok hmm, I removed all the database entries, reuploaded all the files and tried again
When I enable the RSS Feed, I get this error

Fatal error: Call to undefined function: build_new_post() in /home/deimos/public_html/forums/includes/RSS/rss_update.php on line 103

Any ideas? heh

Slapyo 06-10-2004 04:23 PM

hrm ... i'm not sure. i'm sure that you did edit the files and upload everything to where it needs to go. but the only thing i could say is to double and triple check it.

also, do you have any other hacks installed? a while back someone installed this on 2 instances of vB. one was clean and one was hacked. he had a problem with the hacked one that we were never able to solve, and it was installed properly.

rsuplido 06-10-2004 04:40 PM

I decided to modify the program instead. I added a 'rss_url' in the threads table so I can use that as the key for comparing. I then changed the loop code in rss_update.php to compare each record via an SQL call, comparing the rss_url field. I also wanted a url column so I can easily do a news listing on my main page and have the link ready.

It's all working now. Thanks for this hack.

andyhodges 06-11-2004 12:21 AM

I am getting duplicates again... very annoying.. it's adding and adding... is there a fix for this? If so, can somebody post the instructions?

-Andy

killervette 06-11-2004 01:38 AM

me 2 ^

Slapyo 06-11-2004 06:21 AM

what news feeds are you using? the requirement from the news feed is there has to be a field <pubDate> in it ... otherwise it won't grab the date and it won't be able to check for duplicates since it checks for the title & the date.

post your news feeds that you are using.

Bobby S 06-11-2004 08:20 AM

Slapyo: awesome hack many thanks :)

I have a couple of problems:

with the feed from:

http://www.masshibsteria.com/home/in..._rss&no_html=1

I get duplicates. Viz your comment above is it because the feed lacks a pub date?

Also from this feed:

http://sport.scotsman.com/football_h...cfm?format=rss

some of the stories have an apostrophe "Hibees' strike stars will be battling it out for Riordan's crown"

and these stories are repeating and the ' is being replaced by

"Hibees&#x27; strike stars will be battling it out for Riordan&#x27;s crown"

Any ideas? :)

Bobby S 06-11-2004 08:23 AM

I should add, I've added 3 other newsfeeds without any problem :)

andyhodges 06-11-2004 11:16 AM

Quote:

Originally Posted by Slapyo
what news feeds are you using? the requirement from the news feed is there has to be a field <pubDate> in it ... otherwise it won't grab the date and it won't be able to check for duplicates since it checks for the title & the date.

post your news feeds that you are using.

I am using: http://rss.news.yahoo.com/rss/celebrity

And it does have a <pubDate> in it. It's grabbing the same top story over and over again.

-Andy

Slapyo 06-11-2004 02:34 PM

Quote:

Originally Posted by Bobby S
Slapyo: awesome hack many thanks :)

I have a couple of problems:

with the feed from:

http://www.masshibsteria.com/home/in..._rss&no_html=1

I get duplicates. Viz your comment above is it because the feed lacks a pub date?

Also from this feed:

http://sport.scotsman.com/football_h...cfm?format=rss

some of the stories have an apostrophe "Hibees' strike stars will be battling it out for Riordan's crown"

and these stories are repeating and the ' is being replaced by

"Hibees&#x27; strike stars will be battling it out for Riordan&#x27;s crown"

Any ideas? :)

ok bobby, here is what i can see.

your first feed has no pubDate field so it is not able to check if it repeats because it lacks that field.

your second feed having the ' and " in the title may be causing a problem because as you noted &#x27; does not equal ' when comparing strings.

i will look into the 2nd problem some more when i get a chance. i have 2 more finals today that are back to back and then i graduate on sunday. will have lots more time after that to work on it.

Slapyo 06-11-2004 02:35 PM

Quote:

Originally Posted by andyhodges
I am using: http://rss.news.yahoo.com/rss/celebrity

And it does have a <pubDate> in it. It's grabbing the same top story over and over again.

-Andy

andy, your problem may be the same problem as bobby ... having the ' or " in the title may mess up when it checks for duplicates. because in the database they are not stored as " or ' but html encoded. while they appear the same, the string is different. i'm gonna look more into this.

andyhodges 06-11-2004 03:11 PM

Can anyone else get this one to work? http://news.search.yahoo.com/usns/yn...?p=half-life+2

It doesn't appear to be working at all.

-Andy

Slapyo 06-11-2004 04:02 PM

what does it not do? does anything show up? it appears to have all the proper fields, but it isn't rss, it is rdf which is slightly different, notice the CDATA tags around the title.

andyhodges 06-11-2004 04:11 PM

Yeah, it doesn't show up at all.. doesn't do anything. It would be cool if this would work, because you can search for specific news. Unless, you know of one?

-Andy

proxyMX 06-11-2004 06:58 PM

Quote:

Originally Posted by yeloc
Is there a way not to add the news posts to the total posts number?

how can i moderate what news gets shown, Moderate Usergroup dosent seem to be working....

Slapyo 06-11-2004 07:32 PM

Quote:

Originally Posted by andyhodges
Yeah, it doesn't show up at all.. doesn't do anything. It would be cool if this would work, because you can search for specific news. Unless, you know of one?

-Andy

http://www.syndic8.com

you can look around on there for news feeds.

Slapyo 06-11-2004 07:33 PM

Quote:

Originally Posted by proxyMX
how can i moderate what news gets shown, Moderate Usergroup dosent seem to be working....

what exactly do you mean?

proxyMX 06-11-2004 09:34 PM

Quote:

Originally Posted by Slapyo
what exactly do you mean?

i want to select exactly what appears on my site before the bot posts it

Intex 06-13-2004 07:55 AM

Slapyo - I've just had a thought about why it might be duplicating posts for certain forums. If you've included the slight code modification highlighted by yourself in Post 222 of this thread (which strips HTML codes from the thread title), then could it be that because tags are being removed, the titles are different. Therefore, when a comparison is made, they fundamentally look different and therefore get posted as a new thread?

The reason this happens for some forums and not others, is because some RSS feeds don't use HTML tags and some do?

What do you reckon?

Slapyo 06-13-2004 08:04 AM

Quote:

Originally Posted by proxyMX
i want to select exactly what appears on my site before the bot posts it

oh you want to moderate which posts come in ... hrm, unless there is a built in option to moderate posts by forum, it's not built into the rss feed. sorry.

Slapyo 06-13-2004 08:05 AM

Quote:

Originally Posted by Intex
Slapyo - I've just had a thought about why it might be duplicating posts for certain forums. If you've included the slight code modification highlighted by yourself in Post 222 of this thread (which strips HTML codes from the thread title), then could it be that because tags are being removed, the titles are different. Therefore, when a comparison is made, they fundamentally look different and therefore get posted as a new thread?

The reason this happens for some forums and not others, is because some RSS feeds don't use HTML tags and some do?

What do you reckon?

true, that could also be it. maybe a comparison of the title with html tags stripped to a comparison of the title from the feed with html tags stripped.

dethfire 06-15-2004 03:01 AM

Fatal error: Call to undefined function: html_entity_decode() in /home/street44/public_html/forum/includes/RSS/rss_update.php on line 77

Bobby S 06-15-2004 07:45 AM

I've had a think about my problem using feeds without a publication date.

Would it be possible to modify the code, so that it only checks for similarly titled threads? Without any date checking? I think that would solve my problems at least for the meantime :)

Intex 06-15-2004 09:51 AM

I think that's a good idea and probably would solve it. You're not likely to get the same headline again - so that would work for me also.

Slapyo - any ideas?

Bobby S 06-15-2004 03:20 PM

Quote:

Originally Posted by Bobby S

http://sport.scotsman.com/football_h...cfm?format=rss

some of the stories have an apostrophe "Hibees' strike stars will be battling it out for Riordan's crown"

and these stories are repeating and the ' is being replaced by

"Hibees&#x27; strike stars will be battling it out for Riordan&#x27;s crown"

Any ideas? :)

I'm going to try manually editing the topic titles as they come in: that would hopefully solve that problem in the meantime. I'll let you know if that works. :)

Slapyo 06-15-2004 08:53 PM

Quote:

Originally Posted by Bobby S
I've had a think about my problem using feeds without a publication date.

Would it be possible to modify the code, so that it only checks for similarly titled threads? Without any date checking? I think that would solve my problems at least for the meantime :)

here you go, in rss_update.php:

FIND:
PHP Code:

        // filter out the old items
        
while($rss_thread_data $DB_site->fetch_array($rss_query)) {
            for(
$j count($rss_allItems) - 1$j >= 0$j--) {
                if(
$rss_thread_data[title] == $rss_allItems[$j][TITLE] &&
                   
$rss_thread_data[rss_date] == $rss_allItems[$j][pubDate]) {
                    
$rss_allItems[$j][OLD] = true;
                }
            }
        } 

REPLACE WITH:
PHP Code:

        // filter out the old items
        
while($rss_thread_data $DB_site->fetch_array($rss_query)) {
            for(
$j count($rss_allItems) - 1$j >= 0$j--) {
                if(
$rss_thread_data[title] == $rss_allItems[$j][TITLE]) {
                    
$rss_allItems[$j][OLD] = true;
                }
            }
        } 


Erwin 06-18-2004 04:26 AM

Anyone seen this? I get this as a cron error every hour:

Quote:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/public_html/includes/functions_newpost.php on line 690
I suspect one of the news feed is timing out. Is there a way to prevent this error being emailed to me every hour if a news feed times out?

Just wondering, and thanks for the hack.

Slapyo 06-18-2004 07:39 AM

hm, i think you would have to add in a script to watch the time and if the execution time hit 29 seconds to stop. not sure exactly how to put that in though.

checknme12 06-19-2004 04:36 PM

Stange... :( I have the newest version of the hack installed but I am still getting duplicate stories. Anyone know why this might happen? I went to bed and now I have like 7 stories saying "Intel's 3D divorce rate" and another 7 duplicating another story and so on. The duplicates are not in a row.

Please help :) My bot is nuts.

Slapyo 06-20-2004 07:03 PM

what is the link to your RSS feed?

Kraydl 06-22-2004 03:33 PM

I found this mod for RSS feeds. The code may help you discover how others tackle the post duplication problem.

http://www.w3reports.com/forumfeeds.php

dethfire 06-22-2004 03:59 PM

Quote:

Originally Posted by Kraydl
I found this mod for RSS feeds. The code may help you discover how others tackle the post duplication problem.

http://www.w3reports.com/forumfeeds.php

looks like it's the same script... copyright issues?

Slapyo 06-22-2004 04:20 PM

that was one of the original rss feed scripts that doesn't insert the news with the function built into vB. no search works, no post counts go up, nada.

smsmasters 06-22-2004 04:21 PM

I get 30 second max execution errors on my forum at www.smsmasters.co.uk My members got so fed with 17 pages worth of news in Today's Posts. Is there a way to stop these posts appearing in Today's Posts or New Posts???


All times are GMT. The time now is 10:50 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.01905 seconds
  • Memory Usage 1,852KB
  • 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
  • (2)bbcode_php_printable
  • (17)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