Adult Script Pro Community Forums

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.

#1 2012-02-08 19:48:36

ful2fun.com
Member
From: Usa
Registered: 2011-09-16
Posts: 1,048
Website

How To Shuffle All Videos

Hello Friends,

Anybody Know How To Shuffle All Videos As My Site Is Embedded Category Wise So I Want To Shuffle All Videos. How Can I Do That?




ful2fun.com
livesexpirates.com

Offline

#2 2012-02-09 06:49:26

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: How To Shuffle All Videos

You cannot shuffle all videos, but you can shuffle 100 for example from Admin -> Video -> Manage


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2012-02-09 07:36:01

ful2fun.com
Member
From: Usa
Registered: 2011-09-16
Posts: 1,048
Website

Re: How To Shuffle All Videos

Like video_embed.php there is hot shuffle php so we can shuffle videos or any other way  leaving admin panel to shuffle videos.

ful2fun.com
livesexpirates.com

Offline

#4 2012-02-13 07:27:47

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: How To Shuffle All Videos

Here's a small code that will shuffle XX videos for you every day (you have to run this from cron). Save code code in cron/video_shuffle.php:

<?php
define('_VALID', true);
define('CONSOLE', true);

$base_dir = realpath(dirname(__FILE__).'/../');
require $base_dir.'/libraries/bootstrap.php';

set_time_limit(0);

$db = VF::factory('database');
$db->query("SELECT video_id
            FROM #__video
            WHERE status = 1
            ORDER BY add_time ASC
            LIMIT 60");
$videos = $db->fetch_rows();
$date   = date('Y-m-d h:i:s');
$time   = time();
foreach ($videos as $video) {
    $db->query("UPDATE #__video
                SET add_time = ".$time.",
                    add_date = '".$date."'
                WHERE video_id = ".(int) $video['video_id']."
                LIMIT 1");
}

VF::close();

This will shuflly 60 videos every day for you.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#5 2012-02-14 10:04:22

ful2fun.com
Member
From: Usa
Registered: 2011-09-16
Posts: 1,048
Website

Re: How To Shuffle All Videos

symtab wrote:

Here's a small code that will shuffle XX videos for you every day (you have to run this from cron). Save code code in cron/video_shuffle.php:

<?php
define('_VALID', true);
define('CONSOLE', true);

$base_dir = realpath(dirname(__FILE__).'/../');
require $base_dir.'/libraries/bootstrap.php';

set_time_limit(0);

$db = VF::factory('database');
$db->query("SELECT video_id
            FROM #__video
            WHERE status = 1
            ORDER BY add_time ASC
            LIMIT 60");
$videos = $db->fetch_rows();
$date   = date('Y-m-d h:i:s');
$time   = time();
foreach ($videos as $video) {
    $db->query("UPDATE #__video
                SET add_time = ".$time.",
                    add_date = '".$date."'
                WHERE video_id = ".(int) $video['video_id']."
                LIMIT 1");
}

VF::close();

This will shuflly 60 videos every day for you.


Can We increase the Limit Of Videos And It Will Shuffle Randomly Or First 60 Videos


ful2fun.com
livesexpirates.com

Offline

Board footer

Powered by FluxBB