2009-10-31
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>
详情:看这里。
