QQ互联插件乱码问题解决
最近发现论坛有人反应QQ互联插件乱码,出于以往的经验,是由于安装时与站点编码不一致导致。
关键现在安装的时候会自动选择与站点编码一致的xml文件安装,实在搞不懂为啥还会出现这类问题,焦虑了,有问题的站长不妨把你的安装过程详细写下来,方便我们排查是否是bug。
由于QQ互联是系统插件,是无法卸载和重新安装的,必须要通过数据库操作才能解决此类问题。
解决方法:
第一种方法:
1.根据您网站的编码,选择执行下面对应的sql(需要在数据库里执行)。
简体GBK编码的站点:
UPDATE pre_common_plugin SET modules = 'a:6:{i:0;a:10:{s:4:"name";s:7:"connect";s:4:"menu";s:0:"";s:3:"url";s:0:"";s:4:"type";s:2:"11";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"0";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}i:1;a:10:{s:4:"name";s:7:"spacecp";s:4:"menu";s:6:"QQ绑定";s:3:"url";s:0:"";s:4:"type";s:1:"7";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"1";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}i:2;a:10:{s:4:"name";s:6:"qqshow";s:4:"menu";s:4:"QQ秀";s:3:"url";s:0:"";s:4:"type";s:1:"7";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"2";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}i:3;a:10:{s:4:"name";s:7:"connect";s:4:"menu";s:0:"";s:3:"url";s:0:"";s:4:"type";s:2:"28";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"0";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}s:6:"system";i:2;s:5:"extra";a:2:{s:11:"installtype";s:6:"SC_GBK";s:10:"langexists";i:1;}}' WHERE name = 'QQ互联';
简体UFT-8编码的站点:
UPDATE pre_common_plugin SET modules = 'a:6:{i:0;a:10:{s:4:"name";s:7:"connect";s:4:"menu";s:0:"";s:3:"url";s:0:"";s:4:"type";s:2:"11";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"0";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}i:1;a:10:{s:4:"name";s:7:"spacecp";s:4:"menu";s:6:"QQ绑定";s:3:"url";s:0:"";s:4:"type";s:1:"7";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"1";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}i:2;a:10:{s:4:"name";s:6:"qqshow";s:4:"menu";s:4:"QQ秀";s:3:"url";s:0:"";s:4:"type";s:1:"7";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"2";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}i:3;a:10:{s:4:"name";s:7:"connect";s:4:"menu";s:0:"";s:3:"url";s:0:"";s:4:"type";s:2:"28";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"0";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}s:6:"system";i:2;s:5:"extra";a:2:{s:11:"installtype";s:7:"SC_UTF8";s:10:"langexists";i:1;}}' WHERE name = 'QQ互联';
2.执行完上述sql后,进入站点后台-》工具下,点击更新缓存。
第二种方法:
如果第一种方法执行后不起效,您进入您网站目录/source/plugin/qqconnect目录下,检查是否存在discuz_plugin_qqconnect.xml文件。
如果存在,则可以按下面的方法再试下。
不需要区分网站编码,执行下面的sql:
UPDATE pre_common_plugin SET modules = 'a:6:{i:0;a:10:{s:4:"name";s:7:"connect";s:4:"menu";s:0:"";s:3:"url";s:0:"";s:4:"type";s:2:"11";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"0";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}i:1;a:10:{s:4:"name";s:7:"spacecp";s:4:"menu";s:6:"QQ绑定";s:3:"url";s:0:"";s:4:"type";s:1:"7";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"1";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}i:2;a:10:{s:4:"name";s:6:"qqshow";s:4:"menu";s:4:"QQ秀";s:3:"url";s:0:"";s:4:"type";s:1:"7";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"2";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}i:3;a:10:{s:4:"name";s:7:"connect";s:4:"menu";s:0:"";s:3:"url";s:0:"";s:4:"type";s:2:"28";s:7:"adminid";s:1:"0";s:12:"displayorder";s:1:"0";s:8:"navtitle";s:0:"";s:7:"navicon";s:0:"";s:10:"navsubname";s:0:"";s:9:"navsuburl";s:0:"";}s:6:"system";i:2;s:5:"extra";a:2:{s:11:"installtype";s:0:"";s:10:"langexists";i:1;}}' WHERE name = 'QQ互联';
执行完后,进入站点后台-》工具下更新缓存。
Discuz官方原文地址:
http://www.discuz.net/thread-2940572-1-1.html
如果还有问题请到Discuz官方原问跟帖回复。 :)