本文整理汇总了PHP中CKunenaLink::GetKunenaURL方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaLink::GetKunenaURL方法的具体用法?PHP CKunenaLink::GetKunenaURL怎么用?PHP CKunenaLink::GetKunenaURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaLink
的用法示例。
在下文中一共展示了CKunenaLink::GetKunenaURL方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display()
{
if (!$this->config->showannouncement) {
return;
}
$do = JRequest::getVar("do", "");
$id = intval(JRequest::getVar("id", ""));
switch ($do) {
case 'read':
$this->getAnnouncement($id, 1);
CKunenaTools::loadTemplate('/announcement/read.php');
break;
case 'show':
$this->getAnnouncements(0, 5);
CKunenaTools::loadTemplate('/announcement/show.php');
break;
case 'edit':
if (!$this->canEdit) {
while (@ob_end_clean()) {
}
$this->app->redirect(CKunenaLink::GetKunenaURL(false), JText::_('COM_KUNENA_POST_NOT_MODERATOR'));
return;
}
$this->getAnnouncement($id, 0);
// Continue
// Continue
case 'add':
if (!$this->canEdit) {
while (@ob_end_clean()) {
}
$this->app->redirect(CKunenaLink::GetKunenaURL(false), JText::_('COM_KUNENA_POST_NOT_MODERATOR'));
return;
}
CKunenaTools::loadTemplate('/announcement/edit.php');
break;
case 'delete':
$this->delete($id);
break;
case 'doedit':
$this->edit($id);
break;
default:
$this->getAnnouncements(0, 5);
CKunenaTools::loadTemplate('/announcement/show.php');
}
}
示例2: edit
protected function edit()
{
if (!$this->load()) {
return false;
}
if ($this->lockProtection()) {
return false;
}
if ($this->isUserBanned()) {
return false;
}
if ($this->isIPBanned()) {
return false;
}
$saved = $this->_app->getUserState('com_kunena.postfields');
$this->_app->setUserState('com_kunena.postfields', null);
$message = $this->msg_cat;
if ($message->parent == 0) {
$this->allow_topic_icons = 1;
}
$allowEdit = 0;
if (CKunenaTools::isModerator($this->my->id, $this->catid)) {
// Moderator can edit any message
$allowEdit = 1;
} else {
if ($this->my->id && $this->my->id == $message->userid) {
$allowEdit = CKunenaTools::editTimeCheck($message->modified_time, $message->time);
}
}
if ($allowEdit == 1) {
// Load attachments
require_once KUNENA_PATH_LIB . '/kunena.attachments.class.php';
$attachments = CKunenaAttachments::getInstance();
$this->attachments = array_pop($attachments->get($message->id));
$this->kunena_editmode = 1;
$this->message_text = $message->message;
$this->resubject = $message->subject;
$this->authorName = $message->name;
$this->email = $message->email;
$this->id = $message->id;
$this->catid = $message->catid;
$this->parent = $message->parent;
$this->emoid = $message->topic_emoticon;
$this->action = 'edit';
//save the options for query after and load the text options, the number options is for create the fields in the form after
if ($message->poll_id) {
$this->polldatasedit = $this->poll->get_poll_data($this->id);
if ($this->kunena_editmode) {
$this->polloptionstotal = count($this->polldatasedit);
}
}
$this->allow_anonymous = !empty($this->msg_cat->allow_anonymous) && $message->userid;
$this->anonymous = 0;
$this->allow_name_change = 0;
if (!$this->my->id || $this->config->changename || !empty($this->msg_cat->allow_anonymous) || CKunenaTools::isModerator($this->my->id, $this->catid)) {
$this->allow_name_change = 1;
}
if (!$this->allow_name_change && $message->userid == $this->my->id) {
$this->authorName = $this->getAuthorName();
}
$this->title = JText::_('COM_KUNENA_POST_EDIT') . ' ' . $this->resubject;
if ($saved) {
$this->authorName = $saved['fields']['name'];
$this->email = $saved['fields']['email'];
$this->resubject = $saved['fields']['subject'];
$this->message_text = $saved['fields']['message'];
$this->emoid = $saved['fields']['topic_emoticon'];
if (isset($saved['options']['anonymous'])) {
$this->anonymous = $saved['options']['anonymous'];
}
}
$this->modified_reason = isset($saved['fields']['modified_reason']) ? $saved['fields']['modified_reason'] : '';
CKunenaTools::loadTemplate('/editor/form.php');
} else {
while (@ob_end_clean()) {
}
$this->_app->redirect(CKunenaLink::GetKunenaURL(false), JText::_('COM_KUNENA_POST_NOT_MODERATOR'));
}
}
示例3: defined
<?php
/**
* @version $Id$
* 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;
$options = array();
$options[] = JHTML::_('select.option', '0', JText::_('COM_KUNENA_FORUM_TOP'));
$lists['parent'] = CKunenaTools::forumSelectList('forumjump', isset($this->catid) ? intval($this->catid) : 0, $options, 'class="inputbox fbs" size="1" onchange = "this.form.submit()"', true);
?>
<form id="jumpto" name="jumpto" method="post" target="_self" action="<?php
echo CKunenaLink::GetKunenaURL();
?>
">
<span class="kright">
<input type="hidden" name="func" value="showcat" />
<?php
echo $lists['parent'];
?>
<input type="submit" name="Go" class="kbutton ks" value="<?php
echo JText::_('COM_KUNENA_GO');
?>
" />
</span>
</form>
示例4: if
<fieldset class="fieldset">
<legend><?php echo JText::_('COM_KUNENA_SEARCH_SHOW'); ?></legend>
<input id="show0" type="radio" name="show" value="0" <?php if ($this->state->get('query.show') == 0) echo 'checked="checked"'; ?> />
<label for="show0"><?php echo JText::_('COM_KUNENA_SEARCH_SHOW_NORMAL'); ?></label><br />
<input id="show1" type="radio" name="show" value="1" <?php if ($this->state->get('query.show') == 1) echo 'checked="checked"'; ?> />
<label for="show1"><?php echo JText::_('COM_KUNENA_SEARCH_SHOW_UNAPPROVED'); ?></label><br />
<input id="show2" type="radio" name="show" value="2" <?php if ($this->state->get('query.show') == 2) echo 'checked="checked"'; ?> />
<label for="show2"><?php echo JText::_('COM_KUNENA_SEARCH_SHOW_TRASHED'); ?></label><br />
</fieldset>
<?php endif; ?>
</td>
</tr>
<tr>
<td colspan="2" class="kcenter">
<input class="kbutton ks" type="submit" value="<?php echo JText::_('COM_KUNENA_SEARCH_SEND'); ?>"/>
<input class="kbutton ks" type="reset" value="<?php echo JText::_('COM_KUNENA_SEARCH_CANCEL'); ?>" onclick="window.location='<?php echo CKunenaLink::GetKunenaURL();?>';"/>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
<?php if($this->results): ?>
<div class="kblock ksearchresult">
<div class="kheader">
<span class="ktoggler"><a class="ktoggler close" title="<?php echo JText::_('COM_KUNENA_TOGGLER_COLLAPSE') ?>" rel="ksearchresult"></a></span>
<h2>
<span>
示例5: __construct
//.........这里部分代码省略.........
$cb = KGetArrayReverseInts("cb");
$result = $KunenaUserAPI->unsubscribeThreads($kunena_my->id, $cb);
if ($result) {
$message = JText::_('COM_KUNENA_USER_UNSUBSCRIBE_YES');
} else {
$message = JText::_('COM_KUNENA_POST_NO_UNSUBSCRIBED_TOPIC');
}
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetProfileURL($kunena_my->id, false), $message);
break;
case "bulkDelPerm":
CKunenaTools::KDeletePerm();
break;
case "bulkRestore":
CKunenaTools::KUndelete();
break;
}
break;
case 'template':
jimport('joomla.filesystem.path');
$name = JRequest::getString('name', JRequest::getString('kunena_template', '', 'COOKIE'));
while (@ob_end_clean()) {
}
if ($name) {
$name = JPath::clean($name);
if (!is_readable(KPATH_SITE . "/template/{$name}/template.xml")) {
$name = 'default';
}
setcookie('kunena_template', $name, 0, JURI::root(true) . '/');
} else {
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 = '&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'));
}
示例6: if
<br />
<label id="childforums-lbl">
<input type="checkbox" value="1" name="childforums" <?php if ($this->state->get('query.childforums')) echo 'checked="checked"'; ?> />
<?php echo JText::_('COM_KUNENA_SEARCH_SEARCHIN_CHILDREN'); ?>
</label>
</fieldset>
<?php if ( $this->me->isModerator() ) : ?>
<fieldset class="fieldset">
<legend><?php echo JText::_('COM_KUNENA_SEARCH_SHOW'); ?></legend>
<input id="show0" type="radio" name="show" value="0" <?php if ($this->state->get('query.show') == 0) echo 'checked="checked"'; ?> />
<label for="show0"><?php echo JText::_('COM_KUNENA_SEARCH_SHOW_NORMAL'); ?></label><br />
<input id="show1" type="radio" name="show" value="1" <?php if ($this->state->get('query.show') == 1) echo 'checked="checked"'; ?> />
<label for="show1"><?php echo JText::_('COM_KUNENA_SEARCH_SHOW_UNAPPROVED'); ?></label><br />
<input id="show2" type="radio" name="show" value="2" <?php if ($this->state->get('query.show') == 2) echo 'checked="checked"'; ?> />
<label for="show2"><?php echo JText::_('COM_KUNENA_SEARCH_SHOW_TRASHED'); ?></label><br />
</fieldset>
<?php endif; ?>
</div>
<div class="clr"></div>
<div class="kpost-buttons">
<button title="Click here to search" type="submit" class="kbutton"><?php echo JText::_('COM_KUNENA_SEARCH_SEND'); ?></button>
<button onclick="window.location='<?php echo CKunenaLink::GetKunenaURL();?>';" title="Click here to cancel" type="button" class="kbutton"><?php echo JText::_('COM_KUNENA_SEARCH_CANCEL'); ?></button>
</div>
</form>
</div>
<div class="clr"></div>
</div>
<?php $this->displaySearchResults() ?>