Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2013, 07:39 PM
ROTPAR ROTPAR is offline
 
Join Date: May 2004
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default rss bot

hi, i want the rss bot to check for new update all 24 or 48 hours. The problem is, in the settings dropdown i only can choos 12 hours as maximum. What could I do to change that to 28 hours?

2.) I noticed that there seems to be a problem, if I use 4 rss bot, posting from 4 different sources. Each of the bots is using a own nickname. If they all post, it doesnt work, nothing happens but if I deactiveate 3 of the bots, the one left, is working. Whats wrong there?

thank you for any help
Reply With Quote
  #2  
Old 04-04-2013, 12:09 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you edit file admincp/rssposter.php, around line 363 is the end of the list of choices:
Code:
	  36000 => construct_phrase($vbphrase['x_hours'], 10),
	  43200 => construct_phrase($vbphrase['x_hours'], 12),
	), $feed['ttl']);

If you want, you can add some lines to that, like:
Code:
	  36000 => construct_phrase($vbphrase['x_hours'], 10),
	  43200 => construct_phrase($vbphrase['x_hours'], 12),
	  86400 => construct_phrase($vbphrase['x_hours'], 24),
	  172800 => construct_phrase($vbphrase['x_hours'], 48),
	), $feed['ttl']);

(The first number is the number of seconds in that many hours). I looked at the rss poster code and it looks like that's the only change you should have to make, but I haven't actually tried it.

As for your second issue, I think some feeds contain something that causes an error in the rss poster code and it crashes, so the other feeds don't get processed. I helped someone a few months ago with a similar problem, but I never heard back from him to know if it worked. Maybe later I'll have a chance to dig it up and see what the fix was.
Reply With Quote
  #3  
Old 04-04-2013, 07:28 AM
ROTPAR ROTPAR is offline
 
Join Date: May 2004
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey kh99 Great thank you so much. I will try that and if you find a Solution for the other, that would be awesome Thank you for your help
Reply With Quote
  #4  
Old 04-06-2013, 11:30 AM
ROTPAR ROTPAR is offline
 
Join Date: May 2004
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok it looks like this:

Quote:
print_select_row($vbphrase['check_feed_every'], 'ttl', array(
600 => construct_phrase($vbphrase['x_minutes'], 10),
1200 => construct_phrase($vbphrase['x_minutes'], 20),
1800 => construct_phrase($vbphrase['x_minutes'], 30),
3600 => construct_phrase($vbphrase['x_minutes'], 60),
7200 => construct_phrase($vbphrase['x_hours'], 2),
14400 => construct_phrase($vbphrase['x_hours'], 4),
21600 => construct_phrase($vbphrase['x_hours'], 6),
28800 => construct_phrase($vbphrase['x_hours'], 8),
36000 => construct_phrase($vbphrase['x_hours'], 10),
43200 => construct_phrase($vbphrase['x_hours'], 12),
86400 => construct_phrase($vbphrase['x_hours'], 24),
172800 => construct_phrase($vbphrase['x_hours'], 48),
259200 => construct_phrase($vbphrase['x_hours'], 72),
345600 => construct_phrase($vbphrase['x_hours'], 96),
432000 => construct_phrase($vbphrase['x_hours'], 120),
518400 => construct_phrase($vbphrase['x_hours'], 144),
), $feed['ttl']);
The problem is, if I want to select 120 hours or what ever I added, it will reset to default 30 minutes after I saved. Any ideas?

Thank you
Reply With Quote
  #5  
Old 04-06-2013, 11:47 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, you would also need to edit file includes/class_dm_rssfeed.php and find this around line 162, and add the lines in red:

Code:
switch ($ttl)
{
	case 518400: // every 144 hours	
	case 345600: // every 96 hours
	case 432000: // every 120 hours
	case 259200: // every 72 hours
	case 172800: // every 48 hours
	case 86400: // every 24 hours
        case 43200: // every 12 hours
	case 36000: // every 10 hours

Apparently when the code was written, someone felt it was important to make sure that value could only be set to one of the "official" values.

I'll look for that other code to see if the fix helps you.
Reply With Quote
  #6  
Old 04-06-2013, 11:57 AM
ROTPAR ROTPAR is offline
 
Join Date: May 2004
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Didn't help, sorry that is really weird and I dont understand why vbulletin gives my only minutes values.
Reply With Quote
  #7  
Old 04-06-2013, 12:06 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ROTPAR View Post
Didn't help, sorry that is really weird and I dont understand why vbulletin gives my only minutes values.
Hmm..OK, there may be some other check somewhere. I'll have to look around more.

As for the other issue, What I told the guy is this: In file includes/cron/rssposter.php, around line 453, I made this change (add the curly brace in red, delete the one in blue on the last line):

Code:

}
	if (!empty($feeds))
	{
		// update lastrun time for feeds
		$vbulletin->db->query_write("
			UPDATE " . TABLE_PREFIX . "rssfeed
			SET lastrun = " . TIMENOW . "
			WHERE rssfeedid IN(" . implode(', ', array_keys($feeds)) . ")
		");
	}

}

I don't remember the reasoning behind it, and I don't know exactly what your problem is, so I don't know if this will fix it. But I think it had something to do with the fact that if a feed has a problem, the original code will just keep trying that feed over and over. This change makes it update the feed check time so that it will cycle through the other feeds instead of getting stuck on one.
Reply With Quote
  #8  
Old 04-06-2013, 12:20 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ROTPAR View Post
Didn't help, sorry that is really weird and I dont understand why vbulletin gives my only minutes values.
OK, the (hopefully last) problem is that the field in the database where the time is saved is a "smallint" which only holds up to 65535. So if you really want to do this, you can modify the rssfeed table in the database and change the ttl field to be mediumint (or int if you think you'll ever want a value greater than 90 days or so).
Reply With Quote
  #9  
Old 12-17-2015, 08:47 AM
Sferle Sferle is offline
 
Join Date: Nov 2010
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the advice , I would add MySQL code:
Quote:
mysql> use "forumname"
mysql>ALTER TABLE rssfeed MODIFY ttl MEDIUMINT
forumname is your forum database !

I am now 24 and 48 hours at options.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04497 seconds
  • Memory Usage 2,244KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete