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

no because they are new posts, however this has been suggested and you can fix it by opening up the file and modifying the search criteria for today's posts or new posts.

there is a new field in the tableprefix_THREAD table and it is called rss_feed. just add this into the query:

WHERE rss_feed!=1

that should work. not at my computer right now so i could double check, but that should eliminate all news posts from being brought up since they will have a 1 in the column and normal fields won't.

smsmasters 06-22-2004 04:47 PM

Thanks, how about the max execution time of 30 seconds? It keeps timing out!

smsmasters 06-22-2004 04:48 PM

I added : http://www.smsmasters.co.uk/forum/se...72,73,74,75,76

Slapyo 06-22-2004 05:04 PM

the time out could be related to your feed you are grabbing. what is the URL to the news feed. the script doesn't take long to run at all. but it could be timing out waiting for the rss file.

smsmasters 06-22-2004 05:22 PM

well, I have about <10 newsfeeds:

http://rss.news.yahoo.com/rss/software
http://rss.news.yahoo.com/rss/tech
http://rss.news.yahoo.com/rss/internet
http://rss.news.yahoo.com/rss/topstories
http://rss.news.yahoo.com/rss/wireless
http://news.bbc.co.uk/rss/newsonline...age/rss091.xml
http://news.bbc.co.uk/rss/newsonline...ews/rss091.xml
http://news.bbc.co.uk/rss/newsonline...ogy/rss091.xml
http://news.bbc.co.uk/rss/newsonline...ent/rss091.xml
http://news.bbc.co.uk/rss/newsonline...lth/rss091.xml

smsmasters 06-22-2004 05:27 PM

Hmm, strange, if I run the cron job manually it times out, but if I let ir run automatically, it's fine!

Slapyo 06-22-2004 06:55 PM

it might time out because of the number of feeds.

Intex 06-22-2004 08:09 PM

The 30 second timeout is a PHP function. You can change this to whatever value you like in your PHP.INI I believe.



Quote:

Originally Posted by smsmasters
Thanks, how about the max execution time of 30 seconds? It keeps timing out!


Slapyo 06-22-2004 11:01 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

ya, this problem has been resolved.

rsuplido 06-23-2004 12:05 AM

In their tutorial, there is a rssfeed.php file that is called from cron. Where can I get this?

Thanks.

Slapyo 06-23-2004 12:42 AM

you can call this script from cron if you want to.

call rss.php .... thats the file that triggers everything.

Natch 06-23-2004 06:46 AM

I have a small modification to the admincp/rss_admin.php to make the listing of Bot's more intuitive in the RSS News Feed Manager => Modify Bots ...

Find:
PHP Code:

// ########################## EDIT USER DISPLAY ############################
} else if ($_REQUEST['do'] == 'editUsers') {
    
print_form_header('rss_admin''update_editUser');
    
print_table_header('Edit a Bot');
    
$var "<select name=\"rss_userid\" id=\"sel_rss_userid\" class=\"bginput\">";

    
$query $DB_site->query("SELECT * FROM " TABLE_PREFIX "rss_user");
    while(
$data $DB_site->fetch_array($query)) {
        
$rss_userid $data['rssuserid'];
        
$rss_username $data['userid']; 

Add after:
PHP Code:

        $rss_source $data['source']; 

Then Find [four lines down from the last modification]:
PHP Code:

        $var .= "<option value=\"$rss_userid\">$rss_username (id: $rss_userid)</option>"

Replace with:
PHP Code:

        $var .= "<option value=\"$rss_userid\">$rss_source (feed id: $rss_userid)</option>"

HTH

Intex 06-23-2004 01:08 PM

Slapyo - I'm lost. How is the duplication issue being resolved?



Quote:

Originally Posted by Slapyo
you can call this script from cron if you want to.

call rss.php .... thats the file that triggers everything.


Intex 06-23-2004 01:09 PM

Natch - very useful, thx :).



Quote:

Originally Posted by Natch
I have a small modification to the admincp/rss_admin.php to make the listing of Bot's more intuitive in the RSS News Feed Manager => Modify Bots ...

Find:
PHP Code:

// ########################## EDIT USER DISPLAY ############################
} else if ($_REQUEST['do'] == 'editUsers') {
    
print_form_header('rss_admin''update_editUser');
    
print_table_header('Edit a Bot');
    
$var "<select name=\"rss_userid\" id=\"sel_rss_userid\" class=\"bginput\">";
 
    
$query $DB_site->query("SELECT * FROM " TABLE_PREFIX "rss_user");
    while(
$data $DB_site->fetch_array($query)) {
        
$rss_userid $data['rssuserid'];
        
$rss_username $data['userid']; 

Add after:
PHP Code:

        $rss_source $data['source']; 

Then Find [four lines down from the last modification]:
PHP Code:

        $var .= "<option value=\"$rss_userid\">$rss_username (id: $rss_userid)</option>"

Replace with:
PHP Code:

        $var .= "<option value=\"$rss_userid\">$rss_source (feed id: $rss_userid)</option>"

HTH


Kraydl 06-23-2004 02:00 PM

The post duplication problem.

Quote:

Originally Posted by Slapyo
ya, this problem has been resolved.

Slap, does the latest version have that fix in it?
Thanks.

Slapyo 06-23-2004 02:37 PM

nope, but if intex doesn't mind i would like to add this into the full release version. intex?

Slapyo 06-23-2004 02:39 PM

Quote:

Originally Posted by Kraydl
The post duplication problem.



Slap, does the latest version have that fix in it?
Thanks.

actually the post duplicate problem hasn't been resolved yet and that code wouldn't help since it was mine. it was a really old version of the code and still has the same stuff in it, someone changed the "created by" in the top of the rss_update.php. what i meant, was the problem had been resolved from them hosting the file off of their site.

Kraydl 06-23-2004 02:42 PM

Ah okay. I'm going to hold off installing that yet till the dup thing is fixed. Great work on the effort you have put into it so far.

Slapyo 06-23-2004 03:24 PM

i'm gonna work on the dup thing today. check back later on, might be updated.

Slapyo 06-23-2004 05:59 PM

ok, i am at work and made some changes but can't test it out.

Version 1.26 (23 June 2004 - Slapyo, Natch)
- listing of bot's more intuitive (Natch)
- hopefully fixed duplicate problem (Slapyo)
- stripped html tags from title and description (Slapyo)

for comparing the RSS feed with whats in the database, i just applied the same things i do before inserting the post. so it should be the same. i also applied Natch's hack to make listing the bots easier.

files changed:
- rss_admin.php
- rss_update.php

dethfire 06-23-2004 06:31 PM

Quote:

Originally Posted by Slapyo
ok, i am at work and made some changes but can't test it out.

Version 1.26 (23 June 2004 - Slapyo, Natch)
- listing of bot's more intuitive (Natch)
- hopefully fixed duplicate problem (Slapyo)
- stripped html tags from title and description (Slapyo)

for comparing the RSS feed with whats in the database, i just applied the same things i do before inserting the post. so it should be the same. i also applied Natch's hack to make listing the bots easier.

thanks!!! do we have to run any queries to update or just overwite the files?

dethfire 06-23-2004 06:49 PM

running the update

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

Slapyo 06-23-2004 09:46 PM

sorry, no need to run the update. actually i should remove those from the install cause there is nothing to update from really. that was from the previous script.

the rss_admin.php and rss_update.php were the only files edited, so you just have to upload those.

Natch 06-24-2004 03:07 AM

Thanks - I'll let you know how this goes with the dup. posting ...

Intex 06-24-2004 08:07 AM

Slapyo - the only additional code I offered was excluding certain forums from the search (utilising 2 search scripts). If this is what you meant, go ahead, fine by me.



Quote:

Originally Posted by Slapyo
nope, but if intex doesn't mind i would like to add this into the full release version. intex?


smsmasters 06-24-2004 08:22 AM

Where's the code to exclude certain forums from search?

Intex 06-24-2004 09:12 AM

I posted it way back in this thread HERE.

Slapyo 06-24-2004 03:11 PM

sorry intex, i meant Natch, but thought it was you because i saw the code in your post, but it was a quote of Natch. and yes, actually i would like to include your code to remove the posts from search because i know some people have requested that. thanks.

Blackbeard 06-24-2004 03:33 PM

Top 100 Most-Subscribed-To RSS Feeds

http://radio.xmlstoragesystem.com/rcsPublic/rssHotlist

hope this is of some use

Blackbeard 06-24-2004 04:39 PM

Done the install, set up a bot etc, then ran the schedule and got this error

Parse error: parse error in /home/httpd/vhosts/l**********.com/httpdocs/forums/includes/functions_newpost.php on line 1187

line 1187 is

?>

whats happening here

Slapyo 06-24-2004 09:59 PM

look and see if there is any extra white space at the end of the file. ?> should be the very last thing, there shouldn't be anything else after it, not even spaces.

Intex 06-25-2004 06:09 AM

I believe this is the most comprehensive database of all RSS Newsfeeds websites: http://www.syndic8.com/. Hopefully you'll find everything there you need.

Blackbeard 06-25-2004 01:09 PM

Quote:

Originally Posted by Slapyo
look and see if there is any extra white space at the end of the file. ?> should be the very last thing, there shouldn't be anything else after it, not even spaces.

Just checked that and no spaces, still click run now in schedule manager and same error message comes up and no posts have been made in the forum i set the bot up to.

Slapyo 06-25-2004 03:18 PM

the only thing i could suggest to you is to go and download vbulletin again ... then take:

/forums/includes/functions_newpost.php

so you have a fresh new copy. apply the edits to the file that are listed in the instructions, then try it again.

Blackbeard 06-26-2004 04:02 PM

Ok Thanks

Natch 06-27-2004 05:58 AM

Great work Slapyo - the duplicates seem to be gone :)

Slapyo 06-28-2004 06:19 AM

whew! good to know. lemme know if they are still there, or if you notice any other problems.

Intex 06-28-2004 06:03 PM

Yep, gone for me too. Thx. Slapyo.

Deimos 06-28-2004 11:53 PM

I've got a problem with it to
Installed it AOK, ran the cron job and it picked up the news from the page I wanted it to...that was 2/3 days ago and it hasn't updated/got anymore news since then
Any ideas why?
I re ran the cron job and it didn't update it either.

gmtalk 06-29-2004 12:09 AM

Is the news feed updated?

Some of my feeds are only updated M-F


All times are GMT. The time now is 11:31 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.03685 seconds
  • Memory Usage 1,843KB
  • 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
  • (8)bbcode_php_printable
  • (9)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