getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word'); $listStyle = "
"; $document =& JFactory::getDocument(); $document->setBuffer($listStyle, 'modules', 'submenu'); JHTML::_('behavior.mootools'); $document->addScript('components/com_media/assets/mediamanager.js'); $document->addStyleSheet('components/com_media/assets/mediamanager.css'); JHTML::_('behavior.modal'); $document->addScriptDeclaration(" window.addEvent('domready', function() { document.preview = SqueezeBox; });"); JHTML::script('mootree.js'); JHTML::stylesheet('mootree.css'); if ($config->get('enable_flash', 0)) { JHTML::_('behavior.uploader', 'file-upload', array('onAllComplete' => 'function(){ MediaManager.refreshFrame(); }')); } if(DS == '\\') { $base = str_replace(DS,"\\\\",COM_MEDIA_BASE); } else { $base = COM_MEDIA_BASE; } $js = " var basepath = '".$base."'; var viewstyle = '".$style."'; " ; $document->addScriptDeclaration($js); /* * Display form for FTP credentials? * Don't set them here, as there are other functions called before this one if there is any file write operation */ jimport('joomla.client.helper'); $ftp = !JClientHelper::hasCredentials('ftp'); $this->assignRef('session', JFactory::getSession()); $this->assignRef('config', $config); $this->assignRef('state', $this->get('state')); $this->assign('require_ftp', $ftp); $this->assign('folders_id', ' id="media-tree"'); $this->assign('folders', $this->get('folderTree')); // Set the toolbar $this->_setToolBar(); parent::display($tpl); echo JHTML::_('behavior.keepalive'); } function _setToolBar() { // Get the toolbar object instance $bar =& JToolBar::getInstance('toolbar'); // Set the titlebar text JToolBarHelper::title( JText::_( 'Media Manager' ), 'mediamanager.png'); // Add a delete button $title = JText::_('Delete'); $dhtml = " $title"; $bar->appendButton( 'Custom', $dhtml, 'delete' ); // Add a popup configuration button JToolBarHelper::help( 'screen.mediamanager' ); } function getFolderLevel($folder) { $this->folders_id = null; $txt = null; if (isset($folder['children']) && count($folder['children'])) { $tmp = $this->folders; $this->folders = $folder; $txt = $this->loadTemplate('folders'); $this->folders = $tmp; } return $txt; } }