Ejemplo n.º 1
0
 public function display($tpl = null)
 {
     JHTML::stylesheet('joomfish.css', 'administrator/components/com_joomfish/assets/css/');
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('JOOMFISH_TITLE') . ' :: ' . JText::_('TITLE_Statistics'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('TITLE_Statistics'), 'statistics');
     JToolBarHelper::custom('cpanel.show', 'joomfish', 'joomfish', 'CONTROL PANEL', false);
     JToolBarHelper::help('screen.statistics', true);
     JSubMenuHelper::addEntry(JText::_('Control Panel'), 'index2.php?option=com_joomfish');
     JSubMenuHelper::addEntry(JText::_('Translation'), 'index2.php?option=com_joomfish&task=translate.overview');
     JSubMenuHelper::addEntry(JText::_('Orphans'), 'index2.php?option=com_joomfish&task=translate.orphans');
     JSubMenuHelper::addEntry(JText::_('Manage Translations'), 'index2.php?option=com_joomfish&task=manage.overview', false);
     JSubMenuHelper::addEntry(JText::_('Statistics'), 'index2.php?option=com_joomfish&task=statistics.overview', true);
     JSubMenuHelper::addEntry(JText::_('Language Configuration'), 'index2.php?option=com_joomfish&task=languages.show', false);
     JSubMenuHelper::addEntry(JText::_('Content elements'), 'index2.php?option=com_joomfish&task=elements.show', false);
     JSubMenuHelper::addEntry(JText::_('HELP AND HOWTO'), 'index2.php?option=com_joomfish&task=help.show', false);
     $this->panelStates = $this->get('PanelStates');
     $this->contentInfo = $this->get('ContentInfo');
     $this->publishedTabs = $this->get('PublishedTabs');
     $this->assignRef('panelStates', $this->panelStates);
     $this->assignRef('contentInfo', $this->contentInfo);
     $this->assignRef('publishedTabs', $this->publishedTabs);
     JHTML::_('behavior.tooltip');
     parent::display($tpl);
 }
Ejemplo n.º 2
0
 public function display($tpl = null)
 {
     JHTML::stylesheet('joomfish.css', 'administrator/components/com_joomfish/assets/css/');
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('JOOMFISH_TITLE') . ' :: ' . JText::_('TITLE_Statistics'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('TITLE_Statistics'), 'statistics');
     JToolBarHelper::custom('cpanel.show', 'joomfish', 'joomfish', 'COM_JOOMFISH_CONTROL_PANEL', false);
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.statistics', true);
     JSubMenuHelper::addEntry(JText::_('COM_JOOMFISH_CONTROL_PANEL'), 'index.php?option=com_joomfish');
     JSubMenuHelper::addEntry(JText::_('TRANSLATION'), 'index.php?option=com_joomfish&task=translate.overview');
     if (JOOMFISH_DEVMODE == true) {
         JSubMenuHelper::addEntry(JText::_('ORPHANS'), 'index.php?option=com_joomfish&task=translate.orphans');
     }
     if (JOOMFISH_DEVMODE == true) {
         JSubMenuHelper::addEntry(JText::_('MANAGE_TRANSLATIONS'), 'index.php?option=com_joomfish&task=manage.overview', false);
     }
     if (JOOMFISH_DEVMODE == true) {
         JSubMenuHelper::addEntry(JText::_('STATISTICS'), 'index.php?option=com_joomfish&task=statistics.overview', true);
     }
     JSubMenuHelper::addEntry(JText::_('LANGUAGE_CONFIGURATION'), 'index.php?option=com_joomfish&task=languages.show');
     JSubMenuHelper::addEntry(JText::_('CONTENT_ELEMENTS'), 'index.php?option=com_joomfish&task=elements.show');
     JSubMenuHelper::addEntry(JText::_('HELP_AND_HOWTO'), 'index.php?option=com_joomfish&task=help.show');
     $this->panelStates = $this->get('PanelStates');
     $this->contentInfo = $this->get('ContentInfo');
     $this->publishedTabs = $this->get('PublishedTabs');
     $this->assignRef('panelStates', $this->panelStates);
     $this->assignRef('contentInfo', $this->contentInfo);
     $this->assignRef('publishedTabs', $this->publishedTabs);
     JHTML::_('behavior.tooltip');
     parent::display($tpl);
 }
Ejemplo n.º 3
0
 function display($tpl = null)
 {
     $document =& JFactory::getDocument();
     // browser title
     $document->setTitle(JText::_('JOOMFISH_TITLE') . ' :: ' . JText::_('Content elements'));
     // set page title
     JToolBarHelper::title(JText::_('Content elements'), 'extension');
     $layout = $this->getLayout();
     if (method_exists($this, $layout)) {
         $this->{$layout}($tpl);
     } else {
         $this->overview($tpl);
     }
     parent::display($tpl);
 }
Ejemplo n.º 4
0
 /**
  * Load a template file -- This is a special implementation that tries to find the files within the distribution help
  * dir first. There localized versions of these files can be stored!
  *
  * @access	public
  * @param string $tpl The name of the template source file ...
  * automatically searches the template paths and compiles as needed.
  * @return string The output of the the template script.
  */
 public function loadTemplate($tpl = null)
 {
     global $mainframe, $option;
     // clear prior output
     $this->_output = null;
     $file = isset($tpl) ? $this->_layout . '_' . $tpl : $this->_layout;
     // Add specific prefix to the file for usage within the help directry
     $file = 'help.' . $file;
     // clean the file name
     $file = preg_replace('/[^A-Z0-9_\\.-]/i', '', $file);
     // Get Help URL
     jimport('joomla.language.help');
     $filetofind = JHelp::createURL($file, true);
     // TODO: reactivate - this construct can not deal with symbolic links!
     //$this->_template = JPath::find(JPATH_ADMINISTRATOR, $filetofind);
     $fullname = JPATH_ADMINISTRATOR . DS . $filetofind;
     $this->_template = JFile::exists($fullname) ? $fullname : false;
     if ($this->_template != false) {
         // unset so as not to introduce into template scope
         unset($tpl);
         unset($file);
         // never allow a 'this' property
         if (isset($this->this)) {
             unset($this->this);
         }
         // start capturing output into a buffer
         ob_start();
         // include the requested template filename in the local scope
         // (this will execute the view logic).
         include $this->_template;
         // done with the requested template; get the buffer and
         // clear it.
         $this->_output = ob_get_contents();
         ob_end_clean();
         return $this->_output;
     } else {
         return parent::loadTemplate($tpl);
     }
 }
Ejemplo n.º 5
0
 /**
  * Method to initialize the language depended image (flag) browser
  * The browser is initialized with the default root path based on the Joomfish configuration
  * @param $tpl
  */
 public function filebrowser($tpl = null)
 {
     $document = JFactory::getDocument();
     $livesite = JURI::base();
     $document->addStyleSheet($livesite . 'components/com_joomfish/assets/css/joomfish.css');
     $document->addStyleSheet(JURI::root(true) . '/media/media/css/popup-imagelist.css');
     JHtml::_('behavior.modal');
     JHTML::script('com_joomfish/joomfish.mootools.js', true, true);
     $jfManager = JoomFishManager::getInstance();
     $root = $jfManager->getCfg('directory_flags');
     $current = JRequest::getVar('current', '');
     if ($current != '') {
         $root = dirname($current);
     }
     // remove leading / in case it exists
     $root = preg_replace('/^\\/(.*)/', "\$1", $root);
     $flagField = JRequest::getVar('flagField', '');
     $folder = JRequest::getVar('folder', $root, 'default', 'path');
     $type = JRequest::getCmd('type', 'image');
     if (JString::trim($folder) == "") {
         $path = JPATH_SITE . DS . JPath::clean('/');
     } else {
         $path = JPATH_SITE . DS . JPath::clean($folder);
     }
     JPath::check($path);
     $title = JText::_('BROWSE_LANGUAGE_FLAGS');
     $filter = '.jpg|png|gif|xcf|odg|bmp|jpeg';
     if (JFolder::exists($path)) {
         $folderList = JFolder::folders($path);
         $filesList = JFolder::files($path, $filter);
     }
     if (!empty($folder)) {
         $parent = substr($folder, 0, strrpos($folder, '/'));
     } else {
         $parent = '';
     }
     $this->assignRef('folders', $folderList);
     $this->assignRef('files', $filesList);
     $this->assignRef('parent', $parent);
     $this->assignRef('path', $folder);
     $this->assignRef('type', $type);
     $this->assignRef('title', $title);
     $this->assignRef('flagField', $flagField);
     parent::display($tpl);
 }
Ejemplo n.º 6
0
 /**
  * Load a template file -- This is a special implementation that tries to find the files within the distribution help
  * dir first. There localized versions of these files can be stored!
  *
  * @access	public
  * @param string $tpl The name of the template source file ...
  * automatically searches the template paths and compiles as needed.
  * @return string The output of the the template script.
  */
 function loadTemplate($tpl = null)
 {
     global $mainframe, $option;
     // clear prior output
     $this->_output = null;
     $file = $this->_layout;
     // clean the file name
     $file = preg_replace('/[^A-Z0-9_\\.-]/i', '', $file);
     // Get Help URL
     jimport('joomla.language.help');
     $filetofind = JHelp::createURL($file, true);
     $this->_template = JPath::find(JPATH_ADMINISTRATOR, $filetofind);
     if ($this->_template != false) {
         // unset so as not to introduce into template scope
         unset($tpl);
         unset($file);
         // never allow a 'this' property
         if (isset($this->this)) {
             unset($this->this);
         }
         // start capturing output into a buffer
         ob_start();
         // include the requested template filename in the local scope
         // (this will execute the view logic).
         include $this->_template;
         // done with the requested template; get the buffer and
         // clear it.
         $this->_output = ob_get_contents();
         ob_end_clean();
         return $this->_output;
     } else {
         return parent::loadTemplate($tpl);
     }
 }
Ejemplo n.º 7
0
 /**
  * Method displaying the config traslation layout
  */
 function translateConfig($tpl = null)
 {
     $document = JFactory::getDocument();
     // this already includes administrator
     $livesite = JURI::base();
     $document->addStyleSheet($livesite . 'components/com_joomfish/assets/css/joomfish.css');
     $document->setTitle(JText::_('JOOMFISH_TITLE') . ' :: ' . JText::_('Language Title'));
     // hide the sub menu
     JRequest::setVar('hidemainmenu', 1);
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('Language Title') . ' - ' . JText::_('Translate Configuration'), 'language');
     JToolBarHelper::save('languages.saveTranslateConfig');
     JToolBarHelper::cancel('languages.show');
     JToolBarHelper::help('screen.languages', true);
     parent::display($tpl);
 }
Ejemplo n.º 8
0
 function preview($tpl = null)
 {
     // hide the sub menu
     $this->_hideSubmenu();
     parent::display($tpl);
 }