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


PHP CKunenaTools::loadTemplate方法代码示例

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


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

示例1: display

 function display()
 {
     if (!$this->allow) {
         echo JText::_('COM_KUNENA_NO_ACCESS');
         return;
     }
     if ($this->func == 'mylatest') {
         $this->getMyLatest();
     } else {
         if ($this->func == 'latestposts') {
             $this->getLatestPosts();
         } else {
             if ($this->func == 'latesttopics') {
                 $this->getLatestTopics();
             } else {
                 if ($this->func == 'noreplies') {
                     $this->getNoReplies();
                 } else {
                     if ($this->func == 'subscriptions') {
                         $this->getSubscriptions();
                     } else {
                         if ($this->func == 'catsubscriptions') {
                             $this->getCategoriesSubscriptions();
                         } else {
                             if ($this->func == 'favorites') {
                                 $this->getFavorites();
                             } else {
                                 if ($this->func == 'userposts') {
                                     $this->getUserPosts();
                                 } else {
                                     if ($this->func == 'owntopics') {
                                         $this->getOwnTopics();
                                     } else {
                                         if ($this->func == 'saidthankyouposts') {
                                             $this->getSaidThankYouPosts();
                                         } else {
                                             if ($this->func == 'gotthankyouposts') {
                                                 $this->getGotThankYouPosts();
                                             } else {
                                                 if ($this->func == 'unapproved') {
                                                     $this->getUnapprovedPosts();
                                                 } else {
                                                     if ($this->func == 'deleted') {
                                                         $this->getDeletedPosts();
                                                     } else {
                                                         $this->getLatest();
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     if (!$this->allow) {
         echo JText::_('COM_KUNENA_NO_ACCESS');
         return;
     }
     //meta description and keywords
     $metaKeys = $this->header . kunena_htmlspecialchars(", {$this->config->board_title}, ") . $this->app->getCfg('sitename');
     $metaDesc = $this->header . kunena_htmlspecialchars(" ({$this->page}/{$this->totalpages}) - {$this->config->board_title}");
     $cur = $this->document->get('description');
     $metaDesc = $cur . '. ' . $metaDesc;
     $this->document =& JFactory::getDocument();
     $this->document->setMetadata('robots', 'noindex, follow');
     $this->document->setMetadata('keywords', $metaKeys);
     $this->document->setDescription($metaDesc);
     $this->document->setTitle($this->title . ' - ' . $this->config->board_title);
     if (!isset($this->total)) {
         $this->total = 0;
     }
     CKunenaTools::loadTemplate('/threads/latestx.php');
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:78,代码来源:latestx.php

示例2: showForm

 public function showForm()
 {
     if (!$this->reportAllowed()) {
         return false;
     }
     CKunenaTools::loadTemplate('/plugin/report/report.php');
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:7,代码来源:kunena.report.class.php

示例3: displayWhoIsOnline

 public function displayWhoIsOnline()
 {
     CKunenaTools::loadTemplate('/plugin/who/whoisonline.php');
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:4,代码来源:kunena.who.class.php

示例4: displayAttachments

 function displayAttachments($attachments)
 {
     $this->attachments = $attachments;
     CKunenaTools::loadTemplate('/view/message.attachments.php');
 }
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:5,代码来源:post.php

示例5: __construct


//.........这里部分代码省略.........
            // Get the document object.
            $document =& JFactory::getDocument();
            // Set the MIME type for JSON output.
            $document->setMimeEncoding('application/json');
            // Change the suggested filename.
            if ($action != 'uploadfile') {
                JResponse::setHeader('Content-Disposition', 'attachment; filename="kunena.json"');
            }
            $value = JRequest::getVar('value', '');
            JResponse::sendHeaders();
            if ($kunena_config->board_offline && !CKunenaTools::isAdmin()) {
                // when the forum is offline, we don't entertain json requests
                json_encode(array('status' => '0', 'error' => @sprintf(_KUNENA_FORUM_OFFLINE)));
            } else {
                // Generate reponse
                echo $ajaxHelper->generateJsonResponse($action, $do, $value);
            }
            $kunena_app->close();
        }
        if ($kunena_config->board_offline && !CKunenaTools::isAdmin()) {
            // if the board is offline
            echo $kunena_config->offline_message;
        } else {
            if ($kunena_config->regonly && !$kunena_my->id) {
                // if we only allow registered users
                if (file_exists(KUNENA_JTEMPLATEPATH . '/css/kunena.forum-min.css')) {
                    CKunenaTools::addStyleSheet(KUNENA_JTEMPLATEURL . '/css/kunena.forum-min.css');
                } else {
                    CKunenaTools::addStyleSheet(KUNENA_TMPLTCSSURL);
                }
                echo '<div id="Kunena">';
                $this->header = JText::_('COM_KUNENA_LOGIN_NOTIFICATION');
                $this->body = JText::_('COM_KUNENA_LOGIN_FORUM');
                CKunenaTools::loadTemplate('/login.php');
                echo '</div>';
            } else {
                // =======================================================================================
                // Forum is online:
                //intercept the RSS request; we should stop afterwards
                if ($func == 'rss') {
                    require_once JPATH_COMPONENT . '/funcs/rss.php';
                    $feed = new CKunenaRSSView($catid);
                    $feed->display();
                    $kunena_app->close();
                }
                if ($func == 'fb_pdf' || $func == 'pdf') {
                    $httpReferer = JRequest::getVar('HTTP_REFERER', JURI::base(true), 'server');
                    if (KUNENA_JOOMLA_COMPAT == '1.5') {
                        include JPATH_COMPONENT . '/lib/kunena.pdf.php';
                        $kunena_app->close();
                    }
                }
                $format = JRequest::getCmd('format', 'html');
                if ($format != 'html') {
                    echo "Kunena: Unsupported output format {$format}, please use only format=html or .html";
                    $kunena_app->close();
                }
                $integration = KunenaFactory::getProfile();
                $integration->open();
                //time format
                include_once JPATH_COMPONENT . '/lib/kunena.timeformat.class.php';
                $document =& JFactory::getDocument();
                if (file_exists(KUNENA_ABSTMPLTPATH . '/initialize.php')) {
                    require_once KUNENA_ABSTMPLTPATH . '/initialize.php';
                } else {
                    require_once KPATH_SITE . '/template/default/initialize.php';
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:67,代码来源:kunena.php

示例6: display

 public function display()
 {
     switch ($this->do) {
         case 'vote':
             $this->changevote = '';
             CKunenaTools::loadTemplate('/plugin/poll/pollvote.php');
             break;
         case 'changevote':
             $this->changevote = '1';
             CKunenaTools::loadTemplate('/plugin/poll/pollvote.php');
             break;
     }
 }
开发者ID:rich20,项目名称:Kunena-1.6,代码行数:13,代码来源:kunena.poll.class.php

示例7: display

 public function display()
 {
     if ($this->_moderatorProtection()) {
         return false;
     }
     switch ($this->do) {
         case 'modapprove':
             $this->ApproveMessage();
             break;
         case 'moddelete':
             $this->DeleteMessage();
             break;
         default:
             CKunenaTools::loadTemplate('/moderate/moderate_messages.php');
     }
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:16,代码来源:kunena.review.php

示例8: displayEdit

 function displayEdit()
 {
     $user = JFactory::getUser();
     if ($user->id != $this->profile->userid) {
         return;
     }
     CKunenaTools::loadTemplate('/profile/edit.php');
 }
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:8,代码来源:profile.php

示例9: display

 function display()
 {
     if (!$this->allow) {
         echo JText::_('COM_KUNENA_NO_ACCESS');
         return;
     }
     if (empty($this->categories[0])) {
         echo '' . JText::_('COM_KUNENA_GEN_NOFORUMS') . '';
         return;
     }
     CKunenaTools::loadTemplate('/categories/listcat.php');
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:12,代码来源:listcat.php

示例10: display

 function display($redirect = false)
 {
     $this->getView();
     if ($redirect) {
         $this->redirect();
     }
     if (!$this->allow) {
         echo JText::_('COM_KUNENA_NO_ACCESS');
         return;
     }
     if (!$this->first_message) {
         echo JText::_('COM_KUNENA_MODERATION_INVALID_ID');
         return;
     }
     CKunenaTools::loadTemplate("/view/{$this->layout}.php", false, $this->templatepath);
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:16,代码来源:view.php

示例11: defined

 * Kunena Component
 * @package Kunena
 *
 * @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link http://www.kunena.org
 *
 **/
defined('_JEXEC') or die;
JHTML::_('behavior.calendar');
JHTML::_('behavior.tooltip');
?>
<div id="kprofile-rightcoltop">
	<div class="kprofile-rightcol2">
<?php 
CKunenaTools::loadTemplate('/profile/socialbuttons.php');
?>
	</div>
	<div class="kprofile-rightcol1">
		<ul>
			<li><span class="kicon-profile kicon-profile-location"></span><strong><?php 
echo JText::_('COM_KUNENA_MYPROFILE_LOCATION');
?>
:</strong> <?php 
echo $this->locationlink;
?>
</li>
			<!--  The gender determines the suffix on the span class- gender-male & gender-female  -->
			<li><span class="kicon-profile kicon-profile-gender-<?php 
echo $this->genderclass;
?>
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:usertab.php

示例12: show

 /**
  * Display results
  * @param string actionstring
  */
 function show()
 {
     extract($this->params);
     $this->quser = $this->get_searchusername();
     $this->selected = ' selected="selected"';
     $this->checked = ' checked="checked"';
     $this->advsearch_hide = 1;
     if ($this->int_kunena_errornr) {
         $this->advsearch_hide = 0;
     }
     $this->tabclass = array("row1", "row2");
     $searchdatelist = array();
     $searchdatelist[] = JHTML::_('select.option', 'lastvisit', JText::_('COM_KUNENA_SEARCH_DATE_LASTVISIT'));
     $searchdatelist[] = JHTML::_('select.option', '1', JText::_('COM_KUNENA_SEARCH_DATE_YESTERDAY'));
     $searchdatelist[] = JHTML::_('select.option', '7', JText::_('COM_KUNENA_SEARCH_DATE_WEEK'));
     $searchdatelist[] = JHTML::_('select.option', '14', JText::_('COM_KUNENA_SEARCH_DATE_2WEEKS'));
     $searchdatelist[] = JHTML::_('select.option', '30', JText::_('COM_KUNENA_SEARCH_DATE_MONTH'));
     $searchdatelist[] = JHTML::_('select.option', '90', JText::_('COM_KUNENA_SEARCH_DATE_3MONTHS'));
     $searchdatelist[] = JHTML::_('select.option', '180', JText::_('COM_KUNENA_SEARCH_DATE_6MONTHS'));
     $searchdatelist[] = JHTML::_('select.option', '365', JText::_('COM_KUNENA_SEARCH_DATE_YEAR'));
     $searchdatelist[] = JHTML::_('select.option', 'all', JText::_('COM_KUNENA_SEARCH_DATE_ANY'));
     $this->searchdatelist = JHTML::_('select.genericlist', $searchdatelist, 'searchdate', 'class="ks"', 'value', 'text', $this->params['searchdate']);
     $beforeafterlist = array();
     $beforeafterlist[] = JHTML::_('select.option', 'after', JText::_('COM_KUNENA_SEARCH_DATE_NEWER'));
     $beforeafterlist[] = JHTML::_('select.option', 'before', JText::_('COM_KUNENA_SEARCH_DATE_OLDER'));
     $this->beforeafterlist = JHTML::_('select.genericlist', $beforeafterlist, 'beforeafter', 'class="ks"', 'value', 'text', $this->params['beforeafter']);
     $sortbylist = array();
     $sortbylist[] = JHTML::_('select.option', 'title', JText::_('COM_KUNENA_SEARCH_SORTBY_TITLE'));
     //$sortbylist[] 	= JHTML::_('select.option',  'replycount', JText::_('COM_KUNENA_SEARCH_SORTBY_POSTS') );
     $sortbylist[] = JHTML::_('select.option', 'views', JText::_('COM_KUNENA_SEARCH_SORTBY_VIEWS'));
     //$sortbylist[] 	= JHTML::_('select.option',  'threadstart', JText::_('COM_KUNENA_SEARCH_SORTBY_START') );
     $sortbylist[] = JHTML::_('select.option', 'lastpost', JText::_('COM_KUNENA_SEARCH_SORTBY_POST'));
     //$sortbylist[] 	= JHTML::_('select.option',  'postusername', JText::_('COM_KUNENA_SEARCH_SORTBY_USER') );
     $sortbylist[] = JHTML::_('select.option', 'forum', JText::_('COM_KUNENA_SEARCH_SORTBY_FORUM'));
     $this->sortbylist = JHTML::_('select.genericlist', $sortbylist, 'sortby', 'class="ks"', 'value', 'text', $this->params['sortby']);
     $limitlist = array();
     $limitlist[] = JHTML::_('select.option', '5', JText::_('COM_KUNENA_SEARCH_LIMIT5'));
     $limitlist[] = JHTML::_('select.option', '10', JText::_('COM_KUNENA_SEARCH_LIMIT10'));
     $limitlist[] = JHTML::_('select.option', '15', JText::_('COM_KUNENA_SEARCH_LIMIT15'));
     $limitlist[] = JHTML::_('select.option', '20', JText::_('COM_KUNENA_SEARCH_LIMIT20'));
     $this->limitlist = JHTML::_('select.genericlist', $limitlist, 'limit', 'class="ks"', 'value', 'text', $this->limit);
     //category select list
     $options = array();
     $options[] = JHTML::_('select.option', '0', JText::_('COM_KUNENA_SEARCH_SEARCHIN_ALLCATS'));
     $this->categorylist = CKunenaTools::forumSelectList('searchlist', explode(',', $this->params['catids']), $options, 'class="inputbox" size="8" multiple="multiple"', true);
     CKunenaTools::loadTemplate('/search/advsearch.php');
     $this->results = $this->get_results();
     $this->pagination = $this->getPagination($this->func, $this->q, $this->getUrlParams(), floor($this->limitstart / $this->limit) + 1, $this->limit, floor($this->total / $this->limit) + 1, 7);
     if (defined('KUNENA_DEBUG')) {
         echo '<p style="background-color:#FFFFCC;border:1px solid red;">' . $this->str_kunena_errormsg . '</p>';
     }
     $searchlist = $this->get_searchstrings();
     foreach ($this->results as $i => $result) {
         // Clean up subject
         $ressubject = KunenaParser::parseText($result->subject);
         // Strip smiles and bbcode out of search results; they look ugly
         $resmessage = KunenaParser::parseBBCode($result->message);
         foreach ($searchlist as $searchword) {
             if (empty($searchword)) {
                 continue;
             }
             $ressubject = preg_replace("/" . preg_quote($searchword, '/') . "/iu", '<span  class="searchword" >' . $searchword . '</span>', $ressubject);
             // FIXME: enable highlighting, but only after we can be sure that we do not break html
             //$resmessage = preg_replace ( "/" . preg_quote ( $searchword, '/' ) . "/iu", '<span  class="searchword" >' . $searchword . '</span>', $resmessage );
         }
         $this->results[$i]->htmlsubject = $ressubject;
         $this->results[$i]->htmlmessage = $resmessage;
     }
     CKunenaTools::loadTemplate('/search/search.php');
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:74,代码来源:kunena.search.class.php

示例13: display

 function display()
 {
     if (!$this->allow) {
         echo JText::_('COM_KUNENA_NO_ACCESS');
         return;
     }
     CKunenaTools::loadTemplate('/threads/showcat.php');
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:8,代码来源:showcat.php

示例14: displayLoginBox

 function displayLoginBox()
 {
     require_once KUNENA_PATH_LIB . '/kunena.login.php';
     $type = CKunenaLogin::getType();
     if ($type == 'login') {
         CKunenaTools::loadTemplate('/loginbox/login.php');
     } else {
         CKunenaTools::loadTemplate('/loginbox/logout.php');
     }
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:10,代码来源:class.kunena.php

示例15:

						<input id="kupload" class="kfile-input hidden" name="kattachment" type="file" />
					</div>
					<a href="#" class="kattachment-remove kbutton" style="display: none"><?php 
    echo JText::_('COM_KUNENA_GEN_REMOVE_FILE');
    ?>
</a>
					<a href="#" class="kattachment-insert kbutton" style="display: none"><?php 
    echo JText::_('COM_KUNENA_EDITOR_INSERT');
    ?>
</a>
				</div>

				<?php 
    // Include attachments template if we have any
    if (isset($this->attachments)) {
        CKunenaTools::loadTemplate('/editor/attachments.php');
    }
    ?>
			</td>
		</tr>
		<?php 
}
?>

		<?php 
if (!empty($this->cansubscribe)) {
    ?>
		<tr id="kpost-subscribe" class="krow<?php 
    echo 1 + ($this->k ^= 1);
    ?>
">
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:form.php


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