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


PHP CKunenaTools::showIcon方法代码示例

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


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

示例1: intval

				<div class="ks">
					<!-- Category -->
					<span class="ktopic-category">
						<?php 
        echo JText::_('COM_KUNENA_CATEGORY') . ' ' . CKunenaLink::GetCategoryLink('showcat', intval($message->catid), $this->escape($message->catname));
        ?>
					</span>
					<!-- /Category -->
				</div>
			</td>
			<td class="kcol-mid kcol-ktopiclastpost">
				<div class="klatest-post-info">
					<!--  Sticky   -->
					<?php 
        if ($this->messages[$message->id]->ordering != 0) {
            echo CKunenaTools::showIcon('ktopicsticky', JText::_('COM_KUNENA_GEN_ISSTICKY'));
        }
        ?>
					<!--  /Sticky   -->
					<!-- Avatar -->
					<?php 
        if ($this->config->avataroncat > 0) {
            $profile = KunenaFactory::getUser((int) $this->messages[$message->id]->userid);
            $useravatar = $profile->getAvatarLink('klist-avatar', 'list');
            if ($useravatar) {
                ?>
					<span class="ktopic-latest-post-avatar">
					<?php 
                echo CKunenaLink::GetProfileLink(intval($this->messages[$message->id]->userid), $useravatar);
                ?>
					</span>
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:31,代码来源:posts.php

示例2: displayThreadActions

 function displayThreadActions($location = 0)
 {
     static $locations = array('top', 'bottom');
     $this->goto = '<a name="forum' . $locations[$location] . '"></a>';
     $location ^= 1;
     $this->goto .= CKunenaLink::GetSamePageAnkerLink('forum' . $locations[$location], CKunenaTools::showIcon('kforum' . $locations[$location], JText::_('COM_KUNENA_GEN_GOTO' . $locations[$location])), 'nofollow', 'kbuttongoto');
     CKunenaTools::loadTemplate('/view/thread.actions.php');
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:8,代码来源:view.php

示例3: loadCategories

 function loadCategories()
 {
     if ($this->_loaded) {
         return;
     }
     $this->_loaded = true;
     $catids = array();
     foreach ($this->categories[0] as $cat) {
         $catids[] = $cat->id;
     }
     if (empty($catids)) {
         return;
     }
     $catlist = implode(',', $catids);
     $readlist = $this->session->readtopics;
     if ($this->config->shownew && $this->my->id) {
         $subquery = " (SELECT COUNT(DISTINCT thread) FROM #__kunena_messages AS mmm WHERE c.id=mmm.catid AND mmm.hold='0' AND mmm.time>{$this->db->Quote($this->prevCheck)} AND mmm.thread NOT IN ({$readlist})) AS new";
     } else {
         $subquery = " 0 AS new";
     }
     // TODO: optimize this query (just combined many queries into one)
     $query = "SELECT c.*, m.id AS mesid, m.thread, m.catid, t.subject AS topicsubject, m.subject, m.name AS mname, u.id AS userid, u.username, u.name AS uname,\n\t\t\t(SELECT COUNT(*) FROM #__kunena_messages AS mm WHERE m.thread=mm.thread) AS msgcount, {$subquery}\n\t\t\tFROM #__kunena_categories AS c\n\t\t\tLEFT JOIN #__kunena_messages AS m ON c.id_last_msg=m.id\n\t\t\tLEFT JOIN #__kunena_messages AS t ON m.thread=t.id\n\t\t\tLEFT JOIN #__users AS u ON u.id=m.userid\n\t\t\tWHERE c.parent IN ({$catlist}) AND c.published='1' AND c.id IN({$this->session->allowed}) ORDER BY ordering, name";
     $this->db->setQuery($query);
     $allsubcats = $this->db->loadObjectList();
     if (KunenaError::checkDatabaseError()) {
         return;
     }
     $this->tabclass = array("row1", "row2");
     $subcats = array();
     $routerlist = array();
     $userlist = array();
     $myprofile = KunenaFactory::getUser();
     if ($myprofile->ordering != '0') {
         $topic_ordering = $myprofile->ordering == '1' ? true : false;
     } else {
         $topic_ordering = $this->config->default_sort == 'asc' ? false : true;
     }
     foreach ($allsubcats as $i => $subcat) {
         if ($subcat->mesid) {
             $routerlist[$subcat->thread] = $subcat->subject;
         }
         if ($topic_ordering) {
             $subcat->page = 1;
         } else {
             $subcat->page = ceil($subcat->msgcount / $this->config->messages_per_page);
         }
         if ($this->config->shownew && $this->my->id != 0) {
             if ($subcat->new) {
                 // Check Unread    Cat Images
                 if (is_file(KUNENA_ABSCATIMAGESPATH . $subcat->id . "_on.gif")) {
                     $allsubcats[$i]->htmlCategoryIcon = "<img src=\"" . KUNENA_URLCATIMAGES . $subcat->id . "_on.gif\" border=\"0\" class='kforum-cat-image' alt=\" \" />";
                 } else {
                     $allsubcats[$i]->htmlCategoryIcon = CKunenaTools::showIcon('kunreadforum', JText::_('COM_KUNENA_GEN_FORUM_NEWPOST'));
                 }
             } else {
                 // Check Read Cat Images
                 if (is_file(KUNENA_ABSCATIMAGESPATH . $subcat->id . "_off.gif")) {
                     $allsubcats[$i]->htmlCategoryIcon = "<img src=\"" . KUNENA_URLCATIMAGES . $subcat->id . "_off.gif\" border=\"0\" class='kforum-cat-image' alt=\" \"  />";
                 } else {
                     $allsubcats[$i]->htmlCategoryIcon = CKunenaTools::showIcon('kreadforum', JText::_('COM_KUNENA_GEN_FORUM_NOTNEW'));
                 }
             }
         } else {
             if (is_file(KUNENA_ABSCATIMAGESPATH . $subcat->id . "_notlogin.gif")) {
                 $allsubcats[$i]->htmlCategoryIcon = "<img src=\"" . KUNENA_URLCATIMAGES . $subcat->id . "_notlogin.gif\" border=\"0\" class='kforum-cat-image' alt=\" \" />";
             } else {
                 $allsubcats[$i]->htmlCategoryIcon = CKunenaTools::showIcon('knotloginforum', JText::_('COM_KUNENA_GEN_FORUM_NOTNEW'));
             }
         }
         // collect user ids for avatar prefetch when integrated
         $userlist[intval($subcat->userid)] = intval($subcat->userid);
     }
     require_once KUNENA_PATH . '/router.php';
     KunenaRouter::loadMessages($routerlist);
     $modcats = array();
     foreach ($allsubcats as $subcat) {
         $this->categories[$subcat->parent][] = $subcat;
         $subcats[] = $subcat->id;
         if ($subcat->moderated) {
             $modcats[] = $subcat->id;
         }
     }
     // Get the childforums
     $this->childforums = array();
     if (count($subcats)) {
         $subcatlist = implode(',', $subcats);
         if ($this->config->shownew && $this->my->id) {
             $subquery = " (SELECT COUNT(DISTINCT thread) FROM #__kunena_messages AS m WHERE c.id=m.catid AND m.hold='0' AND m.time>{$this->db->Quote($this->prevCheck)} AND m.thread NOT IN ({$readlist})) AS new";
         } else {
             $subquery = "0 AS new";
         }
         $query = "SELECT c.id, c.name, c.description, c.parent, c.numTopics, c.numPosts, {$subquery}\n\t\t\tFROM #__kunena_categories AS c\n\t\t\tWHERE c.parent IN ({$subcatlist}) AND c.published='1' AND c.id IN({$this->session->allowed}) ORDER BY c.ordering, c.name";
         $this->db->setQuery($query);
         $childforums = $this->db->loadObjectList();
         KunenaError::checkDatabaseError();
         foreach ($childforums as $i => $childforum) {
             //Begin: parent read unread iconset
             if ($this->config->showchildcaticon) {
                 if ($this->config->shownew && $this->my->id != 0) {
                     if ($childforum->new) {
//.........这里部分代码省略.........
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:101,代码来源:listcat.php

示例4:

		</td>
	</tr>
</table>
<!-- F: List Actions -->

<?php 
$this->displayFlat();
?>

<!-- B: List Actions Bottom -->
<table class="klist-actions-bottom" >
	<tr>
		<td class="klist-actions-goto">
			<a name="forumbottom"> </a>
			<?php 
echo CKunenaLink::GetSamePageAnkerLink('forumtop', CKunenaTools::showIcon('kforumtop', JText::_('COM_KUNENA_GEN_GOTOBOTTOM')), 'nofollow', 'kbuttongoto');
?>
		</td>
		<td class="klist-actions-forum">
			<?php 
if (isset($this->forum_new) || isset($this->forum_markread) || isset($this->thread_subscribecat)) {
    echo '<div class="kmessage-buttons-row">';
    if (isset($this->forum_new)) {
        echo $this->forum_new;
    }
    if (isset($this->forum_markread)) {
        echo ' ' . $this->forum_markread;
    }
    if (isset($this->thread_subscribecat)) {
        echo ' ' . $this->thread_subscribecat;
    }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:showcat.php

示例5: __construct


//.........这里部分代码省略.........
                            setcookie('kunena_template', null, time() - 3600, JURI::root(true) . '/');
                        }
                        $kunena_app->redirect(CKunenaLink::GetKunenaURL(false));
                        break;
                    case 'credits':
                        include JPATH_COMPONENT . '/lib/kunena.credits.php';
                        break;
                    default:
                        require_once KUNENA_PATH_FUNCS . '/listcat.php';
                        $page = new CKunenaListcat($catid);
                        $page->display();
                        break;
                }
                if (JDEBUG) {
                    $__profiler->mark('$func End');
                }
                // Bottom Module
                CKunenaTools::showModulePosition('kunena_bottom');
                // PDF and RSS
                if ($kunena_config->enablerss || $kunena_config->enablepdf) {
                    if ($catid > 0) {
                        kimport('category');
                        $category = KunenaCategory::getInstance($catid);
                        if ($category->pub_access == 0 && $category->parent) {
                            $rss_params = '&amp;catid=' . (int) $catid;
                        }
                    } else {
                        $rss_params = '';
                    }
                    if (isset($rss_params) || $kunena_config->enablepdf) {
                        echo '<div class="krss-block">';
                        if ($kunena_config->enablepdf && $func == 'view' && KUNENA_JOOMLA_COMPAT == '1.5') {
                            // FIXME: add better translation:
                            echo CKunenaLink::GetPDFLink($catid, $limit, $limitstart, $id, CKunenaTools::showIcon('kpdf', JText::_('PDF')), 'nofollow', '', JText::_('PDF'));
                        }
                        if ($kunena_config->enablerss && isset($rss_params)) {
                            if ($kunena_config->rss_specification == 'atom1.0') {
                                $rss_specification = 'application/atom+xml';
                            } else {
                                $rss_specification = 'application/rss+xml';
                            }
                            $document->addCustomTag('<link rel="alternate" type="' . $rss_specification . '" title="' . JText::_('COM_KUNENA_LISTCAT_RSS') . '" href="' . CKunenaLink::GetRSSURL($rss_params) . '" />');
                            echo CKunenaLink::GetRSSLink(CKunenaTools::showIcon('krss', JText::_('COM_KUNENA_LISTCAT_RSS')), 'follow', $rss_params);
                        }
                        echo '</div>';
                    }
                }
                $template = KunenaFactory::getTemplate();
                $this->params = $template->params;
                // Credits
                echo '<div class="kcredits kms"> ' . CKunenaLink::GetTeamCreditsLink($catid, JText::_('COM_KUNENA_POWEREDBY')) . ' ' . CKunenaLink::GetCreditsLink();
                if ($this->params->get('templatebyText') != '') {
                    echo ' :: <a href ="' . $this->params->get('templatebyLink') . '" rel="follow">' . $this->params->get('templatebyText');
                    if ($this->params->get('templatebyName')) {
                        echo ' ' . $this->params->get('templatebyName') . '</a>';
                    } else {
                        echo '</a>';
                    }
                }
                echo '</div>';
                // display footer
                // Show total time it took to create the page
                $__ktime = JProfiler::getmicrotime() - $__kstarttime;
                ?>
	<div class="kfooter">
		<span class="kfooter-time"><?php 
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:67,代码来源:kunena.php

示例6: intval

            ?>
			</td>

			<td class="kcol-mid kcol-kcattitle">
			<div class="kthead-title kl">
			<?php 
            // Show new posts, locked, review
            echo CKunenaLink::GetCategoryLink('showcat', intval($category->id), $this->escape($category->name));
            if ($category->new) {
                echo '<sup class="knewchar">(' . intval($category->new) . ' ' . JText::_('COM_KUNENA_A_GEN_NEWCHAR') . ")</sup>";
            }
            if ($category->locked) {
                echo CKunenaTools::showIcon('kforumlocked', JText::_('COM_KUNENA_GEN_LOCKED_FORUM'));
            }
            if ($category->review) {
                echo CKunenaTools::showIcon('kforummoderated', JText::_('COM_KUNENA_GEN_MODERATED'));
            }
            ?>
			</div>

		<?php 
            if (!empty($category->description)) {
                ?>
			<div class="kthead-desc km"><?php 
                echo KunenaParser::parseBBCode($category->description);
                ?>
 </div>
		<?php 
            }
            ?>
		<?php 
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:categories.php


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