當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JModuleHelper::getLayoutPath方法代碼示例

本文整理匯總了PHP中JModuleHelper::getLayoutPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP JModuleHelper::getLayoutPath方法的具體用法?PHP JModuleHelper::getLayoutPath怎麽用?PHP JModuleHelper::getLayoutPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JModuleHelper的用法示例。


在下文中一共展示了JModuleHelper::getLayoutPath方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: display

	public function display() {
		static $cssadded = false;

		require_once (KUNENA_PATH_LIB . DS . 'kunena.link.class.php');
		require_once (KUNENA_PATH_LIB . DS . 'kunena.image.class.php');
		require_once (KUNENA_PATH_LIB . DS . 'kunena.timeformat.class.php');
		require_once (KUNENA_PATH_FUNCS . DS . 'latestx.php');
		require_once (JPATH_ADMINISTRATOR . '/components/com_kunena/libraries/html/parser.php');
		$this->kunena_config = KunenaFactory::getConfig ();
		$this->myprofile = KunenaFactory::getUser ();

		// load Kunena main language file so we can leverage langaueg strings from it
		KunenaFactory::loadLanguage();

		// Initialize session
		$session = KunenaFactory::getSession ();
		$session->updateAllowedForums();

		$this->latestdo = null;

		if ($this->params->get ( 'choosemodel' ) != 'latest') {
			$this->latestdo = $this->params->get ( 'choosemodel' );
		}

		$this->ktemplate = KunenaFactory::getTemplate();
		$this->klistpost = modKunenaLatestHelper::getKunenaLatestList ( $this->params );
		$this->topic_ordering = modKunenaLatestHelper::getTopicsOrdering($this->myprofile, $this->kunena_config);

		require (JModuleHelper::getLayoutPath ( 'mod_kunenalatest' ));
	}
開發者ID:rich20,項目名稱:mod_kunenalatest,代碼行數:30,代碼來源:class.php

示例2: render

    function render()
    {
        // create instances of basic Joomla! classes
        $document = JFactory::getDocument();
        if (in_array('plus.google.com', $headData_keys)) {
            $link_founded = true;
        }
        if ($this->config['cookie_conset'] == 0) {
            $type = '<script type="text/javascript">';
        } else {
            $type = '<script type="text/plain" class="cc-onconsent-social">';
        }
        if ($this->config['gplus_badge_style'] == 'standard_badge') {
            // async script mode
            $content = $type . 'window.___gcfg = {lang: \'' . $this->config['gplus_lang_code'] . '\'};
		        (function() {
		            var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
		            po.src = \'https://apis.google.com/js/platform.js\';
		            var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
		          })();</script>';
        }
        // if gplus script file doesn't exists in document head section
        if ($this->config['gplus_user'] != '' && $this->config['gplus_badge_style'] == 'standard_badge') {
            echo $content;
        }
        // select proper layout to load
        if ($this->config['gplus_badge_style'] == 'standard_badge') {
            require JModuleHelper::getLayoutPath('mod_social_gk5', 'gplusBadge');
        } else {
            require JModuleHelper::getLayoutPath('mod_social_gk5', 'gplusIcon');
        }
    }
開發者ID:grchis,項目名稱:Site-Auto,代碼行數:32,代碼來源:gplus.php

示例3: renderItem

 function renderItem(&$item, &$params, &$access)
 {
     global $mainframe;
     $user =& JFactory::getUser();
     $item->text = $item->introtext;
     $item->groups = '';
     $item->readmore = trim($item->fulltext) != '';
     $item->metadesc = '';
     $item->metakey = '';
     $item->created = '';
     $item->modified = '';
     if ($params->get('readmore') || $params->get('link_titles')) {
         if ($params->get('intro_only')) {
             // Check to see if the user has access to view the full article
             if ($item->access <= $user->get('aid', 0)) {
                 $itemparams = new JParameter($item->attribs);
                 $readmoretxt = $itemparams->get('readmore', JText::_('Read more text'));
                 $item->linkOn = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->sectionid));
                 $item->linkText = $readmoretxt;
             } else {
                 $item->linkOn = JRoute::_('index.php?option=com_user&view=login');
                 $item->linkText = JText::_('Login To Read More');
             }
         }
     }
     if (!$params->get('image')) {
         $item->text = preg_replace('/<img[^>]*>/', '', $item->text);
     }
     $results = $mainframe->triggerEvent('onAfterDisplayTitle', array(&$item, &$params, 1));
     $item->afterDisplayTitle = trim(implode("\n", $results));
     $results = $mainframe->triggerEvent('onBeforeDisplayContent', array(&$item, &$params, 1));
     $item->beforeDisplayContent = trim(implode("\n", $results));
     require JModuleHelper::getLayoutPath('mod_newsflash', '_item');
 }
開發者ID:RangerWalt,項目名稱:ecci,代碼行數:34,代碼來源:helper.php

示例4: button

 public static function button($button)
 {
     ob_start();
     require JModuleHelper::getLayoutPath('mod_imageshow_quickicon', 'default_button');
     $html = ob_get_clean();
     return $html;
 }
開發者ID:jdrzaic,項目名稱:joomla-dummy,代碼行數:7,代碼來源:helper.php

示例5: get_image

 function get_image($num)
 {
     // used variables
     $url = false;
     $output = '';
     // select the proper image function
     if ($this->mode == 'com_content') {
         // load necessary com_content View class
         if (!class_exists('NSP_GK5_com_content_View')) {
             require_once JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_content/view');
         }
         // generate the com_content image URL only
         $url = NSP_GK5_com_content_View::image($this->parent->config, $this->parent->content[$num], true, true);
     } else {
         if ($this->mode == 'com_k2') {
             // load necessary k2 View class
             if (!class_exists('NSP_GK5_com_k2_View')) {
                 require_once JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_k2/view');
             }
             // generate the K2 image URL only
             $url = NSP_GK5_com_k2_View::image($this->parent->config, $this->parent->content[$num], true, true);
         }
     }
     // check if the URL exists
     if ($url === FALSE) {
         return false;
     } else {
         // if URL isn't blank - return it!
         if ($url != '') {
             return $url;
         } else {
             return false;
         }
     }
 }
開發者ID:Roma48,項目名稱:abazherka_old,代碼行數:35,代碼來源:controller.php

示例6: doExecute

 /**
  * Entry point for CLI script
  *
  * @return  void
  *
  * @since   3.0
  */
 public function doExecute()
 {
     $response = new stdClass();
     $response->needsOtp = 'false';
     $response->form = "";
     // Session check
     if (JSession::checkToken('POST')) {
         $db = JFactory::getDbo();
         // Check if TFA is enabled. If not, just return false
         $query = $db->getQuery(true)->select('COUNT(*)')->from('#__extensions')->where('enabled=' . $db->q(1))->where('folder=' . $db->q('twofactorauth'));
         $db->setQuery($query);
         $tfaCount = $db->loadResult();
         if ($tfaCount > 0) {
             $username = JRequest::getVar('u', '', 'POST', 'username');
             $query = $db->getQuery(true)->select('id, password, otpKey')->from('#__users')->where('username=' . $db->q($username));
             $db->setQuery($query);
             $result = $db->loadObject();
             if ($result && $result->otpKey != '') {
                 //jimport('sourcecoast.utilities');
                 //SCStringUtilities::loadLanguage('mod_sclogin');
                 JFactory::getLanguage()->load('mod_sclogin');
                 //$password = JRequest::getString('p', '', 'POST', JREQUEST_ALLOWRAW);
                 //if (JUserHelper::verifyPassword($password, $result->password, $result->id))
                 //{
                 $response->needsOtp = 'true';
                 ob_start();
                 require JModuleHelper::getLayoutPath('mod_sclogin', 'otp');
                 $response->form = ob_get_clean();
                 //}
             }
         }
     }
     echo json_encode($response);
     exit;
 }
開發者ID:q0821,項目名稱:esportshop,代碼行數:42,代碼來源:otpcheck.php

示例7: __construct

 public function __construct($params)
 {
     static $cssadded = false;
     require_once KUNENA_PATH_LIB . DS . 'kunena.link.class.php';
     require_once KUNENA_PATH_LIB . DS . 'kunena.image.class.php';
     require_once KUNENA_PATH_LIB . DS . 'kunena.timeformat.class.php';
     require_once KUNENA_PATH_FUNCS . DS . 'latestx.php';
     require_once JPATH_ADMINISTRATOR . '/components/com_kunena/libraries/html/parser.php';
     $this->kunena_config = KunenaFactory::getConfig();
     $this->myprofile = KunenaFactory::getUser();
     // load Kunena main language file so we can leverage langaueg strings from it
     KunenaFactory::loadLanguage();
     // Initialize session
     $session = KunenaFactory::getSession();
     $session->updateAllowedForums();
     $this->document = JFactory::getDocument();
     $kloadcss = $params->get('kunena_load_css');
     if ($cssadded == false && $kloadcss) {
         $this->document->addStyleSheet(JURI::root() . 'modules/mod_kunenalatest/tmpl/css/kunenalatest.css');
         $cssadded = true;
     }
     $this->latestdo = null;
     if ($params->get('choosemodel') != 'latest') {
         $this->latestdo = $params->get('choosemodel');
     }
     $this->params = $params;
     $this->ktemplate = KunenaFactory::getTemplate();
     $this->klistpost = modKunenaLatestHelper::getKunenaLatestList($params);
     $this->topic_ordering = modKunenaLatestHelper::getTopicsOrdering($this->myprofile, $this->kunena_config);
     require JModuleHelper::getLayoutPath('mod_kunenalatest');
 }
開發者ID:vuchannguyen,項目名稱:hoctap,代碼行數:31,代碼來源:class.php

示例8: renderItem

 function renderItem(&$item, &$params, &$access)
 {
     global $mainframe;
     $user =& JFactory::getUser();
     $item->text = $item->introtext;
     $item->groups = '';
     $item->readmore = trim($item->fulltext) != '';
     $item->metadesc = '';
     $item->metakey = '';
     $item->access = '';
     $item->created = '';
     $item->modified = '';
     if ($params->get('readmore') || $params->get('link_titles')) {
         if ($params->get('intro_only')) {
             // Check to see if the user has access to view the full article
             if ($item->access <= $user->get('aid', 0)) {
                 $linkOn = ContentHelperRoute::getArticleRoute($item->slug, $item->catslug);
             } else {
                 $linkOn = JRoute::_('index.php?option=com_user&task=register');
             }
         }
         $item->linkOn = $linkOn;
     }
     $results = $mainframe->triggerEvent('onAfterDisplayTitle', array(&$item, &$params, 1));
     $item->afterDisplayTitle = trim(implode("\n", $results));
     $results = $mainframe->triggerEvent('onBeforeDisplayContent', array(&$item, &$params, 1));
     $item->beforeDisplayContent = trim(implode("\n", $results));
     require JModuleHelper::getLayoutPath('mod_yoo_drawer', '_item');
 }
開發者ID:janssit,項目名稱:www.kadulleke.be,代碼行數:29,代碼來源:helper.php

示例9: display

 function display()
 {
     $this->stats = $this->getStats();
     require JModuleHelper::getLayoutPath('mod_kunenastats');
     $this->document = JFactory::getDocument();
     $this->document->addStyleSheet(JURI::root() . 'modules/mod_kunenastats/tmpl/css/kunenastats.css');
 }
開發者ID:vuchannguyen,項目名稱:hoctap,代碼行數:7,代碼來源:class.php

示例10: sendMail

 /**
  * Send email whith user data from form
  *
  * @param   array  $params An object containing the module parameters
  *
  * @access public
  */
 public static function sendMail($params)
 {
     $sender = $params->get('sender');
     $recipient = $params->get('recipient');
     $subject = $params->get('subject');
     // Getting the site name
     $sitename = JFactory::getApplication()->get('sitename');
     // Getting user form data-------------------------------------------------
     $name = JFilterInput::getInstance()->clean(JRequest::getVar('name'));
     $phone = JFilterInput::getInstance()->clean(JRequest::getVar('phone'));
     $email = JFilterInput::getInstance()->clean(JRequest::getVar('email'));
     $message = JFilterInput::getInstance()->clean(JRequest::getVar('message'));
     // Set the massage body vars
     $nameLabel = JText::_('MOD_JCALLBACK_FORM_NAME_LABEL_VALUE');
     $phoneLabel = JText::_('MOD_JCALLBACK_FORM_PHONE_LABEL_VALUE');
     $emailLabel = JText::_('MOD_JCALLBACK_FORM_EMAIL_LABEL_VALUE');
     $messageLabel = JText::_('MOD_JCALLBACK_FORM_MESSAGE_LABEL_VALUE');
     $emailLabel = $email ? "<b>{$emailLabel}:</b> {$email}" : "";
     $messageLabel = $message ? "<b>{$messageLabel}:</b> {$message}" : "";
     // Get the JMail ogject
     $mailer = JFactory::getMailer();
     // Set JMail object params------------------------------------------------
     $mailer->setSubject($subject);
     $params->get('useSiteMailfrom') ? $mailer->setSender(JFactory::getConfig()->get('mailfrom')) : $mailer->setSender($sender);
     $mailer->addRecipient($recipient);
     // Get the mail message body
     require JModuleHelper::getLayoutPath('mod_jcallback', 'default_email_message');
     $mailer->isHTML(true);
     $mailer->Encoding = 'base64';
     $mailer->setBody($body);
     $mailer->Send();
     // The mail sending errors will be shown in the Joomla Warning Message from JMail object..
 }
開發者ID:WhiskeyMan-Tau,項目名稱:JCallback,代碼行數:40,代碼來源:helper.php

示例11: _display

 protected function _display()
 {
     $this->type = $this->params->get('type', 'general');
     $this->items = (int) $this->params->get('items', 5);
     $this->stats_link = $this->_getStatsLink(JText::_('MOD_KUNENASTATS_LINK'), JText::_('MOD_KUNENASTATS_LINK'));
     $this->stats = $this->getStats();
     require JModuleHelper::getLayoutPath('mod_kunenastats');
 }
開發者ID:ZerGabriel,項目名稱:Kunena-Addons,代碼行數:8,代碼來源:class.php

示例12: submitAction

 public function submitAction()
 {
     $recipientEmail = $this->params->get('email', '');
     $post = JRequest::get('post');
     $post["username"] = $post["name"];
     $subject = $post["src_title"];
     $body = $this->renderpart(JModuleHelper::getLayoutPath(self::$moduleName, 'email'), $post, true);
     JUTility::sendMail($post["email"], $post["name"], $recipientEmail, $subject, $body, true);
     print "ok";
     jexit();
 }
開發者ID:rivetweb,項目名稱:old-joomla-lp-ecwid,代碼行數:11,代碼來源:helper.php

示例13: renderEmphasis

 function renderEmphasis(&$review)
 {
     $Pro_Item = modEmphasisNewsHelper::GetItemId($review);
     $link = JRoute::_("index.php?option=com_u_re&controller=projects&Itemid=" . $Pro_Item . "&task=view&id=" . $review->id);
     if (file_exists('images/project/' . $review->id . '/preview.jpg')) {
         $review->image = "images/project/" . $review->id . "/preview.jpg";
     } else {
         $review->image = "images/noimage.jpg";
     }
     require JModuleHelper::getLayoutPath('mod_jea_newsfp', '_emphasis');
 }
開發者ID:omarmm,項目名稱:MangLuoiBDS,代碼行數:11,代碼來源:helper.php

示例14: _display

 protected function _display()
 {
     $this->ksearch_button = $this->params->get('ksearch_button', '');
     $this->ksearch_button_pos = $this->params->get('ksearch_button_pos', 'right');
     $this->ksearch_button_txt = $this->params->get('ksearch_button_txt', JText::_('Search'));
     $this->ksearch_width = intval($this->params->get('ksearch_width', 20));
     $this->ksearch_maxlength = $this->ksearch_width > 20 ? $this->ksearch_width : 20;
     $this->ksearch_txt = $this->params->get('ksearch_txt', JText::_('Search...'));
     $this->ksearch_moduleclass_sfx = $this->params->get('moduleclass_sfx', '');
     $this->url = KunenaRoute::_('index.php?option=com_kunena');
     require JModuleHelper::getLayoutPath('mod_kunenasearch');
 }
開發者ID:anawu2006,項目名稱:PeerLearning,代碼行數:12,代碼來源:class.php

示例15: display

 function display()
 {
     $this->list = KunenaMenuHelper::getList($this->parameters);
     $this->app = JFactory::getApplication();
     $this->menu = $this->app->getMenu();
     $this->active = $this->menu->getActive();
     $this->active_id = isset($this->active) ? $this->active->id : $this->menu->getDefault()->id;
     $this->path = isset($this->active) ? $this->active->tree : array();
     $this->showAll = $this->parameters->get('showAllChildren');
     $this->class_sfx = htmlspecialchars($this->parameters->get('class_sfx'));
     if (count($this->list)) {
         require JModuleHelper::getLayoutPath('mod_kunenamenu', $this->parameters->get('layout', 'default'));
     }
 }
開發者ID:laiello,項目名稱:senluonirvana,代碼行數:14,代碼來源:class.php


注:本文中的JModuleHelper::getLayoutPath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。