评论引用回复插件:Quoter

posted under Wordpress | Trackback | 17fav 收藏本文

Wordpress的评论系统中默认是没有引用功能的,如果很多人对于某个话题在同一个帖子上展开了热烈讨论的话,也许就只能手动引用了,这样既麻烦又降低了讨论者的积极性。我们可以使用Quoter(原始下载Box下载)这个插件来为自己的Blog增加简单的引用功能。

原文中的说明是英文的,我在这简单解释一下,整个步骤是这样的:
1.下载插件、解压、上传到wp-content/plugins/
2.在后台激活这个插件
3.进入外观>主题编辑器(以WP默认主题为例),找到评论页编辑
4.修改以下代码:

  1. <small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php if (function_exists('quoter_comment')) { quoter_comment(); } ?> <?php edit_comment_link('e','',''); ?></small>

其中<?php if (function_exists(’quoter_comment’)) { quoter_comment(); } ?>为后来添加的;

  1. <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"><?php if (function_exists('quoter_comment_server')) { quoter_comment_server(); } ?></textarea></p>

其中<?php if (function_exists(’quoter_comment_server’)) { quoter_comment_server(); } ?>为后来添加的;
5.保存。
这样就算完成了,如果你希望在模板其他地方也加上这个引用按钮的话可以找个自认为好的地方添加上这段代码:

  1. <?php if (function_exists('quoter_page')) { quoter_page(); } ?>

全部完成以后的效果见本站评论部分。用过以后大家一定会发现这个功能和Discuz里面的引用回复很相似,是的,就是那个功能,你可以在[quote][/quote]中随意添加内容。很简单,但是很实用,所以推荐一下!


Tags: ,
可以任意转载, 转载时请务必以超链接形式标明文章原始出处及此声明
本文地址:http://interjc.net/archives/2006/12/11/wp-quoter.html

相关文章:

13条留言

(必填)
(必填,不会被显示)