} if (!$vdetails['embed_code'] || $vdetails['embed_code'] == 'none' || $ytcode) { $code = '<embed src="' . $embed_src . '" type="application/x-shockwave-flash"'; $code .= 'allowscriptaccess="always" allowfullscreen="true" '; $code .= 'width="' . config("embed_player_width") . '" height="' . config("embed_player_height") . '"></embed>'; return $code; } else { return false; } } /** * Writing CB Player function to play videos on facebook */ function cb_facebook_embed($params) { $vdetails = $params['video']; $config = urlencode(BASEURL . "/player/" . CB_PLAYER . "/embed_player.php?vid=" . $vdetails['videoid'] . "&autoplay=" . config('autoplay_embed')); $embed_src = BASEURL . '/player/' . CB_PLAYER . '/player.swf?config=' . $config; return $embed_src; } register_embed_function('cbplayer_embed_src'); register_actions_play_video('cb_player'); cb_register_function('cb_facebook_embed', 'fb_embed_video'); //include Pak Player JS File $Cbucket->add_header(CB_PLAYER_DIR . '/cbplayer_header.html'); $Cbucket->add_admin_header(CB_PLAYER_DIR . '/cbplayer_header.html'); /** * Including plugin files */ include "cbplayer.plugin.php"; }
//$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"));
/* Plugin Name: ClipBucket Helper v1 Description: This will help you set troubleshoot your problems. Author: Arslan Hassan Author Website: http://clip-bucket.com/ ClipBucket Version: 2 Version: 1.0 Website: http://clip-bucket.com/ Plugin Type: global */ //Adding Admin Menu add_admin_menu("ClipBucket Helper", "Cron Jobs", 'cron_jobs.php', 'clipbucket_helper/admin'); //Functions function cron_call_writer($file) { $tmp_file = TEMP_DIR . '/' . $file; $file = fopen($tmp_file, "w"); fwrite($file, now()); } //Registering Functions cb_register_function('cron_call_writer', 'video_convert_cron', 'video_convert_cron.txt'); cb_register_function('cron_call_writer', 'verify_converted_videos_cron', 'verify_converted_videos_cron.txt'); cb_register_function('cron_call_writer', 'update_cb_stats_cron', 'update_cb_stats_cron.txt'); $array = array('video_convert_cron.txt', 'verify_converted_videos_cron.txt', 'update_cb_stats_cron.txt'); //Reading and registering Contentings foreach ($array as $arr) { if (file_exists(TEMP_DIR . '/' . $arr)) { assign(getName($arr), file_get_contents(TEMP_DIR . '/' . $arr)); } }
* Template PHP File for template functions... */ include "template_functions.php"; include "configs.php"; /** * add_thumb_size(336x44) */ if (!config($Cbucket->template . '-theme-options')) { $options = array(); //Add Theme options $options = array('options' => $options, 'widgets' => array()); } //Loading configs.. $Cbucket->theme_configs = theme_configs(); //Registering our first time ever sidebar $sidebar = array('title' => lang('Watch Video'), 'description' => lang('Displays a side bar on "watch video" page'), 'before_title' => '<h3>', 'after_title' => '</h3>', 'before_widget' => '<div class="cb-widget">', 'after_widget' => '</div>', 'id' => 'watch-video-sidebar'); register_sidebar($sidebar); /** * Registering our Widget :) */ register_widget(array('id' => 'user-details-box', 'title' => 'User details box', 'description' => 'Displays a user box on watch video page with brief details.', 'icon' => FRONT_TEMPLATEURL . '/images/widgets/user-box.png', 'callback' => 'displayUserBox', 'callback_admin' => 'displayUserBoxAdmin')); register_widget(array('id' => 'related-videos', 'title' => 'Related videos', 'description' => 'List related videos on watch video page', 'icon' => FRONT_TEMPLATEURL . '/images/widgets/related-videos.png', 'callback' => 'displayRelatedVideos')); register_widget(array('id' => 'html-box', 'title' => 'HTML Box', 'description' => 'Displays an HTML box', 'icon' => FRONT_TEMPLATEURL . '/images/widgets/html-box.png', 'callback' => 'displayUserBox', 'callback_admin' => 'displayUserBoxAdmin')); /** * Register sidebar for watch video player */ $sidebar_player = array('title' => lang('Watch Video Player'), 'description' => lang('Watch video player sidebar'), 'before_title' => '<h3>', 'after_title' => '</h3>', 'before_widget' => '<div class="cb-widget">', 'after_widget' => '</div>', 'id' => 'watch-video-player-sidebar'); register_sidebar($sidebar_player); //regsitering cb custom functions cb_register_function('cbv3_show_rating', 'show_rating');
//$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")); define("SEND_VID_APPROVE_EMAIL", config("approve_video_notification")); define('MOBILE_TEMPLATE', 'cb_iphone2'); if ($Cbucket->template == MOBILE_TEMPLATE) { require_once 'classes/mobile-form-class.php';