Basic Understandings

Before we move forward, there is a basic understanding that you must have. This will give you a much broader command about how the code is written, how its connected and how you can made your favorite changes.

Languages, DB, Tools and Libraries


Version 7.3, We intent to upgrade but not sure When


We used Mysqli driver

we use Smarty Templating Engine for PHP to render the template, there is no specific purpose, its just easy to carry the objects and keep the front end totally seperate.


We use FFMPEG for video conversion

VideoJS Video Player

we use video JS for Video Player, previously it was JWPlayer then they went stupid.

Other Stuff

No Rest API system At the moment...Uh oh.

We have made Functions for each object in order to easy access them across the project for example

We have a user object user.class.php and its initiated as $userquery. To get a Userid we use this method


Then we wrote a function in file functions_users.php and now we can fetch userid as


All objects names and function names are following pattern

{object}.class.php and functions{object}.class.php e.g users.class.php and functions_userrs.php

Objects, Classes & Functions

Each Object or class is mentioned in the includes/classes/ folder. We have following Major Objects, there are more but we will cover the basics.

This manages all the Operations related to the Videos, from Edit, Publishing and other important Stuff.


For those methods that are common accross all objects e.g Add_to_favorites is called in video, photos and groups so we use one class, re initate it in the object and call it e.g

in videoc.class.php we

$this->action = new cbactions();

then call this->action->add_to_Favorites


For managing Ads System


Honestly, this class does not even make sense anymore. It was for calculate dates.


Category system is integral part of ClipBucket, we Extend the category system to all major objects. e.g CBVideo in video.class.php is extended from CBCategory.

It manages the category system for all objects, we can even use on category system for multiple objects.


For sending emails and setting email templates.


ClipBucket has a built in Feeds system, this basically records all major activies of the users.


Found in the admin area, CBPage is a page management class


Core Class of ClipBucket, initiates and maintain all operations of ClipBucket


Advance Playlist system. Collections class is for Managing the collections across ClipBucket. Collections can be used as Playlists for videos while Albums for Photos and Music.

We create thsi class in each major object to use it as specific collection for example in video.class.php we created $this->collection = new Collections(); to assign a collection to a $vod object.

Database object class. Basically does very basic handling, nothing fancy. The good thing is all DB queries are went through this object so we can manipulate or log everything here.


Unlike the original PHP Error Handler, its just to log ClipBucket operations for example 'Invalid username & password' is an error, we log using this object


Its one of the classic forms class of ClipBucket, this basically takes an array and returns a fully fledged HTML Form element. I request you to read it throughly, experiment with it before using it.

This acctually helped us achieve dynamic form fields for signup and upload. which, in future we are dumping and replacing with json forms.


Just as the name suggests


For managing all operations related to the groups system in ClipBucket, Groups system is similar to the FB groups but .. a very small part of it.


Language manegement system


Unlike the name, its basically an activity recorder and Records and manages all activities related to any object. This Object is re-initiated in all major objects e.g videos, photos, etc. We store all activities in actions table.


This class was used to handle multiple videos at once

For creating front end and backend menus include Admin Area Menu


In earlier versions of ClipBucket, there were no seperate classes, so myquery class was used. now its a stalled.


For small Objects to display e.g list of template with a dropdown. You can say 'widgets' in other terms


Dont confuse it with CBPages, pages.class.php is actually used for Pagination and creating links.


This is for managing photos operations


for player operations, like changing height, which player to use etc.


Collections should have been used but in earlier version playlist was used. we intended to replace it but we didnt so playlist still exists and is current linked to videos only.


THe magical Plguins class for manaing plugins


Pm is for Private Messaging, yes ClipBucket also offers that.


For Re-indexing the data such as No for videos of a user tc..


Search object is re initiated in each object to setup its search functionality just like actions and collections.

e.g in videos.class.php -> init_search function

$this->search = new cbsearch;

and $vdo->search->search() will return the results


For handling sessions ... and cookies

for managing the template system of ClipBucket


For handling the video uploading, was stupid to have one seperate class.

for handlng alll user related operations

For handling videos operations

Last updated