当前位置: 首页>>代码示例>>PHP>>正文


PHP JModuleHelper::isEnabled方法代码示例

本文整理汇总了PHP中JModuleHelper::isEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP JModuleHelper::isEnabled方法的具体用法?PHP JModuleHelper::isEnabled怎么用?PHP JModuleHelper::isEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JModuleHelper的用法示例。


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

示例1: checkThirdPartyVersion

function checkThirdPartyVersion($namephp, $namexml, $namedetailled, $path, $plggroup = null, $components = 0, $module = 0, $plugin = 0)
{
    jimport('joomla.filesystem.file');
    if ($components) {
        if (JFile::exists(JPATH_SITE . '/' . $path . '/' . $namephp . '.php')) {
            $check = false;
            foreach ($namexml as $filexml) {
                if (JFile::exists(JPATH_ADMINISTRATOR . '/' . $path . '/' . $filexml . '.xml')) {
                    $xml_com = JFactory::getXMLparser('Simple');
                    $xml_com->loadFile(JPATH_ADMINISTRATOR . '/' . $path . '/' . $filexml . '.xml');
                    $com_version = $xml_com->document->version[0];
                    $com_version = '[u]' . $namedetailled . '[/u] ' . $com_version->data();
                    $check = true;
                }
            }
            if (!$check) {
                $com_version = '[u]' . $namedetailled . ':[/u] The file doesn\'t exist ' . $namexml . '.xml !';
            }
        } else {
            $com_version = '';
        }
        return $com_version;
    } elseif ($module) {
        if (JModuleHelper::isEnabled($namephp) && JFile::exists(JPATH_SITE . '/' . $path . '/' . $namephp . '.php')) {
            if (JFile::exists(JPATH_SITE . '/' . $path . '/' . $namexml . '.xml')) {
                $xml_mod = JFactory::getXMLparser('Simple');
                $xml_mod->loadFile(JPATH_SITE . '/' . $path . '/' . $namexml . '.xml');
                $mod_version = $xml_mod->document->version[0];
                $mod_version = '[u]' . $namedetailled . '[/u] ' . $mod_version->data();
            } else {
                $mod_version = '[u]' . $namedetailled . ':[/u] The file doesn\'t exist ' . $namexml . '.xml !';
            }
        } else {
            $mod_version = '';
        }
        return $mod_version;
    } elseif ($plugin) {
        if (KUNENA_JOOMLA_COMPAT == '1.5') {
            $pathphp = JPATH_SITE . '/' . $path . '/' . $namephp;
            $pathxml = JPATH_SITE . '/' . $path . '/' . $namexml;
        } else {
            $pathphp = JPATH_SITE . '/' . $path . '/' . $namephp . '/' . $namephp;
            $pathxml = JPATH_SITE . '/' . $path . '/' . $namephp . '/' . $namexml;
        }
        if (JPluginHelper::isEnabled($plggroup, $namephp) && JFile::exists($pathphp . '.php')) {
            if (JFile::exists($pathxml . '.xml')) {
                $xml_plg = JFactory::getXMLparser('Simple');
                $xml_plg->loadFile($pathxml . '.xml');
                $plg_version = $xml_plg->document->version[0];
                $plg_version = '[u]' . $namedetailled . '[/u] ' . $plg_version->data();
            } else {
                $plg_version = '[u]' . $namedetailled . ':[/u] The file doesn\'t exist ' . $namexml . '.xml !';
            }
        } else {
            $plg_version = '';
        }
        return $plg_version;
    }
}
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:59,代码来源:admin.kunena.php

示例2: GenModuleById

 /**
  * Render the module
  *
  * @param Int $moduleid The module ID to load
  * @param JRegistry $params
  * @param Array $modulesList The list of all module objects published
  *
  * @return string with HTML
  */
 static function GenModuleById($moduleid, $params, $modulesList, $style)
 {
     $attribs['style'] = $style;
     // get the title of the module to load
     $modtitle = $modulesList[$moduleid]->title;
     $modname = $modulesList[$moduleid]->module;
     //$modname = preg_replace('/mod_/', '', $modname);
     // load the module
     if (JModuleHelper::isEnabled($modname)) {
         $module = JModuleHelper::getModule($modname, $modtitle);
         return JModuleHelper::renderModule($module, $attribs);
     }
     return 'Module ID=' . $moduleid . ' not found !';
 }
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:23,代码来源:helper.php

示例3: testIsEnabled

 /**
  * Test JModuleHelper::isEnabled
  *
  * @return  void
  *
  * @since   3.2
  */
 public function testIsEnabled()
 {
     $this->assertTrue((bool) JModuleHelper::isEnabled('mod_search'), 'mod_search should be enabled');
 }
开发者ID:joomla-projects,项目名称:media-manager-improvement,代码行数:11,代码来源:JModuleHelperTest.php

示例4: checkMagicMagnity

 public function checkMagicMagnity()
 {
     jimport('joomla.application.module.helper');
     return JModuleHelper::isEnabled('redmagicmagnifyplus');
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:5,代码来源:configuration.php

示例5: genModuleById

 static function genModuleById($moduleId, $modulesList, $style)
 {
     $attributes['style'] = $style;
     $moduleTitle = $modulesList[$moduleId]->title;
     $moduleName = $modulesList[$moduleId]->module;
     if (JModuleHelper::isEnabled($moduleName)) {
         $module = JModuleHelper::getModule($moduleName, $moduleTitle);
         return JModuleHelper::renderModule($module, $attributes);
     }
     return 'Module ID=' . $moduleId . ' not found !';
 }
开发者ID:jeprodev,项目名称:hrmemu,代码行数:11,代码来源:helper.php

示例6: GenModuleById

 function GenModuleById($paramsVT, &$params, &$modulesList)
 {
     $paramsVT = preg_replace('/modid=/', '', $paramsVT);
     $modtitle = $modulesList[$paramsVT]->title;
     $modname = $modulesList[$paramsVT]->module;
     $modname = preg_replace('/mod_/', '', $modname);
     if (JModuleHelper::isEnabled($modname)) {
         $module = JModuleHelper::getModule($modname, $modtitle);
         $attribs['style'] = 'xhtml';
         return JModuleHelper::renderModule($module, $attribs);
     }
 }
开发者ID:Rikisha,项目名称:proj,代码行数:12,代码来源:helper.php

示例7: and

<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />

<link rel="stylesheet" href="templates/system/css/system.css" type="text/css" />
<link href="templates/<?php echo  $this->template ?>/css/template.css" rel="stylesheet" type="text/css" />
<link href="templates/<?php echo  $this->template ?>/css/960_fluid.css" rel="stylesheet" type="text/css" media="screen and (min-width:1025px)" />
<link href="templates/tablet/css/960_fluid.css" rel="stylesheet" type="text/css" media="screen and (max-width: 1024px)" />

<?php if($this->direction == 'rtl') : ?>
	<link href="templates/<?php echo  $this->template ?>/css/template_rtl.css" rel="stylesheet" type="text/css" />
<?php endif; ?>

<script type="text/javascript" src="templates/<?php echo  $this->template ?>/js/chromatable.js"></script>

<?php if(JModuleHelper::isEnabled('menu')) : ?>
	<script type="text/javascript" src="templates/<?php echo  $this->template ?>/js/index.js"></script>
<?php endif; ?>

<!--[if IE]>
<script src="http://domassistant.googlecode.com/svn/branches/2.8/DOMAssistantCompressed.js" type="text/javascript"></script>
<script type="text/javascript" src="templates/<?php echo  $this->template ?>/js/flexie.js"></script>
<link href="templates/<?php echo  $this->template ?>/css/ie.css" rel="stylesheet" type="text/css" />
 <![endif]-->
 
<?php if(strpos(KRequest::get('server.HTTP_USER_AGENT', 'word'), 'Titanium')) : ?>
     <link href="templates/desktop/css/template.css" rel="stylesheet" type="text/css" />
 <?php endif ?>

</head>
<body id="minwidth-body" class="<?php echo JRequest::getVar('option', 'cmd'); ?>">
开发者ID:raeldc,项目名称:com_learn,代码行数:31,代码来源:index.php

示例8: _checkThirdPartyVersion

	/**
	 * Method to check if third party plugin/module/component is here and in which version.
	 *
	 * @return	string
	 * @since	1.6
	 */
	protected function _checkThirdPartyVersion($namephp, $namexml, $namedetailled, $path, $plggroup=null, $components=0, $module=0, $plugin=0) {
	// need update
		if ($components) {
		if ( JFile::exists(JPATH_SITE.'/'.$path.'/'.$namephp.'.php') ) {
			if ( JFile::exists(JPATH_ADMINISTRATOR.'/'.$path.'/'.$namexml.'.xml') ) {
				$xml_com = JFactory::getXMLparser('Simple');
				$xml_com->loadFile(JPATH_ADMINISTRATOR.'/'.$path.'/'.$namexml.'.xml');
				$com_version = $xml_com->document->version[0];
				$com_version = '[u]'.$namedetailled.':[/u] Installed (Version : '.$com_version->data().')';
			} else {
				$com_version = '[u]'.$namedetailled.'[/u] The file doesn\'t exist '.$namexml.'.xml !';
			}
		} else {
			$com_version = '';
		}
		return $com_version;
	} elseif ($module) {
		if ( JModuleHelper::isEnabled($namephp) && JFile::exists(JPATH_SITE.'/'.$path.'/'.$namephp.'.php') ) {
			if ( JFile::exists(JPATH_SITE.'/'.$path.'/'.$namexml.'.xml') ) {
				$xml_mod = JFactory::getXMLparser('Simple');
				$xml_mod->loadFile(JPATH_SITE.'/'.$path.'/'.$namexml.'.xml');
				$mod_version = $xml_mod->document->version[0];
				$mod_version = '[u]'.$namedetailled.':[/u] Enabled (Version : '.$mod_version->data().')';
			} else {
				$mod_version = '[u]'.$namedetailled.'[/u] The file doesn\'t exist '.$namexml.'.xml !';
			}
		} else {
			$mod_version = '';
		}
		return $mod_version;
	} elseif ($plugin) {
		$jversion = new JVersion ();
		if ($jversion->RELEASE == '1.5') {
			$pathphp = JPATH_SITE.'/'.$path.'/'.$namephp;
			$pathxml = JPATH_SITE.'/'.$path.'/'.$namexml;
		} else {
			$pathphp = JPATH_SITE.'/'.$path.'/'.$namephp.'/'.$namephp;
			$pathxml =JPATH_SITE.'/'.$path.'/'.$namephp.'/'.$namexml;
		}
		if ( JPluginHelper::isEnabled($plggroup, $namephp) && JFile::exists($pathphp.'.php') ) {
			if ( JFile::exists($pathxml.'.xml') ) {
				$xml_plg = JFactory::getXMLparser('Simple');
				$xml_plg->loadFile($pathxml.'.xml');
				$plg_version = $xml_plg->document->version[0];
				$plg_version = '[u]'.$namedetailled.'[/u] '.$plg_version->data();
			}	else {
				$plg_version = '[u]'.$namedetailled.':[/u] The file doesn\'t exist '.$namexml.'.xml !';
			}
		} else {
			$plg_version = '';
		}
		return $plg_version;
	}
}
开发者ID:rich20,项目名称:Kunena,代码行数:60,代码来源:report.php

示例9: GenModuleById

 static function GenModuleById($title, &$params, &$modulesList)
 {
     $attribs['style'] = 'none';
     if (!isset($modulesList[$title])) {
         return "<p>No module found !</p>";
     }
     $modtitle = $modulesList[$title]->title;
     $modname = $modulesList[$title]->module;
     //$modname = preg_replace('/mod_/', '', $modname);
     // load the module
     if (JModuleHelper::isEnabled($modname)) {
         $module = JModuleHelper::getModule($modname, $modtitle);
         if ($module) {
             return JModuleHelper::renderModule($module, $attribs);
         }
     }
     return "<p>No module found !</p>";
 }
开发者ID:shamusdougan,项目名称:GDMCWebsite,代码行数:18,代码来源:helper.php

示例10: GenModuleById

 /**
  * Render the module
  *
  * @param Int $moduleid The module ID to load
  * @param JRegistry $params
  * @param Array $modulesList The list of all module objects published
  *
  * @return string with HTML
  */
 static function GenModuleById($moduleid, $params, $modulesList, $style, $level = '1')
 {
     $attribs['style'] = $style;
     // get the title of the module to load
     $modtitle = $modulesList[$moduleid]->title;
     $modname = $modulesList[$moduleid]->module;
     //$modname = preg_replace('/mod_/', '', $modname);
     // load the module
     if (JModuleHelper::isEnabled($modname)) {
         $module = JModuleHelper::getModule($modname, $modtitle);
         // set the module param to know the calling level
         $paramstmp = new JRegistry();
         $paramstmp->loadString($module->params);
         $paramstmp->set('calledfromlevel', $level);
         $module->params = $paramstmp->toString();
         return JModuleHelper::renderModule($module, $attribs);
     }
     return 'Module ID=' . $moduleid . ' not found !';
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:28,代码来源:helper.php

示例11: extensionIsEnabled

 function extensionIsEnabled($extension_name = '')
 {
     if (!$extension_name) {
         return false;
     }
     $extension_type = substr($extension_name, 0, 3);
     $setNewBody = false;
     switch ($extension_type) {
         case 'com':
             jimport('joomla.application.component.helper');
             if (JComponentHelper::isEnabled($extension_name, true)) {
                 return true;
             }
             break;
         case 'mod':
             jimport('joomla.application.module.helper');
             // name has to be without "mod_" string at start
             if (JModuleHelper::isEnabled(substr($extension_name, 4))) {
                 return true;
             }
             break;
         case 'plg':
             jimport('joomla.plugin.helper');
             $extname = substr($extension_name, 4);
             // name has to be without "plg_" at start
             $plgname = substr($extname, strpos($extname, '_') + 1);
             $plgtype = substr($extname, 0, strlen($plgname) * -1 - 1);
             if (JPluginHelper::isEnabled($plgtype, $plgname)) {
                 return true;
             }
             break;
         default:
             break;
     }
     return false;
 }
开发者ID:educacionbe,项目名称:stabwall,代码行数:36,代码来源:keycaptcha.php

示例12: stripslashes

            ?>
:&nbsp;<a class="colorbox" href="<?php 
            echo JRoute::_("index.php?option=com_dtregister&controller=location&task=show&id=" . $Tevent->location_id . "&tmpl=component", $xhtml_url, false);
            ?>
"   ><?php 
            echo stripslashes($locationTable->name);
            ?>
</a>
           <?php 
        }
    }
}
$document =& JFactory::getDocument();
$document->addScript(JURI::root(true) . '/components/com_dtregister/assets/js/dt_jquery.js');
$document->addScript(JURI::root(true) . '/components/com_dtregister/assets/js/jquery.lightbox.js');
if (!JModuleHelper::isEnabled('s5_box')) {
    $document->addStyleSheet(JURI::root(true) . '/components/com_dtregister/assets/css/jquery.lightbox.css');
}
$document->addStyleSheet(JURI::root(true) . '/components/com_dtregister/assets/css/main.css');
if ($config->getGlobal('googlekey', '') !== "") {
    $document->addScript("http://maps.google.com/maps?file=api" . $amp . "v=2.x" . $amp . "key=" . $googlekey);
}
?>
 <script type="text/javascript">

    //<![CDATA[

	DTjQuery(function(){ 

	  window.status='test';
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:30,代码来源:registrant.php

示例13: termsField

    function termsField($eventId)
    {
        global $amp, $xhtml, $terms_conditions;
        if (!$terms_conditions) {
            return;
        }
        require_once JPATH_SITE . "/components/com_dtregister/views/field/view.html.php";
        $fieldView = new DtregisterViewField(array());
        foreach ($fieldView->_path['template'] as $path) {
            if (file_exists($path)) {
                $basepath = $path;
                break;
            }
        }
        $file = $basepath . "default.php";
        $label = JText::_('DT_CHECK_TERMS_CONDITIONS');
        $value = '<input type="checkbox" name="terms_conditions" id="terms_conditionscheck" value="terms" class="required" />';
        $value .= '<a href="' . JRoute::_('index.php?option=com_dtregister&controller=event&task=terms&no_html=1&eventId=' . $eventId) . '" id="terms_conditions_popup" class="lbOn">' . htmlspecialchars(JText::_('DT_TERMS_CONDITIONS_READ')) . '</a> <label for="terms_conditions" style="display:none" generated="true" class="error"></label> ';
        $constants = array('[label]', '[value]', '[description]');
        $replace = array($label, $value, '');
        $tpl = file_get_contents($file);
        $html = str_replace($constants, $replace, $tpl);
        $document =& JFactory::getDocument();
        if (!JModuleHelper::isEnabled('s5_box')) {
            $document->addStyleSheet(JURI::root(true) . '/components/com_dtregister/assets/css/jquery.lightbox.css');
        }
        $document->addScript(JURI::root(true) . '/components/com_dtregister/assets/js/jquery.lightbox.js');
        ob_start();
        ?>
             DTjQuery(function(){
                 DTjQuery("#terms_conditions_popup").live('click',function(){
                
			var href = DTjQuery(this).attr('href');
            
			DTjQuery.fn.colorbox({href:DTjQuery(this).attr('href'), open:true,iframe:true,  innerWidth:'50%',innerHeight:'50%' });
			
			return false;

		});
                
             });
          <?php 
        $js = ob_get_clean();
        $document->addScriptDeclaration($js);
        return $html;
    }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:46,代码来源:view.html.php

示例14:

    echo $this->template;
    ?>
/css/rounded.css" />
<?php 
} else {
    ?>
	<link rel="stylesheet" type="text/css" href="templates/<?php 
    echo $this->template;
    ?>
/css/norounded.css" />
<?php 
}
?>

<?php 
if (JModuleHelper::isEnabled('menu')) {
    ?>
	<script type="text/javascript" src="templates/<?php 
    echo $this->template;
    ?>
/js/menu.js"></script>
	<script type="text/javascript" src="templates/<?php 
    echo $this->template;
    ?>
/js/index.js"></script>
<?php 
}
?>

</head>
<body id="minwidth-body">
开发者ID:kuwox,项目名称:xpoweb,代码行数:31,代码来源:cpanel.php


注:本文中的JModuleHelper::isEnabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。