字preSS - 有评论直列AJAX像计算器 [英] wordpress - having comments inline ajax like in stackoverflow

查看:157
本文介绍了字preSS - 有评论直列AJAX像计算器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个字preSS博客,想给人们添加评论说,在计算器相同的用户体验。有一些意见AJAX的插件在那里,但我不能找到一个正在运行的,可以让你内联主页上,去添加不先钻意见分解成一个单独的单篇文章的页面。

i have a wordpress blog and want to give people the same user experience for adding comments that is in stackoverflow. There are a number of comments ajax plugins out there but i can't find a working one that allows you to inline on the main page, go in and add comments without first drilling down into a seperate single post page.

谁能帮助这里是一个字preSS插件或php code做到这一点。

Can anyone help here with either a wordpress plugin or php code to do this.

推荐答案

我从来没有能够得到AJAXed字preSS做什么,我(显然提问)想要做的。

I was never able to get AJAXed Wordpress to do what me (and apparently the questioner) want to do.

我使用自定义的解决方案,让使用外挂被称为内嵌的Ajax评论。我有一个时间赫克找到下载链接,但这里有一个仍然有效: HTTP: //kashou.net/files/inline-ajax-comments.zip

I use a custom solution that makes use of a plug-in called Inline Ajax Comments. I had a heck of a time finding a download link, but here's one that still works: http://kashou.net/files/inline-ajax-comments.zip

在Word中preSS'的主题编辑器,我编辑的index.html。以下后:

In WordPress' theme editor, I edit index.html. After the following:

<?php the_content(''); ?>

我想补充(使插件,当然后):

I add (after enabling the plug-in of course):

<?php ajax_comments_link(); ?>
<?php ajax_comments_div(); ?>

我再编辑插件的PHP文件本身。我注释掉code块如下:

I then edited the plugin PHP file itself. I commented out blocks of code as follows:

        	if ($comment_count == '1') {
    		echo('<span id="show-inline-comments-'. $id .'">  ');
/*  			echo('<a href="javascript:;" id="show-inline-comments-link-'. $id .'" onmouseup="ajaxShowComments('. $id .', \''. $throbberURL .'\', \''. $commentpageURL .'\'); return false;">show comment &raquo;</a>'); 
*/
    		echo('</span>');
    		echo('<span id="hide-inline-comments-'. $id .'" style="display: none;">  ');
/*  			echo('<a href="#comments-'. $id .'" onmouseup="ajaxHideComments('. $id .', \''. $throbberURL .'\', \''. $commentpageURL .'\'); return true;">&laquo; hide comment</a>'); 
*/
    		echo('</span>');
    	} else if ($comment_count > '1') {
    		echo('<span id="show-inline-comments-'. $id .'">  ');
/*  			echo('<a href="javascript:;" id="show-inline-comments-link-'. $id .'" onmouseup="ajaxShowComments('. $id .', \''. $throbberURL .'\', \''. $commentpageURL .'\'); return false;">show comments &raquo;</a>'); 
*/
    		echo('</span>');
    		echo('<span id="hide-inline-comments-'. $id .'" style="display: none;">  ');
/*  			echo('<a href="#comments-'. $id .'" onmouseup="ajaxHideComments('. $id .', \''. $throbberURL .'\', \''. $commentpageURL .'\'); return true;">&laquo; hide comments</a>'); 
*/
    		echo('</span>');
    	}

IIRC,这就是我所要做的,但让我知道,如果不为你工作。我试图扭转工程师自己的解决方案,因为它似乎是你想做的事,以及到底是什么。

IIRC, that's all I had to do, but let me know if that doesn't work for you. I'm trying to reverse engineer my own solution since it seems to be exactly what you want to do as well.

这篇关于字preSS - 有评论直列AJAX像计算器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆