1 Star 4 Fork 2

Crazy / PHPCrazy.QQConnect

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

#PHPCrazy.QQConnect

PHPCrazy

插件名:PHPCrazy QQ互联登录插件
插件作者:Crazy mailzhangyun@qq.com
主页:http://zhangyun.org

##描述

本插件是 PHPCrazy 的QQ互联登录插件,安装之后你网站的用户可以使用QQ号码登陆你的站点

如需使用此插件请先到 http://connect.qq.com 做好准备工作,具体请查看 QQ互联文档资料

##安装过程

###修改PHPCrazy

打开文件

includes/controller/main/login.php

找到

// 登录
} else {

    // 如果已登录则跳转到用户中心
	if ($GLOBALS['U']['login']) {
		header('Location: ' .HomeUrl('index.php/main:user/'));
		AppEnd();
	}

	$submit = isset($_POST['submit']) ? true : false;
	$account = isset($_POST['account']) ? $_POST['account'] : '';
	$password = isset($_POST['password']) ? $_POST['password'] : '';

	$continue = true;
	$error = array();

下一行添加

$QQC = new QQConnect();

打开文件

themes/AmazeUI/login.tpl.php

找到

<a href="#" class="am-btn am-btn-secondary am-btn-sm"><i class="am-icon-qq am-icon-sm"></i> Q Q</a>

替换

<a href="<?php echo $QQC->Login(); ?>" class="am-btn am-btn-secondary am-btn-sm"><i class="am-icon-qq am-icon-sm"></i> Q Q</a>

打开文件

themes/AmazeUI/user.tpl.php

找到

<li><?php echo L('注册时间'); ?><?php echo date('Y-m-d H:i', $GLOBALS['U']['regtime']); ?></li>

下一行添加

    				<li>
					<?php echo L('QQC 设置'); ?>
						<?php if (empty($GLOBALS['U']['qq_openid'])): ?>
						<a href="<?php echo HomeUrl('index.php/QQConnect:bind/'); ?>"><?php echo L('QQC 绑定'); ?></a>
						<?php else: ?>
						<a href="<?php echo HomeUrl('index.php/QQConnect:unbind/'); ?>"><?php echo L('QQC 解除'); ?></a>
						<?php endif; ?>
					</li>

###复制文件 复制文件到 PHPCrazy 的根目录

###安装 访问 http://你的域名/index.php/QQConnect:install/

###设置 设置您的appid, appkey, scope

The MIT License (MIT) Copyright (c) 2015 Crazy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

PHPCrazy的QQ互联登录插件 展开 收起
PHP
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
PHP
1
https://gitee.com/Crazy-code/PHPCrazy.QQConnect.git
git@gitee.com:Crazy-code/PHPCrazy.QQConnect.git
Crazy-code
PHPCrazy.QQConnect
PHPCrazy.QQConnect
master

搜索帮助