/** * displays "media manager" toolbar button * * @param string $directory * @param string $alt */ static function media_manager($directory = null, $alt = null) { global $_CB_framework; if (!$alt) { $alt = 'Upload'; } $template = CBtoolmenuBar::getTemplate(); $image = cbMenuBarBase::ImageCheckAdmin('upload.png', '/administrator/images/', NULL, NULL, CBTxt::T('Upload Image'), 'uploadPic'); $onClickJs = "popupWindow( '" . $_CB_framework->backendUrl("index.php?pop=uploadimage.php&directory={$directory}&t={$template}", true, 'component') . "','win1',350,100,'no' );"; CBtoolmenuBar::_output($onClickJs, $image, $alt); }
/** * Writes a media_manager button * @param string The sub-drectory to upload the media to */ static function media_manager( $directory = '', $alt=null ) { global $_CB_framework; if ( is_null( $alt ) ) { $alt = 'Upload'; } $cur_template = CBtoolmenuBar::getTemplate(); $image = cbMenuBarBase::ImageCheckAdmin( 'upload.png', '/administrator/images/', NULL, NULL, CBTxt::T('Upload Image'), 'uploadPic' ); // $image2 = cbMenuBarBase::ImageCheckAdmin( 'upload_f2.png', '/administrator/images/', NULL, NULL, CBTxt::T('Upload Image'), 'uploadPic', 0 ); $onClickJs = "popupWindow('" . $_CB_framework->backendUrl( "index.php?pop=uploadimage.php&directory=$directory&t=$cur_template", true, 'component' ) . "','win1',350,100,'no');"; echo CBtoolmenuBar::_output( $onClickJs, $image, $alt ); // CBTxt::T("....") done in addToToolBar }