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


PHP JURI::root方法代码示例

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


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

示例1: fetchHead

 public static function fetchHead($params, $module)
 {
     $document = JFactory::getDocument();
     $mainframe = JFactory::getApplication();
     $template = $mainframe->getTemplate();
     JHTML::_('behavior.framework');
     $language = JFactory::getLanguage();
     $mapApi = 'http://maps.google.com/maps/api/js?sensor=true&language=' . $language->getTag();
     if ($params->get('weather')) {
         $mapApi .= '&libraries=weather';
     }
     $document->addScript($mapApi);
     if (file_exists(JPATH_BASE . '/templates/' . $template . '/html/mod_bt_googlemaps/js/default.js')) {
         $document->addScript(JURI::root() . 'templates/' . $template . '/html/mod_bt_googlemaps/js/default.js');
     } else {
         $document->addScript(JURI::root() . 'modules/mod_bt_googlemaps/tmpl/js/btbase64.min.js');
         if ($params->get('enable-custom-infobox')) {
             $document->addScript(JURI::root() . 'modules/mod_bt_googlemaps/tmpl/js/infobox.js');
         }
         $document->addScript(JURI::root() . 'modules/mod_bt_googlemaps/tmpl/js/default.js');
     }
     if (file_exists(JPATH_BASE . '/templates/' . $template . '/html/mod_bt_googlemaps/css/styles.css')) {
         $document->addStyleSheet(JURI::root() . 'templates/' . $template . '/html/mod_bt_googlemaps/css/style.css');
     } else {
         $document->addStyleSheet(JURI::root() . 'modules/mod_bt_googlemaps/tmpl/css/style.css');
     }
 }
开发者ID:Tommar,项目名称:vino2,代码行数:27,代码来源:helper.php

示例2: fetchElement

 /**
  * fetch Element 
  */
 function fetchElement($name, $values, &$node, $control_name)
 {
     $mediaPath = JURI::root() . str_replace(DS, '/', str_replace(JPATH_ROOT, '', dirname(dirname(dirname(__FILE__))))) . '/assets/';
     JHTML::stylesheet('form.css', $mediaPath);
     $attributes = $node->attributes();
     $class = isset($attributes['group']) && trim($attributes['group']) == 'end' ? 'lof-end-group' : 'lof-group';
     $title = isset($attributes['title']) ? JText::_($attributes['title']) : 'Group';
     $title = isset($attributes['title']) ? JText::_($attributes['title']) : '';
     $for = isset($attributes['for']) ? $attributes['for'] : '';
     if (isset($attributes['onoff'])) {
         // echo $control_name; die;
         // echo $name; die;
         //	echo '<pre>'.print_r($values,1); die;
         $string = '<div ' . ($title ? "" : 'style="display:none"') . '  class="' . $class . '" title="' . $for . '">';
         $checked = $values ? 'checked="checked"' : "";
         //	echo $checked; die;
         $string .= '<input type="checkbox" class="lof-onoff" id="params' . $for . '" value="" ' . $checked . ' name="' . $control_name . '[' . $for . ']" /><b>' . $title . '</b></div>';
         return $string;
     } else {
         $string = '<div ' . ($title ? "" : 'style="display:none"') . '  class="' . $class . '" title="' . $for . '">' . $title . '</div>';
         if (!defined('LOF_ADDED_TIME')) {
             $string .= '<input type="hidden" class="text_area" value="' . time() . '" id="paramsmain_lof_added_time" name="params[lof_added_time]">';
             define('LOF_ADDED_TIME', 1);
         }
     }
     if (!defined('ADD_MEDIA_CONTROL')) {
         define('ADD_MEDIA_CONTROL', 1);
         $uri = str_replace(DS, "/", str_replace(JPATH_SITE, JURI::base(), dirname(__FILE__)));
         $uri = str_replace("/administrator/", "", $uri);
         JHTML::stylesheet('form.css', $uri . "/media/");
         JHTML::script('form.js', $uri . "/media/");
     }
     return $string;
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:37,代码来源:fgroup.php

示例3: display

 function display($tpl = null)
 {
     // Do not allow cache
     JResponse::allowCache(false);
     $app = JFactory::getApplication();
     $style = $app->getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word');
     $lang = JFactory::getLanguage();
     JHtml::_('behavior.framework', true);
     $document = JFactory::getDocument();
     $document->addStyleSheet('../media/media/css/medialist-' . $style . '.css');
     if ($lang->isRTL()) {
         $document->addStyleSheet('../media/media/css/medialist-' . $style . '_rtl.css');
     }
     $document->addScriptDeclaration("\n\t\twindow.addEvent('domready', function() {\n\t\t\twindow.parent.document.updateUploader();\n\t\t\t\$\$('a.img-preview').each(function(el) {\n\t\t\t\tel.addEvent('click', function(e) {\n\t\t\t\t\tnew Event(e).stop();\n\t\t\t\t\twindow.top.document.preview.fromElement(el);\n\t\t\t\t});\n\t\t\t});\n\t\t});");
     $images = $this->get('images');
     $documents = $this->get('documents');
     $folders = $this->get('folders');
     $state = $this->get('state');
     $this->baseURL = JURI::root();
     $this->assignRef('images', $images);
     $this->assignRef('documents', $documents);
     $this->assignRef('folders', $folders);
     $this->assignRef('state', $state);
     parent::display($tpl);
 }
开发者ID:christianesperar,项目名称:joomla-example,代码行数:25,代码来源:view.html.php

示例4: getInput

 /**
  * Method to get the field input markup for a generic list.
  * Use the multiple attribute to enable multiselect.
  *
  * @return  string  The field input markup.
  *
  * @since   11.1
  */
 protected function getInput()
 {
     $document = JFactory::getDocument();
     $jsPath = JURI::root(true) . '/modules/mod_currentdatetime/js';
     $joomlaVersion = new JVersion();
     if ($joomlaVersion->isCompatible('3')) {
         JHtml::_('jquery.ui', array('core', 'sortable'));
     } else {
         $document->addStyleSheet($jsPath . '/25/css/chosen.min.css');
         $document->addScript($jsPath . '/25/jquery.min.js');
         $document->addScript($jsPath . '/25/jquery-noconflict.js');
         $document->addScript($jsPath . '/25/chosen.jquery.min.js');
         $document->addScript($jsPath . '/25/jquery.ui.core.min.js');
         $document->addScript($jsPath . '/25/jquery.ui.widget.min.js');
         $document->addScript($jsPath . '/25/jquery.ui.mouse.min.js');
         $document->addScript($jsPath . '/25/jquery.ui.sortable.min.js');
     }
     $document->addScript($jsPath . '/jquery-chosen-sortable.min.js');
     $script = 'jQuery(function(){jQuery(".chzn-sortable").chosen().chosenSortable();});';
     $document->addScriptDeclaration($script);
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $html = parent::getInput();
     return $html;
 }
开发者ID:abdullah929,项目名称:bulletin,代码行数:34,代码来源:items.php

示例5: sendMemberDaytimeToAdmin

 function sendMemberDaytimeToAdmin($member_id, $service_id, $daytime_id)
 {
     define("BodyMemberDaytimeToAdmin", "<h1>Nouvelle inscription à une tranche horaire</h1><p>Un bénévole s'est inscrit à un secteur / tranche horaire.</p><p><strong>Nom :</strong> %s <br /><strong>Secteur :</strong> %s<br /><strong>Date :</strong> %s<br /><strong>Tranche horaire :</strong> %s</p><p><a href=\"" . JURI::root() . "/administrator/index.php?option=com_estivole&view=member&layout=edit&member_id=%s\">Cliquez ici</a> pour valider l'inscription et/ou recontacter le bénévole.</p>");
     define("SubjectMemberDaytimeToAdmin", "Nouvelle inscription à une tranche horaire");
     $db = JFactory::getDBO();
     $query = $db->getQuery(TRUE);
     $this->user = JFactory::getUser();
     // Get the dispatcher and load the user's plugins.
     $dispatcher = JEventDispatcher::getInstance();
     JPluginHelper::importPlugin('user');
     $data = new JObject();
     $data->id = $this->user->id;
     // Trigger the data preparation event.
     $dispatcher->trigger('onContentPrepareData', array('com_users.profilestivole', &$data));
     $userProfilEstivole = $data;
     $userName = $userProfilEstivole->profilestivole['firstname'] . ' ' . $userProfilEstivole->profilestivole['lastname'];
     $query->select('*');
     $query->from('#__estivole_members as b, #__estivole_services as s, #__estivole_daytimes as d');
     $query->where('b.member_id = ' . (int) $member_id);
     $query->where('s.service_id = ' . (int) $service_id);
     $query->where('d.daytime_id = ' . (int) $daytime_id);
     $db->setQuery($query);
     $mailModel = $db->loadObject();
     $mail = JFactory::getMailer();
     $mail->setBody(sprintf(constant("BodyMemberDaytimeToAdmin"), $userName, $mailModel->service_name, date('d-m-Y', strtotime($mailModel->daytime_day)), date('H:i', strtotime($mailModel->daytime_hour_start)) . ' - ' . date('H:i', strtotime($mailModel->daytime_hour_end)), $mailModel->member_id));
     $mail->setSubject(constant("SubjectMemberDaytimeToAdmin"));
     $mail->isHtml();
     $recipient = array('benevoles@estivale.ch', $mailModel->email_responsable);
     $mail->addRecipient($recipient);
     $mail->Send('estivole@estivale.ch');
 }
开发者ID:gorgozilla,项目名称:Estivole,代码行数:31,代码来源:mail.php

示例6: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     global $JElementJSComboJSWritten;
     if (!$JElementJSComboJSWritten) {
         $jsFile = dirname(__FILE__) . DS . "jscombobox.js";
         $jsUrl = str_replace(JPATH_ROOT, JURI::root(true), $jsFile);
         $jsUrl = str_replace(DS, "/", $jsUrl);
         $document = JFactory::getDocument();
         $document->addScript($jsUrl);
         $document->addstylesheet(str_replace('jscombobox.js', 'jscombobox.css', $jsUrl));
         $JElementJSComboJSWritten = TRUE;
     }
     $html = array();
     $attr = '';
     // Initialize some field attributes.
     $attr .= $this->element['class'] ? ' class="combobox ' . (string) $this->element['class'] . '"' : ' class="combobox"';
     // To avoid user's confusion, readonly="true" should imply disabled="true".
     if ((string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true') {
         $attr .= ' disabled="disabled"';
     }
     $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
     // Initialize JavaScript field attributes.
     $attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
     // Get the field options.
     $options = (array) $this->getOptions();
     //store saved value for textbox
     $attr .= $this->value ? ' data-value="' . $this->value . '"' : '';
     // Create a regular list.
     $html[] = JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);
     return implode($html);
 }
开发者ID:scarsroga,项目名称:blog-soa,代码行数:37,代码来源:jscombo.php

示例7: _initDefaultPage

 private function _initDefaultPage()
 {
     $document = JFactory::getDocument();
     $document->addCustomTag('<link href="' . JURI::root(true) . '/media/cbcc/js/jstree/themes/default/style.css" rel="stylesheet" />');
     $document->addScript(JURI::root(true) . '/media/jui/js/jquery.min.js');
     $document->addScript(JURI::root(true) . '/media/cbcc/js/jstree/jquery.jstree.js');
 }
开发者ID:phucdnict,项目名称:cbcc_05062015,代码行数:7,代码来源:view.raw.php

示例8: bootstrap

	/**
	 * This renders the necessary bootstrap data into the html headers.
	 */
	public function bootstrap()
	{
		static $isRendered	= false;

		$doc 				= JFactory::getDocument();

		if( !$isRendered && $doc->getType() == 'html' )
		{
			// @task: Include dependencies from foundry.
			require_once( JPATH_ROOT . DIRECTORY_SEPARATOR . 'media' . DIRECTORY_SEPARATOR . 'foundry' . DIRECTORY_SEPARATOR . '3.1' . DIRECTORY_SEPARATOR . 'joomla' . DIRECTORY_SEPARATOR . 'configuration.php' );

			$config = Komento::getConfig();

			$environment = JRequest::getVar( 'komento_environment' , $config->get( 'komento_environment' ) );

			$folder	= 'scripts';

			// @task: Let's see if we should load the dev scripts.
			if( $environment == 'development' )
			{
				$folder		= 'scripts_';
			}

			$doc->addScript( rtrim( JURI::root() , '/' ) . '/media/com_komento/' . $folder . '/abstract.js' );

			$isRendered		= true;
		}

		return $isRendered;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:33,代码来源:foundry.php

示例9: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     $doc = JFactory::getDocument();
     $doc->addScript(JURI::root(true) . '/plugins/vmpayment/klikandpay/klikandpay/assets/js/admin.js');
     $doc->addStyleSheet(JURI::root(true) . '/plugins/vmpayment/klikandpay/klikandpay/assets/css/klikandpay.css');
     return '';
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:7,代码来源:customjs.php

示例10: plgcontentloadozio

function plgcontentloadozio($galleriaozio)
{
    $db =& JFactory::getDBO();
    $query = 'SELECT published, link, id, access, params' . ' FROM #__menu' . ' WHERE id=' . (int) $galleriaozio;
    $db->setQuery($query);
    $codice = $db->loadObject();
    $query = 'SELECT *' . ' FROM #__menu' . ' WHERE (link LIKE "index.php?option=com_oziogallery2&view=01tilt3d" 
						OR link LIKE "index.php?option=com_oziogallery2&view=02flashgallery"
						OR link LIKE "index.php?option=com_oziogallery2&view=03imagin"
						OR link LIKE "index.php?option=com_oziogallery2&view=04carousel"
						OR link LIKE "index.php?option=com_oziogallery2&view=05imagerotator"
						OR link LIKE "index.php?option=com_oziogallery2&view=06accordion"	
						OR link LIKE "index.php?option=com_oziogallery2&view=07flickrslidershow"
						OR link LIKE "index.php?option=com_oziogallery2&view=08flickrphoto"		
						OR link LIKE "index.php?option=com_oziogallery2&view=09mediagallery"
						OR link LIKE "index.php?option=com_oziogallery2&view=10cooliris"						
						)';
    $db->setQuery($query);
    $cp = $db->loadObject();
    $document =& JFactory::getDocument();
    if ($cp->id = $galleriaozio) {
        @($gall = JURI::root() . $codice->link . '&Itemid=' . (int) $galleriaozio);
        $parametar = new JParameter($codice->params);
        // alexred
        if (@$codice->published != 0 && @$codice->access != 1 && @$codice->access != 2) {
            $document->addScript(JURI::root(true) . '/components/com_oziogallery2/assets/js/autoHeight.js');
            $contents = '';
            $contents .= '<div class="clr"></div>';
            $contents .= '<iframe src="' . $gall . '&amp;tmpl=component" width="' . $parametar->get("width") . '" marginwidth="0px" allowtransparency="true" frameborder="0" scrolling="no" class="autoHeight">';
            $contents .= '</iframe>';
            $contents .= '<div class="clr"></div>';
            return $contents;
        }
    }
}
开发者ID:MOYA8564,项目名称:oziogallery2,代码行数:35,代码来源:ozio.php

示例11: title

 /**
  * Set admin toolbar title and auto add page title to HTML head document.
  */
 static function title($title, $icon = 'generic.png')
 {
     $doc = JFactory::getDocument();
     $app = JFactory::getApplication();
     $doc->setTitle($title);
     $view = JRequest::getVar('view');
     $layout = JRequest::getVar('layout', 'default');
     $option = JRequest::getVar('option');
     // Strip the extension.
     $icons = explode(' ', $icon);
     foreach ($icons as &$icon) {
         $icon = 'icon-48-' . preg_replace('#\\.[^.]*$#', '', $icon);
     }
     $class = "header-{$view}-{$layout}";
     $img = "components/{$option}/images/admin-icons/{$class}.png";
     if (JFile::exists(JPATH_ADMINISTRATOR . '/' . $img)) {
         $icon = $class;
     }
     if (JVERSION >= 3) {
         $icon = null;
     }
     $admin = $app->isSite() ? JURI::root() . 'administrator/' : '';
     $img = $admin . "components/{$option}/images/admin-icons/{$class}.png";
     $doc->addStyleDeclaration("\n.{$class} {\n    background: url({$img}) no-repeat;\n}\n        ");
     $html = '<div class="pagetitle ' . htmlspecialchars($icon) . '"><h2>' . $title . '</h2></div>';
     //$html = $title ;
     $app->JComponentTitle = $html;
 }
开发者ID:ForAEdesWeb,项目名称:AEW3,代码行数:31,代码来源:toolbar.php

示例12: getInput

 protected function getInput()
 {
     $this->value = JURI::root() . 'plugins/vmpayment/realex_hpp_api/jump.php';
     $class = !empty($this->class) ? 'class="' . $this->class . '"' : 'class="text_area"';
     $size = $this->size ? 'size="' . $this->size . '"' : '';
     return '<input type="text" name="' . $this->name . '" id="' . $this->name . '" value="' . $this->value . '" ' . $class . ' ' . $size . ' />';
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:7,代码来源:referringurl.php

示例13: display

    public function display($tpl = null) {


        global $mainframe;
        $document = & JFactory::getDocument();
        $document->addScript('components/com_gglms/js/jquery-ui-1.8.2.custom.min.js');
        $document->addStyleSheet(JURI::root(true) . '/components/com_gglms/css/provagratuita.css');


        $user = JFactory::getUser();
        $userid = $user->get('id');
        if (!$userid) {
            $tpl = "loggati";
        } else {
            $model = & $this->getModel();
            $pg = $model->check_Coupon();

            if (!empty($pg)) {

                $this->assignRef('data_scadenza', $pg['data_scadenza_f']);
                $this->assignRef('ora_scadenza', $pg['ora_scadenza_f']);

                if (strtotime($pg['data_scadenza']) < strtotime(date("Y-m-d H:i:s")))
                    $tpl = "scaduta";
                else
                    $tpl = "incorso";
            } else
                $tpl = "attivala";
        }
        parent::display($tpl);
    }
开发者ID:GGallery,项目名称:MDWEBTV-new,代码行数:31,代码来源:view.html.php

示例14: ListExtensions

    public static function ListExtensions(&$extensions)
    {
        $root = JURI::root() . '../../';
        $base = JPATH_PLUGINS . DS . 'editors' . DS . 'jckeditor' . DS . 'plugins';
        $db = JFactory::getDBO();
        $query = '	SELECT ext.name FROM #__jckplugins ext
					INNER JOIN #__jckplugins parent on parent.id = ext.parentid
					WHERE parent.name = "jtreelink"
					AND parent.published = 1
					AND  ext.published = 1';
        $db->setQuery($query);
        $results = $db->loadResultArray();
        if (empty($results)) {
            return;
        }
        foreach ($results as $extension) {
            $path = $base . DS . $extension . DS . 'images' . DS . 'icon.gif';
            $url = $root . $extension . '/images/icon.gif';
            $icon = array('_open', '_closed');
            //We default to default icon if no custom icon has been supplied by plugin.
            if (JFile::exists($path)) {
                $icon = array($url, $url);
            } else {
                $path = $base . DS . $extension . DS . 'images' . DS . 'icon.png';
                $url = $root . $extension . '/images/icon.png';
                if (JFile::exists($path)) {
                    $icon = array($url, $url);
                }
            }
            $extensions[$extension] = $icon;
        }
    }
开发者ID:bizanto,项目名称:Hooked,代码行数:32,代码来源:initialize.php

示例15: display

 function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $document->setMimeEncoding('application/json');
     if ($virtuemart_media_id = vRequest::getInt('virtuemart_media_id')) {
         //JResponse::setHeader( 'Content-Disposition', 'attachment; filename="media'.$virtuemart_media_id.'.json"' );
         $model = VmModel::getModel('Media');
         $image = $model->createMediaByIds($virtuemart_media_id);
         // 			echo '<pre>'.print_r($image,1).'</pre>';
         $this->json = $image[0];
         //echo json_encode($this->json);
         if (isset($this->json->file_url)) {
             $this->json->file_root = JURI::root(true) . '/';
             $this->json->msg = 'OK';
             echo @json_encode($this->json);
         } else {
             $this->json->msg = '<b>' . vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
             echo @json_encode($this->json);
         }
     } else {
         if (!class_exists('VmMediaHandler')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'mediahandler.php';
         }
         $start = vRequest::getInt('start', 0);
         $type = vRequest::getCmd('mediatype', 0);
         $list = VmMediaHandler::displayImages($type, $start);
         echo @json_encode($list);
     }
     jExit();
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:30,代码来源:view.json.php


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