两款wordpress评论回复插件
wordpress本身不带有评论回复功能,找到了两款评论回复插件:
1.Ajax Comments-Reply修订版,该插件原创于懶懶喵日記,由阅微堂修正。
Ajax Comments-Reply主要实现下面两个功能:
1.回复无需刷新。
2.可以直接回复留言,使得讨论更有针对性。
此修订版主要改了一下几个方面:
重写所有JS函数。原来懶懶喵所用的Ajax prototype被全部抛弃,原因是因为prototype功能强大,但多数都用不上,代码过于冗长,不如最简单的AJAX代码实用。
修改了原插件发表留言之后别的留言全部消失的BUG(似乎是懶懶喵特意如此,原因不明)。
修改了留言栏的式样,使得比较好看一点——这个地方用户也可以自定义,只需保留原来的ID和Name属性即可。
压缩包内容,包含在一个ajaxcomment的文件夹:
1.comments.php // 评论栏模版文件,可修改
2.comments-ajax.php // 留言处理文件
3.comment-reply.php // 插件管理文件
4.comment.js // javascript文件,我给了详细注释,可对照修订。
5.comment.css // css文件,控制评论栏式样,可自定义
插件安装使用:
1.从上面链接下载安装文件,解压缩后得到一个ajaxcomment文件夹
2.把文件夹的comments.php放到模版目录下,覆盖同名文件——注意备份原来的comments.php。
3.将ajaxcomment文件夹整个放入插件目录。
4.到管理界面启用Ajax Comments-Reply修订版插件。
插件卸载:
1.将模版目录下备份的comments.php复原,如果忘记备份,重新下载一份你的主题,把comments.php弄回来。
管理界面停用插件或者直接删除此插件文件。
插件自定义:
1.comments.php里控制已有评论显示以及评论表格的显示,可修改,注意保留所有id, name, class信息。
2.comment.css通过css控制评论栏的式样,可直接修改。
2.Quoter
安装方法:
下载,上传,激活,添加代码到模板下的comments.php 。
如何添加代码?以下是原文:
quoter_comment()-
Generates the link to be clicked to quote a comment. It must be inserted in the comments loop, for example in the
commentmetadatasection.Example:
(already existing code is grayed and is from WordPress default theme; the code to add is in black)<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>
quoter_comment_server()-
Generates quoted text inside the comment textarea for users that don’t have Javascript enabled. It’s dependant from
quoter_comment(). It must be inserted inside the<textarea></textarea>tag in the comment form.Example:
(already existing code is grayed and is from WordPress default theme; the code to add is in black)<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"><?php if (function_exists('quoter_comment_server')) { quoter_comment_server(); } ?></textarea></p>
quoter_page()-
Generates a link that allows users to quote any text in a page, not only a comment. It can be inserted in any part of the file (outside the loop), preferably in the comment form, near the textarea. It’s totally independent from the other two functions.
Example:
<?php if (function_exists('quoter_page')) { quoter_page(); } ?> -
点击下载quoter_1.1
3 Comments:
是ajax吗?
呵呵呵 不错的东西
感觉还行啊