當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XWB_plugin::O方法代碼示例

本文整理匯總了PHP中XWB_plugin::O方法的典型用法代碼示例。如果您正苦於以下問題:PHP XWB_plugin::O方法的具體用法?PHP XWB_plugin::O怎麽用?PHP XWB_plugin::O使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XWB_plugin的用法示例。


在下文中一共展示了XWB_plugin::O方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _session_start

 /**
  * 啟動session
  */
 function _session_start()
 {
     $operatorType = defined('XWB_P_SESSION_OPERATOR') ? strtolower(XWB_P_SESSION_OPERATOR) : 'native';
     $storageType = defined('XWB_P_SESSION_STORAGE_TYPE') ? strtolower(XWB_P_SESSION_STORAGE_TYPE) : '';
     //session操作器初始化
     $this->_operator = XWB_plugin::O('session/session_operator_' . $operatorType);
     //session存儲器注冊到session操作器中
     if (!empty($storageType)) {
         $sessStorage = XWB_plugin::O('session/session_storage_' . $storageType);
         $this->_operator->setStorageHandler($sessStorage);
         //模擬操作器必須要有一個session存儲器
     } elseif ('simulator' == $operatorType) {
         //XWB_plugin::showError('管理員設置錯誤,導致程序被終止。請聯係管理員解決。<br />錯誤原因:You have defined SIMULATOR session operator but does not define a session STORAGE type! SYSTEM HALTED!');
         trigger_error('You have defined SIMULATOR session operator but does not define a session STORAGE type! SYSTEM HALTED!', 256);
     }
     $this->_operator->session_start();
 }
開發者ID:chibimiku,項目名稱:xweibo_for_discuz_x2_php7,代碼行數:20,代碼來源:clientUser.class.php

示例2:

 /**
  * 獲取clientUser類別
  * @return clientUser clientUser類
  */
 function &getUser()
 {
     return XWB_plugin::O('clientUser');
 }
開發者ID:chibimiku,項目名稱:xweibo_for_discuz_x2_php7,代碼行數:8,代碼來源:core.class.php

示例3: _setPushbackSiteAccount

 /**
  * 設置評論回推用戶
  * @param string $username 用戶名,請傳參前自行轉碼到論壇用戶的編碼
  * @return int 用戶uid
  */
 function _setPushbackSiteAccount($username)
 {
     loaducenter();
     $userInfo = uc_get_user($username);
     if (is_array($userInfo) && $userInfo[0] > 0) {
         $this->_importUserFromUC($userInfo);
         return $userInfo[0];
     }
     $email = 'xweibo_user' . rand(1, 99999) . '@sina.com';
     $siteRegister = XWB_plugin::O('xwbSiteUserRegister');
     $uid = $siteRegister->reg($username, $email);
     return $uid > 0 ? $uid : 0;
 }
開發者ID:Jaedeok-seol,項目名稱:discuz_template,代碼行數:18,代碼來源:pushbackInterface.mod.php

示例4: json_encode

 function json_encode($s)
 {
     $gloJSON = XWB_plugin::O('servicesJSON');
     $gloJSON->use = 16;
     return $gloJSON->encode($s);
 }
開發者ID:chibimiku,項目名稱:xweibo_for_discuz_x2_php7,代碼行數:6,代碼來源:compat.inc.php

示例5: bindTopic

 /**
  * 設置發帖同步
  */
 function bindTopic()
 {
     if (XWB_S_UID < 1 || !XWB_plugin::pCfg('is_account_binding')) {
         XWB_plugin::showError('新浪微博綁定功能已經關閉!');
     }
     $setting = XWB_plugin::V('p:setting');
     $tojishigou = XWB_plugin::V('p:tojishigou');
     $reply_tojishigou = XWB_plugin::V('p:reply_tojishigou');
     $profile = XWB_plugin::O('xwbUserProfile');
     $profile->set(array('bind_setting' => (int) $setting, 'synctopic_tojishigou' => (int) $tojishigou, 'syncreply_tojishigou' => (int) $reply_tojishigou));
     //XWB_plugin::redirect('xwbSiteInterface.bind',2);
     jclass('misc')->update_account_bind_info(XWB_S_UID, '', '', 1);
     echo '<script>parent.tips();</script>';
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:17,代碼來源:xwbSiteInterface.mod.php

示例6: setUserProfileBind

 /**
  * 用戶設置同步選項
  */
 function setUserProfileBind()
 {
     if (XWB_S_UID < 1) {
         XWB_plugin::showError('你尚未登錄。');
     } elseif (!XWB_plugin::pCfg('is_account_binding') || !XWB_plugin::isRequestBy('POST')) {
         XWB_plugin::showError('網站管理員關閉了插件功能“新浪微博綁定”。請稍後再試。');
     }
     $set = (array) XWB_plugin::V('p:set');
     $newset = array();
     $inputCheck = array('topic2weibo_checked' => array(0, 1), 'blog2weibo_checked' => array(0, 1), 'article2weibo_checked' => array(0, 1), 'share2weibo' => array(0, 1), 'doing2weibo' => array(0, 1));
     $newset = $this->_filterInput($set, $inputCheck);
     $profile = XWB_plugin::O('xwbUserProfile');
     $profile->set($newset);
     echo '<script>parent.showMsg(\'success\');</script>';
 }
開發者ID:chibimiku,項目名稱:xweibo_for_discuz_x2_php7,代碼行數:18,代碼來源:xwbSiteInterface.mod.php

示例7: exit

<?php

/*
 * @version $Id: newshare.hack.php 459 2010-12-23 09:06:50Z yaoying $
 */
if (!defined('IS_IN_XWB_PLUGIN')) {
    exit('Access Denied!');
}
global $_G;
$arr = isset($GLOBALS['arr']) ? (array) $GLOBALS['arr'] : array();
$sid = isset($GLOBALS['sid']) ? (int) $GLOBALS['sid'] : 0;
$p = XWB_plugin::O('xwbUserProfile');
$share2weibo = (int) $p->get('share2weibo', 0);
if ($sid > 0 && !empty($arr) && $share2weibo === 1) {
    $xp_publish = XWB_plugin::N('xwb_plugins_publish');
    register_shutdown_function(array(&$xp_publish, 'shareSync'), $sid, $arr);
}
開發者ID:chibimiku,項目名稱:xweibo_for_discuz_x2_php7,代碼行數:17,代碼來源:newshare.hack.php

示例8: portalcp_bottom_output

 /**
  * 發表文章頁麵鉤子:同步按鈕顯示
  */
 function portalcp_bottom_output()
 {
     global $_G;
     $return = '';
     if ('article' != $_G['gp_ac'] || !$_G['uid'] || (!isset($GLOBALS['op']) || 'add' != $GLOBALS['op']) || 'GET' != core_sina_xweibo_x2::getRequestMethod() || false == $this->_start_xweibo(true) || !XWB_plugin::pCfg('is_syncarticle_toweibo')) {
         return $return;
     }
     $lang['xwb_sycn_to_sina'] = XWB_plugin::L('xwb_sycn_to_sina');
     $lang['xwb_sycn_open'] = XWB_plugin::L('xwb_sycn_open');
     $p = XWB_plugin::O('xwbUserProfile');
     $html_checked = (int) $p->get('article2weibo_checked', 1);
     include template($this->pluginid . ':portalcp_newarticle');
     return $return;
 }
開發者ID:chibimiku,項目名稱:xweibo_for_discuz_x2_php7,代碼行數:17,代碼來源:hook.class.php

示例9: getIsSynPost

 /**
  * 獲取用戶設置“新發微博是否自動發到新浪微博”設置。
  * 默認為是
  * @return interger
  */
 function getIsSynPost()
 {
     $p = XWB_plugin::O('xwbUserProfile');
     return (int) $p->get('bind_setting', 1);
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:10,代碼來源:core.class.php

示例10: setSync

 function setSync()
 {
     $uid = max(0, (int) MEMBER_ID);
     if ($uid < 1) {
         $this->Messager("請先<a href='index.php?mod=login'>點此登錄</a>或者<a href='index.php?mod=member'>點此注冊</a>一個帳號", null);
     }
     $setting = (int) $this->Get['setting'];
     if ('sina' == $this->Get['type']) {
         define('IS_IN_XWB_PLUGIN', true);
         define('XWB_P_ROOT', ROOT_PATH . 'include/ext/xwb/');
         require_once XWB_P_ROOT . 'sina.php';
         require_once XWB_P_ROOT . 'lib/core.class.php';
         if (XWB_S_UID < 1 || !XWB_plugin::pCfg('is_account_binding')) {
             XWB_plugin::showError('新浪微博綁定功能已經關閉!');
         }
         $tojishigou = XWB_plugin::V('G:tojishigou');
         $reply_tojishigou = XWB_plugin::V('G:reply_tojishigou');
         $profile = XWB_plugin::O('xwbUserProfile');
         $profile->set(array('bind_setting' => (int) $setting, 'synctopic_tojishigou' => (int) $tojishigou, 'syncreply_tojishigou' => (int) $reply_tojishigou));
         $r = jclass('misc')->update_account_bind_info(XWB_S_UID, '', '', 1);
     } elseif ('qq' == $this->Get['type']) {
         $this->DatabaseHandler->Query("update " . TABLE_PREFIX . "qqwb_bind_info set `synctoqq`='{$setting}' where `uid`='{$uid}'");
         $r = jclass('misc')->update_account_bind_info($uid, '', '', 1);
     } elseif ('renren' == $this->Get['type'] && !$setting) {
         $r = $this->DatabaseHandler->Query("delete from " . TABLE_PREFIX . "renren_bind_info where `uid`='{$uid}'");
     } elseif ('kaixin' == $this->Get['type']) {
         $this->DatabaseHandler->Query("delete from " . TABLE_PREFIX . "kaixin_bind_info where `uid`='{$uid}'");
     }
     json_result('ok', $setting ? 0 : 1);
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:30,代碼來源:misc.mod.php

示例11: sinaFaceSync

 /**
  * 構造函數
  *
  * @return sinaFaceSync
  */
 function sinaFaceSync()
 {
     $this->_getSinaUserInfo();
     $this->http = XWB_plugin::O('fsockopenHttp');
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:10,代碼來源:sinaFaceSync.class.php


注:本文中的XWB_plugin::O方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。