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


PHP DiscussHelper::getToken方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $config = DiscussHelper::getConfig();
     $this->fullName = "EasyDiscuss";
     $this->shortName = "ed";
     $this->environment = $config->get('easydiscuss_environment');
     $this->mode = $config->get('easydiscuss_mode');
     $this->version = DiscussHelper::getLocalVersion();
     $this->baseUrl = DiscussHelper::getAjaxURL();
     $this->token = DiscussHelper::getToken();
     parent::__construct();
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:12,代码来源:configuration.php

示例2: _store

 private function _store()
 {
     $mainframe = JFactory::getApplication();
     $message = '';
     $type = 'success';
     if (JRequest::getMethod() == 'POST') {
         $model = $this->getModel('Settings');
         $postArray = JRequest::get('post');
         $saveData = array();
         // Unset unecessary data.
         unset($postArray['controller']);
         unset($postArray['active']);
         unset($postArray['child']);
         unset($postArray['layout']);
         unset($postArray['task']);
         unset($postArray['option']);
         unset($postArray['c']);
         $token = DiscussHelper::getToken();
         unset($postArray[$token]);
         foreach ($postArray as $index => $value) {
             // Filter out the dummy checkbox_display_xxx entry
             if (substr($index, 0, 17) == 'checkbox_display_') {
                 continue;
             }
             if ($index == 'integration_google_adsense_code') {
                 $value = str_ireplace(';"', ';', $value);
             }
             if ($index != 'task') {
             }
             $saveData[$index] = $value;
             if (is_array($value)) {
                 $saveData[$index] = implode(',', $value);
             }
         }
         // reset the setting 'main_allowdelete' to use from configuration.ini
         $saveData['main_allowdelete'] = DiscussHelper::getDefaultConfigValue('main_allowdelete', '');
         // reset the setting 'layout_featuredpost_style' to always use from configuration.ini
         $saveData['layout_featuredpost_style'] = DiscussHelper::getDefaultConfigValue('layout_featuredpost_style', '0');
         if ($model->save($saveData)) {
             $message = JText::_('COM_EASYDISCUSS_CONFIGURATION_SAVED');
         } else {
             $message = JText::_('COM_EASYDISCUSS_CONFIGURATION_SAVE_ERROR');
             $type = 'error';
         }
     } else {
         $message = JText::_('COM_EASYDISCUSS_INVALID_FORM_METHOD');
         $type = 'error';
     }
     return array('message' => $message, 'type' => $type);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:50,代码来源:settings.php

示例3:

?>
				</div>
			</h2>
		</a>

		<div class=" mr-5 mt-20 hide-phone pull-right" data-toggle="buttons-radio">
			<a href="<?php 
echo DiscussRouter::_('index.php?option=com_easydiscuss&controller=conversation&task=unread&' . DiscussHelper::getToken() . '=1&id=' . $conversation->id);
?>
" class="btn btn-mini">
				<i class="icon-eye-open"></i> <?php 
echo JText::_('COM_EASYDISCUSS_BUTTON_MARK_UNREAD');
?>
			</a>
			<a href="<?php 
echo DiscussRouter::_('index.php?option=com_easydiscuss&controller=conversation&task=archive&' . DiscussHelper::getToken() . '=1&id=' . $conversation->id);
?>
" class="btn btn-mini">
				<i class="icon-remove"></i> <?php 
echo JText::_('COM_EASYDISCUSS_BUTTON_ARCHIVE');
?>
			</a>
		</div>
	</div>
	<a href="<?php 
echo DiscussRouter::_('index.php?option=com_easydiscuss&view=conversation');
?>
">&laquo; <?php 
echo JText::_('COM_EASYDISCUSS_BACK_TO_INBOX');
?>
</a>
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:31,代码来源:conversation.read.php

示例4: base64_encode

			<button class="btn btn-primary" type="submit"><?php 
echo JText::_('COM_EASYDISCUSS_BUTTON_LOGIN');
?>
</button>
		</div>
	</div>
	
	<?php 
if (DiscussHelper::getJoomlaVersion() >= '1.6') {
    ?>
	<input type="hidden" value="com_users"  name="option">
	<input type="hidden" value="user.login" name="task">
	<?php 
} else {
    ?>
	<input type="hidden" value="com_user"  name="option">
	<input type="hidden" value="login" name="task">
	<?php 
}
?>

	<input type="hidden" value="<?php 
echo base64_encode($redirect);
?>
" name="return" />
	<input type="hidden" value="1" name="<?php 
echo DiscussHelper::getToken();
?>
" />
</fieldset>
</form>
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:31,代码来源:login.form.php

示例5: ajaxMemberReply

 public function ajaxMemberReply($username = null, $password = null, $token = null)
 {
     $disjax = new Disjax();
     $mainframe = JFactory::getApplication();
     JRequest::setVar($token, 1);
     if (empty($username) || empty($password)) {
         $disjax->script("EasyDiscuss.\$('#usertype_status .msg_in').html('" . JText::_('COM_EASYDISCUSS_PLEASE_INSERT_YOUR_USERNAME_AND_PASSWORD') . "');");
         $disjax->script("EasyDiscuss.\$('#usertype_status .msg_in').addClass('alert alert-error');");
         $disjax->script("EasyDiscuss.\$('#edialog-member-reply').prop('disabled', false);");
         $disjax->send();
         return false;
     }
     // Check for request forgeries
     if (JRequest::checkToken('request')) {
         $credentials = array();
         $credentials['username'] = $username;
         $credentials['password'] = $password;
         $result = $mainframe->login($credentials);
         if (!JError::isError($result)) {
             $token = DiscussHelper::getToken();
             $disjax->script('EasyDiscuss.$(".easydiscuss-token").val("' . $token . '");');
             $disjax->script('disjax.closedlg();');
             $disjax->script('discuss.reply.submit();');
         } else {
             $error = JError::getError();
             $disjax->script('EasyDiscuss.$(\'#usertype_status .msg_in\').html(\'' . $error->message . '\');');
             $disjax->script('EasyDiscuss.$(\'#usertype_status .msg_in\').addClass(\'alert alert-error\');');
             $disjax->script('EasyDiscuss.$(\'#edialog-member-reply\').prop(\'disabled\', false);');
         }
     } else {
         $token = DiscussHelper::getToken();
         $disjax->script('discuss.login.token = "' . $token . '";');
         $disjax->script('EasyDiscuss.$(\'#usertype_status .msg_in\').html(\'' . JText::_('COM_EASYDISCUSS_MEMBER_LOGIN_INVALID_TOKEN') . '\');');
         $disjax->script('EasyDiscuss.$(\'#usertype_status .msg_in\').addClass(\'alert alert-error\');');
         $disjax->script('EasyDiscuss.$(\'#edialog-reply\').prop(\'disabled\', false);');
     }
     $disjax->send();
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:38,代码来源:view.ajax.php

示例6:

		<li>
			<i class="ico"></i><a class="discuss-badges" href="<?php 
        echo DiscussRouter::_('index.php?option=com_easydiscuss&view=badges' . $menuURL);
        ?>
"><span><?php 
        echo JText::_('MOD_EASYDISCUSS_WELCOME_BROWSE_BADGES');
        ?>
</span></a>
		</li>
	<?php 
    }
    ?>

	<li>
		<i class="ico"></i><a class="discuss-logout" href="<?php 
    echo JRoute::_('index.php?option=' . $userComponent->option . '&task=' . $userComponent->logout . '&' . DiscussHelper::getToken() . '=1&return=' . $return);
    ?>
"><span><?php 
    echo JText::_('MOD_EASYDISCUSS_WELCOME_SIGN_OUT');
    ?>
</span></a>
	</li>
</ul>
<?php 
} else {
    if ($params->get('enable_login')) {
        ?>
<form action="<?php 
        echo JRoute::_('index.php', true, $params->get('usesecure'));
        ?>
" method="post" name="login" id="form-login" >
开发者ID:pguilford,项目名称:vcomcc,代码行数:31,代码来源:default.php


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