本文整理匯總了PHP中CKunenaLink::GetShowMyLatestLink方法的典型用法代碼示例。如果您正苦於以下問題:PHP CKunenaLink::GetShowMyLatestLink方法的具體用法?PHP CKunenaLink::GetShowMyLatestLink怎麽用?PHP CKunenaLink::GetShowMyLatestLink使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CKunenaLink
的用法示例。
在下文中一共展示了CKunenaLink::GetShowMyLatestLink方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: KUNENA_get_menu
/**
* Function that get the menu used in the header of our board
* @param array $fbConfig
* @param array $fbIcons
* @param int $my_id
* The user id
* @param int $type
* What kind of header do you want to print: 1: default (home/profile/latest posts/faq), 2: extended1 (home/profile/view/pending messages/faq) ,3:extended2 (home/profile/reply/view/pdf/faq)
* @param string $view
* The view the user is currently using, only needs to be pass when type==3 or type==2
* @param int $catid
* Only needs to be passed when type==3 or type==2
* @param int $id
* Only needs to be passed when type==3 or type==2
* @param int $thread
* Only needs to be passed when type==3 or type==2 (well actually just give 0 when type==2)
* @param boolean $is_moderator
* Only needs to be passed when type==2
* @param int $numPending
* Number of pending messages, only needs to be passed when type==2
* @return String $header
* The menu :-)
*/
function KUNENA_get_menu($cbitemid, $fbConfig, $fbIcons, $my_id, $type, $view = "", $catid = 0, $id = 0, $thread = 0, $is_moderator = false, $numPending = 0)
{
$func = strtolower(JRequest::getCmd('func', ''));
if ($func == '') {
switch ($fbConfig->fbdefaultpage) {
case 'recent':
$func = 'latest';
break;
case 'my':
$func = $my_id ? 'mylatest' : 'latest';
break;
default:
$func = 'listcat';
}
}
$header = '<div id="fb_topmenu" ><div id="Kunena_tab"><ul>';
$header .= ' <li ';
if ($func == 'latest' || $func == '') {
$header .= ' class="Kunena_item_active" ';
}
$header .= ' >' . CKunenaLink::GetShowLatestLink('<span>' . (array_key_exists('showlatest', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['showlatest'] . '" border="0" alt="' . _KUNENA_ALL_DISCUSSIONS . '" title="' . _KUNENA_ALL_DISCUSSIONS . '"/>' : _KUNENA_ALL_DISCUSSIONS) . '</span>');
$header .= '</li>';
if ($my_id != 0) {
$header .= ' <li ';
if ($func == 'mylatest') {
$header .= ' class="Kunena_item_active" ';
}
$header .= ' >' . CKunenaLink::GetShowMyLatestLink('<span>' . (array_key_exists('showmylatest', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['showmylatest'] . '" border="0" alt="' . _KUNENA_MY_DISCUSSIONS . '" title="' . _KUNENA_MY_DISCUSSIONS . '"/>' : _KUNENA_MY_DISCUSSIONS) . '</span>');
$header .= '</li>';
}
$header .= '<li ';
if ($func == 'listcat') {
$header .= ' class="Kunena_item_active" ';
}
$header .= ' >' . CKunenaLink::GetCategoryListLink('<span>' . (array_key_exists('home', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['home'] . '" border="0" alt="' . _KUNENA_CATEGORIES . '" title="' . _KUNENA_CATEGORIES . '" />' : _KUNENA_CATEGORIES) . '</span>');
$header .= '</li>';
if ($my_id != 0) {
$header .= ' <li ';
if ($func == 'myprofile') {
$header .= ' class="Kunena_item_active" ';
}
$header .= ' >' . CKunenaLink::GetMyProfileLink($fbConfig, $my_id, '<span>' . (array_key_exists('profile', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['profile'] . '" border="0" alt="' . _GEN_MYPROFILE . '" title="' . _GEN_MYPROFILE . '"/>' : _GEN_MYPROFILE) . '</span>');
$header .= '</li>';
}
switch ($type) {
case 3:
//Threaded view option removed from Kunena
// if ($view == "flat") {
// $header .= '<li>';
// $header .= CKunenaLink::GetViewLink('view', $id, $catid, 'threaded', '<span>'. _GEN_THREADED_VIEW .'</span>');
// $header .= '</li>';
// }
// else
// {
// $header .= '<li>';
// $header .= CKunenaLink::GetViewLink('view', $id, $catid, 'flat', '<span>'. _GEN_FLAT_VIEW .'</span>');
// $header .= '</li>';
// }
break;
case 2:
//Threaded view option removed from Kunena
// if ($view == "flat")
// {
// $header .= '<li>';
// $header .= CKunenaLink::GetViewLink('showcat', $id, $catid, 'threaded', '<span>'. _GEN_THREADED_VIEW .'</span>');
// $header .= '</li>';
// }
// else
// {
// $header .= '<li>';
// $header .= CKunenaLink::GetViewLink('showcat', $id, $catid, 'flat', '<span>'. _GEN_FLAT_VIEW .'</span>');
// $header .= '</li>';
// }
if ($is_moderator) {
if ($numPending > 0) {
$numcolor = '<font color="red">';
$header .= '<li>';
//.........這裏部分代碼省略.........
示例2:
?>
<?php
if ($this->params->get('showprofile')) {
?>
<li class="klogin-myprofile"><?php
echo CKunenaLink::GetProfileLink($this->my->id, JText::_('MOD_KUNENALOGIN_MYPROFILE'));
?>
</li>
<?php
}
?>
<?php
if ($this->params->get('showmyposts')) {
?>
<li class="klogin-mypost"><?php
echo CKunenaLink::GetShowMyLatestLink(JText::_('MOD_KUNENALOGIN_MYPOSTS'));
?>
</li>
<?php
}
?>
<?php
if ($this->params->get('showrecent')) {
?>
<li class="klogin-recent"><?php
echo CKunenaLink::GetShowLatestLink(JText::_('MOD_KUNENALOGIN_RECENT'));
?>
</li>
<?php
}
?>