Ejemplo n.º 1
0
 /**
  * Setting links up in my account
  */
 function setting_up_collections()
 {
     global $userquery, $Cbucket;
     $per = $userquery->get_user_level(userid());
     // Adding My Account Links
     if (isSectionEnabled('collections')) {
         $userquery->user_account[lang('Collections')] = array(lang('add_new_collection') => "manage_collections.php?mode=add_new", lang('manage_collections') => "manage_collections.php", lang('manage_favorite_collections') => "manage_collections.php?mode=favorite");
     }
     // Adding Search Type
     if (isSectionEnabled('collections')) {
         $Cbucket->search_types['collections'] = "cbcollection";
     }
     // Adding Collection links in Admin Area
     $menu = array('title' => lang('Collections Manager'), 'icon' => 'icon-th', 'id' => 'collections-manager', 'access' => 'collection_moderation');
     $sub_menu = array('collections-manager' => array(array('title' => lang('Manage Collections'), 'link' => 'collection_manager.php'), array('title' => lang('Manage Categories'), 'link' => 'collection_category.php'), array('title' => lang('Flagged Collections'), 'link' => 'flagged_collections.php')));
     add_admin_menu($menu);
     add_admin_sub_menus($sub_menu);
     // Adding Collection links in Cbucket Class
     $Cbucket->links['collections'] = array('collections.php', 'collections/');
     $Cbucket->links['manage_collections'] = array('manage_collections.php', 'manage_collections.php');
     $Cbucket->links['edit_collection'] = array('manage_collections.php?mode=edit_collection&cid=', 'manage_collections.php?mode=edit_collection&cid=');
     $Cbucket->links['manage_items'] = array('manage_collections.php?mode=manage_items&cid=%s&type=%s', 'manage_collections.php?mode=manage_items&cid=%s&type=%s');
     $Cbucket->links['user_collections'] = array('user_content.php?object_group=content&object=collections&user='******'user_content.php?object_group=content&object=collections&user='******'user_fav_collections'] = array('user_content.php?object_group=content&object=collections&content_type=favorite&user='******'user_content.php?object_group=content&object=collections&content_type=favorite&user=');
 }
Ejemplo n.º 2
0
 function run()
 {
     if (current_user()->can($this->privilege)) {
         create_admin_menu($this->namespace, riake(0, $this->menu_position), riake(1, $this->menu_position));
         add_admin_menu($this->namespace, array('title' => $this->label, 'href' => '#', 'is_submenu' => false, 'icon' => $this->menu_icon));
         add_admin_menu($this->namespace, array('title' => $this->posts_list_label, 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'list'))));
         add_admin_menu($this->namespace, array('title' => $this->new_post_label, 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'new'))));
         if ($this->comment_enabled === TRUE) {
             add_admin_menu($this->namespace, array('title' => $this->post_comment_label, 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'comments'))));
         }
         foreach (force_array($this->query->get_defined_taxonomies()) as $taxonomy) {
             add_admin_menu($this->namespace, array('title' => riake('taxonomy-list-label', $taxonomy, sprintf(__('%s list'), riake('namespace', $taxonomy))), 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'taxonomy', riake('namespace', $taxonomy), 'list'))));
             add_admin_menu($this->namespace, array('title' => riake('new-taxonomy-label', $taxonomy, sprintf(__('New %s'), riake('namespace', $taxonomy))), 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'taxonomy', riake('namespace', $taxonomy), 'new'))));
         }
     }
 }
Ejemplo n.º 3
0
 public function admin_context()
 {
     $this->salaire_personnel = new PostType(array('namespace' => 'posts', 'label' => __('Posts')));
     $this->salaire_personnel->run();
     // Creating Menu 1.4
     create_admin_menu('blogster', 'after', 'dashboard');
     add_admin_menu('blogster', array('title' => __('Posts'), 'href' => module_url(array('index'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Write a new post'), 'href' => module_url(array('publish'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Create a new category'), 'href' => module_url(array('category', 'create'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Categories'), 'href' => module_url(array('category'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Comments'), 'href' => module_url(array('comments'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Tags'), 'href' => module_url(array('tags'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Settings'), 'href' => module_url(array('setting'), 'blogster')));
     declare_admin_widget(array("module_namespace" => "blogster", "widget_namespace" => "articles_stats", "widget_title" => __('Blogster statistics'), "widget_content" => $this->load->view(MODULES_DIR . $this->module['encrypted_dir'] . '/views/widgets/articles_stats', null, true, true), "widget_description" => __('Displays blogster stats')));
     declare_admin_widget(array("module_namespace" => "blogster", "widget_namespace" => "recents_commentaires", "widget_title" => __('Recents comments'), "widget_content" => $this->load->view(MODULES_DIR . $this->module['encrypted_dir'] . '/views/widgets/recents_comments', null, true, true), "widget_description" => __('Displays recents comments'), "action_control" => module_action('blogster', 'blogster_manage_comments')));
 }
Ejemplo n.º 4
0
*	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");
Ejemplo n.º 5
0
		<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'));
}
Ejemplo n.º 6
0
	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');
Ejemplo n.º 7
0
/**
 * add multiple admin menus
 */
function add_admin_menus($menus)
{
    if (is_array($menus)) {
        foreach ($menus as $menu) {
            add_admin_menu($menu);
        }
    }
}
Ejemplo n.º 8
0
 /**
  * Create Admin Area menu for photos
  */
 function photos_admin_menu()
 {
     global $Cbucket, $cbcollection, $userquery;
     $am = $Cbucket->AdminMenu;
     $per = $userquery->get_user_level(userid());
     $menu = array('title' => lang('Photos Manager'), 'icon' => 'icon-picture', 'id' => 'photos-manager', 'access' => 'photos_moderation');
     $sub_menu = array('photos-manager' => array(array('title' => lang('Photo Manager'), 'link' => 'photo_manager.php'), array('title' => lang('Photo Tags Manager'), 'link' => 'tags_manager.php'), array('title' => lang('Flagged Photos'), 'link' => 'flagged_photos.php'), array('title' => lang('Orphan Photos'), 'link' => 'orphan_photos.php'), array('title' => lang('Photo Settings'), 'link' => 'photo_settings.php'), array('title' => lang('Watermark Settings'), 'link' => 'photo_settings.php?mode=watermark_settings'), array('title' => lang('Recreate Thumbs'), 'link' => 'recreate_thumbs.php?mode=mass')));
     add_admin_menu($menu);
     add_admin_sub_menus($sub_menu);
 }
Ejemplo n.º 9
0
<?php

/*
	Plugin Name: Pakplayer Manager
	Description: Control Pakplayer more easily
	Author: Arslan Hassan
	ClipBucket Version: 2
	Plugin Version: 1.0
	Website: http://clip-bucket.com/
*/
define('PAKPLAYER_PLUG_DIR', PLUG_DIR . '/pakplayer');
add_admin_menu('Templates And Players', 'Pakplayer', 'pakplayer.php', 'pakplayer/admin');
Plugin Name: Plugin Ayuda WordPress
Plugin URI: http://ayudawordpress.com
Description: Un plugin mas en el universo wordpresero
Author: Fernando Tellado
Ejemplo n.º 11
0
        if (!error_list()) {
            $db->insert(tbl("custom_fields"), $fields_array, $value_array);
        }
    }
    /**
     * Function used add fields in upload form
     */
    function load_form_fields()
    {
        global $db;
        $results = $db->select(tbl("custom_fields"), "*");
        if (count($results[0]) > 0) {
            foreach ($results as $result) {
                $name = $result['custom_field_name'];
                foreach ($result as $field => $value) {
                    $field_array[$name][substr($field, 13, strlen($field))] = $value;
                }
            }
        }
        if (count($field_array) > 0) {
            return false;
        }
        return $field_array;
    }
    //Adding Admin Menu
    add_admin_menu('Custom Fields', 'Add New Custom Field', 'add_custom_fields.php');
    add_admin_menu('Custom Fields', 'Manage Custom Fields', 'manage_custom_fields.php');
    if (load_form_fields()) {
        register_custom_form_field(load_form_fields());
    }
}
Ejemplo n.º 12
0
        $value = $result['default_value'];
        $db_field = $result['db_field'];
        if ($type == 'dropdown') {
            $defaultselectvalue = explode(",", $value);
            $selectbuttonvalues = array();
            foreach ($defaultselectvalue as $key => $value) {
                $selectbuttonvalues[$value] = $value;
            }
            $array = array($name => array('title' => $title, 'type' => $type, 'value' => $selectbuttonvalues, 'name' => $name, 'id' => $name, 'db_field' => $db_field));
        } else {
            if ($type == 'radiobutton' || $type == 'checkbox') {
                $defaultradio = explode(",", $value);
                $radiobuttonvalues = array();
                foreach ($defaultradio as $key => $value) {
                    $radiobuttonvalues[$value] = $value;
                }
                $array = array($name => array('title' => $title, 'type' => $type, 'name' => $name, 'id' => $name, 'value' => $radiobuttonvalues, 'checked' => $defaultradio[0], 'db_field' => $db_field, 'auto_view' => 'no', 'sep' => '&nbsp;'));
            } else {
                $array = array($name => array('title' => $title, 'type' => $type, 'name' => $name, 'id' => $name, 'db_field' => $db_field));
            }
        }
        foreach ($array as $key => $fields) {
            $new_array[$key] = $fields;
        }
    }
    return $new_array;
}
register_signup_field(load_custom_fields_signup($data, true));
register_custom_upload_field(load_custom_fields($data, true));
add_admin_menu('Custom Field', 'Custom Field', 'add_custom_field.php', CB_CUSTOM_FIELDS_DIR_NAME . '/admin');
Ejemplo n.º 13
0
        return $user_terminator[0][0];
    }
    function update_users_terminator($users_terminator)
    {
        global $db;
        $users_terminator = $users_terminator;
        $db->Execute("UPDATE " . tbl("terminator") . " SET terminate_users='{$users_terminator}'");
    }
    // deactivate all videos
    if (terminator() == 'deactivate') {
        global $db;
        $db->Execute("UPDATE " . tbl("video") . " SET active='no'");
    } elseif (terminator() == 'activate') {
        global $db;
        $db->Execute("UPDATE " . tbl("video") . " SET active='yes'");
    } elseif (terminator() == 'del') {
        global $db;
        $db->Execute("DELETE FROM" . tbl("video"));
    }
    // deactivate all users
    if (users_terminator() == 'deactivate') {
        global $db;
        $db->Execute("UPDATE " . tbl("users") . " SET usr_status='ToActivate'");
    } elseif (users_terminator() == 'activate') {
        global $db;
        $db->Execute("UPDATE " . tbl("users") . " SET usr_status='Ok'");
    } elseif (users_terminator() == 'del') {
        $db->Execute("DELETE FROM" . tbl("users") . " WHERE userid != 1");
    }
    add_admin_menu('Terminator', 'Terminate', 'terminator_pick.php', 'terminator/admin');
}
Ejemplo n.º 14
0
<?php

/*
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));
    }
Ejemplo n.º 15
0
 public function admin_context()
 {
     create_admin_menu('tendoo_contents', 'after', 'dashboard');
     add_admin_menu('tendoo_contents', array('title' => __('Media Library'), 'href' => module_url(array('index'), 'tendoo_contents'), 'icon' => 'fa fa-image'));
     add_admin_menu('tendoo_contents', array('title' => __('Add new media'), 'href' => module_url(array('upload'), 'tendoo_contents')));
 }