本文整理汇总了PHP中JSNHtmlAsset::addInlineScript方法的典型用法代码示例。如果您正苦于以下问题:PHP JSNHtmlAsset::addInlineScript方法的具体用法?PHP JSNHtmlAsset::addInlineScript怎么用?PHP JSNHtmlAsset::addInlineScript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSNHtmlAsset
的用法示例。
在下文中一共展示了JSNHtmlAsset::addInlineScript方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onDisplay
//.........这里部分代码省略.........
$option = JRequest::getVar('option');
$com_advancedmodules = JSNPagebuilderHelpersPagebuilder::checkComponentEnabled('com_advancedmodules') ? array('com_advancedmodules') : '';
$flexiContent = JSNPagebuilderHelpersPagebuilder::checkComponentEnabled('com_flexicontent') ? array('com_flexicontent') : '';
$supported_list = array('com_content', 'com_modules');
if ($com_advancedmodules != '') {
$supported_list = array_merge($supported_list, $com_advancedmodules);
}
if ($flexiContent != '') {
$supported_list = array_merge($supported_list, $flexiContent);
}
if (isset($params)) {
if ($params->extension_support != '') {
$supported_list = json_decode($params->extension_support);
}
}
$installedPbExtensions = JSNPagebuilderHelpersExtensions::getPbExtensions();
if (count($installedPbExtensions)) {
foreach ($installedPbExtensions as $installedPbExtension) {
if ($option == "com_" . $installedPbExtension->element) {
if (!$installedPbExtension->enabled) {
$app->enqueueMessage(sprintf('Please enable the %s plugin before using. How to enable it, click <a href="%s" target="_blank">here</a>', 'JSN PageBuilder ' . strtoupper($installedPbExtension->element) . ' element', 'index.php?option=com_pagebuilder&view=configuration&s=maintainence&g=extensions'), 'warning');
return;
} else {
$isInstalledPbExtension = true;
}
break;
}
}
}
if ($isInstalledPbExtension) {
if (!in_array($option, $supported_list)) {
$app->enqueueMessage(sprintf('Please enable the JSN PageBuilder %s Extention Support before using. How to enable it, click <a href="%s" target="_blank">here</a>', strtoupper($installedPbExtension->element), 'index.php?option=com_pagebuilder&view=configuration&s=configuration&g=msgs'), 'warning');
return;
}
}
if ($framework->extension_id && in_array($option, $supported_list)) {
// Get PageBuilder configuration
if (!in_array($option, $supported_list)) {
$isInstalled = JSNPagebuilderHelpersExtensions::checkInstalledPlugin(str_replace('com_', '', $option));
if (!$isInstalled['isInstalled']) {
return;
}
}
// Check if it's enabled or not
$isEnabled = $params->get('enable_pagebuilder', 1);
if ($isEnabled) {
$conf = JFactory::getConfig();
$editor = $conf->get('editor');
// Inlcude the entry js file.
JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/joomlashine.noconflict.js');
JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/jquery-ui/js/jquery-ui-1.10.3.custom.js');
JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/jquery-livequery/jquery.livequery.min.js');
JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/builder-layout.js');
JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/joomlashine/js/jsn-modal.js');
JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/elements-lang.js');
JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/jquery.alphanumeric/jquery.alphanumeric.js');
JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/shortcodesetting/settings-handler.js');
JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/handle.js');
// Include supoported editor script
switch ($editor) {
case 'codemirror':
JSNHtmlAsset::addScript(JURI::root(true) . '/plugins/editors-xtd/pagebuilder/assets/js/supported-editor/codemirror.js');
break;
case 'tinymce':
JSNHtmlAsset::addScript(JURI::root(true) . '/plugins/editors-xtd/pagebuilder/assets/js/supported-editor/tiny-mce.js');
break;
case 'jce':
JSNHtmlAsset::addScript(JURI::root(true) . '/plugins/editors-xtd/pagebuilder/assets/js/supported-editor/jce.js');
break;
case 'jckeditor':
JSNHtmlAsset::addScript(JURI::root(true) . '/plugins/editors-xtd/pagebuilder/assets/js/supported-editor/jckeditor.js');
break;
case 'ckeditor':
JSNHtmlAsset::addScript(JURI::root(true) . '/plugins/editors-xtd/pagebuilder/assets/js/supported-editor/ckeditor.js');
break;
case 'artofeditor':
JSNHtmlAsset::addScript(JURI::root(true) . '/plugins/editors-xtd/pagebuilder/assets/js/supported-editor/artofeditor.js');
break;
case 'arkeditor':
JSNHtmlAsset::addScript(JURI::root(true) . '/plugins/editors-xtd/pagebuilder/assets/js/supported-editor/arkeditor.js');
break;
default:
JSNHtmlAsset::addScript(JURI::root(true) . '/plugins/editors-xtd/pagebuilder/assets/js/supported-editor/default.js');
break;
}
// Generate random string to assign to switcher button
$random_id = JSNPagebuilderHelpersShortcode::generateRandomString();
JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/entry.js');
$js = "\n\t\t\t\t\tvar Pb_Ajax\t= {};\n\n\t\t\t\t\tvar JSNPbParams = {pbstrings:{}};\n\t\t\t\t\tJSNPbParams.rootUrl = '" . JUri::root() . "';\n\t\t\t\t\tJSNPbParams.pbstrings.COPY = '" . JText::_('copy') . "';\n\t\t\t\t\tJSNPbParams.pbstrings.EMPTY = '" . JText::_('(Untitled)') . "';\n\t\t\t\t\tJSNPbParams.pbstrings.ALERT_DELETE_ROW = '" . JText::_('Are you sure you want to delete the whole row including all elements it contains?') . "';\n\t\t\t\t\tJSNPbParams.pbstrings.ALERT_DELETE_COLUMN = '" . JText::_('Are you sure you want to delete the whole column including all elements it contains?') . "';\n\t\t\t\t\tJSNPbParams.pbstrings.ALERT_DELETE_ELEMENT = '" . JText::_('Are you sure you want to delete the element?') . "';\n\t\t\t\t\tvar pb;\n\t\t\t\t\tvar pbContentStatus_{$random_id}\t= 'normal';\n\n\t\t\t\t\t// Set global pagebuilder instance\n\t\t\t\t\tvar jsnpb_{$random_id};\n\n\t\t\t\t\t// Method to switch between Joomla editor and PageBuilder\n\t\t\t\t\tfunction switchPagebuilder(id, status){\n\t\t\t\t\t\t(function (\$){\n\t\t\t\t\t\t\tif (status == 'on') {\n\t\t\t\t\t\t\t\tjsnpb_{$random_id}\t= new \$.JSNPageBuilder(id);\n\t\t\t\t\t\t\t\tpbContentStatus_{$random_id} = 'pb';\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tjsnpb_{$random_id}.transformToSource();\n\t\t\t\t\t\t\t\tpbContentStatus_{$random_id} = 'normal';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})(JoomlaShine.jQuery);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Entry button group structure which will be appended to the aditor\n\t\t\t\t\tvar pbEntryButtons\t= '<div class=\"jsn-form-bar pb-switcher-group\">'\n\t\t\t\t\t\t\t+ '<div id=\"pb-editor-switcher\" class=\"btn-group\">'\n\t\t\t\t\t\t\t+\t'<button type=\"button\" class=\"switchmode-button pb-off btn active btn-success\" id=\"pagebuilder-off-{$random_id}\" >Default Editor</button>'\n\t\t\t\t\t\t\t+\t'<button type=\"button\" class=\"switchmode-button pb-on btn\" id=\"pagebuilder-on-{$random_id}\" >PageBuilder</button>'\n\t\t\t\t\t\t\t+'</div>'\n\t\t\t\t\t\t\t+\t'<input type=\"hidden\" id=\"jform_pb_total\" name=\"jform_pb_total\" value=\"{$pbTotal}\">'\n\t\t\t\t\t\t\t+\t'<input type=\"hidden\" id=\"jform_content_id\" name=\"jform_content_id\" value=\"{$id}\">'\n\t\t\t\t\t\t\t+\t'<input type=\"hidden\" id=\"jform_list_id\" name=\"jform_list_id\" value=\"{$listId}\">'\n\t\t\t\t\t\t\t+'<div class=\"pull-right\" id=\"top-btn-actions\">'\n +'<!--<button class=\"btn btn-default page-custom-css\" onclick=\"return false;\">Custom CSS</button>-->'\n + '<input type=\"hidden\" id=\"pb_content_id\" name=\"pb_content_id\" value=\"{$id}\">'\n +'</div>'\n\t\t\t\t\t\t+'</div>';\n\n\t\t\t\t\t(function (\$){\n\t\t\t\t\t\t\$(window).load(function (){\n\t\t\t\t\t\t\$('body').find('ul#myTabTabs li:first').on('click', function(){\n\t\t\t\t\t\t\t\$('.switchmode-button.pb-off').click();\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (\$('#jform_module').length)\n\t\t\t\t\t\t \t\t{\n\t\t\t\t\t\t\t\t\tif (\$('#jform_module').val() != 'mod_custom')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\tvar editorHelper_{$random_id}\t= new \$.JSNPbEditorHelper();\n\t\t\t\t\t\t\tvar buttonGroups\t= editorHelper_{$random_id}.initEntryButtons('" . $name . "', pbEntryButtons);\n\n\t\t\t\t\t\t\t//Auto switch to PageBuilder if shortcode structure detected\n\t\t\t\t\t\t\tvar _content\t= \$('#" . $name . "').val();\n\t\t\t\t\t\t\tif (_content.indexOf('[pb_row') >= 0) {\n\t\t\t\t\t\t\t\t//setTimeout(function (){\n\t\t\t\t\t\t\t\t\t\$('.switchmode-button.pb-on', buttonGroups).click();\n\t\t\t\t\t\t\t\t//}, 500);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t})(JoomlaShine.jQuery);\n\t\t\t\t";
JSNHtmlAsset::addInlineScript($js);
JSNHtmlAsset::addStyle(JSNPB_FRAMEWORK_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.9.0.custom.css');
JSNHtmlAsset::addStyle(JSNPB_FRAMEWORK_ASSETS . '/joomlashine/css/jsn-gui.css');
JSNHtmlAsset::addStyle(JSNPB_PLG_SYSTEM_ASSETS_URL . 'css/pagebuilder.css');
JSNHtmlAsset::addStyle(JSNPB_ADMIN_URL . '/assets/css/jsn-element-font.css');
JSNHtmlAsset::addStyle(JSNPB_FRAMEWORK_ASSETS . '/joomlashine/css/jsn-advanced-parameters.css');
// for text,
JSNHtmlAsset::addStyle(JSNPB_ADMIN_URL . '/assets/css/settings.css');
}
}
}
示例2: display
public function display($tpl = null)
{
JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/shortcodesetting/settings-handler.js');
$js = '
var JSNPbParams = {pbstrings : {}};
JSNPbParams.rootUrl = \'' . JUri::root() . '\';
JSNPbParams.pbstrings.NO_ITEM_FOUND = \'' . JText::_('JSN_PAGEBUILDER_CONTROLLERS_SHORTCODE_NO_ITEM_FOUND') . '\';
JSNPbParams.pbstrings.SINGLE_ENTRY = \'' . JText::_('JSN_PAGEBUILDER_CONTROLLERS_SHORTCODE_SINGLE_ENTRY') . '\';
JSNPbParams.pbstrings.SETTINGS = \'' . JText::_('JSN_PAGEBUILDER_CONTROLLERS_SHORTCODE_SETTINGS') . '\';
JSNPbParams.pbstrings.INVALID_LINK = \'' . JText::_('JSN_PAGEBUILDER_CONTROLLERS_SHORTCODE_THE_LINK_IS_INVALID') . '\';
JSNPbParams.pbstrings.COPY = \'' . JText::_('JSN_PAGEBUILDER_CONTROLLERS_SHORTCODE_COPY') . '\';
JSNPbParams.pbstrings.EMPTY = \'' . JText::_('JSN_PAGEBUILDER_CONTROLLERS_SHORTCODE_EMPTY') . '\';
JSNPbParams.pbstrings.SELECT_DES_MARKER = \'' . JText::_('JSN_PAGEBUILDER_CONTROLLERS_SHORTCODE_SELECT_DES_MARKER') . '\';
';
JSNHtmlAsset::addInlineScript($js);
$shortcode = JRequest::getString('shortcode');
$params = '';
// Get params from session then clear the session
if (isset($_SESSION[JSNPB_SHORTCODE_SESSION_NAME][$shortcode]['params'])) {
$params = $_SESSION[JSNPB_SHORTCODE_SESSION_NAME][$shortcode]['params'];
$params = json_decode($params);
$_SESSION[JSNPB_SHORTCODE_SESSION_NAME][$shortcode]['params'] = '';
}
// TODO: move under assets inside shortcode
// Add common js library for elements.
JSNHtmlAsset::addScript(JSNPB_FRAMEWORK_ASSETS . '/3rd-party/jquery-tipsy/jquery.tipsy.js');
JSNHtmlAsset::addStyle(JSNPB_FRAMEWORK_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css');
JSNHtmlAsset::addStyle(JSNPB_FRAMEWORK_ASSETS . '/joomlashine/css/jsn-general.css');
// for accordion_item, buttonbar_item,
JSNHtmlAsset::addStyle(JSNPB_FRAMEWORK_ASSETS . '/joomlashine/css/jsn-fonticomoon.css');
// for accordion_item, buttonbar_item,
$extract_params = '';
$shortcodeHelper = new JSNPagebuilderHelpersShortcode();
$data = array();
if (!empty($shortcode)) {
// elements
$class = $shortcodeHelper->getShortcodeClass($shortcode);
if (class_exists($class)) {
// Get all regitered element shortcodes
global $JSNPbElements;
$elements = $JSNPbElements->getElements();
$instance = isset($elements[strtolower($class)]) ? $elements[strtolower($class)] : null;
// Init and register new instance if it not
if (!is_object($instance)) {
$instance = new $class();
}
if (!empty($params)) {
$params = stripslashes($params);
$params = urldecode($params);
} else {
$params = $instance->config['shortcode_structure'];
}
// Add neccessary assets for the shortcode
$instance->backend_element_assets();
// process require_js at backend setting
if (isset($instance->config['exception']['require_js'])) {
$requires = $instance->config['exception']['require_js'];
foreach ($requires as $i => $require) {
if (file_exists(JSNPB_ASSETS_PATH . $require)) {
JSNHtmlAsset::addScript(JSNPB_ASSETS_PATH . $require);
}
}
}
if (!empty($params)) {
$extract_params = JSNPagebuilderHelpersShortcode::extractParams($params, $shortcode);
// if have sub-shortcode, get content
if (!empty($instance->config['has_subshortcode'])) {
$sub_sc_data = JSNPagebuilderHelpersShortcode::extractSubShortcode($params, true);
$extract_params['sub_sc_content'] = $sub_sc_data;
}
// MODIFY $instance->items
$shortcodeHelper->generateShortcodeParams($instance->items, NULL, $extract_params, TRUE);
// recall this to re-extract params
$instance->shortcode_data();
}
// get Modal setting box
$settings = $instance->items;
$shortcodeAterfix = substr($shortcode, -5);
$showPreview = true;
if ($shortcodeAterfix == '_item') {
$showPreview = false;
}
if ($shortcode == 'pb_row') {
$showPreview = false;
}
$modalContent = $shortcodeHelper->getShortcodeModalSettings($settings, $shortcode, $extract_params);
$this->assign('content', $modalContent);
$this->assign('params', $params);
$this->assign('shortcodeName', $shortcode);
$this->assign('showPreview', $showPreview);
}
}
return parent::display();
}
示例3: getInput
/**
* 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);
}
示例4: getInput
protected function getInput()
{
require_once JSNPB_ADMIN_PATH . '/helpers/extensions.php';
require_once JSNPB_ADMIN_PATH . '/helpers/pagebuilder.php';
$supportedExtList = JSNPagebuilderHelpersExtensions::getSupportedExtList();
JSNHtmlAsset::addStyle(JSNPB_PLG_SYSTEM_ASSETS_URL . 'css/pagebuilder.css');
JSNHtmlAsset::addScript('http://code.jquery.com/jquery-2.1.0.min.js');
JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . '/3rd-party/jquery-ui/js/jquery-ui-1.10.3.custom.js');
JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . '/3rd-party/jquery-livequery/jquery.livequery.min.js');
JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . 'js/joomlashine.noconflict.js');
JSNHtmlAsset::addScript(JURI::root(true) . '/plugins/system/jsnframework/assets/3rd-party/jquery-tipsy/jquery.tipsy.js');
JSNHtmlAsset::addScript(JSNPB_ASSETS_URL . 'js/configuration/extmanager.js');
$customScript = "var baseUrl = '" . JURI::root() . "';";
JSNHtmlAsset::addInlineScript($customScript);
if (count($supportedExtList)) {
$installedComponents = JSNPagebuilderHelpersPagebuilder::getInstalledComponents();
foreach ($supportedExtList as $key => $ext) {
$_shortName = str_ireplace("com_", "", $key);
$ext->name = $_shortName;
$ext->comInstalled = in_array($key, $installedComponents) ? true : false;
$extStatus = JSNPagebuilderHelpersExtensions::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_PAGEBUILDER_EXTPAGE_DISABLE') . '">
<input type="hidden" id="label-enable" value="' . JText::_('JSN_PAGEBUILDER_EXTPAGE_ENABLE') . '">
<input type="hidden" id="label-install" value="' . JText::_('JSN_PAGEBUILDER_EXTPAGE_INSTALL') . '">
';
$html[] = '<ul class="thumbnails">';
foreach ($list as $ext) {
$_className = '';
$_alt = '';
$posibleAct = '';
$_id = JSN_PAGEBUILDER_EXT_IDENTIFIED_NAME_PREFIX . $ext->name;
if (!$ext->plgInstalled) {
if (!$ext->comInstalled) {
$_className = 'item-locked';
$_alt = JText::_('JSN_PAGEBUILDER_EXTPAGE_COM_NOT_INSTALLED_EXPLAIN');
$posibleAct = '<a class="btn btn-primary disabled"' . JText::_('JSN_PAGEBUILDER_EXTPAGE_COM_NOT_INSTALLED_EXPLAIN') . '">' . JText::_('JSN_PAGEBUILDER_EXTPAGE_INSTALL') . '</a>';
} else {
$_className = 'item-locked';
$_alt = JText::_('JSN_PAGEBUILDER_EXTPAGE_COM_NOT_INSTALLED_EXPLAIN');
$posibleAct = '<a class="btn btn-primary" id="' . $_id . '" act="install" href="#">' . JText::_('JSN_PAGEBUILDER_EXTPAGE_INSTALL') . '</a>';
}
} else {
if ($ext->plgInstalled) {
if (!$ext->enabled) {
$_className = 'item-installed item-disabled';
$_alt = JText::_('JSN_PAGEBUILDER_EXTPAGE_CLICK_TO_ENABLED');
$posibleAct = '<a class="btn btn-primary" id="' . $_id . '" act="enable" href="#">' . JText::_('JSN_PAGEBUILDER_EXTPAGE_ENABLE') . '</a>';
} else {
$_className = 'item-installed item-enabled';
$_alt = JText::_('JSN_PAGEBUILDER_EXTPAGE_CLICK_TO_DISABLE');
$posibleAct = '<a class="btn btn-primary" id="' . $_id . '" act="disable" href="#">' . JText::_('JSN_PAGEBUILDER_EXTPAGE_DISABLE') . '</a>';
}
} else {
$_className = 'item-notinstalled';
$_alt = JText::_('JSN_PAGEBUILDER_EXTPAGE_CLICK_TO_INSTALL');
$posibleAct = '<a class="btn btn-primary" id="' . $_id . '" act="install" href="#">' . JText::_('JSN_PAGEBUILDER_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>';
$html[] = '</div>';
return implode($html);
}