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>

详情:看这里

随机文章:

2 Comments

  1. Kin 2009-11-23,1:21 上午

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

  2. 无叶 2009-11-23,10:18 下午

    应该可以显示了,你现在是什么状况呢?给个链接?

Add a Comment