/** * Playlist view display method * @return void **/ function display($tpl = null) { AvrGenericHelper::addCSS('.icon-48-avreloaded {background-image:url(' . JURI::root() . '/administrator/components/com_avreloaded/assets/avreloaded-48x48.png);}'); // Get data from the model $lists =& $this->_getViewLists(); $model =& $this->getModel(); $data =& $model->getData(); $items = $data->items; $isNew = !file_exists($data->filename); $text = $isNew ? JText::_('New') : JText::_('Edit'); JToolBarHelper::title($text . ' ' . JText::_('AVR_TITLE_PLAYLIST') . ' - AllVideos Reloaded', 'avreloaded'); JToolBarHelper::save(); if ($isNew) { JToolBarHelper::cancel(); } else { // for existing items the button is renamed `close` JToolBarHelper::apply(); JToolBarHelper::cancel('cancel', 'Close'); } if (count($items)) { JToolBarHelper::deleteList(); JToolBarHelper::editListX(); } JToolBarHelper::addNewX(); JToolBarHelper::help('playlist', true); $this->assignRef('items', $items); $this->assignRef('data', $data); $this->assignRef('lists', $lists); parent::display($tpl); }
/** * Playlists view display method * @return void **/ function display($tpl = null) { AvrGenericHelper::addCSS('.icon-48-avreloaded {background-image:url(' . JURI::root() . '/administrator/components/com_avreloaded/assets/avreloaded-48x48.png);}'); JToolBarHelper::title(JText::_('AVR_TITLE_MANAGE_PLAYLISTS') . ' - AllVideos Reloaded', 'avreloaded'); $vdir = AvrGenericHelper::getVdir(); $app =& JFactory::getApplication(); $folder = $app->getUserStateFromRequest('com_avreloaded.playlists_folder', 'folder', $vdir); // Get data from the model $fselect = $this->_getFolderSelect($vdir, $folder); $lists =& $this->_getViewLists($app, $folder); $model =& $this->getModel(); $items =& $model->getData(); if (count($items)) { JToolBarHelper::deleteList(); JToolBarHelper::editListX(); } JToolBarHelper::addNewX(); JToolBarHelper::help('playlists', true); $files = ''; foreach ($items as $i => $item) { if ($i > 0) { $files .= ','; } $files .= "'" . basename($item->filename) . "'"; } $this->assignRef('items', $items); $this->assignRef('lists', $lists); $this->assignRef('fselect', $fselect); $this->assignRef('files', $files); parent::display($tpl); }
function fetchElement($name, $value, &$node, $control_name) { static $once; $assets = 'administrator/components/com_avreloaded/assets/'; $assetsuri = JURI::root() . 'administrator/components/com_avreloaded/assets/'; $js_mor = 'mooRainbow.js'; $cfg =& JFactory::getConfig(); $debug = $cfg->getValue('config.debug'); $konqcheck = strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "konqueror"); // If global debugging is enabled or the browser is konqueror, // we use uncompressed JavaScript if ($debug || $konqcheck) { $js_mor = 'mooRainbow-uncompressed.js'; } JHTML::script($js_mor, $assets); JHTML::stylesheet('mooRainbow.css', $assets); if (!$once) { $once = true; $js = "window.addEvent('domready', function() {\n" . " var r = new MooRainbow('none', {align:'tl',okLabel:'" . JText::_('LBL_SELECT', true) . "',wheel:true,imgPath:'" . $assetsuri . "'});\n" . " \$\$('.rainbow').each(function(el) {\n" . " el.setStyle('cursor', 'pointer');\n" . " el.addEvent('click', function(e) { new Event(e).stop(); r.reAttachAndShow(el); }.bind(r));\n" . " });\n" . "});\n"; $style = '.moor-cursor{background-image:url(' . $assetsuri . 'moor_cursor.gif);} ' . '.moor-arrows{background-image:url(' . $assetsuri . 'moor_arrows.gif);} '; AvrGenericHelper::addJS($js); AvrGenericHelper::addCSS($style); } $size = $node->attributes('size') ? 'size="' . $node->attributes('size') . '"' : ''; $class = $node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="text_area"'; /* * Required to avoid a cycle of encoding & * html_entity_decode was used in place of htmlspecialchars_decode because * htmlspecialchars_decode is not compatible with PHP 4 */ $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES), ENT_QUOTES); $elem = '<div>' . '<img src="' . $assetsuri . 'rainbow.png" class="rainbow" ' . 'style="vertical-align:middle;margin-right:5px;" rel="' . $control_name . $name . '" alt="" /><input type="text" name="' . $control_name . '[' . $name . ']" id="' . $control_name . $name . '" value="' . $value . '" ' . $class . ' ' . $size . ' /></div>'; return $elem; }
/** * Tags view display method * @return void **/ function display($tpl = null) { AvrGenericHelper::addCSS('.icon-48-avreloaded {background-image:url(' . JURI::root() . '/administrator/components/com_avreloaded/assets/avreloaded-48x48.png);}'); JToolBarHelper::title(JText::_('AVR_TITLE_MANAGE_TAGS') . ' - AllVideos Reloaded', 'avreloaded'); JToolBarHelper::deleteList(); JToolBarHelper::editListX(); JToolBarHelper::addNewX(); JToolBarHelper::help('tags', true); // Get data from the model $lists =& $this->_getViewLists(); $items =& $this->get('Data'); $this->assignRef('items', $items); $this->assignRef('lists', $lists); parent::display($tpl); }
/** * Tags view display method * @return void **/ function display($tpl = null) { AvrGenericHelper::addCSS('.icon-48-avreloaded {background-image:url(' . JURI::root() . '/administrator/components/com_avreloaded/assets/avreloaded-48x48.png);}'); JToolBarHelper::title('About - AllVideos Reloaded', 'avreloaded'); JToolBarHelper::help('about', true); $changelog = JURI::root() . '/administrator/components/com_avreloaded/assets/ChangeLog.html'; $lang =& JFactory::getLanguage(); $tag = $lang->getTag(); $welcome = JPATH_COMPONENT_ADMINISTRATOR . DS . 'assets' . DS . $tag . '.welcome.html'; if (!file_exists($welcome)) { $welcome = JPATH_COMPONENT_ADMINISTRATOR . DS . 'assets' . DS . 'en-GB.welcome.html'; } $this->assignRef('welcome', $welcome); $this->assignRef('changelog', $changelog); parent::display($tpl); }
/** * display method of Ripper view * @return void **/ function display($tpl = null) { AvrGenericHelper::addCSS('.icon-48-avreloaded {background-image:url(' . JURI::root() . '/administrator/components/com_avreloaded/assets/avreloaded-48x48.png);}'); // get the Ripper $ripper =& $this->get('Data'); $isNew = $ripper->id < 1; $text = $isNew ? JText::_('New') : JText::_('Edit'); JToolBarHelper::title($text . ' ' . JText::_('AVR_TITLE_RIPPER') . ' - AllVideos Reloaded', 'avreloaded'); JToolBarHelper::save(); if ($isNew) { JToolBarHelper::cancel(); } else { // for existing items the button is renamed `close` JToolBarHelper::apply(); JToolBarHelper::cancel('cancel', 'Close'); } JToolBarHelper::help('ripper', true); $this->assignRef('ripper', $ripper); parent::display($tpl); }
/** * Track view display method * @return void **/ function display($tpl = null) { AvrGenericHelper::addCSS('.icon-48-avreloaded {background-image:url(' . JURI::root() . '/administrator/components/com_avreloaded/assets/avreloaded-48x48.png);}'); // Get data from the model $track =& $this->get('Track'); $data = JRequest::getVar('data', ''); $isNew = empty($track->file); $text = $isNew ? JText::_('New') : JText::_('Edit'); JToolBarHelper::title($text . ' ' . JText::_('AVR_TITLE_TRACK') . ' - AllVideos Reloaded', 'avreloaded'); JToolBarHelper::save(); if ($isNew) { JToolBarHelper::cancel(); } else { // for existing items the button is renamed `close` JToolBarHelper::cancel('cancel', 'Close'); } JToolBarHelper::help('track', true); $list = array(JHTML::_('select.option', '', '- ' . JText::_('AVR_SELECT_NONE') . ' -')); foreach (split(',', 'gif,flv,jpg,mp3,png,rtmp,swf') as $type) { $list[] = JHTML::_('select.option', $type, $type); } $types = JHTML::_('select.genericlist', $list, 'type', 'class="inputbox" size="1" ', 'value', 'text', $track->type); $mbutton = JElementInsertButton::fetchElementImplicit('mtext&playlist=1&noplists=1', JText::_('AVR Media'), false); $ibutton = $this->_imgButton(); $root = AvrGenericHelper::rootURI(true) . '/'; $aloc = AvrGenericHelper::getAloc(true) . '/'; $vloc = AvrGenericHelper::getVloc(true) . '/'; $this->assignRef('types', $types); $this->assignRef('track', $track); $this->assignRef('data', $data); $this->assignRef('ibutton', $ibutton); $this->assignRef('mbutton', $mbutton); $this->assignRef('aloc', $aloc); $this->assignRef('vloc', $vloc); $this->assignRef('root', $root); parent::display($tpl); }