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


PHP JURI::base方法代码示例

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


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

示例1: defaults

 function defaults()
 {
     $document = JFactory::getDocument();
     $document->addScript(JUri::base(true) . '/media/cbcc/js/jquery/jquery.maskedinput.min.js');
     $document->addScript(JUri::base(true) . '/media/cbcc/js/jquery/upload/jquery.fileupload.js');
     $document->addScript(JUri::base(true) . '/media/cbcc/js/jquery.colorbox-min.js');
     $document->addScript(JUri::base(true) . '/media/cbcc/js/jquery/upload/jquery.iframe-transport.js');
     $document->addScript(JUri::base(true) . '/media/cbcc/js/bootstrap.tab.ajax.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/jquery/jquery.cookie.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/jstree/jquery.jstree.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/caydonvi.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/jquery.dataTables.min.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/dataTables.bootstrap.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/dataTables.tableTools.min.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/datatables.default.config.js');
     $document->addStyleSheet(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/css/dataTables.tableTools.css');
     $model = Core::model('Thongke/Thongke');
     $idUser = JFactory::getUser()->id;
     $idRoot = Core::getManageUnit($idUser, 'com_thongke', 'treeview', 'treethongke');
     if ($idRoot == null) {
         $this->setLayout('hoso_404');
     } else {
         $root['root_id'] = $idRoot;
         $tmp = $model->getThongtin(array('name, type'), 'ins_dept', null, array('id=' . $root['root_id']), null);
         $root['root_name'] = $tmp[0]->name;
         $root['root_showlist'] = $tmp[0]->type;
     }
     $this->assignRef('root_info', $root);
 }
开发者ID:phucdnict,项目名称:cbcc_05062015,代码行数:29,代码来源:view.html.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: fetchButton

 function fetchButton($type = 'Acyactions')
 {
     $url = JURI::base() . "index.php?option=com_acymailing&ctrl=filter&tmpl=component";
     $top = 0;
     $left = 0;
     $width = 700;
     $height = 500;
     $text = JText::_('ACTIONS');
     if (!ACYMAILING_J30) {
         $class = "icon-32-acyaction";
     } else {
         $class = "icon-14-acyaction";
     }
     $js = "\r\nfunction getAcyActionUrl() {\r\n\ti = 0;\r\n\tmylink = 'index.php?option=com_acymailing&ctrl=filter&tmpl=component&subid=';\r\n\twhile(window.document.getElementById('cb'+i)){\r\n\t\tif(window.document.getElementById('cb'+i).checked)\r\n\t\t\tmylink += window.document.getElementById('cb'+i).value+',';\r\n\t\ti++;\r\n\t}\r\n\treturn mylink;\r\n}\r\n";
     $doc = JFactory::getDocument();
     $doc->addScriptDeclaration($js);
     if (!ACYMAILING_J30) {
         JHTML::_('behavior.modal', 'a.modal');
         return '<a href="' . $url . '" class="modal" onclick="this.href=getAcyActionUrl();" rel="{handler: \'iframe\', size: {x: ' . $width . ', y: ' . $height . '}}"><span class="' . $class . '" title="' . $text . '"></span>' . $text . '</a>';
     }
     $html = '<button class="btn btn-small modal" data-toggle="modal" data-target="#modal-' . $type . '"><i class="' . $class . '"></i> ' . $text . '</button>';
     $params['title'] = $text;
     $params['url'] = '\'+getAcyActionUrl()+\'';
     //$url;
     $params['height'] = $height;
     $params['width'] = $width;
     $modalHtml = JHtml::_('bootstrap.renderModal', 'modal-' . $type, $params);
     $html .= str_replace(array('id="modal-' . $type . '"'), array('id="modal-' . $type . '" style="width:' . ($width + 20) . 'px;height:' . ($height + 90) . 'px;margin-left:-' . ($width + 20) / 2 . 'px"'), $modalHtml);
     $html .= '<script>' . "\r\n" . 'jQuery(document).ready(function(){jQuery("#modal-' . $type . '").appendTo(jQuery(document.body));});' . "\r\n" . '</script>';
     return $html;
 }
开发者ID:freaqzilla,项目名称:joomla-site,代码行数:31,代码来源:acyactions.php

示例4: onTP_GetHTML

 /**
  * RETURN PAY HTML FORM
  * */
 function onTP_GetHTML($vars)
 {
     $vars = $this->preFormatingData($vars);
     $plgPaymentEpaydkHelper = new plgPaymentEpaydkHelper();
     // Split the name in first and last name
     $user = JFactory::getUser();
     $nameParts = $user->name;
     // explode(' ', $user->name, 2);
     $firstName = $user->name;
     $lastName = $user->name;
     // Get the base URL without the path
     $rootURL = rtrim(JURI::base(), '/');
     $subpathURL = JURI::base(true);
     if (!empty($subpathURL) && $subpathURL != '/') {
         $rootURL = substr($rootURL, 0, -1 * strlen($subpathURL));
     }
     // Separate URL variable as it cannot be a part of the md5 checksum
     $url = $this->getPaymentURL();
     $data = array('merchant' => $this->getMerchantID(), 'success' => $vars->return, 'cancel' => $vars->cancel_return, 'postback' => $vars->notify_url, 'orderid' => $vars->order_id, 'currency' => strtoupper($vars->currency_code), 'amount' => $vars->amount * 100, 'cardtypes' => implode(',', $this->params->get('cardtypes', array())), 'instantcapture' => '1', 'instantcallback' => '1', 'language' => $this->params->get('language', '0'), 'ordertext' => 'Order id' . ' - [ ' . $vars->order_id . ' ]', 'windowstate' => '3', 'ownreceipt' => '0', 'md5' => $this->params->get('secret', ''));
     if ($this->params->get('md5', 1)) {
         // Security hash - must be compiled from ALL inputs sent
         $data['md5'] = md5(implode('', $data));
     } else {
         $data['md5'] = '';
     }
     $data['actionURL'] = $url;
     // dont make md5
     $data['submiturl'] = $vars->submiturl;
     // Set array as object for compatability
     $data = (object) $data;
     $html = $this->buildLayout($data);
     return $html;
 }
开发者ID:JonatanLiecheski,项目名称:MeditecJoomla,代码行数:36,代码来源:epaydk.php

示例5: sp_divider_addon

function sp_divider_addon($atts, $content)
{
    extract(spAddonAtts(array('divider_type' => '', 'margin_top' => '', 'margin_bottom' => '', 'border_color' => '', 'border_style' => '', 'border_width' => '', 'divider_image' => '', 'background_repeat' => '', 'background_position' => '', 'divider_height' => '', 'class' => ''), $atts));
    $style = '';
    $style1 = '';
    $style2 = '';
    if ($margin_top) {
        $style .= 'margin-top:' . (int) $margin_top . 'px;';
    }
    if ($margin_bottom) {
        $style .= 'margin-bottom:' . (int) $margin_bottom . 'px;';
    }
    if ($border_color) {
        $style1 .= 'border-bottom-color:' . $border_color . ';';
    }
    if ($border_style) {
        $style1 .= 'border-bottom-style:' . $border_style . ';';
    }
    if ($border_width) {
        $style1 .= 'border-bottom-width:' . (int) $border_width . 'px;';
    }
    if ($divider_height) {
        $style2 .= 'height:' . (int) $divider_height . 'px;';
    }
    if ($divider_image) {
        $style2 .= 'background-image: url(' . JURI::base(true) . '/' . $divider_image . ');background-repeat:' . $background_repeat . ';background-position:50% 50%;';
    }
    if ($divider_type == 'image') {
        $output = '<div class="sppb-divider sppb-divider-' . $divider_type . '" style="' . $style . ' ' . $style2 . '"></div>';
    } else {
        $output = '<div class="sppb-divider sppb-divider-' . $divider_type . '" style="' . $style . ' ' . $style1 . '"></div>';
    }
    return $output;
}
开发者ID:naka211,项目名称:myloyal,代码行数:34,代码来源:site.php

示例6: fetchButton

 function fetchButton($type = 'Acytags', $newstype = 'news')
 {
     $url = JURI::base() . "index.php?option=com_acymailing&ctrl=tag&task=tag&tmpl=component&type=" . $newstype;
     $top = 0;
     $left = 0;
     $width = 780;
     $height = 550;
     $text = JText::_('TAGS');
     if (!ACYMAILING_J30) {
         $class = "icon-32-tag";
     } else {
         $class = "icon-14-tag";
     }
     if (!ACYMAILING_J30) {
         JHTML::_('behavior.modal');
         $html = "<a class=\"modal\" onclick=\"try{IeCursorFix();}catch(e){}\" href=\"{$url}\" rel=\"{handler: 'iframe', size: {x: {$width}, y: {$height}}}\">\n";
         $html .= "<span class=\"{$class}\" title=\"{$text}\"></span>{$text}</a>\n";
         return $html;
     }
     $html = '<button class="btn btn-small modal" data-toggle="modal" data-target="#modal-' . $type . '"><i class="' . $class . '"></i> ' . $text . '</button>';
     $params['title'] = $text;
     $params['url'] = $url;
     $params['height'] = $height;
     $params['width'] = $width;
     $modalHtml = JHtml::_('bootstrap.renderModal', 'modal-' . $type, $params);
     $html .= str_replace(array('id="modal-' . $type . '"'), array('id="modal-' . $type . '" style="width:' . ($width + 20) . 'px;height:' . ($height + 90) . 'px;margin-left:-' . ($width + 20) / 2 . 'px"'), $modalHtml);
     $html .= '<script>' . "\r\n" . 'jQuery(document).ready(function(){jQuery("#modal-' . $type . '").appendTo(jQuery(document.body));});' . "\r\n" . '</script>';
     return $html;
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:29,代码来源:acytags.php

示例7: postflight

	public function postflight(){	
		define('_FM_COM', 'com_profiles');
		if(!defined('DS')) define('DS',DIRECTORY_SEPARATOR);	
		
		$lang = JFactory::getLanguage();
		define('_MY_LANGUAGE',$lang->getTag());
		define('_CLOSE_HREF','index.php');
			
		$ABSOLUTE_URI = (getenv('HTTPS') == 'on') ? substr_replace( str_replace("http://", "https://", JURI::base() ), '', -1, 1) : substr_replace(JURI::base(), '', -1, 1) . "/";
		define('_FM_ABSOLUTE_URI',$ABSOLUTE_URI);
		define('_FM_HOME_URL', "index.php?option="._FM_COM."&format=raw");
		define('_FM_HOME_FOLDER','components/'._FM_COM.'/filemanager');
		define('_FM_HOME_DIR', JPATH_ROOT . '/administrator/components/'._FM_COM.'/filemanager');
		define('_FM_LANGUAGE_DIR', _FM_HOME_DIR. DS.'languages');
		define('_FM_COOKIE_EXPIRE', time()+60*60*24*60);
		// Define Peer
		define('_FM_PEER','joomla');
			
		require_once _FM_HOME_DIR . DS . 'classes'.DS.'file.php';
		require_once _FM_HOME_DIR . DS . 'classes'.DS.'text.php';
		require_once _FM_HOME_DIR . DS .'includes'.DS.'version.php';
		
		$infoTemplates = _FM_HOME_DIR . DS ."languages" . DS . "info";
		
		$infoPath = $infoTemplates . DS . _MY_LANGUAGE . ".php" ;
		if(!MFile::is($infoPath)){
			$infoPath = $infoTemplates . DS . "en-GB.php";
		}
		
		$isWelcome = 1;
		$jed = null;
		$version=null;
		require_once $infoPath;
		
	}  //EOF install
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:35,代码来源:profiles.script.php

示例8: _getCommand

 /**
  * Get the JavaScript command for the button
  *
  * @param   object   $definition	Button definition
  * @return  string   JavaScript command string
  * @since   11.1
  */
 protected function _getCommand($name, $url, $width, $height, $top, $left)
 {
     if (substr($url, 0, 4) !== 'http') {
         $url = JURI::base() . $url;
     }
     return $url;
 }
开发者ID:carmerin,项目名称:cesae-web,代码行数:14,代码来源:popup.php

示例9: lookingForK2Image

    /**
     * looking for image inside the media folder.
     * heave size XS, XL, S, M, L, Generic
     */
    public function lookingForK2Image($item, $size = 'XL') {
		//Image
		$item->imageK2Image = '';
		if (JFile::exists(JPATH_SITE .  '/media/k2/items/cache/' . md5("Image" . $item->id) . '_' . $size . '.jpg'))
			$item->imageK2Image = JURI::base() . 'media/k2/items/cache/' . md5("Image" . $item->id) . '_' . $size . '.jpg';
		return $item;
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:11,代码来源:k2.php

示例10: getInput

 protected function getInput()
 {
     $document = JFactory::getDocument();
     $option = JRequest::getCmd('option');
     $globalValue = $this->_getPhocaParams($this->element['name']);
     JHTML::stylesheet('administrator/components/com_phocadownload/assets/jcp/picker.css');
     $document->addScript(JURI::base(true) . '/components/com_phocadownload/assets/jcp/picker.js');
     // Initialize some field attributes.
     $size = $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
     $class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
     $maxLength = $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'] . '"' : '';
     $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'] . '"' : '';
     $value = htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8');
     // TODO 1.6
     // MENU - Set Default value to "" because of saving "" value into the menu link ( use global = "")
     if ($option == "com_menus") {
         $DefaultValue = (string) $this->element['default'];
         if ($value == $DefaultValue) {
             $value = '';
         }
     }
     $html = '<input type="text" name="' . $this->name . '" id="' . $this->id . '" value="' . $value . '"' . $class . $size . $disabled . $readonly . $onchange . $maxLength . '/>';
     // Color Picker
     $nameCP = str_replace('[', '_', $this->name);
     $nameCP = str_replace(']', '', $nameCP);
     $html .= '<span style="margin-left:10px" onclick="openPicker(\'' . $nameCP . '\')"  class="picker_buttons">' . JText::_('COM_PHOCADOWNLOAD_PICK_COLOR') . '</span>';
     // MENU - Display the global value
     if ($option == "com_menus") {
         $html .= '<span style="margin-left:10px;">[</span><span style="background:#fff"> ' . $globalValue . ' </span><span>]</span>';
     }
     return $html;
 }
开发者ID:jbelborja,项目名称:lavid3,代码行数:35,代码来源:phocacolortext.php

示例11: display

 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     JHtml::_('behavior.tooltip');
     JHtml::_('behavior.formvalidation');
     JHtml::_('behavior.keepalive');
     JHtml::_('formbehavior.chosen', 'select');
     //Frontend Changes
     $tUri = '';
     if (!$app->isAdmin()) {
         $tUri = JURI::base();
     }
     $document = JFactory::getDocument();
     $uri =& JFactory::getURI();
     JHTML::stylesheet('media/com_phocagallery/css/administrator/phocagallery.css');
     $eName = JRequest::getVar('e_name');
     $eName = preg_replace('#[^A-Z0-9\\-\\_\\[\\]]#i', '', $eName);
     $tmpl['categories'] = $tUri . 'index.php?option=com_phocagallery&amp;view=phocagallerylinkcats&amp;tmpl=component&amp;e_name=' . $eName;
     //$tmpl['COM_PHOCAGALLERY_CATEGORY']		= 'index.php?option=com_phocagallery&amp;view=phocagallerylinkcat&amp;tmpl=component&amp;e_name='.$eName;
     $tmpl['images'] = $tUri . 'index.php?option=com_phocagallery&amp;view=phocagallerylinkimg&amp;type=2&amp;tmpl=component&amp;e_name=' . $eName;
     $tmpl['image'] = $tUri . 'index.php?option=com_phocagallery&amp;view=phocagallerylinkimg&amp;type=1&amp;tmpl=component&amp;e_name=' . $eName;
     $tmpl['switchimage'] = $tUri . 'index.php?option=com_phocagallery&amp;view=phocagallerylinkimg&amp;type=3&amp;tmpl=component&amp;e_name=' . $eName;
     $tmpl['slideshow'] = $tUri . 'index.php?option=com_phocagallery&amp;view=phocagallerylinkimg&amp;type=4&amp;tmpl=component&amp;e_name=' . $eName;
     $this->assignRef('tmpl', $tmpl);
     parent::display($tpl);
 }
开发者ID:scarsroga,项目名称:blog-soa,代码行数:26,代码来源:view.html.php

示例12: __construct

 function __construct(&$subject, $config)
 {
     $app = JFactory::getApplication();
     if ($app->isAdmin()) {
         return;
     }
     $version = new JVersion();
     $joomla_main_version = substr($version->RELEASE, 0, strpos($version->RELEASE, '.'));
     if ($version->PRODUCT == 'Joomla!' and $joomla_main_version != '3') {
         throw new Exception(JText::_('PLG_CONTENT_SIGE_NEEDJ3'), 404);
     }
     parent::__construct($subject, $config);
     $this->loadLanguage('plg_content_sige', JPATH_ADMINISTRATOR);
     if (isset($_SESSION['sigcount'])) {
         unset($_SESSION['sigcount']);
     }
     if (isset($_SESSION['sigcountarticles'])) {
         unset($_SESSION['sigcountarticles']);
     }
     $this->absolute_path = JPATH_SITE;
     $this->live_site = JURI::base();
     if (substr($this->live_site, -1) == '/') {
         $this->live_site = substr($this->live_site, 0, -1);
     }
     $this->plugin_parameter = array();
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:26,代码来源:sige.php

示例13: getInput

    /**
     * fetch Element 
     */
    protected function getInput()
    {
        if (!defined('LOF_LOADMEDIACONTROL')) {
            define('LOF_LOADMEDIACONTROL', 1);
            $uri = str_replace(DS, "/", str_replace(JPATH_SITE, JURI::base(), dirname(__FILE__)));
            $uri = str_replace("/administrator/", "", $uri);
            JHTML::stylesheet($uri . "/media/" . 'form.css');
            JHTML::script($uri . "/media/" . 'form.js');
        }
        if ($this->title == 'end_form') {
            ?>
            	<script type="text/javascript">
					var panels = $$("#module-form .pane-sliders  > .panel").fade("out").removeClass("panel").addClass("lof-panel");
					var div = new Element("div", {"class":"lof-wrapper"});
					var container = new Element("div", {"class":"lof-container"});
					container.innerHTML='<fieldset class="fs-form"><legend><?php 
            echo JText::_("Module Setting");
            ?>
</legend><div class="lof-toolbars"></div><div class="lof-fscontainer"></div></legend></fieldset>';
					var _toolbar = container.getElement(".lof-toolbars");
					var _container = container.getElement(".lof-fscontainer");
					$$("#module-form .pane-sliders").adopt(  div.adopt(container) );
					new LofForm(panels, _toolbar, _container );
				</script>
            <?php 
        }
        //    $text   = (string)$this->element['text']?(string)$this->element['text']:'';
        ///   return '<div class="lof-header">'.JText::_($text).'</div>';
    }
开发者ID:richardgarcia7,项目名称:apc-softdev-gd121mi122-06,代码行数:32,代码来源:lofspacer.php

示例14: display

 function display()
 {
     $tpl = JRequest::getVar('tpl');
     // Add toolbar buttons
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('DBEF') . '</small></small>');
     JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
     JToolBarHelper::spacer();
     $bar =& JToolBar::getInstance('toolbar');
     switch ($tpl) {
         case 'tab':
             JToolBarHelper::deleteList();
             $bar->appendButton('Link', 'preview', JText::_('NORMALVIEW'), 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view'));
             break;
         case '':
         default:
             $bar->appendButton('Link', 'preview', JText::_('TABULARVIEW'), 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=tab');
             break;
     }
     JToolBarHelper::spacer();
     JoomlapackHelperUtils::addLiveHelp('dbef');
     if ($tpl == 'tab') {
         $model =& $this->getModel('Dbef');
         $task = JRequest::getCmd('task', 'default');
         $list =& $model->getRecordsList();
         $this->assignRef('list', $list);
         $this->assignRef('pagination', $model->getPagination());
         $this->assignRef('class', $model->_filterclass);
     }
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     parent::display($tpl);
 }
开发者ID:Ratmir15,项目名称:Joomla---formula-of-success,代码行数:32,代码来源:view.html.php

示例15: format

 private function format(&$articles, $params)
 {
     if (!$articles) {
         return;
     }
     foreach ($articles as $article) {
         $category = JTable::getInstance('Category');
         $category->load($article->catid);
         $article->category = $category;
         $article->permalink = ContentHelperRoute::getArticleRoute($article->id . ':' . $article->alias, $article->catid);
         $article->permalink = JRoute::_($article->permalink);
         $article->category->permalink = ContentHelperRoute::getCategoryRoute($category->id . ':' . $category->alias);
         $article->category->permalink = JRoute::_($article->category->permalink);
         $article->content = empty($article->introtext) ? $article->fulltext : $article->introtext;
         $titleLength = $params->get('title_length');
         $contentLength = $params->get('content_length');
         if ($titleLength) {
             $article->title = JString::substr($article->title, 0, $titleLength);
         }
         // Try to get image of the article
         $image = $this->processContentImage($article->content);
         if ($image) {
             $article->image = $image;
         }
         if ($contentLength) {
             $article->content = JString::substr(strip_tags($article->content), 0, $contentLength) . ' ...';
         } else {
             $base = JURI::base(true) . '/';
             $protocols = '[a-zA-Z0-9]+:';
             //To check for all unknown protocals (a protocol must contain at least one alpahnumeric fillowed by :
             $regex = '#(src|href|poster)="(?!/|' . $protocols . '|\\#|\')([^"]*)"#m';
             $article->content = preg_replace($regex, "\$1=\"{$base}\$2\"", $article->content);
         }
     }
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:35,代码来源:view.html.php


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