Empty Google Friend Connect Bar in WordPress

[English]
It confused me a lot. Now I found the reason, in short, there is some conflict between Google Friend Connect (GFC) and prototype.js (some plugins of WP used this JS lib).
Workaround - add the code below just before the generated gadget code.

<script>
window.JSON = {
 parse: function(st){
   return st.evalJSON();
 },
 stringify: function(obj){
   return Object.toJSON(obj);
 }
};
</script>

For more detail, see this.

[Chinese]
发现Google Friend Connect (GFC) 小工具在Wordpress显示空白的解决办法,希望对别人有用。
GFC的JS代码和prototype.js相冲突(很多WP插件使用这个JS库),解决办法:在生成的gadget代码前加入以下代码即可。

<script>
window.JSON = {
 parse: function(st){
   return st.evalJSON();
 },
 stringify: function(obj){
   return Object.toJSON(obj);
 }
};
</script>

详情:看这里

随机文章:

Empty Google Friend Connect Bar in WordPress》上有 2 条评论

  1. 加了这段代码到GOOGLE生成的代成之前,为什么还是不能显示呢?你成功了吗?帮帮忙。

发表评论

电子邮件地址不会被公开。

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>