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


PHP CKunenaLink::GetThreadLink方法代码示例

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


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

示例1: ceil

        $threadPages = ceil($message->msgcount / $this->config->messages_per_page);
        $unreadPage = ceil($curMessageNo / $this->config->messages_per_page);
        if ($message->attachments) {
            echo CKunenaTools::showIcon('ktopicattach', JText::_('COM_KUNENA_ATTACH'));
        }
        ?>
				<div class="ktopic-title-cover">
					<?php 
        echo CKunenaLink::GetThreadLink('view', intval($message->catid), intval($message->id), KunenaParser::parseText($message->subject, 30), KunenaParser::stripBBCode($message->message), 'follow', 'ktopic-title km');
        ?>
				</div>
			</td>

			<td class="kcol-mid ktopictittle">
				<?php 
        echo CKunenaLink::GetThreadLink('view', intval($firstpost->catid), intval($firstpost->id), KunenaParser::parseText($firstpost->subject, 20), KunenaParser::stripBBCode($firstpost->message), 'follow', 'ktopic-title km');
        ?>
				<?php 
        if ($message->favcount) {
            if ($message->myfavorite) {
                echo CKunenaTools::showIcon('kfavoritestar', JText::_('COM_KUNENA_FAVORITE'));
            } else {
                echo CKunenaTools::showIcon('kfavoritestar-grey', JText::_('COM_KUNENA_FAVORITE'));
            }
        }
        ?>
				<?php 
        if ($message->unread) {
            echo CKunenaLink::GetThreadPageLink('view', intval($message->catid), intval($message->id), $unreadPage, intval($this->config->messages_per_page), '<sup class="knewchar">&nbsp;(' . intval($message->unread) . ' ' . JText::_('COM_KUNENA_A_GEN_NEWCHAR') . ')</sup>', intval($message->lastread));
        }
        if ($message->locked != 0) {
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:31,代码来源:posts.php

示例2: showPlugin


//.........这里部分代码省略.........
			// Find the real topic
			$query = "SELECT {$this->_db->quote($row->id)} AS content_id, t.id AS thread_id, m.id AS mesid, t.thread, t.time
				FROM #__kunena_messages AS m
				LEFT JOIN #__kunena_messages AS t ON t.id = m.thread
				WHERE m.id = {$this->_db->quote($thread)}";
			$this->_db->setQuery ( $query );
			$result = $this->_db->loadObject ();
			CKunenaTools::checkDatabaseError ();

			if ( !is_object($result) ) {
				$this->createReference ( $row, $thread );
				$this->debug ( "showPlugin: First hit to Custom Topic, created cross reference to topic {$thread}" );
			} else {
				$this->debug ( "showPlugin: First hit to Custom Topic, cross reference not created to topic {$thread} because it exist already" );
			}
		} else if (! is_object($result) ) {
			$thread = 0;
			$create = $this->params->get ( 'create', 0 );
			$createTime = $this->params->get ( 'create_time', 0 )*604800; // Weeks in seconds
			if ($createTime && $published+$createTime < $now) {
				$this->debug ( "showPlugin: Topic creation time expired, cannot start new discussion anymore" );
				return '';
			}
			if ($create) {
				$thread = $this->createTopic ( $row, $catid, $subject );
				$this->debug ( "showPlugin: First hit, created new topic {$thread} into forum" );
			}
		} else {
			$thread = $result->thread_id;
			$this->debug ( "showPlugin: Topic {$thread} exists in the forum" );
		}

		// Do we allow answers into the topic?
		$closeTime = $this->params->get ( 'close_time', 0 ) * 604800; // Weeks in seconds or 0
		if ($closeTime) {
			$this->debug ( "showPlugin: Check if topic is closed" );
			if ($result) {
				$closeReason = $this->params->get ( 'close_reason', 0 );
				if ($closeReason) {
					// Close topic by last post time
					$query = "SELECT MAX(time)
						FROM #__kunena_messages
						WHERE thread = {$this->_db->quote($result->thread)}";
					$this->_db->setQuery ( $query );
					$closeTime = $this->_db->loadResult () + $closeTime;
					CKunenaTools::checkDatabaseError ();
					$this->debug ( "showPlugin: Close time by last post" );
				} else {
					// Close topic by cration time
					$closeTime = $result->time + $closeTime;
					$this->debug ( "showPlugin: Close time by topic creation" );
				}
			} else {
				$closeTime = $now;
			}
		}

		if ($linkOnly && $thread) {
			$this->debug ( "showPlugin: Link only" );

			$sql = "SELECT COUNT(*) FROM #__kunena_messages WHERE hold=0 AND parent!=0 AND thread={$this->_db->quote($thread)}";
			$this->_db->setQuery ( $sql );
			$postCount = $this->_db->loadResult ();
			CKunenaTools::checkDatabaseError ();
			$linktitle = JText::sprintf ( 'PLG_KUNENADISCUSS_DISCUSS_ON_FORUMS', $postCount );
			require_once (KPATH_SITE . '/lib/kunena.link.class.php');
			$link = CKunenaLink::GetThreadLink ( 'view', $catid, $thread, $linktitle, $linktitle );
			return '<div class="kunenadiscuss">' . $link . '</div>';
		}

		// ************************************************************************
		// Process the QuickPost form

		$quickPost = '';
		if (!$plgShowForm) {
			$this->debug ( "showPlugin: Form has been disabled" );
		} elseif (!$closeTime || $closeTime >= $now) {
			$canPost = $this->canPost ( $catid, $thread );
			if ($canPost && JRequest::getInt ( 'kdiscussContentId', 0, 'POST' ) == $row->id) {
				$this->debug ( "showPlugin: Reply topic!" );
				$quickPost .= $this->replyTopic ( $row, $catid, $thread, $subject );
			} else {
				$quickPost .= $this->showForm ( $row, $catid, $thread, $subject );
			}
		}

		// This will be used all the way through to tell users how many posts are in the forum.
		$content = $this->showTopic ( $catid, $thread );

		if (!$content && !$quickPost) {
			return '';
		}
		if ($formLocation) {
			$content = '<div class="kunenadiscuss">' . $content . '<br />' . $quickPost . '</div>';
		} else {
			$content = '<div class="kunenadiscuss">' . $quickPost . "<br />" . $content . '</div>';
		}

		return $content;
	}
开发者ID:rich20,项目名称:plg_kunenadiscuss,代码行数:101,代码来源:kunenadiscuss.php

示例3: kunena_htmlspecialchars

                            <td class = "td-2">
                                <?php 
            echo CKunenaLink::GetSimpleLink($id);
            ?>

                                <img src = "<?php 
            echo KUNENA_URLEMOTIONSPATH;
            ?>
arrow.gif" alt = "emo"/>
                            </td>

                            <td class = "td-3">
                                <div class = "fb-topic-title-cover">
                                    <?php 
            echo CKunenaLink::GetThreadLink('view', $newURLParams['catid'], $newURLParams['id'], kunena_htmlspecialchars(stripslashes($leaf->subject)), kunena_htmlspecialchars(stripslashes($leaf->subject)), 'follow', 'fb-topic-title fbm');
            ?>
                                </div>




                        <?php 
        }
        ?>

                        <div class="fbs">
                        <!-- By -->

        <span class="topic_posted_time"><?php 
        echo _KUNENA_POSTED_AT;
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:30,代码来源:flat.php

示例4: defined

<?php

/**
 * @version $Id$
 * Kunena Discuss Plug-in
 * @package Kunena Discuss
 *
 * @Copyright (C) 2010-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('');
?>
<div class="kdiscuss-title"><?php 
echo CKunenaLink::GetThreadLink('view', $this->catid, $this->thread, JText::_('PLG_KUNENADISCUSS_POSTS'), JText::_('PLG_KUNENADISCUSS_POSTS'), 'follow');
?>
</div>

<?php 
foreach ($this->messages as $message) {
    if ($message->parent) {
        $this->displayMessage($message);
    }
}
?>
<div class="kdiscuss-more"><?php 
echo CKunenaLink::GetThreadLink('view', $this->catid, $this->thread, JText::_('COM_KUNENA_ANN_READMORE'), JText::_('COM_KUNENA_ANN_READMORE'), 'follow');
?>
</div>
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:29,代码来源:view.php

示例5: loadTopPolls

	public function loadTopPolls($limit=0) {
		$limit = $limit ? $limit : $this->_config->poppollscount;
		if (count($this->topPolls) < $limit) {
			$query = "SELECT m.*, poll.*, SUM(opt.votes) AS count
					FROM #__kunena_polls_options AS opt
					INNER JOIN #__kunena_polls AS poll ON poll.id=opt.pollid
					LEFT JOIN #__kunena_messages AS m ON poll.threadid=m.id
					GROUP BY pollid
					ORDER BY count DESC";
			$this->_db->setQuery($query, 0, $limit);
			$this->topPolls = $this->_db->loadObjectList();
			KunenaError::checkDatabaseError();
			$top = reset($this->topPolls);
			if (empty($top->count)){
				$this->topPolls = array();
				return;
			}
			foreach ($this->topPolls as $item) {
				$item->link = CKunenaLink::GetThreadLink( 'view', $item->catid, $item->id, KunenaHtmlParser::parseText ($item->subject), '' );
				$item->percent = round(100 * $item->count / $top->count);
			}
			$top->title = JText::_('COM_KUNENA_STAT_TOP') .' '. $limit .' '. JText::_('COM_KUNENA_STAT_POPULAR') .' '. JText::_('COM_KUNENA_STAT_POPULAR_POLLS_KGSG');
			$top->titleName = JText::_('COM_KUNENA_POLL_STATS_NAME');
			$top->titleCount =  JText::_('COM_KUNENA_USRL_VOTES');
		}
		return array_slice($this->topPolls, 0, $limit);
	}
开发者ID:rich20,项目名称:Kunena,代码行数:27,代码来源:statistics.php

示例6: elseif

		<?php 
            }
            ?>

	<?php 
        } elseif ($this->type == 'polls') {
            ?>
		<?php 
            foreach ($this->stats as $stat) {
                ?>
		<tr class="krow<?php 
                echo ($i ^= 1) + 1;
                ?>
">
			<td class="kcol-first"><?php 
                echo CKunenaLink::GetThreadLink('view', $stat->catid, $stat->threadid, JString::substr(htmlspecialchars($stat->title), '0', $this->params->get('titlelength')), $stat->title);
                ?>
</td>
			<td class="kcol-last"><span class="kstats-hits-bg"><span class="kstats-hits" style="width:<?php 
                echo $this->getBarWidth($stat->total);
                ?>
%;"><?php 
                echo CKunenaTools::formatLargeNumber($stat->total, 3);
                ?>
</span></span></td>
		</tr>
		<?php 
            }
            ?>

	<?php 
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:default.php

示例7: if

		</tr>
		<?php if (empty($this->stats)) : ?>
		<tr class="krow<?php echo ($i^=1)+1;?>"><td><?php echo JText::_('MOD_KUNENASTATS_NO_ITEMS'); ?></td></tr>
		<?php else : ?>
	<?php if ( $this->type == 'topics' ) : ?>
		<?php foreach ( $this->stats as $stat) : ?>
		<tr class="krow<?php echo ($i^=1)+1;?>">
			<td class="kcol-first"><?php echo CKunenaLink::GetThreadLink('view', $stat->catid, $stat->thread, JString::substr ( htmlspecialchars ($stat->subject), '0', $this->params->get ( 'titlelength' ) ), htmlspecialchars ($stat->subject) ); ?></td>
			<td class="kcol-last"><span class="kstats-hits-bg"><span class="kstats-hits" style="width:<?php echo $this->getBarWidth($stat->hits);?>%;"><?php echo CKunenaTools::formatLargeNumber($stat->hits, 3);?></span></span></td>
		</tr>
		<?php endforeach; ?>

	<?php elseif ( $this->type == 'polls' ) : ?>
		<?php foreach ( $this->stats as $stat) : ?>
		<tr class="krow<?php echo ($i^=1)+1;?>">
			<td class="kcol-first"><?php echo CKunenaLink::GetThreadLink('view', $stat->catid, $stat->threadid, JString::substr ( htmlspecialchars ($stat->title), '0', $this->params->get ( 'titlelength' ) ), $stat->title); ?></td>
			<td class="kcol-last"><span class="kstats-hits-bg"><span class="kstats-hits" style="width:<?php echo $this->getBarWidth($stat->total);?>%;"><?php echo CKunenaTools::formatLargeNumber($stat->total, 3);?></span></span></td>
		</tr>
		<?php endforeach; ?>

	<?php elseif ( $this->type == 'posters' ) : ?>
		<?php foreach ( $this->stats as $stat) : ?>
		<tr class="krow<?php echo ($i^=1)+1;?>">
			<td class="kcol-first"><?php echo CKunenaLink::GetProfileLink($stat->userid, JString::substr ( htmlspecialchars ($stat->username), '0', $this->params->get ( 'titlelength' ) )); ?></td>
			<td class="kcol-last"><span class="kstats-hits-bg"><span class="kstats-hits" style="width:<?php echo $this->getBarWidth($stat->posts);?>%;"><?php echo CKunenaTools::formatLargeNumber($stat->posts, 3);?></span></span></td>
		</tr>
		<?php endforeach; ?>

	<?php elseif ( $this->type == 'profiles' ) : ?>
		<?php foreach ( $this->stats as $stat) : ?>
		<tr class="krow<?php echo ($i^=1)+1;?>">
开发者ID:rich20,项目名称:mod_kunenastats,代码行数:31,代码来源:default.php

示例8: foreach

					<?php 
        foreach ($this->toppolls as $toppoll) {
            $k = 1 - $k;
            if (intval($toppoll->total) == $this->toppollvotes) {
                $barwidth = 100;
            } else {
                $barwidth = round(intval($toppoll->total) * 100 / $this->toppollvotes);
            }
            ?>
					<tr class = "k<?php 
            echo $this->escape($tabclass[$k]);
            ?>
">
						<td class="kcol-first">
							<?php 
            echo CKunenaLink::GetThreadLink('view', intval($toppoll->catid), intval($toppoll->threadid), $this->escape($toppoll->title), '');
            ?>
						</td>
						<td class="kcol-mid">
							<img class = "kstats-bar" src = "<?php 
            echo KUNENA_TMPLTMAINIMGURL . 'images/bar.png';
            ?>
" alt = "" height = "10" width = "<?php 
            echo intval($barwidth);
            ?>
%"/>
						</td>
						<td class="kcol-last">
							<?php 
            echo intval($toppoll->total);
            ?>
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:stats.php

示例9: kunena_htmlspecialchars

                    echo '</font></div>';
                }
            }
            echo "</td>";
            echo " <td class=\"td-3  fbm\" align=\"center\" >{$numtopics}</td>";
            echo " <td class=\"td-4  fbm\" align=\"center\" >{$numreplies}</td>";
            if ($numtopics != 0) {
                ?>

                        <td class = "td-5" align="left">
                            <div class = "<?php 
                echo $boardclass;
                ?>
latest-subject fbm">
                                <?php 
                echo CKunenaLink::GetThreadLink('view', $latestcatid, $latestthread, kunena_htmlspecialchars(stripslashes($latestsubject)), kunena_htmlspecialchars(stripslashes($latestsubject)), $rel = 'nofollow');
                ?>
                            </div>

                            <div class = "<?php 
                echo $boardclass;
                ?>
latest-subject-by  fbs">
<?php 
                echo _GEN_BY;
                ?>

                                <?php 
                echo CKunenaLink::GetProfileLink($fbConfig, $latestuserid, $latestname, $rel = 'nofollow');
                ?>
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:30,代码来源:fb_sub_category_list.php

示例10: defined

<?php
/**
 * @version $Id$
 * Kunena Discuss Plug-in
 * @package Kunena Discuss
 *
 * @Copyright (C) 2010-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 ( '' );
?>
<div class="kdiscuss-title"><?php echo CKunenaLink::GetThreadLink ( 'view', $this->catid, $this->thread, JText::_('PLG_KUNENADISCUSS_POSTS'), 'follow') ?></div>

<?php
foreach ( $this->messages as $message ) {
	if ($message->parent) $this->displayMessage($message);
}
?>
<div class="kdiscuss-more"><?php echo CKunenaLink::GetThreadLink ( 'view', $this->catid, $this->thread, JText::_('COM_KUNENA_ANN_READMORE'), 'follow') ?></div>
开发者ID:rich20,项目名称:plg_kunenadiscuss,代码行数:20,代码来源:view.php

示例11: intval

		<?php 
            echo $this->ktemplate->getTopicIcon($item);
            ?>
		</li>
		<?php 
        }
        ?>
		<li class="klatest-subject">
		<?php 
        if ($this->params->get('sh_sticky')) {
            if ($item->ordering) {
                echo '<img src="' . JURI::root() . 'modules/mod_kunenalatest/tmpl/images/sticky.png" alt="' . JText::_('MOD_KUNENALATEST_STICKY_TOPIC') . '" title="' . JText::_('MOD_KUNENALATEST_STICKY_TOPIC') . '" />';
            }
        }
        if ($this->params->get('choosemodel') != 'latestposts' && $this->params->get('choosemodel') != 'latesttopics') {
            echo CKunenaLink::GetThreadLink('view', $item->catid, $item->id, JString::substr(htmlspecialchars($item->subject), '0', $this->params->get('titlelength')), JString::substr(htmlspecialchars(KunenaParser::stripBBCode($item->message)), '0', $this->params->get('messagelength')), 'follow');
        } else {
            if ($this->topic_ordering == 'ASC') {
                echo CKunenaLink::GetThreadPageSpecialLink('view', intval($item->catid), intval($item->thread), $threadPages, intval($this->kunena_config->messages_per_page), JString::substr(htmlspecialchars($item->subject), '0', $this->params->get('titlelength')), intval($item->id), '', '', JString::substr(htmlspecialchars(KunenaParser::stripBBCode($item->message)), '0', $this->params->get('messagelength')));
            } else {
                echo CKunenaLink::GetThreadPageSpecialLink('view', intval($item->catid), intval($item->thread), 1, intval($this->kunena_config->messages_per_page), JString::substr(htmlspecialchars($item->subject), '0', $this->params->get('titlelength')), intval($item->id), '', '', JString::substr(htmlspecialchars(KunenaParser::stripBBCode($item->message)), '0', $this->params->get('messagelength')));
            }
        }
        if ($item->unread) {
            echo '<sup class="knewchar">(' . JText::_($this->params->get('unreadindicator')) . ")</sup>";
        }
        if ($this->params->get('sh_favorite')) {
            if ($item->favcount) {
                if ($item->myfavorite) {
                    echo '<img class="favoritestar" src="' . $this->ktemplate->getImagePath('icons/favoritestar.png') . '"  alt="' . JText::_('MOD_KUNENALATEST_FAVORITE') . '" title="' . JText::_('MOD_KUNENALATEST_FAVORITE') . '" />';
                } else {
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:default.php

示例12: intval

?>
								</ul>
								<input type="hidden" name="kpoll-id" value="<?php 
echo intval($this->id);
?>
">
								<?php 
echo JHTML::_('form.token');
?>
							</fieldset>
							<div class="kpoll-btns">
								<input id="kpoll-button-vote" class="kbutton ks" type="submit" value="<?php 
echo JText::_('COM_KUNENA_POLL_BUTTON_VOTE');
?>
" />
								<?php 
echo '	' . CKunenaLink::GetThreadLink('view', intval($this->catid), intval($this->id), JText::_('COM_KUNENA_POLL_NAME_URL_RESULT'), JText::_('COM_KUNENA_POLL_NAME_URL_RESULT'), 'follow');
?>
							</div>
							<input type="hidden" id="kpollvotejsonurl" value="<?php 
echo CKunenaLink::GetJsonURL($json_action, '', true);
?>
" />
						</form>
					</div>
				</td>
			</tr>
	</table>
		</div>
	</div>
</div>
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:pollvote.php


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