How to Limit the Number of Videos That Can Be Uploaded in a Day in Clip-Bucket v2.6


A couple of days ago, a user at the forum asked how to limit the amount of videos that can be uploaded in a day; looking at the script I found the tweak was very simple to do, so I am writing an article for all of you that would like to limit the videos to X per day. Tested in Clip-Bucket v2.6.

Difficulty level: Easy

1. Back up upload.php, located in ./*

2. Open upload.php

If you have made changes/modifications in the past to that file, please read this post for step by step instruction, so you don’t lose your previous work:

3. Delete everything from the file and copy paste these: (This examples limits upload to 4, to change, look for if($row >= ‘4’) and edit that number to your needs)


 | Copyright (c) 2007-2008 All rights reserved.    
 | @ Author   : ArslanHassan                                        
 | @ Software : ClipBucket , ©
 | @ Modified : June 14, 2009 by Arslan Hassan


require 'includes/';


//Checking if user is guest  
    $verify_logged_user = true;
    $verify_logged_user = false;

//Check if the upload limit has been exceeded
$currdate = date("Y-m-d"); //Get current date in format YYYY-DD-MM like in database
$q = "SELECT COUNT(*) FROM cb_video WHERE datecreated='{$currdate}'"; // Query to count videos with that date
$res = mysql_query($q);
$row = mysql_fetch_assoc($res);
//$row <- will contain the current number of videos upload with that date
//We will now check with an if statement if the limit has been exceeded.
if($row >= '4') { // if it HAS BEEN exceeded
        } else { //if NOT BEEN    

    $file_name = time().RandomString(5);

    $step = 1;

            $_POST['file_name'] = time().RandomString(5);

            $vid = $Upload->submit_upload();
            //echo $db->db_query;
            //Call file so it can activate video


    //Assigning Form Name [RECOMMEND for submitting purpose]

    //Adding Uploading JS Files
}//End our check


//Displaying The Template


4. Save and Upload.

You’ve now finished. If you have any problem, question, comment, please let me know and I’ll get back to you ASAP.

Best Regards,
Owner of Juapo2Services

Looking for quality ClipBucket hosting? Try out Arvixe and you won’t be disappointed.
Tags: , , , , , , , , , , , , , , , , | Posted under ClipBucket | RSS 2.0

Author Spotlight

Richi González

I started programming when I was 12. I'm a Developer and have been working with the Clip-Bucket script since it came out. I'm the Liaison between Arvixe and Clip-Bucket, so anything you need regarding Clip-Bucket or any particular computer-related subject you need, let me know so I can assist you.

2 Comments on How to Limit the Number of Videos That Can Be Uploaded in a Day in Clip-Bucket v2.6

  1. khuram says:

    Please help me to limit the total number of video upload and size as well for the registered users only,,, i mean i do not want to limit admin but i want to limit all other user to upload e.g only 5 videos with the maximum file size 50mb.

Leave a Reply

Your email address will not be published. Required fields are marked *