Plugin Development
ClipBucket was inspired by Wordpress For the Development however its not as efficient as Wordpress, we will try to get things done vial available options
​
Good news is Vodlix & ClipBucket share the same Core for the Plugins

Folder Strucuture

- plugins
|-plugin_folder
|- plugin_name.php
|- plugin_name_install.php //Call when plugin is about to install
|- plugin_name_uninstall.php //Caled when plugin is about to uninstall
​
//Example
​
- plugins
|-global_announcement
|-global_announcement.php

Plugin Meta

Just like wordpress, you have mention the plugin detail at the top in comments just as shown below
<?php
/*
Plugin Name: Global announcement
Description: This will let you post a global announcement on your website
Author: Arslan Hassan
ClipBucket Version: 1.8
Plugin Version: 1.0
Website: http://google.com/
*/
​
​

Plugin Installation Script

This is pure PHP Script, nothing fancy, we usually just call DB Queries in it. e.g
​
//Creating Table for anncoument if not exists
function install_global_announcement()
{
global $db;
$db->Execute(
'CREATE TABLE IF NOT EXISTS '.tbl("global_announcement").' (
`announcement` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;'
);
//inserting new announcment
$db->Execute("INSERT INTO ".tbl('global_announcement')." (announcement) VALUES ('')");
}
​
​
//This will first check if plugin is installed or not, if not this function will install the plugin details
install_global_announcement();

Plugin Uninstall Script

//Function used to uninstall Plugin
function un_install_global_announcement()
{
global $db;
$db->Execute(
'DROP TABLE '.tbl("global_announcement").''
);
}
​
un_install_global_announcement();

Resource from ClipBucket

Getting Started With Plugins
ClipBucket Documentation

Global Announcement Tutorial

Creating Advance Global Announcement Plugin for ClipBucket
ClipBucket Documentation

Understanding Plugin Development

​