View Single Post
Old 06-08-2013, 08:45 AM  
Zeiss
Confirmed User
 
Industry Role:
Join Date: May 2012
Location: With your mom
Posts: 5,189
If you are using TGPX, can you check this?

I need to find a way to run certain gallery scanner with cron. I don't find a case for this in the cron.php. Anyone know how to do this?

Something like this will do it. But I don't know what else to include.

Code:
if( $configuration['import_rss'] )
{

    $DB->Update('UPDATE `PREFIX_scanner_configs` SET `current_status`=?,`status_updated`=? WHERE `config_id`=?',
                array("Importing galleries from RSS",
                      time(),
                      $config_id));

    $result = $DB->Query('SELECT * FROM `PREFIX_rss_feeds`');
    $total_feeds = $DB->NumRows($result);
    $current_feed = 0;
    while( $feed = $DB->NextRow($result) )
    {
        $current_feed++;

        $DB->Update('UPDATE `PREFIX_scanner_configs` SET `current_status`=?,`status_updated`=? WHERE `config_id`=?',
                array("Importing galleries from RSS feed $current_feed of $total_feeds",
                      time(),
                      $config_id));

        ImportFromRss($feed);
    }
    $DB->Free($result);
}
Ideas, please!
__________________


Adult Webmasters Guides

Last edited by Zeiss; 06-08-2013 at 08:48 AM..
Zeiss is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote