我的 Facebook 评论代码是:
<fb:comments url="<?=$this_url?>" width="600" xid="<?=$this_unique_xid?>" notify="true" candelete="true" simple="1" numposts=1 url="http://www.veethi.com"></fb:comments>
现在如果我想删除警告消息:
警告:此评论插件正在兼容模式下运行,但是
还没有帖子。考虑按照建议指定显式“href”
在评论插件文档中利用所有插件
特点
“url”替换为“href”,但这样做我会丢失我的旧评论,
有遇到问题或解决方案的人请回复我。
我需要一种解决方案来删除警告消息,就像我拥有所有旧评论一样。
提前谢谢。
my fb comments code is:
<fb:comments url="<?=$this_url?>" width="600" xid="<?=$this_unique_xid?>" notify="true" candelete="true" simple="1" numposts=1 url="http://www.veethi.com"></fb:comments>
Now if i want to remove the warning message:
Warning: this comments plugin is operating in compatibility mode, but
has no posts yet. Consider specifying an explicit ‘href’ as suggested
in the comments plugin documentation to take advantage of all plugin
features
I need to replace "url" to "href", but by doing this i lose my old comments,
Is anyone who facing the problem or solution pls, reply me.
I need one solution that remove the warning message and the same way i have all my old comments.
thankx in advance.
发布评论
评论(4)
我写了一个完整的教程,稍微使用了 JS 来解决这个问题。
访问 教程
我所做的是:
I wrote a complete tutorial with a small use of JS to solve this issue.
Visit the tutorial
What I did was:
我使用
Instead of
<fb:comments ...
, I used<div class="fb-comments" ...
and then everything worked correctly.https://developers.facebook.com/docs/reference/plugins/comments/
输入您的网站网址,设置您想要在评论中发布的帖子数量,获取代码。第一部分将其放在 header 中,位于 single.php(单篇文章模板)中的
和
之后。删除
并添加来自 facebook 的那个 ;) 非常适合我 ;)
https://developers.facebook.com/docs/reference/plugins/comments/
Put your website URL, set the number of posts that you want to have in comments, get the code. First part put it in header, right after
<body>
and the<div>
in single.php (single post template). Delete</div><?php comments_template(); ?></div>
and add the one from facebook ;) Works perfect for me ;)@gil-goldshlager,感谢这个解决方法,我认为很多开发人员都在寻找这个。我自己在我的一个网站上很长一段时间以来都在努力解决这个问题:sharemovi.es
我认为您所做的最重要的事情是并排显示旧评论和新评论。
不幸的是,在某些情况下,黄色框仍然出现,并且一些评论因此丢失:
确定:2011 年 12 月 15 日之后发布,没有评论 (http://sharemovi.es/theprestige)
好的:均在 2011 年 12 月 15 日之后发布 + 评论(http://sharemovi.es/biutiful)
好的:都是在 2011 年 12 月 15 日之前发帖+评论 ( http://sharemovi.es/thesocialnetwork,http://sharemovi.es/battlelosangeles 和 http://sharemovi.es/thequickandthedead ) - 很高兴看到这些评论回来!
不行:2011 年 12 月 15 日之前发帖,没有评论 - 这里有 2 个问题:
:黄色框,显示“警告:此评论插件正在兼容模式下运行,但还没有帖子。请考虑按照评论插件文档中的建议指定显式的“href”,以利用所有插件功能。”
b. 2011 年 12 月 15 日之后发表的帖子/页面的评论消失(没有评论:http://sharemovi.es/fromdusktilldawn< /a>,http://sharemovi.es/waiting,带有评论 - 我检查过审核面板 - http://sharemovi.es/ellesappelaitsarah 和 http://sharemovi.es/thegame )
总之,我现在收到的评论比以前多了,所以再次感谢。不过黄色的盒子实在是太丑了,看起来不太专业。 Facebook 的设计决策非常糟糕!
希望您能对此进行调查,我很乐意尽可能提供帮助。
干杯
鲍勃
@gil-goldshlager, thanks for this workaround, I think a lot of developers are looking for this. I myself are struggling with this since a long time on one of my sites: sharemovi.es
I think most important thing you managed is to show old vs new comments side by side.
Unfortunately the yellow box still shows up in some instances, and some comments get lost consequently :
OK: post after 12.15.2011 without comments (http://sharemovi.es/theprestige)
OK: both post + comments after 12.15.2011 (http://sharemovi.es/biutiful)
OK: both post + comments before 12.15.2011 (http://sharemovi.es/thesocialnetwork, http://sharemovi.es/battlelosangeles and http://sharemovi.es/thequickandthedead) - really nice to see those comments back!
not OK: posts before 12.15.2011 without comments - 2 problems here:
a. yellow box with "Warning: this comments plugin is operating in compatibility mode, but has no posts yet. Consider specifying an explicit 'href' as suggested in the comments plugin documentation to take advantage of all plugin features."
b. the comments for those posts/pages that were made AFTER 12.15.2011 disappear (without comments: http://sharemovi.es/fromdusktilldawn, http://sharemovi.es/waiting, with comments - I checked moderation panel - http://sharemovi.es/ellesappelaitsarah and http://sharemovi.es/thegame )
All together, I get more comments now than before, so thanks again. However the yellow box is quite ugly, doesn't look professional. Very bad design decision from Facebook!
Hopefully you can look into this, I am happy to assist where possible.
Cheers
Bob