在之前一段时间里,我发现了ZBlog的用户中心,其中有个做的比较好的LayerCenter,但是这个收费很高,我表示用不起,后面发现唐朝大大提供了用户中心百搭版本,可以支持各种集成,然后有很多大佬们根据这个百搭版本的用户中心做了各种适配,而我有幸拿到了一个田星用户中心的版本。官方提供的插件,请阅读《ZBlog PHP会员中心插件:用户中心》
毕竟没有付费,是从网络上收集到的资源,其中的第三方登录的功能就用不了,经过尝试解决,还是处理不了,问题是这样的
1、首先配置好qq互联的回调地址、appid、appkey等信息
2、进入到登录页面,点击qq登录
3、完成操作后,提示如图
4、经过调试发现是zb_system/function/c_system_event.php的59行报错
至于为何其中会报错,就有点弄不清楚了,花费了不少时间,既然还解决不了,我不如换种方式解决
5、在应用中心,下载QQ互联插件
6、启用设置,并重新设置回调地址
7、从下方调用内容中获取代码
点击复制代码 Markup
<a href="https://www.zjh336.cn/zb_system/cmd.php?act=os_qqconnect&type=login" class="os-qqconnect-link"><img src="https://aliyunoss.zjh336.cn/plugin/os_qqconnect/static/icon/qq_d_24_gray.png" alt="QQ登录" /></a>
直接取其中zb_system/cmd.php?act=os_qqconnect&type=login 即可
8、打开可道云文件管理器,在/zb_users/plugin/tx_user_theme目录下搜索/plugin/YtUser/login.php
9、打开全部文件,将zb_users/plugin/YtUser/login.php替换为zb_system/cmd.php?act=os_qqconnect&type=login
10、返回后台首页,清空缓存并重新编译模板
11、再次尝试点击登录页面的qq图标,跳转页面
如有账号,输入用户名密码后点击登录并绑定,如果没有账号,点击又下角生成账户
12、再次点击用户中心,登录界面,显示内容为刚注册用户
13、点击发布文章,显示界面如下,富文本编辑器工具栏内容太少
14、使用可道云文件管理器,打开zb_users/plugin/YtUser/function/yt_event.php
其中工具栏代码toolbars仅仅只有五个,将其中中括号部分替换如下代码
点击复制代码 Markup
[["fullscreen","source","|","undo","redo","|","bold","italic","underline","fontborder","strikethrough","superscript","subscript","removeformat","formatmatch","autotypeset","blockquote","pasteplain","|","forecolor","backcolor","insertorderedlist","insertunorderedlist","selectall","cleardoc","|","rowspacingtop","rowspacingbottom","lineheight","|","customstyle","paragraph","fontfamily","fontsize","|","directionalityltr","directionalityrtl","indent","|","justifyleft","justifycenter","justifyright","justifyjustify","|","touppercase","tolowercase","|","link","unlink","anchor","|","imagenone","imageleft","imageright","imagecenter","|","simpleupload","insertimage","emotion","scrawl","insertvideo","music","attachment","map","gmap","insertframe","insertcode","webapp","pagebreak","template","background","|","horizontal","date","time","spechars","snapscreen","wordimage","|","inserttable","deletetable","insertparagraphbeforetable","insertrow","deleterow","insertcol","deletecol","mergecells","mergeright","mergedown","splittocells","splittorows","splittocols","charts","|","print","preview","searchreplace","drafts","help"]]
15、后台清空缓存并重新编辑后,查看发布页面,工具栏齐全
直接将文件解压到zb_users/plugin目录下即可,启用田星用户中心插件时,可先关闭应用中心,待启动后再打开
本文链接:http://78moban.cn/post/7834.html
版权声明:站内所有文章皆来自网络转载,只供模板演示使用,并无任何其它意义!