The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!
You are not logged in.
Pages: 1
Hi
Is it possiible to create a schedule for photo albums that will release Photo albums slowly during the course of the day or does it already exist. I have attempted to do this by
1. Create the Cron script "photo_schedule" in Admin>>Tools>Cron Scripts
2. In the database, duplicated the "video_shedule" table and named the new table "photo_shedule"
a. removed the contents of the new table
b. renamed the "video_id" field to "photo_id"
3. Creatoing the php named "photo_shedule.php" and uploaded it to "/public_html/cron/scripts"
<?php
defined('_VALID') or die('Restricted Access!');
function cron_photo_shedule()
{
update_script('photo_shedule', TRUE, FALSE);
file_put_contents('/tmp/shedule.txt', 'x');
$db = VF::factory('database');
$db->query("SELECT photo_id
FROM #__photo_shedule
WHERE shedule_date = '".date('Y-m-d')."'");
if ($db->affected_rows()) {
$rows = $db->fetch_rows();
foreach ($rows as $video) {
$photo_id = (int) $photo['photo_id'];
$db->query("UPDATE #__photo
SET status = 1
WHERE photo_id = ".$photo_id."
LIMIT 1");
if ($db->affected_rows()) {
$db->query("DELETE FROM #__photo_shedule
WHERE photo_id = ".$photo_id."
LIMIT 1");
}
}
}
update_script('photo_shedule', FALSE, TRUE);
}
?>
Is there a step I missed or is this not possible?
Thanks
Offline
Add the cron script in Admin -> Tools -> Cron Scripts.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Pages: 1