function wp_connect_button() { global $login_loaded, $plugin_url, $wptm_basic, $wptm_connect; $style = stripslashes($wptm_connect['custom_style']); // 自定义风格 if ($wptm_connect['style'] == 4 && $style) { if (strpos($style, 'v=1.0.2&widget=5') !== false && strpos($style, 'style=popup') === false) { $style = "<script type='text/javascript' charset='utf-8' src='http://open.denglu.cc/connect/logincode?appid=" . $wptm_basic['appid'] . "&v=1.0.2&widget=5&styletype=1&size=auto_28'></script>"; } echo '<div class="connectBox' . $login_loaded . '">'; echo $style; echo '</div>'; } else { if ($platform = get_user_denglu_platform()) { // 登录按钮本地化,读取失败时用默认js代码暂时代替 echo '<!-- 使用合作网站登录 来自 WordPress连接微博 插件 -->'; echo '<style type="text/css">'; echo '.t_login_text {margin:0; padding:0;}'; echo '.t_login_button {margin:0; padding: 5px 0;}'; echo '.t_login_button a{margin:0; padding-right:4px; line-height:15px}'; echo '.t_login_button img{display:inline; border:none;}'; echo '</style>'; echo '<p class="t_login_text t_login_text' . $login_loaded . '">您可以用合作网站帐号登录:</p>'; // 根据情况用css隐藏文字,class节点请看具体网页源文件 echo '<p class="connectBox' . $login_loaded . ' t_login_button">'; foreach ($platform as $mediaNameEn => $mediaName) { echo "<a href=\"{$plugin_url}/login.php?go={$mediaNameEn}\" title=\"{$mediaName}\" rel=\"nofollow\"><img src=\"{$plugin_url}/images/btn_{$mediaNameEn}.png\" /></a>"; } echo '</p>'; } else { echo "<div class='connectBox" . $login_loaded . "'><script type='text/javascript' charset='utf-8' src='http://open.denglu.cc/connect/logincode?appid=" . $wptm_basic['appid'] . "&v=1.0.2&widget=5&styletype=1&size=auto_28'></script></div>"; } } }
function denglu_bind_account($user) { $account = array('qzone' => array(ifab($user->qqid, $user->qqmid), '腾讯QQ'), 'sina' => array(ifab($user->stid, $user->smid), '新浪微博'), 'tencent' => array(ifab($user->tqqid, $user->qmid), '腾讯微博'), 'renren' => array(ifab($user->renrenid, $user->rmid), '人人网'), 'taobao' => array($user->tbmid, '淘宝网'), 'alipayquick' => array($user->alimid, '支付宝'), 'douban' => array(ifab($user->dtid, $user->dmid), '豆瓣'), 'baidu' => array($user->bdmid, '百度'), 'kaixin001' => array(ifab($user->kaixinid, $user->kmid), '开心网'), 'sohu' => array(ifab($user->sohuid, $user->shmid), '搜狐微博'), 'netease' => array(ifab($user->neteaseid, $user->nmid), '网易微博'), 'netease163' => array($user->wymid, '网易通行证'), 'tianya' => array(ifab($user->tytid, $user->tymid), '天涯微博'), 'guard360' => array($user->guard360mid, '360'), 'tianyi' => array($user->tyimid, '天翼189'), 'windowslive' => array($user->mmid, 'MSN'), 'google' => array($user->gmid, 'Google'), 'yahoo' => array($user->ymid, 'Yahoo'), 'twitter' => array(ifab($user->twitterid, $user->twittermid), 'Twitter'), 'facebook' => array($user->facebookid, 'Facebook')); if ($platform = get_user_denglu_platform()) { // V2.3 return array_intersect_key($account, $platform); } return $account; }