本文整理汇总了PHP中CKunenaLink::GetShowLatestURL方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaLink::GetShowLatestURL方法的具体用法?PHP CKunenaLink::GetShowLatestURL怎么用?PHP CKunenaLink::GetShowLatestURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaLink
的用法示例。
在下文中一共展示了CKunenaLink::GetShowLatestURL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
} else {
$output .= CKunenaLink::GetLatestPageLink($func, $i, 'follow', '', $sel);
}
}
if ($endpage < $totalpages) {
if ($endpage < $totalpages - 1) {
$output .= "...";
}
$output .= CKunenaLink::GetLatestPageLink($func, $totalpages, 'follow', '', $sel);
}
$output .= '</span>';
return $output;
}
if (!$kunena_my->id && $func == "mylatest") {
header("HTTP/1.1 307 Temporary Redirect");
header("Location: " . htmlspecialchars_decode(CKunenaLink::GetShowLatestURL()));
$app->close();
}
require_once KUNENA_PATH_LIB . DS . 'kunena.authentication.php';
//resetting some things:
$lockedForum = 0;
$lockedTopic = 0;
$topicSticky = 0;
if ('' == $sel || !$kunena_my->id && $sel == 0) {
/*
if($kunena_my->id != 0) { $sel="0"; } // Users: show messages after last visit
else { $sel="720"; } // Others: show 1 month as default
*/
$sel = "720";
}
$show_list_time = $sel;
示例2: hasPostPermission
/**
* Checks if a user has postpermission in given thread
* @param database object
* @param int
* @param int
* @param boolean
* @param boolean
*/
function hasPostPermission($kunena_db, $catid, $id, $userid, $pubwrite, $ismod)
{
$fbConfig =& CKunenaConfig::getInstance();
$app =& JFactory::getApplication();
$topicLock = 0;
if ($id != 0) {
$kunena_db->setQuery("SELECT thread FROM #__fb_messages WHERE id='{$id}'");
$topicID = $kunena_db->loadResult();
$lockedWhat = _GEN_TOPIC;
if ($topicID != 0) {
$sql = "SELECT locked FROM #__fb_messages WHERE id='{$topicID}'";
} else {
$sql = "SELECT locked FROM #__fb_messages WHERE id='{$id}'";
}
$kunena_db->setQuery($sql);
$topicLock = $kunena_db->loadResult();
}
if ($topicLock == 0) {
//topic not locked; check if forum is locked
$kunena_db->setQuery("SELECT locked FROM #__fb_categories WHERE id='{$catid}'");
$topicLock = $kunena_db->loadResult();
$lockedWhat = _GEN_FORUM;
}
if (($userid != 0 || $pubwrite) && ($topicLock == 0 || $ismod)) {
return 1;
} else {
//user is not allowed to write a post
if ($topicLock) {
echo "<p align=\"center\">{$lockedWhat} " . _POST_LOCKED . "<br />";
echo _POST_NO_NEW . "<br /><br /></p>";
} else {
$app->enqueueMessage(_POST_NO_PUBACCESS1, 'notice');
$app->enqueueMessage(_POST_NO_PUBACCESS2, 'notice');
$app->redirect(CKunenaLink::GetShowLatestURL());
}
return 0;
}
}