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');