function uninstallTheme() { $objTheme =& JSNISShowcaseTheme::getInstance(); $themes = $objTheme->listThemes(false); if (count($themes)) { foreach ($themes as $theme) { $objTheme->deleteThemeByPluginID((int) $theme['id']); } $app = JFactory::getApplication(); $app->enqueueMessage('SubInstall: Successfully removed all JSN ImageShow Theme plugins', 'message'); } }
protected function removeAllThemes() { jimport('joomla.installer.installer'); require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'jsn_is_showcasetheme.php'; $objJSNTheme = new JSNISShowcaseTheme(); $listThemes = $objJSNTheme->listThemes(false); $installer = new JInstaller(); $extentsion = JTable::getInstance('extension'); JPluginHelper::importPlugin('jsnimageshow'); $dispatcher = JDispatcher::getInstance(); if (count($listThemes)) { foreach ($listThemes as $theme) { $id = trim($theme['id']); $extentsion->load($id); $extentsion->protected = 0; $extentsion->store(); $dispatcher->trigger('onExtensionBeforeUninstall', array('eid' => $id)); $result = $installer->uninstall('plugin', $id); } $this->app->enqueueMessage('Successfully removed all JSN ImageShow Theme plugins'); } }
function _renderThemeData() { $objJSNISShowcaseTheme = JSNISShowcaseTheme::getInstance(); $themes = $objJSNISShowcaseTheme->listThemes(false); $themeTables = array(); if (count($themes)) { foreach ($themes as $theme) { $name = '#__imageshow_' . JString::str_ireplace('theme', 'theme_', $theme['element']); if ($this->_checkTableExist($name)) { $themeTables[$theme['element']] = $name; } } } if (count($themeTables)) { $this->_renderTableThemeData($themeTables); } }
function _getShowcaseTheme() { $objJSNISShowcaseTheme =& JSNISShowcaseTheme::getInstance(); $themes = $objJSNISShowcaseTheme->listThemes(false); $results = array(); if (count($themes)) { foreach ($themes as $theme) { $results[] = $theme['element']; } } return $results; }