コード例 #1
0
ファイル: editor-plugin.php プロジェクト: noxian/WP-Filebase
	<div id="catselect-filter">
		<p><?php 
    _e('Select the categories containing the files you would like to list.', 'wp-filebase');
    ?>
</p>
		<p><input type="checkbox" id="list-all-files" name="list-all-files" value="1" onchange="incAllCatsChanged(this.checked)"/> <label for="list-all-files"><?php 
    _e('Include all Categories', 'wp-filebase');
    ?>
</label></p>
	
	</div>
	
	<ul id="catbrowser" class="filetree"></ul>
	<?php 
    wpfb_loadclass('TreeviewAdmin');
    WPFB_TreeviewAdmin::RenderHTML("catbrowser");
    ?>
</div>
<form id="listtplselect" class="insert">
	<h2><?php 
    _e('Select Template', 'wp-filebase');
    ?>
</h2>
	<?php 
    $tpls = WPFB_ListTpl::GetAll();
    if (!empty($tpls)) {
        foreach ($tpls as $tpl) {
            echo '<label><input type="radio" name="listtpl" value="' . $tpl->tag . '" />' . $tpl->GetTitle() . '</label><br />';
        }
    }
    ?>
コード例 #2
0
ファイル: Output.php プロジェクト: parsonsc/dofe
 static function FileBrowser(&$content, $root_cat_id = 0, $cur_cat_id = 0)
 {
     static $fb_id = 0;
     $fb_id++;
     wpfb_loadclass('Category', 'File');
     if (WPFB_Core::$file_browser_search) {
         // see Core::ContentFilter
     } else {
         $root_cat = $root_cat_id == 0 ? null : WPFB_Category::GetCat($root_cat_id);
         $cur_item = WPFB_Core::$file_browser_item;
         if ($cur_cat_id > 0) {
             $cur_item = WPFB_Category::GetCat($cur_cat_id);
         }
         // make sure cur cat is a child cat of parent
         if (!is_null($cur_item) && !is_null($root_cat) && !$root_cat->IsAncestorOf($cur_item)) {
             $cur_item = null;
         }
         self::initFileTreeView($el_id = "wpfb-filebrowser-{$fb_id}", $root_cat);
         // thats all, JS is loaded in Core::Header
         $content .= '<ul id="' . $el_id . '" class="treeview">';
         $parents = array();
         if (!is_null($cur_item)) {
             $p = $cur_item;
             do {
                 array_push($parents, $p);
             } while (!is_null($p = $p->GetParent()) && !$p->Equals($root_cat));
         }
         $args = array();
         if (is_admin()) {
             $args['is_admin'] = true;
         }
         self::FileBrowserList($content, $root_cat, array_merge($args, array('open_cats' => $parents)));
         $content .= '</ul><div style="clear:both;"></div>';
         if (WPFB_Core::CurUserCanCreateCat() || WPFB_Core::CurUserCanUpload()) {
             wpfb_loadclass('TreeviewAdmin');
             $content .= WPFB_TreeviewAdmin::ReturnHTML($el_id, is_admin() || get_user_option('wpfb_set_fbdd'), is_admin() ? 'filebrowser_admin' : 'filebrowser');
         }
     }
 }