本文整理匯總了PHP中XWB_plugin::isUserBinded方法的典型用法代碼示例。如果您正苦於以下問題:PHP XWB_plugin::isUserBinded方法的具體用法?PHP XWB_plugin::isUserBinded怎麽用?PHP XWB_plugin::isUserBinded使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XWB_plugin
的用法示例。
在下文中一共展示了XWB_plugin::isUserBinded方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: bind
function bind()
{
if (!XWB_plugin::pCfg('is_account_binding')) {
XWB_plugin::showError('新浪微博綁定功能已經關閉!');
}
if (XWB_S_UID > 0 && XWB_plugin::isUserBinded()) {
$xwb_user = XWB_plugin::getUser();
$sina_id = $xwb_user->getInfo('sina_uid');
$wb = XWB_plugin::getWB();
$wb->is_exit_error = false;
$sina_user_info = $wb->getUserShow($sina_id);
if (isset($sina_user_info['error_code']) || isset($sina_user_info['error'])) {
include XWB_P_ROOT . '/tpl/xwb_cenbind_error.tpl.php';
} else {
$db = XWB_plugin::getDB();
$share = XWB_plugin::V("R:share");
$share_msg = '';
if ($share) {
$bind_info = $db->fetch_first("select * from " . XWB_S_TBPRE . "xwb_bind_info where `uid`='" . XWB_S_UID . "'");
$share_time = $bind_info['share_time'];
if (!$share_time) {
$share_time = time();
$db->query("update " . XWB_S_TBPRE . "xwb_bind_info set `share_time`='" . $share_time . "' where `uid`='" . XWB_S_UID . "'");
jclass('misc')->update_account_bind_info(XWB_S_UID, '', '', 1);
$share_msg = "<img src='" . (XWB_plugin::baseUrl() . XWB_plugin::URL('&code=enter&share_time=' . $share_time)) . "' width='0' height='0' />";
}
} else {
/**
* 分享給好友顯示頁麵
*/
$skip_share = XWB_plugin::V("R:skip_share");
if (!$skip_share) {
$bind_info = $db->fetch_first("select * from " . XWB_S_TBPRE . "xwb_bind_info where `uid`='" . XWB_S_UID . "'");
if (!$bind_info['share_time']) {
include XWB_P_ROOT . '/tpl/xwb_cenbind_share.tpl.php';
exit;
}
}
}
$screen_name = $sina_user_info['screen_name'];
$profile = XWB_plugin::O('xwbUserProfile');
$setting = $profile->get('bind_setting', 1);
$tojishigou = $profile->get('synctopic_tojishigou', 0);
$reply_tojishigou = $profile->get('syncreply_tojishigou', 0);
include XWB_P_ROOT . '/tpl/xwb_cenbind_on.tpl.php';
}
} else {
include XWB_P_ROOT . '/tpl/xwb_cenbind_off.tpl.php';
}
}
示例2: _showBindError
/**
* 顯示綁定時的錯誤信息
* @param string $errorType 錯誤類型
*/
function _showBindError($errorType = 'api')
{
$isBind = XWB_plugin::isUserBinded();
//獲取綁定關係
include XWB_P_ROOT . '/tpl/xwb_bind_error.tpl.php';
exit;
}
示例3: _showBindError
/**
* 顯示綁定時的錯誤信息
* @param string $errorType 錯誤類型
*/
function _showBindError($errorType = 'api')
{
$isBind = XWB_plugin::isUserBinded();
//獲取綁定關係
$unbind_tokenhash = xwb_token::make('unbind', true);
include XWB_P_ROOT . '/tpl/xwb_bind_error.tpl.php';
exit;
}
示例4: exit
<?php
/**
*[JishiGou] (C)2005 - 2099 Cenwor Inc.
*
* This is NOT a freeware, use is subject to license terms
*
* @Filename newtopic.hack.php $
*
* @Author 狐狸<foxis@qq.com> $
*
* @version $Id: newtopic.hack.php 3699 2013-05-27 07:26:39Z wuliyong $
*/
if (!defined('IS_IN_XWB_PLUGIN')) {
exit('Access Denied!');
}
if (XWB_plugin::isUserBinded() && XWB_plugin::V('p:syn_to_sina')) {
$xp_publish = XWB_plugin::N('xwb_plugins_publish');
$xp_publish->topic((int) ($tid ? $tid : $GLOBALS['jsg_tid']), (int) ($totid ? $totid : $GLOBALS['jsg_totid']), (string) $GLOBALS['jsg_message'], (string) $GLOBALS['jsg_imageid']);
}
示例5: shareCommentSync
/**
* 分享評論同步
* @param int $id 分享id
* @param string $message 內容
*/
function shareCommentSync($id, $message)
{
global $_G;
$mid = $this->isSync($id, 'share');
if (!$mid || !XWB_plugin::isUserBinded()) {
return;
}
$message = $this->_convert($message);
$link = ' ' . $_G['siteurl'] . "home.php?mod=space&do=share&id={$id}";
if (1 == XWB_plugin::pcfg('link_visit_promotion')) {
$link .= '&fromuid=' . $_G['uid'];
}
$length = 140 - ceil(strlen(urlencode($link)) * 0.5);
//2個字母為1個字
$message = $this->_substr($message, $length);
$message .= $link;
//同步到微博
$wb = XWB_plugin::getWB();
$rs = $wb->comment($mid, $message, null, false);
}
示例6: _checkIsArticlePost
/**
* 門戶文章發表截獲鉤子檢查:是否是在進行文章發表操作、是否可以啟動插件、用戶是否在綁定狀態
* @return integer 檢查結果。0:檢查失敗;1:發表文章
*/
function _checkIsArticlePost()
{
global $_G;
static $result = -999;
if ($result >= 0) {
return $result;
}
if (!in_array($_G['gp_ac'], array('article')) || !$_G['uid'] || 'POST' != $this->getRequestMethod() || false == $this->_start_xweibo(true) || !XWB_plugin::isUserBinded()) {
$result = 0;
} elseif (getgpc('articlesubmit') && XWB_plugin::pCfg('is_syncarticle_toweibo')) {
$result = 1;
} else {
$result = 0;
}
return $result;
}