public function installPaExtension() { $this->model = $this->getModel('installer'); JSNFactory::import('components.com_installer.helpers.installer'); $canDo = InstallerHelper::getActions(); if ($canDo->get('core.manage')) { try { $rs = $this->model->download(); $this->input->set('package', $rs); // Set extension parameters $_GET['package'] = $rs; $_GET['type'] = 'plugin'; $_GET['folder'] = 'jsnpoweradmin'; $_GET['publish'] = 1; $_GET['client'] = 'site'; $_GET['name'] = str_ireplace(JSN_POWERADMIN_EXT_IDENTIFIED_NAME_PREFIX, '', $_GET['identified_name']); $this->model->install($rs); if ($this->model->install($rs)) { require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/extensions.php'; // Enable extension suport $_GET['name'] = str_ireplace(JSN_POWERADMIN_EXT_IDENTIFIED_NAME_PREFIX, '', $_GET['identified_name']); try { JSNPaExtensionsHelper::enableExt($identifiedName); } catch (Exception $ex) { exit('notenabled'); } } } catch (Exception $ex) { exit($ex->getMessage()); } exit('success'); } }
public function changeExtStatus() { $status = (int) JRequest::getInt('status'); $idName = str_ireplace(JSN_POWERADMIN_EXT_IDENTIFIED_NAME_PREFIX, "", JRequest::getVar('identified_name')); if (JSNPaExtensionsHelper::enableExt($idName, 'jsnpoweradmin', $status)) { exit('success'); } }
/** * * Ajax request set/get data */ public function request() { $data = new JRegistry(); $dataFromRequest = JRequest::getVar('data', ''); $data->loadObject(json_decode($dataFromRequest)); if ($data->get('requestTask', '') == 'brankNewData') { JSNFactory::localimport('libraries.joomlashine.mode.rawmode'); $jsnrawmode = JSNRawmode::getInstance($data->toArray()); $jsnrawmode->renderComponent(); echo $jsnrawmode->getHTML('component'); jexit(); } $params = $data->get('params', array()); if (is_object($params)) { $params = (array) $params; } if ($data->get('prefix_params', false)) { $prefixId = 0; $_params = array(); foreach ($params as $key => $val) { $suffixs = explode('_', $key); $number = (int) $suffixs[count($suffixs) - 1]; if (!$prefixId) { $prefixId = $number; } $_params[str_replace('_' . $number, '', $key)] = $val; } $params = $_params; } $jsnConfig = JSNFactory::getConfig(); // Execute saveParams event if option is supported ext JSNPaExtensionsHelper::executeExtMethod(str_ireplace('com_', '', $data->get('option')), 'saveParams', array('data' => $data, 'jsnConfig' => $jsnConfig, 'params' => $params)); switch ($data->get('requestType', 'only')) { case 'only': $jsnConfig->menuitem($data->get('Itemid', ''), $params); break; case 'globally': //Set global config $jsnConfig->extension($data->get('option', ''), $params); foreach ($params as $k => $param) { $params[$k] = ''; } //Set for menu article layout $allMenuitems = $this->getModel('menuitem')->getAllItems(array('option' => $data->get('option', $data->get('option')), 'view' => $data->get('view', 'article'), 'layout' => $data->get('layout', ''))); foreach ($allMenuitems as $item) { $jsnConfig->menuitem($item->id, $params); } break; } jexit('success'); }
/** * Retrieve search coverage configuration * @param String $coverage * @return Array */ private function getConfiguration($coverage) { $configurations = array('articles' => array('language' => 'com_content', 'modelfile' => 'components/com_content/models/articles.php', 'viewfile' => 'articles', 'modelname' => 'ContentModelArticles', 'order' => 'a.title'), 'components' => array('tabs' => array('com_banners' => array('title' => 'Banners', 'language' => 'com_banners', 'modelfile' => 'components/com_banners/models/banners.php', 'viewfile' => 'banners_items', 'modelname' => 'BannersModelBanners', 'order' => 'name'), 'com_banners_categories' => array('title' => 'Banners Categories', 'language' => 'com_categories', 'modelfile' => 'components/com_categories/models/categories.php', 'viewfile' => 'categories', 'modelname' => 'CategoriesModelCategories', 'order' => 'a.lft', 'filters' => array('filter.extension' => 'com_banners')), 'com_banners_clients' => array('title' => 'Banners Clients', 'language' => 'com_banners', 'modelfile' => 'components/com_banners/models/clients.php', 'viewfile' => 'banners_clients', 'modelname' => 'BannersModelClients', 'order' => 'a.name'), 'com_contact' => array('title' => 'Contacts', 'language' => 'com_contact', 'modelfile' => 'components/com_contact/models/contacts.php', 'viewfile' => 'contacts_items', 'modelname' => 'ContactModelContacts', 'order' => 'name'), 'com_contact_categories' => array('title' => 'Contacts Categories', 'language' => 'com_categories', 'modelfile' => 'components/com_categories/models/categories.php', 'viewfile' => 'categories', 'modelname' => 'CategoriesModelCategories', 'order' => 'a.lft', 'filters' => array('filter.extension' => 'com_contact')), 'com_messages' => array('title' => 'Messages', 'language' => 'com_messages', 'modelfile' => 'components/com_messages/models/messages.php', 'viewfile' => 'messages', 'modelname' => 'MessagesModelMessages', 'order' => 'a.date_time'), 'com_newsfeeds' => array('title' => 'Feeds', 'language' => 'com_newsfeeds', 'modelfile' => 'components/com_newsfeeds/models/newsfeeds.php', 'viewfile' => 'feeds', 'modelname' => 'NewsfeedsModelNewsfeeds', 'order' => 'a.name'), 'com_newsfeeds_categories' => array('title' => 'Feeds Categories', 'language' => 'com_categories', 'modelfile' => 'components/com_categories/models/categories.php', 'viewfile' => 'categories', 'modelname' => 'CategoriesModelCategories', 'order' => 'a.lft', 'filters' => array('filter.extension' => 'com_newsfeeds')), 'com_weblinks' => array('title' => 'Web Links', 'language' => 'com_weblinks', 'modelfile' => 'components/com_weblinks/models/weblinks.php', 'viewfile' => 'weblinks', 'modelname' => 'WeblinksModelWeblinks', 'order' => 'a.title'), 'com_weblinks_categories' => array('title' => 'Web Links Categories', 'language' => 'com_categories', 'modelfile' => 'components/com_categories/models/categories.php', 'viewfile' => 'categories', 'modelname' => 'CategoriesModelCategories', 'order' => 'a.lft', 'filters' => array('filter.extension' => 'com_weblinks')))), 'categories' => array('language' => 'com_categories', 'modelfile' => 'components/com_categories/models/categories.php', 'viewfile' => 'categories', 'modelname' => 'CategoriesModelCategories', 'order' => 'a.lft'), 'modules' => array('language' => 'com_modules', 'modelfile' => 'components/com_modules/models/modules.php', 'viewfile' => 'modules', 'modelname' => 'ModulesModelModules', 'order' => 'a.title'), 'plugins' => array('language' => 'com_plugins', 'modelfile' => 'components/com_plugins/models/plugins.php', 'viewfile' => 'plugins', 'modelname' => 'PluginsModelPlugins', 'order' => 'a.title'), 'menus' => array('language' => 'com_menus', 'modelfile' => 'components/com_poweradmin/models/menusearch.php', 'viewfile' => 'menus', 'modelname' => 'PowerAdminModelMenuSearch', 'order' => 'a.lft'), 'templates' => array('language' => 'com_templates', 'modelfile' => 'components/com_templates/models/styles.php', 'viewfile' => 'templates', 'modelname' => 'TemplatesModelStyles', 'order' => 'a.title'), 'users' => array('language' => 'com_users', 'modelfile' => 'components/com_users/models/users.php', 'viewfile' => 'users', 'modelname' => 'UsersModelUsers', 'order' => 'a.name')); $supportedExtConfigs = JSNPaExtensionsHelper::getExtConfigurations(str_ireplace(JSN_3RD_EXTENSION_STRING . '-', '', $coverage)); if (count($supportedExtConfigs)) { foreach ($supportedExtConfigs as $key => $config) { $configurations[JSN_3RD_EXTENSION_STRING . '-' . strtolower($key)] = $config; } } if (!isset($configurations[$coverage])) { return null; } $config = $configurations[$coverage]; if (!isset($config['tabs'])) { return $config; } $this->tabs = array(); foreach ($config['tabs'] as $key => $tab) { if ($coverage == 'components') { continue; } $model = $this->getItemModel($tab, $this->state, $key); $total = $model->getTotal(); if ($total > 0) { $this->tabs[$key] = array('title' => "{$tab['title']} ({$total})", 'selected' => false); } } $selectedTab = $this->app->getUserStateFromRequest("components.selected", 'tab', null); if ($selectedTab == null || !isset($this->tabs[$selectedTab])) { $tabKeys = array_keys($this->tabs); $selectedTab = array_shift($tabKeys); $this->app->setUserState('components.selected', $selectedTab); } if (empty($this->tabs)) { return null; } $this->tabs[$selectedTab]['selected'] = true; return $config['tabs'][$selectedTab]; }
<a href="<?php echo JRoute::_("index.php?option=com_poweradmin&view=search&coverage={$this->coverage}&tab={$key}"); ?> "><?php echo $tab['title']; ?> </a> </h3> </span> </dt> <?php } ?> </dl> <?php } ?> <div class="clearbreak" ></div> <div class="jsn-search-result"> <?php $this->includeViewFile($this->config); ?> <div class="clearbreak"></div> </div> </div> </div> <?php $products = JSNPaExtensionsHelper::getDependentExtensions(); // Display footer JSNHtmlGenerate::footer($products);
private function _getTableMapping($name) { // Support Virtuemart. // $vmLang = ''; // if(file_exists(JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php')){ // require_once JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php'; // $langs = (array) VmConfig::get('active_languages'); // jimport('joomla.language.helper'); // $languages = JLanguageHelper::getLanguages('lang_code'); // $vmLang = JFactory::getLanguage()->getTag(); // if ( ! $vmLang ) { // // use user default // $lang =JFactory::getLanguage(); // $vmLang = $lang->getTag(); // } // if(!in_array($vmLang, $langs)) { // $params = JComponentHelper::getParams('com_languages'); // $vmLang = $params->get('site', 'en-GB');//use default joomla // } // } // $vmLang = $vmLang ? '_' . strtolower(strtr($vmLang,'-','_')) : ''; // ------------------------ $mappings = array('menus' => array('fields' => array('title' => '{title}', 'description' => '{type_name}'), 'link' => 'index.php?option=com_menus&task=item.edit&id={id}'), 'users' => array('name' => '#__users', 'lookup' => array('name', 'username'), 'fields' => array('title' => '{name}', 'description' => '{username} - {email}'), 'link' => 'index.php?option=com_users&task=user.edit&id={id}'), 'categories' => array('name' => '#__categories', 'lookup' => array('title'), 'link' => 'index.php?option=com_categories&task=category.edit&id={id}&extension={extension}', 'conditions' => 'extension=\'com_content\''), 'articles' => array('name' => '#__content', 'lookup' => array('title'), 'fields' => array('title' => '{title}', 'description' => "{introtext}"), 'link' => 'index.php?option=com_content&task=article.edit&id={id}'), 'modules' => array('name' => '#__modules', 'lookup' => array('title'), 'fields' => array('title' => '{title}', 'description' => ''), 'link' => 'index.php?option=com_modules&task=module.edit&id={id}'), 'plugins' => array('name' => '#__extensions', 'lookup' => array('name'), 'conditions' => 'type=\'plugin\'', 'fields' => array('title' => '{name}', 'description' => ''), 'link' => 'index.php?option=com_plugins&task=plugin.edit&extension_id={extension_id}'), 'templates' => array('name' => '#__template_styles', 'lookup' => array('title'), 'fields' => array('title' => '{title}', 'description' => ''), 'link' => 'index.php?option=com_templates&task=style.edit&id={id}'), 'com_banners' => array('name' => '#__banners', 'lookup' => array('name'), 'fields' => array('title' => '{name}', 'description' => '{description}'), 'link' => 'index.php?option=com_banners&task=banner.edit&id={id}'), 'com_banners_categories' => array('name' => '#__categories', 'lookup' => array('title'), 'link' => 'index.php?option=com_categories&task=category.edit&id={id}&extension=com_banners', 'conditions' => 'extension=\'com_banners\''), 'com_banners_clients' => array('name' => '#__banner_clients', 'lookup' => array('name'), 'fields' => array('title' => '{name}', 'description' => '{contact} - {email}'), 'link' => 'index.php?option=com_banners&task=client.edit&id={id}'), 'com_contacts' => array('name' => '#__contact_details', 'lookup' => array('name'), 'fields' => array('title' => '{name}', 'description' => '{misc}'), 'link' => 'index.php?option=com_contacts&task=contact.edit&id={id}'), 'com_contacts_categories' => array('name' => '#__categories', 'lookup' => array('title'), 'link' => 'index.php?option=com_categories&task=category.edit&id={id}&extension=com_contacts', 'conditions' => 'extension=\'com_contacts\''), 'com_messages' => array('name' => '#__messages', 'lookup' => array('subject'), 'fields' => array('title' => '{subject}', 'description' => '{message}'), 'link' => 'index.php?option=com_messages&view=message&message_id={message_id}'), 'com_newsfeeds' => array('name' => '#__newsfeeds', 'lookup' => array('name'), 'fields' => array('title' => '{name}', 'description' => ''), 'link' => 'index.php?option=com_newsfeeds&task=newsfeeds.edit&id={id}'), 'com_newsfeeds_categories' => array('name' => '#__categories', 'lookup' => array('title'), 'link' => 'index.php?option=com_categories&task=category.edit&id={id}&extension=com_newsfeeds', 'conditions' => 'extension=\'com_newsfeeds\''), 'com_weblinks' => array('name' => '#__weblinks', 'lookup' => array('title'), 'link' => 'index.php?option=com_weblinks&task=weblink.edit&id={id}'), 'com_weblinks_categories' => array('name' => '#__categories', 'lookup' => array('title'), 'link' => 'index.php?option=com_categories&task=category.edit&id={id}&extension=com_weblinks', 'conditions' => 'extension=\'com_weblinks\'')); $supportedExtList = JPluginHelper::getPlugin('jsnpoweradmin'); if (count($supportedExtList)) { foreach ($supportedExtList as $supportedExt) { $_mappings = JSNPaExtensionsHelper::executeExtMethod($supportedExt->name, 'getTableMapping'); if (count($_mappings)) { foreach ($_mappings as $k => $m) { $mappings[$k] = $m; } } } } $params = JSNConfigHelper::get('com_poweradmin'); if (intval($params->get('search_trashed', 0)) == 0) { $mappings['categories']['conditions'] .= ' AND published!=-2'; $mappings['articles']['conditions'] = 'state!=-2'; $mappings['com_banners']['conditions'] = 'state!=-2'; $mappings['com_banners_categories']['conditions'] .= ' AND published!=-2'; $mappings['com_banners_clients']['conditions'] = 'state!=-2'; $mappings['com_contacts']['conditions'] = 'published!=-2'; $mappings['com_contacts_categories']['conditions'] .= ' AND published!=-2'; $mappings['com_newsfeeds']['conditions'] = 'published!=-2'; $mappings['com_newsfeeds_categories']['conditions'] .= ' AND published!=-2'; $mappings['com_weblinks']['conditions'] = 'state!=-2'; $mappings['com_weblinks_categories']['conditions'] .= ' AND published!=-2'; } return !isset($mappings[$name]) ? null : $mappings[$name]; }
/** * Return array of search coverage */ public static function getSearchCoverages() { $config = JSNConfigHelper::get('com_poweradmin'); $searchCoveragesOrder = json_decode($config->search_coverage); $coverages = array(); if (count($searchCoveragesOrder) > 0) { $configCoverages = json_decode($config->search_coverage); $configCoveragesOrder = explode(",", $config->search_coverage_order); if (count($configCoveragesOrder) > 0) { foreach ($configCoveragesOrder as $_cov) { if (in_array($_cov, $configCoverages)) { array_push($coverages, $_cov); } } } else { $coverages = $configCoverages; } } else { $coverages = array('articles', 'categories', 'components', 'modules', 'plugins', 'menus', 'templates', 'users'); include_once JPATH_ROOT . '/administrator/components/com_poweradmin/helpers/extensions.php'; $installedComponents = self::getInstalledComponents(); $supportedList = JSNPaExtensionsHelper::getSupportedExtList(); if (count($supportedList)) { foreach ($supportedList as $extName => $value) { if (in_array($extName, $installedComponents)) { $coverages[] = $value->coverage; } } } } return $coverages; }
/** * Return parameters for client side as JSON format * @return string */ private function _getJSConfiguration() { $input = $this->_application->input; $defaultStyles = $this->_getDefaultStyles(); $installedComponents = PoweradminHelper::getInstalledComponents(); $supportedExtList = JSNPaExtensionsHelper::getSupportedExtList(); if (!$this->_params->get('search_coverage')) { $coverages = PoweradminHelper::getSearchCoverages(); } else { $coverages = json_decode($this->_params->get('search_coverage', PoweradminHelper::getSearchCoverages())); } foreach ($supportedExtList as $_supportedExt => $value) { $supportedExtAlias = str_replace('com_', JSN_3RD_EXTENSION_STRING . '-', $_supportedExt); $_extShortName = str_ireplace('com_', '', $_supportedExt); $_plg = JPluginHelper::getPlugin('jsnpoweradmin', $_extShortName); if (in_array($_supportedExt, $installedComponents) && !in_array($_supportedExt, $coverages) && !count($_plg) && !in_array($supportedExtAlias, explode(',', $this->_params->get('search_coverage_order')))) { array_push($coverages, JSN_3RD_EXTENSION_NOT_INSTALLED_STRING . '-' . $_extShortName); } if (in_array($_supportedExt, $installedComponents) && count($_plg) && !in_array($supportedExtAlias, explode(',', $this->_params->get('search_coverage_order')))) { array_push($coverages, JSN_3RD_EXTENSION_NOT_ENABLED_STRING . '-' . $_extShortName); } } $logoFile = $this->_params->get('logo_file', 'administrator/components/com_poweradmin/assets/images/logo-jsnpoweradmin.png'); $logoFile = $logoFile == 'N/A' ? '' : JURI::root(true) . '/' . $logoFile; $canInstall = $this->_user->authorise('core.manage', 'com_installer'); // Get editors $curEditor = JFactory::getUser()->getParam('editor'); $editorOptions = array(); foreach ($this->_getEditorOptions() as $option) { $_isAtive = $curEditor == $option->value ? true : false; $editorOptions[] = array('value' => $option->value, 'name' => $option->text, 'active' => $_isAtive); } $conf = array('currentUrl' => $_SERVER["REQUEST_URI"], 'baseUrl' => JURI::base(true) . '/', 'rootUrl' => JURI::root(true) . '/', 'userId' => $this->_user->id, 'protected' => $this->_getProtectedComponents(), 'defaultStyles' => $defaultStyles, 'logoFile' => $logoFile, 'logoLink' => $this->_params->get('logo_link', 'http://www.joomlashine.com/joomla-extensions/jsn-poweradmin.html'), 'logoLinkTarget' => $this->_params->get('logo_target', '_blank'), 'logoTitle' => JText::_($this->_params->get('logo_slogan', JText::_('PLG_JSNADMINBAR_CONFIG_LOGO_SLOGAN_DEFAULT'))), 'allowUninstall' => $this->_params->get('allow_uninstall', true) && $canInstall, 'linkTarget' => $this->_target, 'preloadImages' => array('bg-overlay.png', 'loader.gif', 'dark-loader.gif', 'ui-window-buttons.png'), 'pinned' => $this->_params->get('pinned_bar', true), 'sessionInfinite' => $this->_params->get('admin_session_timer_infinite', false), 'warningTime' => $this->_params->get('session_timeout_warning', 1), 'disableWarning' => $this->_params->get('admin_session_timeout_warning_disabled', false), 'searchCoverages' => $coverages, 'sitemenu' => array('preview' => $this->_preview->getPreviewLink(), 'manager' => JRoute::_('index.php?option=com_poweradmin&view=rawmode', false)), 'usermenu' => array('messages' => $this->_getMessagesCount(), 'profileLink' => "index.php?option=com_admin&task=profile.edit&id={$this->_user->id}&tmpl=component", 'messageLink' => "index.php?option=com_messages", 'logoutLink' => "index.php?option=com_login&task=logout&" . JSession::getFormToken() . "=1"), 'history' => array('url' => 'index.php?option=com_poweradmin&task=history.load'), 'spotlight' => array('limit' => $this->_params->get('search_result_num', 10)), 'urlparams' => array('option' => $input->getVar('option', ''), 'task' => $input->getVar('task', ''), 'view' => $input->getVar('view', ''), 'layout' => $input->getVar('layout', ''), 'id' => $input->getInt('id', 0)), 'editors' => $editorOptions); return json_encode($conf); }
/** * Get the language manager markup. * * @return string */ protected function getInput() { require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/extensions.php'; // Generate field container id $id = str_replace('_', '-', $this->id) . '-field'; // Preset output $supportedExtList = JSNPaExtensionsHelper::getSupportedExtList(); JSNHtmlAsset::addScript(JURI::root(true) . '/plugins/system/jsnframework/assets/3rd-party/jquery-tipsy/jquery.tipsy.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'joomlashine/configuration/extmanager.js'); $customScript = "var baseUrl = '" . JURI::root() . "';"; JSNHtmlAsset::addInlineScript($customScript); if (count($supportedExtList)) { $installedComponents = PoweradminHelper::getInstalledComponents(); foreach ($supportedExtList as $key => $ext) { $_shortName = str_ireplace("com_", "", $key); $ext->name = $_shortName; $ext->comInstalled = in_array($key, $installedComponents) ? true : false; $extStatus = JSNPaExtensionsHelper::checkInstalledPlugin($_shortName); if ($extStatus['isInstalled']) { $ext->plgInstalled = true; $ext->enabled = $extStatus['isEnabled']; } else { $ext->plgInstalled = false; $ext->enabled = false; } $list[$_shortName] = $ext; } } $html[] = '<div class="jsn-supported-ext-list"> <input type="hidden" id="label-disable" value="' . JText::_('JSN_POWERADMIN_EXTPAGE_DISABLE') . '"> <input type="hidden" id="label-enable" value="' . JText::_('JSN_POWERADMIN_EXTPAGE_ENABLE') . '"> <input type="hidden" id="label-install" value="' . JText::_('JSN_POWERADMIN_EXTPAGE_INSTALL') . '"> '; $html[] = '<ul class="thumbnails">'; foreach ($list as $ext) { $_className = ''; $_alt = ''; $posibleAct = ''; $_id = JSN_POWERADMIN_EXT_IDENTIFIED_NAME_PREFIX . $ext->name; if (!$ext->comInstalled) { $_className = 'item-locked'; $_alt = JText::_('JSN_POWERADMIN_EXTPAGE_COM_NOT_INSTALLED_EXPLAIN'); $posibleAct = '<a class="btn btn-primary disabled" href="#" title="' . JText::_('JSN_POWERADMIN_EXTPAGE_COM_NOT_INSTALLED_EXPLAIN') . '">' . JText::_('JSN_POWERADMIN_EXTPAGE_INSTALL') . '</a>'; } else { if ($ext->plgInstalled) { if (!$ext->enabled) { $_className = 'item-installed item-disabled'; $_alt = JText::_('JSN_POWERADMIN_EXTPAGE_CLICK_TO_ENABLE'); $posibleAct = '<a class="btn btn-primary" id="' . $_id . '" act="enable" href="#">' . JText::_('JSN_POWERADMIN_EXTPAGE_ENABLE') . '</a>'; } else { $_className = 'item-installed item-enabled'; $_alt = JText::_('JSN_POWERADMIN_EXTPAGE_CLICK_TO_DISABLE'); $posibleAct = '<a class="btn btn-primary" id="' . $_id . '" act="disable" href="#">' . JText::_('JSN_POWERADMIN_EXTPAGE_DISABLE') . '</a>'; } } else { $_className = 'item-notinstalled'; $_alt = JText::_('JSN_POWERADMIN_EXTPAGE_CLICK_TO_INSTALL'); $posibleAct = '<a class="btn btn-primary" id="' . $_id . '" act="install" href="#">' . JText::_('JSN_POWERADMIN_EXTPAGE_INSTALL') . '</a>'; } } $html[] = ' <li class="span4"> <div class="thumbnail"> <img src="' . $ext->thumbnail . '" alt=""> <div class="caption"> <h2>' . ucfirst($ext->name) . '</h2> <p> ' . $posibleAct . ' </p> </div> </div> </li>'; } $html[] = '</ul>'; return implode($html); }