This plug-in for QQ weibo FaceBook login
Installation instructions:
1. Unpack the QQ_ weibo _facebbok login plugin. Zip file, copy the admin catalog image system. These four folders and hybridauth PHP to the root directory of your website.
2. Your website backstage to install this plug-in
3. Configure QQ weibo key secret information callback address: http://xxxx.com/hybridauth.php
4. From the database/customer_authentication. SQL imported into the database, if your watch is a prefix please replace oc_ for your custom table prefix.
5. Add the foreground display code, for example, I wanted to add QQ login on the login page.
Please in the catalog/controller/account/login. Add the PHP page
/ / QQ weibo facebook login information
$data [' hybrid_show] = 0;
If ($this - > config - > get (' hybrid_auth_status)) {
$data [' hybrid_show] = 1;
$data [' hybrid_auth] = array ();
Foreach ($this - > config - > get (' hybrid_auth) as $config) {
/ / FB: : Log ($config);
$data [' hybrid_auth] [] = array (
'provider' = > $this - > url - > link (' hybrid/auth ', 'the provider ='. $config [' provider ']),
'image' = > HTTP_SERVER. 'image/themezee_social_icons/'. The strtolower ($config [' provider']. 'the PNG'),
'the product - review' = > HTTPS_SERVER. 'index.php?The route = hybrid/auth&source = product - review&provider = '$config [' provider'],
"Redirect" = > base64_encode ($this - > url - > link (' information/contact),
'url' = > HTTPS_SERVER. 'index.php?The route = hybrid/auth&provider = '$config [' provider'],
'Alt' = > $config [' provider ']
);
}
}
Then add in the templates
- third-party login -- -- >
{PHP if ($hybrid_show)?>
{PHP foreach ($hybrid_auth as $config)?>
< a style = "float: right; margin - right: 5 px;"A href = "" > < img SRC = "" Alt = "" title = "" / > < / a >
PHP}?>
PHP}?>
- third-party login -- -- >
6. Please in the admin/model/sale/customer. PHP within the method deleteCustomer added
$this - > db - > query (" DELETE FROM ". DB_PREFIX. "customer_authentication WHERE customer_id = '". (int) $customer_id."' ");
The meaning of this sentence is in the delete customer, at the same time, the third-party login information
QQ群 50415210 群共享有免费插件,请加群查看
技术支持 30171310@qq.com
如有其他做站需求,请联系,谢谢.
--------------------------------------------------------------------------------------------------------------------------------
此插件适用 QQ 微博 FaceBook 登入
安装说明:
1. 解压 QQ_微博_facebbok登入插件.zip 文件 , 拷贝其中的 admin catalog image system 这四个文件夹和hybridauth.php 到你网站的根目录.
2. 上你网站的后台安装 此插件
3. 配置 QQ 微博的key secret信息 回调地址写: http://xxxx.com/hybridauth.php
4. 从 database/customer_authentication.sql 导入到的数据库中,如果你的表是有前缀的 请自行替换 oc_为你的自定义表前缀.
5. 添加前台显示代码,比如我想在登入页面 添加 QQ 登入.
请在 catalog/controller/account/login.php 页面添加
//QQ 微博 facebook 登入信息
$data['hybrid_show'] = 0;
if($this->config->get('hybrid_auth_status')){
$data['hybrid_show'] = 1;
$data['hybrid_auth'] = array();
foreach($this->config->get('hybrid_auth') as $config){
//FB::Log($config);
$data['hybrid_auth'][] = array(
'provider' => $this->url->link('hybrid/auth', 'provider=' . $config['provider']),
'image' => HTTP_SERVER . 'image/themezee_social_icons/' . strtolower($config['provider']. '.png'),
'product-review' => HTTPS_SERVER . 'index.php?route=hybrid/auth&source=product-review&provider=' . $config['provider'],
'redirect' => base64_encode($this->url->link('information/contact')),
'url' => HTTPS_SERVER . 'index.php?route=hybrid/auth&provider=' . $config['provider'],
'alt' => $config['provider']
);
}
}
然后在模板添加
<!-- 第三方登入 -->
<?php if ($hybrid_show) { ?>
<?php foreach ($hybrid_auth as $config) { ?>
<a style="float:right; margin-right:5px;" href="<?php echo $config['provider']; ?>"><img src="<?php echo $config['image']; ?>" alt="<?php echo $config['alt']; ?>" title="<?php echo $config['alt']; ?>"/></a>
<?php } ?>
<?php } ?>
<!-- 第三方登入 -->
6. 请在 admin/model/sale/customer.php 在方法 deleteCustomer 内添加
$this->db->query("DELETE FROM " . DB_PREFIX . "customer_authentication WHERE customer_id = '" . (int)$customer_id . "'");
这句话的意思是在删除客户的时候,同时把第三方登入的信息也删除.
--------------------------------------------------------------------------------------------------------------------------------
QQ群 50415210 群共享有免费插件,请加群查看
技术支持 30171310@qq.com
如有其他做站需求,请联系,谢谢.
Login and write down your comment.
Login my OpenCart Account