• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JHtmlBehavior类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中JHtmlBehavior的典型用法代码示例。如果您正苦于以下问题:PHP JHtmlBehavior类的具体用法?PHP JHtmlBehavior怎么用?PHP JHtmlBehavior使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了JHtmlBehavior类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: display

 function display($tpl = null)
 {
     if (JVERSION < 3.0) {
         JHTML::_('behavior.mootools');
     } else {
         JHtmlBehavior::framework();
     }
     $this->_setToolBar();
     $this->setLayout('settings');
     $model = $this->getModel('settings');
     $gatewayplugin = $this->get('APIpluginData');
     $this->assignRef('gatewayplugin', $gatewayplugin);
     $model->refreshUpdateSite();
     $geotable_list = $model->checkgeotables();
     if (!empty($geotable_list)) {
         $geotablepresent = 0;
     } else {
         $geotablepresent = 1;
     }
     $this->assignRef('geotablepresent', $geotablepresent);
     if (JVERSION >= 3.0) {
         $this->sidebar = JHtmlSidebar::render();
     }
     parent::display($tpl);
 }
开发者ID:politik86,项目名称:test2,代码行数:25,代码来源:view.html.php


示例2: getInput

    /**
     * Method to get the field input markup.
     *
     * @return  string  The field input markup.
     */
    protected function getInput()
    {
        $plugin = JPluginHelper::isEnabled('system', 'ezset');
        if (!$plugin) {
            return print_r($plugin, 1) . '需要先啟動外掛!';
        }
        $name = str_replace('jform_params_', '', $this->id);
        \JHtmlBehavior::framework(true);
        $token = JFactory::getSession()->getFormToken();
        $ajaxUrl = JURI::root() . 'index.php?cmd=ajax.overlay.' . $name;
        $ajaxCode = <<<AJAX
window.addEvent('domready', function() {

\t\$('{$name}').addEvent('click', function(e) {
\t\tvar myRequest = new Request({
\t\t\tmethod: 'post',
\t\t\tdata: {
\t\t\t\t'{$token}': 1
\t\t\t},
\t\t\turl: '{$ajaxUrl}',
\t\t\tonSuccess: function(responseText) {
\t\t\t\t\$('{$name}_response').set('html', '<input class="btn btn-default" disabled="true" type="button" value="'+responseText+'">');
\t\t\t}
\t\t});

\t\tmyRequest.send();
\t});
});
AJAX;
        $doc = JFactory::getDocument();
        $doc->addScriptDeclaration($ajaxCode);
        $link = '<div id="' . $name . '_response" ><input class="btn btn-default" id="' . $name . '" type="button" value="按此覆蓋"></div>';
        return $link;
    }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:39,代码来源:ajax.php


示例3: fetchButton

 function fetchButton($type = 'Wizard', $namekey = '', $id = 'wizard')
 {
     if (version_compare(JVERSION, '3.0.0', '<')) {
         JHTML::_('behavior.mootools');
     } else {
         JHtmlBehavior::framework();
     }
     $defaultPage = 'jnewsdoc_glossary';
     if (empty($namekey)) {
         $namekey = $defaultPage;
     } else {
         $namekey = 'jnewsdoc_' . $namekey;
     }
     $langID = substr(JNEWS_CONFIG_LANG, 0, 2);
     $link = 'http://www.joobi.co/index.php?option=com_jlinks&controller=redirect&link=' . $namekey . '&alt=' . $defaultPage . '&lang=' . $langID;
     //.'&Itemid=312';
     $iFrame = "'<iframe src=\\'{$link}\\' width=\\'100%\\' height=\\'100%\\' scrolling=\\'auto\\'></iframe>'";
     $js = "var wizardOn = true; function showWizard(){\n\t\tvar box=\$('jNewsWizard');\n\t\tif(wizardOn){box.innerHTML = " . $iFrame . ";box.style.display = 'block';box.style.height = '0';}";
     $js .= "try{\n                   var fx = box.effects({duration: 2500, transition:\n\t\t\t\t\tFx.Transitions.Quart.easeOut});\n\t\t\t\t\tif(wizardOn){\n\t\t\t\t\t\tfx.start({'height': 500});\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfx.start({'height': 0}).chain(function() {\n\t\t\t\t\t\t\tbox.innerHTML='';\n\t\t\t\t\t\t\tbox.setStyle('display','none');\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}catch(err){\n\t\t\t\t\tbox.style.height = '500px';\n\t\t\t\t\tvar myVerticalSlide = new Fx.Slide('jNewsWizard');\n \t\t\t\t\tif(wizardOn){\n\t\t\t\t\t\tmyVerticalSlide.slideIn();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmyVerticalSlide.slideOut().chain(function() {\n\t\t\t\t\t\tbox.innerHTML='';\n\t\t\t\t\t\tbox.setStyle('display','none');\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} wizardOn = !wizardOn;}";
     $doc = JFactory::getDocument();
     $doc->addScriptDeclaration($js);
     if (version_compare(JVERSION, '3.0.0', '<')) {
         return '<a href="' . $link . '" target="_blank" onclick="showWizard();return false;" class="toolbar"><span class="icon-32-wizard" title="' . _JNEWS_WIZARD . '"></span>' . _JNEWS_WIZARD . '</a>';
     } else {
         return '<a class="btn btn-small" href="' . $link . '" target="_blank" onclick="showWizard();return false;" class="toolbar"><span style="float:left;" class="icon-16-wizard" title="' . _JNEWS_WIZARD . '"></span><span style="float:left; margin-left:8px;">' . _JNEWS_WIZARD . '</span></a>';
     }
 }
开发者ID:naka211,项目名称:kkvn,代码行数:27,代码来源:wizard.php


示例4: __construct

 /**
  * Constructor
  *
  * @access  protected
  * @return  void
  * @since   1.5.5
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->_ambit = JoomAmbit::getInstance();
     $this->_config = JoomConfig::getInstance();
     $this->_mainframe = JFactory::getApplication('administrator');
     $this->_user = JFactory::getUser();
     $this->_doc = JFactory::getDocument();
     $this->_doc->addStyleSheet($this->_ambit->getStyleSheet('admin.joomgallery.css'));
     JHtmlBehavior::framework();
     $this->_doc->addScript($this->_ambit->getScript('admin.js'));
     JoomHelper::addSubmenu();
     JHTML::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     // Check for available updates
     if (!($checked = $this->_mainframe->getUserState('joom.update.checked'))) {
         $controller = JRequest::getCmd('controller');
         if ($this->_config->get('jg_checkupdate') && $controller && $controller != 'control') {
             $dated_extensions = JoomExtensions::checkUpdate();
             if (count($dated_extensions)) {
                 $this->_mainframe->enqueueMessage(JText::_('COM_JOOMGALLERY_ADMENU_SYSTEM_NOT_UPTODATE'), 'warning');
                 $this->_mainframe->setUserState('joom.update.checked', -1);
             } else {
                 $this->_mainframe->setUserState('joom.update.checked', 1);
             }
         }
     } else {
         if ($checked == -1) {
             $controller = JRequest::getCmd('controller');
             if ($controller && $controller != 'control') {
                 $this->_mainframe->enqueueMessage(JText::_('COM_JOOMGALLERY_ADMENU_SYSTEM_NOT_UPTODATE'), 'warning');
             }
         }
     }
 }
开发者ID:pabloarias,项目名称:JoomGallery,代码行数:41,代码来源:view.php


示例5: display

 /**
  * Display method
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return void
  */
 public function display($tpl = null)
 {
     $objJSNUtils = JSNISFactory::getObj('classes.jsn_is_utils');
     $objJSNXML = JSNISFactory::getObj('classes.jsn_is_readxmldetails');
     $objJSNMsg = JSNISFactory::getObj('classes.jsn_is_message');
     // Get config parameters
     $config = JSNConfigHelper::get();
     $this->_document = JFactory::getDocument();
     JHtmlBehavior::framework();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_IMAGESHOW') . ': ' . JText::_('HELP_HELP_AND_SUPPORT'), 'help');
     $shortEdition = '';
     $xml = array();
     // Get messages
     $msgs = '';
     $msgs = $objJSNMsg->getList('HELP_AND_SUPPORT');
     $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     $xml = $objJSNXML->parserXMLDetails();
     $shortEdition = $objJSNUtils->getShortEdition();
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     $this->assignRef('xml', $xml);
     $this->assignRef('shortEdition', $shortEdition);
     $this->_addAssets();
     $this->addToolbar();
     // Display the template
     parent::display($tpl);
 }
开发者ID:NallelyFlores89,项目名称:basvec,代码行数:35,代码来源:view.html.php


示例6: autoThumb

 /**
  * autoThumb
  *
  * @param string     $context
  * @param object     $article
  * @param \JRegistry $params
  *
  * @return  void
  */
 public static function autoThumb($context, $article, $params = null)
 {
     \JHtmlBehavior::modal();
     $minimal = 30;
     $es = \Ezset::getInstance();
     include_once EZSET_ROOT . '/lib/dom/simple_html_dom.php';
     $html = str_get_html($article->text);
     $imgs = $html->find('img');
     foreach ($imgs as $img) {
         $classes = explode(' ', $img->class);
         $imgUrl = UriHelper::pathAddHost($img->src);
         // Has class nothumb, skip to next.
         if (in_array('nothumb', $classes)) {
             continue;
         }
         // If is anchor already, skip to next.
         if ($img->parent->tag == 'a') {
             continue;
         }
         // If img tag has no width and height attrs, skip.
         if (!$img->width && !$img->height) {
             continue;
         }
         // If not localhost image, skip.
         if (!strpos('-' . $imgUrl, \JURI::root()) && $es->params->get('onlyLocalhostThumb', 1)) {
             continue;
         }
         // Get img path and size
         $imgPath = \JPath::clean(str_replace(\JURI::root(), JPATH_ROOT . '/', $imgUrl));
         $size = getimagesize($imgPath);
         // Manul size
         $imgW = $img->width;
         $imgH = $img->height;
         // Original size
         $oriW = $size[0];
         $oriH = $size[1];
         // If too small, skip.
         if ($oriW <= $minimal || $oriH <= $minimal) {
             continue;
         }
         // If large ten origin, skip.
         if ($oriW <= $imgW || $oriW <= $imgW) {
             continue;
         }
         // Get thumb url
         $thumb = new \Windwalker\Image\Thumb();
         $img->src = $thumb->resize($imgUrl, $imgW, $imgH);
         $imgtext = $img->outertext;
         $imgtext = \JHtml::link($imgUrl, $imgtext, array('class' => 'modal'));
         $img->outertext = $imgtext;
         $classes = null;
     }
     $article->text = $html->save();
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:63,代码来源:Thumb.php


示例7: getInput

 /**
  * Method to get the field input markup.
  *
  * @return    string    The field input markup.
  */
 public function getInput()
 {
     // Load the modal behavior script.
     JHtml::_('behavior.modal', 'a.modal');
     JHtmlBehavior::framework(true);
     $this->setElement();
     // Build the script.
     $script = array();
     $script[] = '	function jSelect' . ucfirst($this->component) . '_' . $this->id . '(id, title) {';
     $script[] = '		document.id("jform_link").value = id;';
     $script[] = '		document.id("jform_link").highlight();';
     $script[] = '		SqueezeBox.close();';
     $script[] = '	}';
     // Add the script to the document head.
     JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
     // Setup variables for display.
     $html = array();
     $link = $this->getLink();
     $title = $this->getTitle();
     if (empty($title)) {
         $title = JText::_('COM_' . strtoupper($this->component) . '_SELECT_ITEM');
     }
     $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
     if (JVERSION >= 3) {
         // The current user display field.
         $html[] = '<span class="">';
         $html[] = '<a class="modal btn" title="' . JText::_('COM_' . strtoupper($this->component) . '_CHANGE_ITEM_BUTTON') . '"  href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' . JText::_('JSELECT') . '</a>';
         $html[] = '</span>';
     } else {
         // The user select button.
         $html[] = '<div class="button2-left">';
         $html[] = '  <div class="blank">';
         $html[] = '	<a class="modal" title="' . JText::_('COM_' . strtoupper($this->component) . '_CHANGE_ITEM') . '"  href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('JSELECT') . '</a>';
         $html[] = '  </div>';
         $html[] = '</div>';
     }
     // The active article id field.
     if (0 == (int) $this->value) {
         $value = '';
     } else {
         $value = (int) $this->value;
     }
     // class='required' for client side validation
     $class = '';
     if ($this->required) {
         $class = ' class="required modal-value"';
     }
     $html[] = '<input type="hidden" id="' . $this->id . '_id"' . $class . ' name="' . $this->name . '" value="' . $value . '" />';
     return implode("\n", $html);
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:55,代码来源:modal.php


示例8: display

 /**
  * Display method
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return	void
  */
 public function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     $this->_document = JFactory::getDocument();
     JHtmlBehavior::framework();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_IMAGESHOW') . ': ' . JText::_('MAINTENANCE_CONFIGURATION_AND_MAINTENANCE'), 'maintenance');
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('CONFIGURATION_AND_MAINTENANCE');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     $this->_addAssets();
     $this->addToolbar();
     // Type of screen
     $type = JRequest::getWord('type', 'backup');
     $themeName = JRequest::getWord('theme_name');
     $sourceType = JRequest::getString('source_type');
     switch ($type) {
         case 'themeparameters':
             $this->addTemplatePath(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . $themeName . DS . 'views' . DS . 'maintenance' . DS . 'tmpl');
             echo $this->loadTemplate('theme_config');
             break;
         case 'profileparameters':
             $this->addTemplatePath(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . $sourceType . DS . 'views' . DS . 'maintenance' . DS . 'tmpl');
             echo $this->loadTemplate('source_config');
             break;
         case 'editprofile':
             $sourceID = JRequest::getInt('external_source_id');
             $countShowlist = JRequest::getInt('count_showlist');
             $imageSource = JSNISFactory::getSource($sourceType, 'external');
             $imageSource->_source['sourceTable']->load($sourceID);
             $this->assignRef('sourceInfo', $imageSource->_source['sourceTable']);
             $this->assignRef('countShowlist', $countShowlist);
             $this->addTemplatePath(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . 'source' . $sourceType . DS . 'views' . DS . 'maintenance' . DS . 'tmpl');
             echo $this->loadTemplate('edit_source_profile');
             break;
         default:
             // Display the template
             parent::display($tpl);
             break;
     }
 }
开发者ID:jdrzaic,项目名称:joomla-dummy,代码行数:54,代码来源:view.html.php


示例9: getInput

 /**
  * Method to get the field options.
  *
  * @return    array    The field option objects.
  * @since    1.6
  */
 public function getInput()
 {
     // load core and extra mootools
     JHTML::_('behavior.framework');
     JHtmlBehavior::framework();
     JHtmlBehavior::framework(true);
     // Must load admin language files
     $lang = JFactory::getLanguage();
     $lang->load("com_jevents", JPATH_ADMINISTRATOR);
     $node = $this->element;
     $value = $this->value;
     $name = $this->name;
     $control_name = $this->type;
     $help = $node['help'];
     if (!is_null($help) && version_compare(JVERSION, '1.6.0', ">=")) {
         if (is_object($help)) {
             $help = (string) $help;
         }
         $help = isset($help) && JString::strlen($help) <= 0 ? null : $help;
     }
     if (!is_null($help)) {
         $parts = explode(",", $value);
         $helps = explode(",", $help);
         foreach ($parts as $key => $valuepart) {
             $help = $helps[$key];
             list($helpfile, $varname, $part) = explode("::", $help);
             $lang = JFactory::getLanguage();
             $langtag = $lang->getTag();
             if (file_exists(JPATH_COMPONENT_ADMINISTRATOR . '/help/' . $langtag . '/' . $helpfile)) {
                 $jeventHelpPopup = JPATH_COMPONENT_ADMINISTRATOR . '/help/' . $langtag . '/' . $helpfile;
             } else {
                 $jeventHelpPopup = JPATH_COMPONENT_ADMINISTRATOR . '/help/en-GB/' . $helpfile;
             }
             if (!file_exists($jeventHelpPopup)) {
                 return "";
             }
             include $jeventHelpPopup;
             $help = $this->help(${$varname}, $part);
             $parts[$key] = JText::_($valuepart) . $help;
         }
         $value = implode(", ", $parts);
     }
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     return "<strong style='color:#993300'>" . JText::_($value) . "</strong>";
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:52,代码来源:jevinfo.php


示例10: register

    /**
     * register
     *
     * @return  void
     */
    public static function register()
    {
        /** @var $doc \JDocumentHtml */
        $doc = \JFactory::getDocument();
        $es = \Ezset::getInstance();
        $input = \JFactory::getApplication()->input;
        if ($doc->getType() !== 'html') {
            return;
        }
        $uri = \JUri::getInstance();
        $root = $uri::root();
        $base = $uri::base();
        $host = $uri->toString(array('scheme', 'host')) . '/';
        if ($smoothScroll = $es->params->get('smoothScroll', 0)) {
            \JHtmlBehavior::framework(true);
        }
        $smoothScroll = $smoothScroll ? 'true' : 'false';
        $confirmLeave = $es->params->get('confirmLeave', 0) && UriChecker::isArticleEdit() ? 'true' : 'false';
        $logoLink = \JFactory::getApplication()->isAdmin() ? 'true' : 'false';
        $script = <<<SCRIPT
<script type="text/javascript">
\tvar ezsetOption = {
\t\tsmoothScroll: {$smoothScroll},
\t\tconfirmLeave: {$confirmLeave},
\t\tlogoLink: {$logoLink}
\t};

\tvar ezsetConfig = {
\t\troot : '{$root}',
\t\tbase : '{$base}',
\t\thost : '{$host}'
\t};

\tEzset.init(ezsetOption, ezsetConfig);
</script>
SCRIPT;
        $doc->addCustomTag($script);
        $doc->addScript(\JUri::root(true) . '/plugins/system/ezset/asset/js/ezset.js');
        $doc->addScript(\JUri::root(true) . '/ezset/js/ezset-custom.js');
    }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:45,代码来源:Script.php


示例11: defined

<?php

/**
 * Part of Component Akquickicons files.
 *
 * @copyright   Copyright (C) 2014 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
use Windwalker\Data\Data;
use Windwalker\Html\HtmlElement;
// No direct access
defined('_JEXEC') or die;
// Prepare script
JHtmlBehavior::multiselect('adminForm');
/**
 * Prepare data for this template.
 *
 * @var $container Windwalker\DI\Container
 * @var $data      Windwalker\Data\Data
 * @var $asset     Windwalker\Helper\AssetHelper
 * @var $grid      Windwalker\View\Helper\GridHelper
 * @var $date      \JDate
 */
$container = $this->getContainer();
$asset = $container->get('helper.asset');
$grid = $data->grid;
$date = $container->get('date');
$asset->addCss('akicons.css');
$asset->addCss('font-awesome.css');
// Set order script.
$grid->registerTableSort();
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:31,代码来源:default_table.php


示例12: onAfterDispatch

 /**
  * Plugin that registers the jQuery javascript framework
  */
 public function onAfterDispatch()
 {
     jimport('joomla.html.html.behavior');
     JHtmlBehavior::register('jquery', array('script' => array('media/jquery/jquery.js' => array())));
 }
开发者ID:rcorral,项目名称:joomla-cms,代码行数:8,代码来源:jquery.php


示例13: onContentPrepare


//.........这里部分代码省略.........
                 }
                 $posPercentageWidth = strpos($width, '%');
                 if ($posPercentageWidth) {
                     $width = substr($width, 0, $posPercentageWidth + 1);
                 } else {
                     $width = (int) $width;
                 }
                 $height = (int) $height;
                 $object = new stdClass();
                 $object->width = $width;
                 $object->height = $height;
                 $object->showlist_id = $showListID;
                 $object->showcase_id = $showCaseID;
                 $object->item_id = 0;
                 $object->random_number = $objUtils->randSTR(8);
                 $object->language = $language;
                 $object->edition = $shortEdition;
                 $object->images = $imagesData;
                 $object->showlist = $showlistInfo;
                 $object->showcase = $showcaseInfo;
                 $object->theme_id = $themeProfile->theme_id;
                 $object->theme_name = $themeProfile->theme_name;
                 $object->plugin = true;
                 $html .= $editionVersion;
                 $html .= '<div class="jsn-container">';
                 $html .= '<div class="jsn-gallery">';
                 $result = $objJSNTheme->displayTheme($object);
                 if ($result !== false) {
                     $html .= $result;
                 }
                 $html .= '</div>';
                 $html .= '</div>';
                 if ($display) {
                     $row->text = str_replace("{imageshow " . $matches[$i][1] . "/}", $html, $row->text);
                 } else {
                     if ($showlistInfo['authorization_status']) {
                         $row->text = str_replace("{imageshow " . $matches[$i][1] . "/}", '<div>' . $articleAuth['introtext'] . $articleAuth['fulltext'] . '</div>', $row->text);
                     } else {
                         $row->text = str_replace("{imageshow " . $matches[$i][1] . "/}", '&nbsp;', $row->text);
                     }
                 }
             }
         }
     }
     preg_match_all('/\\{imageshow (.*)\\}(.*)\\{\\/imageshow\\}/U', $row->text, $matchesLink, PREG_SET_ORDER);
     if (count($matchesLink)) {
         for ($z = 0; $z < count($matchesLink); $z++) {
             $dataLink = explode(' ', $matchesLink[$z][1]);
             $width = '';
             $height = '';
             $showCaseID = 0;
             $showListID = 0;
             foreach ($dataLink as $values) {
                 $value = $values;
                 if (stristr($values, 'sl')) {
                     $showListValue = explode('=', $values);
                     $showList = str_replace($values, 'showlist_id=' . $showListValue[1], $values);
                     $showListID = $showListValue[1];
                 } elseif (stristr($values, 'sc')) {
                     $showCaseValue = explode('=', $values);
                     $showCase = str_replace($values, 'showcase_id=' . $showCaseValue[1], $values);
                     $showCaseID = $showCaseValue[1];
                 } elseif (stristr($values, 'w')) {
                     $widthValue = explode('=', $values);
                     $width = str_replace($values, $widthValue[1], $values);
                 } elseif (stristr($values, 'h')) {
                     $heightValue = explode('=', $values);
                     $height = str_replace($values, $heightValue[1], $values);
                 }
             }
             $showlistInfo = $objJSNShowlist->getShowListByID($showListID);
             $showcaseInfo = $objJSNShowcase->getShowCaseByID($showCaseID, true, 'loadAssoc');
             if ($width != '') {
                 $width = $width;
             } else {
                 $width = $showcaseInfo['general_overall_width'];
             }
             if ($height != '') {
                 $height = $height;
             } else {
                 $height = $showcaseInfo['general_overall_height'];
             }
             if (strpos($width, '%')) {
                 $width = '650';
             }
             $width = (int) $width;
             $height = (int) $height;
             $sefRewrite = JFactory::getConfig()->get('sef_rewrite');
             $link = $sefRewrite ? '' : 'index.php';
             $link .= '?option=com_imageshow&amp;tmpl=component&amp;view=show&amp;' . $showList . '&amp;' . $showCase . '&amp;w=' . $width . '&amp;h=' . $height;
             $html = '<a rel="{handler: \'iframe\', size: {x: ' . $width . ', y: ' . $height . '}}" href="' . $link . '" class="modal">' . $matchesLink[$z][2] . '</a>';
             $row->text = str_replace("{imageshow " . $matchesLink[$z][1] . "}" . $matchesLink[$z][2] . "{/imageshow}", $html, $row->text);
         }
     }
     if (count($matchesLink) || count($matches)) {
         JHtmlBehavior::framework();
         JHTML::_('behavior.modal', 'a.modal');
     }
     return true;
 }
开发者ID:jovielarmario,项目名称:albay_cms,代码行数:101,代码来源:imageshow.php


示例14: getPreview

 /**
  * Get Preview Image.
  *
  * @return  string Preview image html.
  */
 public function getPreview()
 {
     // The Preview.
     $preview = (string) $this->element['preview'];
     $showPreview = true;
     $showAsTooltip = false;
     switch ($preview) {
         case 'no':
             // Deprecated parameter value
         // Deprecated parameter value
         case 'false':
         case 'none':
             $showPreview = false;
             break;
         case 'yes':
             // Deprecated parameter value
         // Deprecated parameter value
         case 'true':
         case 'show':
             break;
         case 'tooltip':
         default:
             $this->showAsTooltip = $showAsTooltip = true;
             $options = array('onShow' => 'AKFinderRefreshPreviewTip(this)');
             JHtmlBehavior::tooltip('.hasTipPreview', $options);
             break;
     }
     if ($showPreview) {
         if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) {
             $src = JURI::root() . $this->value;
         } else {
             $src = '';
         }
         $width = (int) XmlHelper::get($this->element, 'preview_width', 300);
         $height = (int) XmlHelper::get($this->element, 'preview_height', 200);
         $style = '';
         $style .= $width > 0 ? 'max-width:' . $width . 'px;' : '';
         $style .= $height > 0 ? 'max-height:' . $height . 'px;' : '';
         $style .= !$showAsTooltip ? 'margin: 10px 0;' : '';
         $imgattr = array('id' => $this->id . '_preview', 'class' => 'media-preview', 'style' => $style);
         $imgattr['class'] = $showAsTooltip ? $imgattr['class'] : $imgattr['class'] . ' img-polaroid';
         $img = JHtml::image($src, JText::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $imgattr);
         $previewImg = '<div id="' . $this->id . '_preview_img"' . ($src ? '' : ' style="display:none"') . '>' . $img . '</div>';
         $previewImgEmpty = '<div id="' . $this->id . '_preview_empty"' . ($src ? ' style="display:none"' : '') . '>' . JText::_('JLIB_FORM_MEDIA_PREVIEW_EMPTY') . '</div>';
         $html[] = '<div class="media-preview add-on fltlft">';
         if ($showAsTooltip) {
             $tooltip = $previewImgEmpty . $previewImg;
             $options = array('title' => JText::_('JLIB_FORM_MEDIA_PREVIEW_SELECTED_IMAGE'), 'text' => '<i class="icon-eye"></i>', 'class' => 'hasTipPreview');
             $options['text'] = JVERSION >= 3 ? $options['text'] : JText::_('JLIB_FORM_MEDIA_PREVIEW_TIP_TITLE');
             $html[] = JHtml::tooltip($tooltip, $options);
         } else {
             $html[] = ' ' . $previewImgEmpty;
             $html[] = ' ' . $previewImg;
             $html[] = '<script type="text/javascript">AKFinderRefreshPreview("' . $this->id . '");</script>';
         }
         $html[] = '</div>';
     }
     return implode("\n", $html);
 }
开发者ID:beingsane,项目名称:quickcontent,代码行数:64,代码来源:finder.php


示例15: mootools

 /**
  * Method to load the MooTools & More framework into the document head
  *
  * If debugging mode is on an uncompressed version of MooTools is included for easier debugging.
  *
  * @param   mixed  $debug  Is debugging mode on? [optional]
  *
  * @return  AssetManager Return self to support chaining.
  */
 public function mootools($debug = null)
 {
     \JHtmlBehavior::framework(true, $debug);
     return $this;
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:14,代码来源:AssetManager.php


示例16: addFieldJs

 /**
  * Add JS to head.
  *
  * @return  void
  */
 public function addFieldJs()
 {
     JHtmlBehavior::framework(true);
     $asset = $this->container->get('helper.asset');
     $input = $this->container->get('input');
     $asset->addJS('cck/fields.js', $input->get('option'));
 }
开发者ID:ForAEdesWeb,项目名称:AEW3,代码行数:12,代码来源:fields.php


示例17: defined

<?php

/**
 * @package 	Bookpro
 * @author 		Ngo Van Quan
 * @link 		http://joombooking.com
 * @copyright 	Copyright (C) 2011 - 2012 Ngo Van Quan
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: default.php 84 2012-08-17 07:16:08Z quannv $
 **/
defined('_JEXEC') or die('Restricted access');
JHtmlBehavior::calendar();
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::cancel();
JToolBarHelper::title(JText::_('COM_BOOKPRO_COUPON_EDIT'), 'user.png');
?>
     

<form action="index.php" method="post" name="adminForm" id="adminForm">
			 <div class="form-horizontal">     
			 	<div class="control-group">
					<label class="control-label" for="pickup"> <?php 
echo JText::_('COM_BOOKPRO_TOUR_HOTEL');
?>
					</label>
					<div class="controls">
						<?php 
echo $this->hotels;
?>
					</div>
开发者ID:hixbotay,项目名称:executivetransport,代码行数:31,代码来源:default.php


示例18: getInput

    protected function getInput()
    {
        jimport('joomla.filesystem.folder');
        $invalue = str_replace(" ", "", $this->value);
        $invalue = explode(",", $invalue);
        $pluginsDir = JPATH_ROOT . '/plugins/jevents';
        $filterpath = $pluginsDir . "/filters";
        $this->filterpath = array();
        if (JFolder::exists($filterpath)) {
            $this->filterpath[] = $filterpath;
        }
        $this->filterpath[] = JPATH_SITE . "/components/com_jevents/libraries/filters";
        if (JFolder::exists(JPATH_SITE . "/plugins/jevents")) {
            $others = JFolder::folders(JPATH_SITE . "/plugins/jevents", 'filters', true, true);
            if (is_array($others)) {
                $this->filterpath = array_merge($this->filterpath, $others);
            }
        }
        $filters = array();
        include_once JPATH_SITE . "/components/com_jevents/libraries/filters.php";
        foreach ($this->filterpath as $path) {
            foreach (JFolder::files($path, ".php") as $filtername) {
                if (!array_key_exists($filtername, $filters)) {
                    if (strpos($filtername, "-") > 0 || strpos($filtername, ".zip") > 0 || strpos($filtername, ".php") != strlen($filtername) - 4) {
                        continue;
                    }
                    $filterpath = $path . "/" . $filtername;
                    $filtername = substr($filtername, 0, strlen($filtername) - 4);
                    // skip special function filters
                    if ($filtername == "startdate" || $filtername == "Startdate") {
                        continue;
                    }
                    $filter = "jev" . ucfirst($filtername) . "Filter";
                    if (!class_exists($filter)) {
                        include_once $filterpath;
                    }
                    if (!class_exists($filter)) {
                        continue;
                    }
                    $filters[$filtername] = $path . "/" . $filter;
                }
            }
        }
        $validvalues = array();
        $input = '<div style="clear:left"></div><table><tr valign="top">
			<td><div style="font-weight:bold">' . JText::_("JEV_CLICK_TO_ADD_FILTER") . '</div>
			<div id="filterchoices" style="width:150px;margin-top:10px;height:100px;;border:solid 1px #ccc;overflow-y:auto" >';
        foreach ($filters as $filter => $filterpath) {
            if (!in_array($filter, $invalue) && !in_array(strtolower($filter), $invalue)) {
                $input .= '<div>' . $filter . "<span style='display:none'>{$filter}</span></div>";
                $validvalues[] = $filter;
            }
        }
        $validvalue = implode(",", $validvalues);
        $input .= '</div></td>
		<td><div  style="font-weight:bold">' . JText::_("JEV_FILTER_CLICK_TO_REMOVE") . '</div>
			<div id="filtermatches" style="margin:10px 0px 0px 10px;">';
        $invalues = array();
        foreach ($invalue as $filter) {
            if (array_key_exists($filter, $filters) || array_key_exists(ucfirst($filter), $filters)) {
                $filter = ucfirst($filter);
                $input .= '<div id="filter' . $filter . '">' . $filter . "</div>";
                $invalues[] = $filter;
            }
        }
        $invalues = implode(",", $invalues);
        $input .= '</div></td>
			</tr></table>';
        // load core and extra mootools
        JHTML::_('behavior.framework');
        JHtmlBehavior::framework();
        JHtmlBehavior::framework(true);
        JEVHelper::script('modules/mod_jevents_filter/fields/filterSelect.js');
        // Initialize some field attributes.
        $size = $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
        $maxLength = $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'] . '"' : '';
        $class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
        $readonly = (string) $this->element['readonly'] == 'true' ? ' readonly="readonly"' : '';
        $disabled = (string) $this->element['disabled'] == 'true' ? ' disabled="disabled"' : '';
        // Initialize JavaScript field attributes.
        $onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
        return $input . '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '"' . ' value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . $class . $size . $disabled . $readonly . $onchange . $maxLength . '/>';
    }
开发者ID:pguilford,项目名称:vcomcc,代码行数:83,代码来源:jevfilters.php


示例19: defined

<?php

/**
 * @package     Joomla.Site
 * @subpackage  Layout
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('JPATH_BASE') or die;
JHtmlBehavior::core();
JFactory::getDocument()->addScriptDeclaration('
	jQuery(document).ready(function($)
	{
		if (window.toggleSidebar)
		{
			toggleSidebar(true);
		}
		else
		{
			$("#j-toggle-sidebar-header").css("display", "none");
			$("#j-toggle-button-wrapper").css("display", "none");
		}
	});
');
?>

<div id="j-toggle-sidebar-wrapper">
	<div id="j-toggle-button-wrapper" class="j-toggle-button-wrapper">
		<?php 
echo JLayoutHelper::render('joomla.sidebars.toggle');
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:31,代码来源:submenu.php


示例20: defined

<?php

/**
 * @package 	Bookpro
 * @author 		Ngo Van Quan
 * @link 		http://joombooking.com
 * @copyright 	Copyright (C) 2011 - 2012 Ngo Van Quan
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: default.php  23-06-2012 23:33:14
 **/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtmlBehavior::modal('a.amodal');
AImporter::helper('form', 'currency');
AImporter::css('common');
$config = JComponentHelper::getParams('com_bookpro');
?>

<form name="frontForm" method=" 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JHtmlBootstrap类代码示例发布时间:2022-05-23
下一篇:
PHP JHtml类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap