The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Hey Kevin,
Just getting a chance to do this now, been so busy. Should I just keep my cron to run rssposter and do it for each minute and keep the limit to 1? What would happen if the previous feed is taking more than 1 minute to retrieve, should it cause an error? Thanks again Kevin! --------------- Added [DATE]1353368318[/DATE] at [TIME]1353368318[/TIME] --------------- Sorry Kevin, I just noticed I have this in the vb4 forum! I am using vb3 - This was the only thing I wanted to upgrade to vb4 but it didn't change. I am not sure, but I think this is the code from vb3 that has been changed for vb4: Code:
// ############################################################################# if ($_POST['do'] == 'updatestatus') { $vbulletin->input->clean_gpc('p', 'enabled', TYPE_ARRAY_UINT); $feeds_result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "rssfeed ORDER BY title"); while ($feed = $db->fetch_array($feeds_result)) { $old = ($feed['options'] & $vbulletin->bf_misc_feedoptions['enabled'] ? 1 : 0); $new = ($vbulletin->GPC['enabled']["$feed[rssfeedid]"] ? 1 : 0); if ($old != $new) { $feeddata =& datamanager_init('RSSFeed', $vbulletin, ERRTYPE_ARRAY); $feeddata->set_existing($feed); $feeddata->set_bitfield('options', 'enabled', $new); $feeddata->save(); } } exec_header_redirect('rssposter.php'); } print_cp_header($vbphrase['rss_feed_manager']); |
#12
|
|||
|
|||
Quote:
Quote:
I did a diff of the vb3 and vb4 rssposter.php and there are only minor differences, so I wouldn't worry about that issue. |
#13
|
|||
|
|||
Thanks Kevin
I don't think it should take more than 1 minute to run the feeds, I am going to try it now. Should the code be changed like this: Code:
// ############################################################################# if ($_POST['do'] == 'updatestatus') { $vbulletin->input->clean_gpc('p', 'enabled', TYPE_ARRAY_UINT); $feeds_result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "rssfeed ORDER BY title"); while ($feed = $db->fetch_array($feeds_result)) { $old = ($feed['options'] & $vbulletin->bf_misc_feedoptions['enabled'] ? 1 : 0); $new = ($vbulletin->GPC['enabled']["$feed[rssfeedid]"] ? 1 : 0); if ($old != $new) { $feeddata =& datamanager_init('RSSFeed', $vbulletin, ERRTYPE_ARRAY); $feeddata->set_existing($feed); $feeddata->set_bitfield('options', 'enabled', $new); ORDER BY lastrun ASC LIMIT 1 $feeddata->save(); } } exec_header_redirect('rssposter.php'); } print_cp_header($vbphrase['rss_feed_manager']); Thanks Kevin for all the help |
#14
|
|||
|
|||
That's the wrong file: you want to change includes/cron/rssposter.php. It should look just like what I posted above.
|
#15
|
|||
|
|||
Opps...Red face...
Thanks Kevin. Just doing this now --------------- Added [DATE]1353448949[/DATE] at [TIME]1353448949[/TIME] --------------- Hey Kevin, Been working with this all day - The code you posted works I changed the limit to 10 because my feeds weren't updating enough - It worked for a while but then suddenly stopped. Even by running the RSS feeds manually, nothing updated - When I unchecked all feeds, then checked a few and run the update manually, they worked. Not sure why it would be doing this.. When I run manually with the code included at a limit of 10 it never gets an error or times out, it just shows the page after checking feeds but with no feeds retrieved, I'm not sure why it would be happening. |
#16
|
|||
|
|||
Hey,
Just wanted to know if anyone can help please, still having the same problem |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|