Beispiel #1
0
 protected function addToolBar()
 {
     // set title
     JToolBarHelper::title('RSForm! Pro', 'rsform');
     require_once JPATH_COMPONENT . '/helpers/toolbar.php';
     RSFormProToolbarHelper::addToolbar('backuprestore');
 }
 protected function addToolbar()
 {
     if (JFactory::getUser()->authorise('core.admin', 'com_rsform')) {
         JToolBarHelper::preferences('com_rsform');
     }
     // set title
     JToolBarHelper::title('RSForm! Pro', 'rsform');
     require_once JPATH_COMPONENT . '/helpers/toolbar.php';
     RSFormProToolbarHelper::addToolbar('rsform');
 }
Beispiel #3
0
 protected function addToolbar()
 {
     static $called;
     // this is a workaround so if called multiple times it will not duplicate the buttons
     if (!$called) {
         require_once JPATH_COMPONENT . '/helpers/toolbar.php';
         RSFormProToolbarHelper::addToolbar('directory');
         $called = true;
     }
 }
Beispiel #4
0
 protected function addToolBar()
 {
     // set title
     JToolBarHelper::title('RSForm! Pro', 'rsform');
     $backupIcon = RSFormProHelper::isJ('3.0') ? 'download' : 'archive';
     $restoreIcon = RSFormProHelper::isJ('3.0') ? 'upload' : 'unarchive';
     JToolBarHelper::custom('backup.download', $backupIcon, $backupIcon, JText::_('RSFP_BACKUP_GENERATE'), false);
     JToolBarHelper::custom('restore.process', $restoreIcon, $restoreIcon, JText::_('RSFP_RESTORE'), false);
     require_once JPATH_COMPONENT . '/helpers/toolbar.php';
     RSFormProToolbarHelper::addToolbar('backuprestore');
 }
Beispiel #5
0
 protected function addToolbar()
 {
     static $called;
     // this is a workaround so if called multiple times it will not duplicate the buttons
     if (!$called) {
         // set title
         JToolBarHelper::title('RSForm! Pro', 'rsform');
         require_once JPATH_COMPONENT . '/helpers/toolbar.php';
         RSFormProToolbarHelper::addToolbar('forms');
         $called = true;
     }
 }
Beispiel #6
0
 public function getSideBar()
 {
     require_once JPATH_COMPONENT . '/helpers/toolbar.php';
     return RSFormProToolbarHelper::render();
 }
Beispiel #7
0
        self::addEntry('UPDATES', 'index.php?option=com_rsform&view=updates', $view == 'updates');
        self::addEntry('PLUGINS', 'index.php?option=com_rsform&task=goto.plugins', false);
    }
    protected static function addEntry($lang_key, $url, $default = false)
    {
        $lang_key = 'COM_RSFORM_' . $lang_key;
        if (self::$isJ30) {
            JHtmlSidebar::addEntry(JText::_($lang_key), JRoute::_($url), $default);
        } else {
            JSubMenuHelper::addEntry(JText::_($lang_key), JRoute::_($url), $default);
        }
    }
    public static function addFilter($text, $key, $options)
    {
        if (self::$isJ30) {
            JHtmlSidebar::addFilter($text, $key, $options);
        }
        // nothing for 2.5
    }
    public static function render()
    {
        if (self::$isJ30) {
            return JHtmlSidebar::render();
        } else {
            return '';
        }
    }
}
$jversion = new JVersion();
RSFormProToolbarHelper::$isJ30 = $jversion->isCompatible('3.0');