本文整理汇总了PHP中CKunenaLink::GetJsonURL方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaLink::GetJsonURL方法的具体用法?PHP CKunenaLink::GetJsonURL怎么用?PHP CKunenaLink::GetJsonURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaLink
的用法示例。
在下文中一共展示了CKunenaLink::GetJsonURL方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: call_javascript_form
/**
* Insert javascript for form of new post
*/
function call_javascript_form()
{
CKunenaTools::addScript(KUNENA_DIRECTURL . 'template/default/plugin/poll/js/kunena.poll-min.js');
$this->document->addScriptDeclaration('// <![CDATA[
var KUNENA_POLL_CATS_NOT_ALLOWED = "' . JText::_('COM_KUNENA_POLL_CATS_NOT_ALLOWED') . '";
var KUNENA_EDITOR_HELPLINE_OPTION = "' . JText::_('COM_KUNENA_EDITOR_HELPLINE_OPTION') . '";
var KUNENA_POLL_OPTION_NAME = "' . JText::_('COM_KUNENA_POLL_OPTION_NAME') . '";
var KUNENA_POLL_NUMBER_OPTIONS_MAX_NOW = "' . JText::_('COM_KUNENA_POLL_NUMBER_OPTIONS_MAX_NOW') . '";
var KUNENA_ICON_ERROR = "' . JURI::root() . 'components/com_kunena/template/default/images/icons/publish_x.png' . '";
var kunena_ajax_url_poll = "' . CKunenaLink::GetJsonURL('pollcatsallowed') . '";
// ]]>');
}
示例2: foreach
<?php
if ($dataspollusers[0]->userid == $this->my->id) {
?>
<a href = "<?php
echo CKunenaLink::GetPollURL('changevote', $this->id, $this->catid);
?>
"><?php
echo JText::_('COM_KUNENA_POLL_BUTTON_CHANGEVOTE');
?>
</a>
<?php
}
?>
</div>
<input type="hidden" id="kpollvotejsonurl" value="<?php
echo CKunenaLink::GetJsonURL('pollvote', '', true);
?>
" />
<?php
echo JHTML::_('form.token');
?>
</form>
<?php
} else {
?>
<table>
<?php
foreach ($dataspollresult as $row) {
?>
<tr class="krow<?php
echo ($i ^= 1) + 1;
示例3: defined
*
* @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;
if (isset($this->advsearch_hide) && $this->advsearch_hide == 1) {
$advsearch_class = ' open';
$advsearch_style = ' style="display: none;"';
$advsearch_title = JText::_('COM_KUNENA_TOGGLER_EXPAND');
} else {
$advsearch_class = ' close';
$advsearch_style = '';
$advsearch_title = JText::_('COM_KUNENA_TOGGLER_COLLAPSE');
}
$this->doc->addScriptDeclaration("// <![CDATA[\ndocument.addEvent('domready', function() {\n\t// Attach auto completer to the following ids:\n\tnew Autocompleter.Request.JSON('kusername', '" . CKunenaLink::GetJsonURL('autocomplete', 'getuser', false) . "', { 'postVar': 'value' });\n});\n// ]]>");
?>
<div class="kblock kadvsearch">
<div class="kheader">
<span class="ktoggler"><a class="ktoggler <?php
echo $advsearch_class;
?>
" title="<?php
echo $advsearch_title;
?>
" rel="advsearch"></a></span>
<h2><span><?php
echo JText::_('COM_KUNENA_SEARCH_ADVSEARCH');
?>
</span></h2>
</div>
示例4: defined
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
*
* Based on FireBoard Component
* @Copyright (C) 2006 - 2007 Best Of Joomla All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.bestofjoomla.com
**/
// Dont allow direct linking
defined('_JEXEC') or die;
$document =& JFactory::getDocument();
$option = JRequest::getCmd('option');
$document->setTitle(JText::_('COM_KUNENA_USRL_USERLIST') . ' - ' . $this->config->board_title);
$document->addScriptDeclaration("// <![CDATA[\nfunction tableOrdering( order, dir, task ) {\n\tvar form=document.adminForm;\n\tform.filter_order.value=order;\n\tform.filter_order_Dir.value=dir;\n\tdocument.adminForm.submit( task );\n}\ndocument.addEvent('domready', function() {\n\t// Attach auto completer to the following ids:\n\tnew Autocompleter.Request.JSON('kusersearch', '" . CKunenaLink::GetJsonURL('autocomplete', 'getuser') . "', { 'postVar': 'value' });\n});\n// FIXME: do not use alert:\nfunction validate() {\n\tif ((document.usrlform.search == '') || (document.usrlform.search.value == '')) {\n\t\talert('" . JText::_('COM_KUNENA_USRL_SEARCH_ALERT') . "');\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}\n// ]]>");
?>
<div class="kblock">
<div class="kheader">
<span class="ktoggler"><a class="ktoggler close" title="<?php
echo JText::_('COM_KUNENA_TOGGLER_COLLAPSE');
?>
" rel="searchuser_tbody"></a></span>
<h2><span><?php
printf(JText::_('COM_KUNENA_USRL_REGISTERED_USERS'), $this->app->getCfg('sitename'), intval($this->total));
?>
</span></h2>
</div>
<div class="kcontainer" id="searchuser_tbody">
<div class="kbody">
<div class="search-user">
示例5: 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>
示例6: 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
**/
// Dont allow direct linking
defined('_JEXEC') or die;
$this->document->addScriptDeclaration("// <![CDATA[\nkunena_url_ajax= '" . CKunenaLink::GetJsonURL() . "';\n// ]]>");
?>
<div class="kblock">
<div class="kheader">
<h2><span><?php
echo $this->moderateTopic ? JText::_('COM_KUNENA_TITLE_MODERATE_TOPIC') : JText::_('COM_KUNENA_TITLE_MODERATE_MESSAGE');
?>
</span></h2>
</div>
<div class="kcontainer">
<div class="kbody" id="kmod-container">
<form action="<?php
echo CKunenaLink::GetPostURL();
?>
" method="post" name="myform"><input type="hidden" name="do" value="domoderate" />
<input type="hidden" name="id" value="<?php
echo $this->id;
?>
示例7: ob_start
$kunena_config = KunenaFactory::getConfig();
require_once KPATH_SITE . '/lib/kunena.poll.class.php';
$kunena_poll =& CKunenaPolls::getInstance();
$document =& JFactory::getDocument();
ob_start();
//
// function kPreviewHelper (elementId)
//
// Helper function for to perform JSON request for preview
//
?>
function kPreviewHelper()
{
if (_previewActive == true){
previewRequest = new Request.JSON({url: "<?php
echo CKunenaLink::GetJsonURL('preview');
?>
",
onSuccess: function(response){
var __message = document.id("kbbcode-preview");
if (__message) {
__message.set("html", response.preview);
}
}}).post({body: document.id("kbbcode-message").get("value")
});
}
}
<?php
// Now we instanciate the class in an object and implement all the buttons and functions.
?>