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


PHP JURI::Root方法代码示例

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


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

示例1: fetchElement

    function fetchElement($name, $value, &$node, $control_name) {
	
		$doc =& JFactory::getDocument();
        $doc->addScript(JURI::Root(true)."/templates/rt_hybrid_j15/elements/childtype.js");
	
        return null;
    }
开发者ID:rkern21,项目名称:videoeditor,代码行数:7,代码来源:menujsinit.php

示例2: loadScripts

 function loadScripts(&$menu)
 {
     $enablejs = $menu->getParameter('roknavmenu_fusion_enable_js', '1');
     $opacity = $menu->getParameter('roknavmenu_fusion_opacity', 1);
     $effect = $menu->getParameter('roknavmenu_fusion_effect', 'slidefade');
     $hidedelay = $menu->getParameter('roknavmenu_fusion_hidedelay', 500);
     $menu_animation = $menu->getParameter('roknavmenu_fusion_menu_animation', 'Quad.easeOut');
     $menu_duration = $menu->getParameter('roknavmenu_fusion_menu_duration', 400);
     $pill = $menu->getParameter('roknavmenu_fusion_pill', 0);
     $pill_animation = $menu->getParameter('roknavmenu_fusion_pill_animation', 'Back.easeOut');
     $pill_duration = $menu->getParameter('roknavmenu_fusion_pill_duration', 400);
     $tweakInitial_x = $menu->getParameter('roknavmenu_fusion_tweakInitial_x', '0');
     $tweakInitial_y = $menu->getParameter('roknavmenu_fusion_tweakInitial_y', '0');
     $tweakSubsequent_x = $menu->getParameter('roknavmenu_fusion_tweakSubsequent_x', '0');
     $tweakSubsequent_y = $menu->getParameter('roknavmenu_fusion_tweakSubsequent_y', '0');
     if ($effect == 'slidefade') {
         $effect = "slide and fade";
     }
     $doc =& JFactory::getDocument();
     JHTML::_('behavior.mootools');
     if (FusionScriptLoader::isIe(6)) {
         $doc->addScript(JURI::Root(true) . '/modules/mod_roknavmenu/themes/fusion/js/sfhover.js');
     }
     if (FusionScriptLoader::isIe() && $effect == 'slide and fade') {
         $effect = "slide";
     }
     if ($enablejs) {
         $doc->addScript(JURI::Root(true) . '/modules/mod_roknavmenu/themes/fusion/js/fusion.js');
         $initialization = "\n\t\t        window.addEvent('domready', function() {\n\t\t\t\t\tnew Fusion('ul.menutop', {\n\t\t\t\t\t\tpill: {$pill},\n\t\t\t\t\t\teffect: '{$effect}',\n\t\t\t\t\t\topacity: {$opacity},\n\t\t\t\t\t\thideDelay: {$hidedelay},\n\t\t\t\t\t\ttweakInitial: {'x': " . $tweakInitial_x . ", 'y': " . $tweakInitial_y . "},\n        \t\t\t\ttweakSubsequent: {'x': " . $tweakSubsequent_x . ", 'y': " . $tweakSubsequent_y . "},\n\t\t\t\t\t\tmenuFx: {duration: {$menu_duration}, transition: Fx.Transitions.{$menu_animation}},\n\t\t\t\t\t\tpillFx: {duration: {$pill_duration}, transition: Fx.Transitions.{$pill_animation}}\n\t\t\t\t\t});\n\t            });";
         $doc->addScriptDeclaration($initialization);
     }
 }
开发者ID:robogals,项目名称:myrobogals,代码行数:32,代码来源:layout.php

示例3: fetchElement

	function fetchElement($name, $value, &$node, $control_name)
	{
		$output = '';
		$document 	=& JFactory::getDocument();
		
		if (defined('ROKSTORIES_ADMIN')) return;
		define('ROKSTORIES_ADMIN', 1);
		
		if (!ROKMODULE_CHECK) return "You need RokModule in order to install Sample Data.";
		
		$module_id = JRequest::getVar('cid', null);
		if(is_array($module_id)) $module_id = $module_id[0];
		if (!$module_id) $module_id = JRequest::getVar('id', null);
		
		$document->addScript(JURI::Root(true)."/modules/mod_rokstories/admin/importData.js");
		$document->addStyleSheet(JURI::Root(true)."/modules/mod_rokstories/admin/rokstories-admin.css");
		$document->addScriptDeclaration("		window.RokStoriesAdminPath = '".JURI::Root(true)."/index.php?option=com_rokmodule&tmpl=component&type=raw&moduleid=$module_id';");
		
		$output .= "<div id='rokstories-admin-wrapper'>
						<div>
							<button>Import Sample Data</button>
						</div>
					</div>";
		
		return $output;
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:26,代码来源:sampledata.php

示例4: loadIcons

 function loadIcons($name, $value, $template)
 {
     $path = JPATH_SITE . DS . "modules" . DS . "mod_roktabs" . DS . "images" . DS;
     $urlPath = JURI::Root(true) . "/modules/mod_roktabs/images/";
     if ($this->form->getValue('tabs_iconpath', 'params') != '') {
         $path = JPATH_SITE . DS . $this->form->getValue('tabs_iconpath', 'params');
         $urlPath = JURI::Root(true) . "/" . $this->form->getValue('tabs_iconpath', 'params');
     }
     $path = str_replace('__template__', 'templates' . DS . $template, $path);
     $urlPath = str_replace('__template__', 'templates/' . $template, $urlPath);
     $path = str_replace('__module__', 'modules/mod_roktabs', $path);
     $urlPath = str_replace('__module__', 'modules/mod_roktabs', $urlPath);
     $icons = array('__none__');
     $html = "";
     if ($handle = @opendir($path)) {
         while (false !== ($file = readdir($handle))) {
             if ($file != "." && $file != "..") {
                 $ext = strtolower(substr($file, strrpos($file, '.') + 1));
                 if ($ext == 'gif' || $ext == 'bmp' || $ext == 'jpg' || $ext == 'png') {
                     array_push($icons, $file);
                 }
             }
         }
         closedir($handle);
     }
     foreach ($icons as $icon) {
         if ($icon == $value) {
             $selected = "selected='selected'";
         } else {
             $selected = "";
         }
         $html .= "<option alt='" . $urlPath . $icon . "' {$selected}>" . $icon . "</option>";
     }
     return $html;
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:35,代码来源:roktabsicons.php

示例5: loadScripts

 public function loadScripts(&$params)
 {
     JHTML::_('behavior.mootools');
     $doc =& JFactory::getDocument();
     $doc->addScript(JURI::Root(true) . '/modules/mod_rokminievents/tmpl/js/rokminievents' . self::_getJSVersion() . '.js');
     $doc->addScript(JURI::Root(true) . '/modules/mod_rokminievents/tmpl/js/rokslider' . self::_getJSVersion() . '.js');
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:7,代码来源:RokMiniEvents.php

示例6: inizialize

 function inizialize($css_style, $offset, &$params)
 {
     global $mainframe;
     $theme = $params->get('theme', 'blue');
     JHTML::_('behavior.mootools');
     $doc =& JFactory::getDocument();
     $css = modRokajaxsearchHelper::getCSSPath('rokajaxsearch.css', 'mod_rokajaxsearch');
     $iebrowser = modRokajaxsearchHelper::getBrowser();
     if ($css_style == 1 && $css != false) {
         $doc->addStyleSheet($css);
         $doc->addStyleSheet(JURI::Root(true) . "/modules/mod_rokajaxsearch/themes/{$theme}/rokajaxsearch-theme.css");
         if ($iebrowser) {
             $style = JURI::Root(true) . "/modules/mod_rokajaxsearch/themes/{$theme}/rokajaxsearch-theme-ie{$iebrowser}";
             $check = dirname(__FILE__) . "/themes/{$theme}/rokajaxsearch-theme-ie{$iebrowser}";
             if (file_exists($check . ".css")) {
                 $doc->addStyleSheet($style . ".css");
             } elseif (file_exists($check . ".php")) {
                 $doc->addStyleSheet($style . ".php");
             }
         }
     }
     $doc->addScript(JURI::Root(true) . "/modules/mod_rokajaxsearch/js/rokajaxsearch.js");
     /* RokAjaxSearch Init */
     $websearch = $params->get('websearch', 0) ? 1 : 0;
     $blogsearch = $params->get('blogsearch', 0) ? 1 : 0;
     $imagesearch = $params->get('imagesearch', 0) ? 1 : 0;
     $videosearch = $params->get('videosearch', 0) ? 1 : 0;
     $ras_init = "window.addEvent((window.webkit) ? 'load' : 'domready', function() {\n\t\t\t\twindow.rokajaxsearch = new RokAjaxSearch({\n\t\t\t\t\t'results': '" . JText::_('RESULTS') . "',\n\t\t\t\t\t'close': '',\n\t\t\t\t\t'websearch': " . $websearch . ",\n\t\t\t\t\t'blogsearch': " . $blogsearch . ",\n\t\t\t\t\t'imagesearch': " . $imagesearch . ",\n\t\t\t\t\t'videosearch': " . $videosearch . ",\n\t\t\t\t\t'imagesize': '" . $params->get('image_size', 'MEDIUM') . "',\n\t\t\t\t\t'safesearch': '" . $params->get('safesearch', 'MODERATE') . "',\n\t\t\t\t\t'search': '" . JText::_('SEARCH') . "',\n\t\t\t\t\t'readmore': '" . JText::_('READMORE') . "',\n\t\t\t\t\t'noresults': '" . JText::_('NORESULTS') . "',\n\t\t\t\t\t'advsearch': '" . JText::_('ADVSEARCH') . "',\n\t\t\t\t\t'page': '" . JText::_('PAGE') . "',\n\t\t\t\t\t'page_of': '" . JText::_('PAGE_OF') . "',\n\t\t\t\t\t'searchlink': '" . JURI::Base() . htmlentities($params->get('search_page')) . "',\n\t\t\t\t\t'advsearchlink': '" . JURI::Base() . htmlentities($params->get('adv_search_page')) . "',\n\t\t\t\t\t'uribase': '" . JURI::Base() . "',\n\t\t\t\t\t'limit': '" . $params->get('limit', '10') . "',\n\t\t\t\t\t'perpage': '" . $params->get('perpage', '3') . "',\n\t\t\t\t\t'ordering': '" . $params->get('ordering', 'newest') . "',\n\t\t\t\t\t'phrase': '" . $params->get('searchphrase', 'any') . "',\n\t\t\t\t\t'hidedivs': '" . $params->get('hide_divs', '') . "',\n\t\t\t\t\t'includelink': " . $params->get('include_link', 1) . ",\n\t\t\t\t\t'viewall': '" . JText::_('VIEWALL') . "',\n\t\t\t\t\t'estimated': '" . JText::_('ESTIMATED') . "',\n\t\t\t\t\t'showestimated': " . $params->get('show_estimated', 1) . ",\n\t\t\t\t\t'showpagination': " . $params->get('show_pagination', 1) . ",\n\t\t\t\t\t'showcategory': " . $params->get('include_category', 1) . ",\n\t\t\t\t\t'showreadmore': " . $params->get('show_readmore', 1) . ",\n\t\t\t\t\t'showdescription': " . $params->get('show_description', 1) . "\n\t\t\t\t});\n\t\t\t});";
     $doc->addScriptDeclaration($ras_init);
     /* Google API */
     if ($params->get('websearch', 0) == 1 && $params->get('websearch_api') != '') {
         $doc->addScript("http://www.google.com/jsapi?key=" . $params->get('websearch_api'));
         $doc->addScriptDeclaration("google.load('search', '1.0', {nocss: true});");
     }
 }
开发者ID:robogals,项目名称:myrobogals,代码行数:35,代码来源:helper.php

示例7: loadScripts

 function loadScripts(&$params)
 {
     JHTML::_('behavior.mootools');
     $doc =& JFactory::getDocument();
     $doc->addScript(JURI::Root(true) . '/modules/mod_roknewsflash/tmpl/js/roknewsflash.js');
     $jsinit = "window.addEvent('domready', function() {\n\t\t\t\tvar x = new RokNewsFlash('newsflash', {\n\t\t\t\t\tcontrols: " . ($params->get('controls') == 1 ? "1" : "0") . ",\n\t\t\t\t\tdelay: " . $params->get('delay') . ",\n\t\t\t\t\tduration: " . $params->get('duration') . "\n\t\t\t\t});\n\t\t\t});";
     $doc->addScriptDeclaration($jsinit);
 }
开发者ID:navinpai,项目名称:GEC-Tandav,代码行数:8,代码来源:helper.php

示例8: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     $lang = JFactory::getLanguage();
     $lang->load('mod_roknavmenu', JPATH_SITE, null, true, false) || $lang->load('mod_roknavmenu', JPATH_SITE . '/modules/mod_roknavmenu', null, true, false) || $lang->load('mod_roknavmenu', JPATH_SITE, $lang->getDefault(), true, false) || $lang->load('mod_roknavmenu', JPATH_SITE . '/modules/mod_roknavmenu', $lang->getDefault(), true, false);
     $doc = JFactory::getDocument();
     $doc->addScript(JURI::Root(true) . "/modules/mod_roknavmenu/fields/childtype.js");
     return '';
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:14,代码来源:moduletypejs.php

示例9: loadAssets

	function loadAssets() {
		define("ROKFEATURETABLE", 1);
		$doc =& JFactory::getDocument();
		$moduleAssets = JURI::Root(true) . "/modules/mod_rokfeaturetable/admin";
		
		$doc->addStyleSheet($moduleAssets . "/css/rokfeaturetable.css");
		$doc->addScript($moduleAssets . "/js/rokfeaturetable".$this->_getJSVersion().".js");
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:8,代码来源:layout.php

示例10: loadScripts

	function loadScripts(&$params)
	{
		JHTML::_('behavior.mootools');
		$doc = &JFactory::getDocument();
		$doc->addScript(JURI::Root(true).'/modules/mod_rokfeaturetable/tmpl/js/rokfeaturetable.js');
		
		if ($params->get('builtin_css', 1)) $doc->addStyleSheet(JURI::Root(true).'/modules/mod_rokfeaturetable/tmpl/css/rokfeaturetable.css');
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:8,代码来源:helper.php

示例11: stageHeader

 public function stageHeader()
 {
     global $gantry;
     //don't include class_sfx on 3rd level menu
     $this->args['class_sfx'] = array_key_exists('startlevel', $this->args) && $this->args['startLevel'] == 1 ? '' : $this->args['class_sfx'];
     $this->activeid = array_key_exists('splitmenu_fusion_enable_current_id', $this->args) && $this->args['splitmenu_fusion_enable_current_id'] == 0 ? false : true;
     JHtml::_('behavior.mootools');
     if ($this->isIe(6)) {
         $gantry->addScript(JURI::Root(true) . '/modules/mod_roknavmenu/themes/fusion/js/sfhover.js');
     }
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:11,代码来源:layout.php

示例12: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     $document =& JFactory::getDocument();
     $document->addScript(JURI::Root(true) . '/modules/mod_jomlogin/js/jscolor/jscolor.js');
     $id_tag = $control_name . '' . $name;
     $class = $node->attributes('class') ? $node->attributes('class') : "color {pickerFaceColor:'#555555',pickerBorder:2,pickerInset:3,hash:true}";
     $size = $node->attributes('size') ? $node->attributes('size') : "15";
     $value = $node->attributes('value') ? $node->attributes('value') : $value;
     $elem = '<div>' . '<input type="text"' . 'id="' . $control_name . $name . '"' . 'name="' . $control_name . '[' . $name . ']"' . 'value="' . $value . '"' . 'size="' . $size . '"' . 'class="' . $class . '" /> ' . '<div id="ColorPicker" class="ColorPicker" style="background-color:' . $value . '"></div>' . '</div>';
     return $elem;
 }
开发者ID:jomvideo,项目名称:JomLogin-Module,代码行数:11,代码来源:color.php

示例13: loadScripts

 public function loadScripts(&$params)
 {
     if (static::$loaded) {
         return;
     }
     JHtml::_('behavior.framework');
     $doc = JFactory::getDocument();
     $URL = JRoute::_(JURI::Root(true) . "/modules/mod_rokminievents3/ajax.php?" . JSession::getFormToken() . "=1", true);
     $doc->addScript(JURI::Root(true) . '/modules/mod_rokminievents3/tmpl/js/rokminievents3.js');
     $doc->addScriptDeclaration('var RokMiniEvents3URL = "' . $URL . '";');
     static::$loaded = true;
 }
开发者ID:afend,项目名称:RULug,代码行数:12,代码来源:RokMiniEvents3.php

示例14: inizialize

 function inizialize($css_style, $offset, &$params)
 {
     global $mainframe;
     JHTML::_('behavior.mootools');
     $doc =& JFactory::getDocument();
     $css = modRokajaxsearchHelper::getCSSPath('rokajaxsearch.css', 'mod_rokajaxsearch');
     if ($css_style == 1 && $css != false) {
         $doc->addStyleSheet($css);
     }
     $doc->addScript(JURI::Root(true) . "/modules/mod_rokajaxsearch/js/rokajaxsearch.js");
     if ($params->get('websearch', 0) == 1 && $params->get('websearch_api') != '') {
         $doc->addScript("http://www.google.com/jsapi?key=" . $params->get('websearch_api'));
         $doc->addScriptDeclaration("google.load('search', '1.0', {nocss: true});");
     }
 }
开发者ID:jnvilo,项目名称:tomasinasanctuary.org,代码行数:15,代码来源:helper.php

示例15: gantry_getFilePath

 function gantry_getFilePath($url)
 {
     $uri =& JURI::getInstance();
     $base = $uri->toString(array('scheme', 'host', 'port'));
     $path = JURI::Root(true);
     if ($url && $base && strpos($url, $base) !== false) {
         $url = preg_replace('|^' . $base . '|', "", $url);
     }
     if ($url && $path && strpos($url, $path) !== false) {
         $url = preg_replace('|^' . $path . '|', '', $url);
     }
     if (substr($url, 0, 1) != DS) {
         $url = DS . $url;
     }
     $filepath = JPATH_SITE . $url;
     return $filepath;
 }
开发者ID:navinpai,项目名称:GEC-Tandav,代码行数:17,代码来源:gantry.php


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