当前位置: 首页>>代码示例>>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;未经允许,请勿转载。