* Plugin Version: 1.0 * @author Saqib Razzaq * @since 9th July, 2015 (ClipBucket 2.7.4) */ define('CB_CAPTCHA', basename(dirname(__FILE__))); // checks user's input function validate_user_ans() { if (isset($_POST['signup'])) { $result = $_POST['g-recaptcha-response']; if ($result == '') { header("Location: http://localhost/cb_svn/upload/signup.php?valid=fail"); } } } if (isset($_POST['signup'])) { validate_user_ans(); } // displaying the form function the_form() { global $db; $key_check = $db->_select('SELECT the_key FROM ' . tbl("the_captcha")); $the_key = $key_check[0]['the_key']; $site_key = $the_key; echo '<div class="g-recaptcha" data-sitekey=' . $site_key . '></div>'; } register_anchor_function("the_form", "the_form"); add_admin_menu("CB Captcha", "reCaptcha Key", "cb_captcha_admin.php", CB_CAPTCHA); // used for displaying message on failure of captcha template_files(PLUG_DIR . "/cb_captcha/captcha.html");
if ($Cbucket->configs['player_file'] != '') { if ($Cbucket->configs['player_dir']) { $folder = '/' . $Cbucket->configs['player_dir']; } $file = PLAYER_DIR . $folder . '/' . $Cbucket->configs['player_file']; if (file_exists($file)) { include_once $file; } } //include_once(PLAYER_DIR.'/cbplayer/cbplayer.plug.php'); /** * Adding Inactive sign on vdeo */ function display_inactive_sign($vdo = array()) { if ($vdo['active'] == 'no') { echo '<div style="position:absolute;top:2px; height:13px; background-color:#ed0000; width:100%; color:#fff; font-size:10px; text-align:center">Video is inactive</div>'; } } function show_pending_alert($data = array()) { if ($data['active'] == 'pen') { $out = "<div style='position:absolute; text-align:center; top:0px; left:0px; width:100%; padding:2px 0px; color:#FFF; background:#d40000; font:normal 10px Tahoma;'>"; $out .= "Video is pending"; $out .= "</div>"; echo $out; } } register_anchor_function('show_pending_alert', 'in_video_thumb'); register_anchor_function('display_inactive_sign', 'in_video_thumb');
<script type="text/javascript"> var ep = new FlashObject("' . BASEURL . '/plugins/editors_pick/editors_pick_player.swf?xmlfile=' . BASEURL . '/plugins/editors_pick/editors_pick_player.php", "sotester", "340", "243", "9", "#FFFFFF"); ep.addParam("wmode", "opaque"); ep.addParam("allowFullScreen", "true"); ep.write("editors_pick"); </script>'; } //the following two written functions are for temporay purpose .. will be chaged later function admin_area_tab($vid) { if (is_video_in_editors_pick($vid['videoid'])) { return '<span class="label label-success" >Added to editors pick</span>'; } else { } } //Adding Editor's Pick Link $cbvid->video_manager_link[] = 'video_manager_ep_link'; //Temporay purpose $cbvid->video_manager_link_new[] = 'admin_area_tab'; //Calling Editor Picks Function $cbvid->video_manager_funcs[] = 'editors_pick'; //ADding Admin Menu add_admin_menu('Videos', 'Editor\'s Pick', 'editor_pick.php'); //Adding Anchor Function register_anchor_function(array('show_editor_pick' => 'index_right_top')); //Registering Delete Action register_action_remove_video('remove_vid_editors_pick'); //ADding Header.html $file = PLUG_DIR . '/editors_pick/header.html'; $Cbucket->add_header($file, array('index')); }
{ global $collection, $js_var; $output = '<script type="text/javascript">'; $output .= 'var js_' . $js_var . ' = ' . $collection['collection_id'] . ';'; $output .= '</script>'; echo $output; } register_anchor_function('_add_collection_id_js', 'cb_head'); } } if (isset($_POST['EnterInfo'])) { assign('step', 2); $datas = $_POST['photoIDS']; $moreData = explode(",", $datas); $details = array(); foreach ($moreData as $key => $data) { $data = str_replace(' ', '', $data); $data = $cbphoto->decode_key($data); $details[] = $data; } //pr($details,TRUE); assign('photos', $details); } if (isset($_POST['updatePhotos'])) { assign('step', 3); } register_anchor_function('load_plupload_upload_photo', 'cb_head'); subtitle(lang('photos_upload')); //Displaying The Template template_files('photo_upload.html'); display_it();
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://labguru.com/ */ if (!function_exists('global_announcement')) { function global_announcement() { echo '<div>' . htmlspecialchars_decode(get_announcement()) . '</div>'; } function get_announcement() { global $db; $exec = $db->Execute('SELECT * FROM ' . tbl("global_announcement")); $ann = $exec->getrows(); return $ann[0][0]; } //Function used to update announcement function update_announcement($text) { global $db; $text = $text; $db->Execute("UPDATE " . tbl("global_announcement") . " SET announcement='{$text}'"); } } //Function used to get annoucment for smarty $Smarty->register_function('get_announcement', 'get_announcement'); register_anchor_function(array('global_announcement' => 'global')); add_admin_menu('Global Announcement', 'Edit Announcement', 'edit_announcement.php');
Website: http://clip-bucket.com/ Plugin Type: global */ add_js(array('jquery_plugs/counter.min.js' => 'global')); function character_counter($type) { switch ($type) { case "comment": default: echo '<script type="text/javascript">'; echo '$("#comment_box").counter({goal: ' . MAX_COMMENT_CHR . '});'; echo '</script>'; break; case "topic": echo '<script type="text/javascript">'; echo '$("#topic_post").counter({goal: ' . config('max_topic_length') . '});'; echo '</script>'; break; } } function character_counter_comment() { return character_counter('comment'); } function character_counter_topic() { return character_counter('topic'); } register_anchor_function('character_counter_comment', 'after_compose_box'); register_anchor_function('character_counter_topic', 'after_topic_post_box');
<?php /* Plugin Name: ClipBucket Modules Description: Social Bookmarks and Recently Viewed Videos - Classic ClipBucet Modules Author: Arslan Hassan Author Website: http://clip-bucket.com/ ClipBucket Version: 2.1 Version: 2 Website: http://labguru.com/ Plugin Type: global */ if (!function_exists('cb_modules')) { function cb_modules() { } function show_social_bookmarks($vdetails = NULL) { echo "<span class='st_stumbleupon_vcount' displayText='Stumble' style='font-size:10px'></span><span class='st_twitter_vcount' displayText='Tweet'></span><span class='st_facebook_vcount' displayText='Facebook'></span><span class='st_plusone_vcount' ></span>"; echo '<div style="height:10px"></div>'; } register_anchor_function("show_social_bookmarks", "video_bookmarks"); add_header(PLUG_DIR . '/' . this_plugin() . '/css.html'); }
if (!$ann == '') { echo '<div class="alert alert-info margin-bottom-10 ">' . $ann . '</div>'; } } /* function global_announcement() { echo '<div>'.htmlspecialchars_decode(get_announcement()).'</div>'; } */ function get_announcement() { global $db; $exec = $db->Execute('SELECT * FROM ' . tbl("global_announcement")); $ann = $exec->getrows(); return $ann[0][0]; } //Function used to update announcement function update_announcement($text) { global $db; $text = $text; $db->Execute("UPDATE " . tbl("global_announcement") . " SET announcement='{$text}'"); } } //Function used to get annoucment for smarty $Smarty->register_function('get_announcement', 'get_announcement'); //getting announcement for display in smarty// register_anchor_function('announcement_2014', 'global'); add_admin_menu('Global Announcement', 'Edit Announcement', 'edit_announcement.php'); //register_anchor_function(array('global_announcement'=>'global'));
//$Smarty->register_modifier('cbsearch',new cbsearch()); $Smarty->register_modifier('flag_type', 'flag_type'); $Smarty->register_modifier('get_username', 'get_username'); $Smarty->register_modifier('formatfilesize', 'formatfilesize'); $Smarty->register_modifier('getWidth', 'getWidth'); $Smarty->register_modifier('getHeight', 'getHeight'); //$Smarty->register_modifier('get_collection_name','get_collection_name'); $Smarty->register_modifier('json_decode', 'jd'); $Smarty->register_modifier('getGroupPrivacy', 'getGroupPrivacy'); assign('updateEmbedCode', 'updateEmbed'); /* * Registering Video Remove Functions */ register_action_remove_video('remove_video_thumbs'); register_action_remove_video('remove_video_log'); register_action_remove_video('remove_video_files'); register_anchor_function('add_photo_plupload_javascript_block', 'cb_head'); cb_register_function('plupload_photo_uploader', 'uploaderDetails'); cb_register_action('increment_playlist_played', 'view_playlist'); include 'admin.functions.php'; //error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED); ////Removing www. as it effects SEO and updating Config //$wwwcheck = preg_match('/:\/\/www\./',$baseurl,$matches); //if(count($matches)>0) //{ // $baseurl = preg_replace('/:\/\/www\./','://',$baseurl); // $myquery->Set_Website_Details('baseurl',$baseurl); //} //Other settings define("SEND_COMMENT_NOTIFICATION", config("send_comment_notification")); define("SEND_VID_APPROVE_EMAIL", config("approve_video_notification"));
return '<font color="#ed0000">' . $input . '</font>'; } elseif ($input > 0) { return '<font color="#006600">+' . $input . '</font>'; } else { return $input; } } /** * Function use to register security captchas for clipbucket */ function register_cb_captcha($func, $ver_func, $show_field = true) { global $Cbucket; $Cbucket->captchas[] = array('load_function' => $func, 'validate_function' => $ver_func, 'show_field' => $show_field); } register_anchor_function('cbRocks', 'the_footer'); /** * FUnction used to register ClipBucket php functions */ function cb_register_function($func_name, $place, $params = NULL) { global $Cbucket; if (function_exists($func_name)) { $Cbucket->clipbucket_functions[$place][] = array('func' => $func_name, 'params' => $params); } } /** * function used to check weather specific place has function or not */ function cb_get_functions($place) {
<?php /** * All Functions that * are used by admin, * registered here */ //Registering Admin Options for Watch Video if (has_access('admin_access', TRUE)) { function show_video_admin_link($data) { echo '<a href="' . ADMIN_BASEURL . '/edit_video.php?video=' . $data['videoid'] . '">Edit Video</a>'; } function show_view_channel_link($data) { echo '<a href="' . ADMIN_BASEURL . '/view_user.php?uid=' . $data['userid'] . '">Edit User</a>'; } register_anchor_function('show_video_admin_link', 'watch_admin_options'); register_anchor_function('show_view_channel_link', 'view_channel_admin_options'); }
{ echo '<div class="btn-group plyrbdle" role="group" aria-label="..." style="width: 100%;> <a href="http://www.facebook.com/sharer/sharer.php?s=100&p[url]={videoLink($video)|urlencode}&p[images][0]={get_thumb vdetails=$video}&p[title]= {$video.title|title|urlencode}&p[summary]={$video.description|description|urlencode}" target="_blank"><button type="button" class="btn btn-primary" style="border-radius:0px; border-right:1px solid white; width: 17%; background-color: #24427E; border-color: #24427E;"><i class="fa fa-facebook"> </i> Facebook</button></a> <a href="https://twitter.com/share" target="_blank"><button type="button" class="btn btn-primary" style="margin-left: -4px; border-radius:0px; border-left:1px solid white; border-right:1px solid white; width: 16%; background-color: #139BCF; border-color: #139BCF;"><i class="fa fa-twitter"> </i> Twitter</button></a> <a href="https://pinterest.com/pin/create/bookmarklet/?media={get_thumb vdetails=$video}&url={videoLink($video)|urlencode}&description= {$video.title|title|urlencode}"><button type="button" class="btn btn-primary" style="margin-left: -4px; border-radius:0px; border-right:1px solid white; border-left:1px solid white; width: 17%; background-color: #CA1E2A; border-color: #CA1E2A;" data-toggle="" data-target=""><i class="fa fa-pinterest-p"></i> Pinterest</button></a> <a href="https://plus.google.com/share?url={urlencode(videolink($video))}" target="_blank"><button type="button" class="btn btn-primary" style="margin-left: -4px; border-radius:0px; border-left:1px solid white; border-right:1px solid white; width: 17%; background-color: #D04437; border-color: #D04437;"> <i class="fa fa-google"></i> Google Plus</button></a> <a href="http://www.stumbleupon.com/submit?url={videoLink($video)|urlencode}&title={$video.title|title|urlencode}" target="_blank"><button type="button" class="btn btn-primary" style="margin-left: -4px; border-radius:0px; border-right:1px solid white; width: 16.66%; background-color: #E46F4E; border-color: #E46F4E;"> <i class="fa fa-stumbleupon"></i></i> Stumble</button></a> <a href="http://www.reddit.com/submit?url={videoLink($video)|urlencode}&title={$video.title|title|urlencode}" target="_blank"><button type="button" class="btn btn-primary" style="margin-left: -4px; border-radius:0px; border-right:1px solid white; width: 17.15%; background-color: black; border-color: black;"><i class="fa fa-reddit"></i> </i> Reddit</button></a> </div>'; } register_anchor_function("share_player", "share_player"); }
$Smarty->register_modifier('get_username', 'get_username'); $Smarty->register_modifier('formatfilesize', 'formatfilesize'); $Smarty->register_modifier('getWidth', 'getWidth'); $Smarty->register_modifier('getHeight', 'getHeight'); //$Smarty->register_modifier('get_collection_name','get_collection_name'); $Smarty->register_modifier('json_decode', 'jd'); $Smarty->register_modifier('getGroupPrivacy', 'getGroupPrivacy'); $Smarty->register_function('loading_pointer', 'loading_pointer'); assign('updateEmbedCode', 'updateEmbed'); /* * Registering Video Remove Functions */ register_action_remove_video('remove_video_thumbs'); register_action_remove_video('remove_video_log'); register_action_remove_video('remove_video_files'); register_anchor_function('load_tagging', 'cb_head'); //register_anchor_function('load_photo_actions','cb_head'); cb_register_function('delete_photo_avatar', 'delete_photo'); cb_register_function('delete_photo_tags', 'delete_photo'); cb_register_function('delete_photo_meta', 'delete_photo'); include 'admin.functions.php'; //error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED); ////Removing www. as it effects SEO and updating Config //$wwwcheck = preg_match('/:\/\/www\./',$baseurl,$matches); //if(count($matches)>0) //{ // $baseurl = preg_replace('/:\/\/www\./','://',$baseurl); // $myquery->Set_Website_Details('baseurl',$baseurl); //} //Other settings define("SEND_COMMENT_NOTIFICATION", config("send_comment_notification"));
add_photo_manager_order(lang('Most Viewed'), tbl('photos.views desc')); /** * Adding orders for collection manager */ add_collection_manager_order(lang('Newest'), tbl('collections.date_added desc')); add_collection_manager_order(lang('Oldest'), tbl('collections.date_added asc')); add_collection_manager_order(lang('Most Viewed'), tbl('collections.views desc')); add_collection_manager_order(lang('Most Photos'), tbl('collections.total_objects desc')); add_collection_manager_order(lang('Last Updated'), tbl('collections.last_updated desc')); register_anchor_function('init_subscriptions_js', 'cb_head'); /** * Dashboard Function */ register_filter('dashboard', '_order_dashboard_widgets_positions'); register_filter('dashboard_widgets', '_test_function_ordering'); register_anchor_function('init_dashboard_js', 'cb_head'); setup_myaccount_dashboard(); /** * User Content Setup */ register_filter('object_name', 'usercontent_make_label'); register_filter('content_type_name', 'usercontent_make_label'); register_filter('object_name', 'lang'); register_filter('content_type_name', 'lang'); $usercontent = new user_content(); $usercontent->object_group = 'content'; $usercontent->object = 'videos'; $usercontent->section = true; $usercontent->content_type = 'uploaded'; $usercontent->get_callback = 'cb_get_user_uploaded_videos'; $usercontent->permissions = 'show_my_videos';