<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>木木木木木 &#187; 评论</title>
	<atom:link href="http://immmmm.com/tag/%e8%af%84%e8%ae%ba/feed" rel="self" type="application/rss+xml" />
	<link>http://immmmm.com</link>
	<description>不问明天，悠然浪费</description>
	<lastBuildDate>Mon, 06 Feb 2012 10:56:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>折腾，需要理由吗？</title>
		<link>http://immmmm.com/no-reason-for-modify-themes.html</link>
		<comments>http://immmmm.com/no-reason-for-modify-themes.html#comments</comments>
		<pubDate>Sat, 03 Dec 2011 16:40:52 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[双击事件]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1864</guid>
		<description><![CDATA[一晃十二月，FF8下主题文字文章变白的BUG实在是看不下去了。另外，这月将是一场攻坚战，真正意义上的检测：期末考试。SO，此周不折腾更待何时！ 主题样式上就把边栏放右边了，此次折腾主要是加入了jQuery，因为这货折腾起来爽撒撒！！ 1.Slimbox2的图片特效，这个可以有： if&#40;$&#40;'.postContent a[rel!=link]:has(img)'&#41;.length &#62; 0&#41;&#123; //判断文章内容区域是否有链接大图的图片，有则： $.getScript&#40;&#34;&#60;?php bloginfo('template_url'); ?&#62;/js/slimbox2.js&#34;&#41;; //动态加载图片特效的js。 //此处有点作，一个判断只为省下4KB的加载。 &#125;; 2.Ajax评论提交，这个必须有： 虽说这对博主来说没啥大关系，一般咱都是后台直接回复评论的，反正后台是Ajax的，管他前台呢～一直认为，木有集成Ajax评论提交的主题都是不负责任。现在我想负起来了，就加呗！ 实现方法当然还是依旧使用牛XX的Willin大师出品，不过适当的改进还是可以有滴～ 比如说，加个新评论提交“双击再编辑”：新评论提交后，突然发现想加个YD的表情？耶，试试双击它～ 额，有突然不想加了……那就点击“取消编辑”呗～ $&#40;'#comments .live'&#41;.live&#40;'dblclick',function&#40;&#41;&#123;$&#40;this&#41;.next&#40;&#41;.children&#40;'a'&#41;.click&#40;&#41;&#125;&#41;; //其实偶就是把那个编辑的链接隐藏了，然后以双击模拟点击，够XD吧～ 3.Ctrl+Enter快捷提交，这个当然有： $&#40;'textarea'&#41;.keypress&#40;function&#40;e&#41;&#123; if&#40;e.ctrlKey &#38;&#38; e.which == 13 &#124;&#124; e.which == 10&#41; &#123; $&#40;this&#41;.parent&#40;&#41;.submit&#40;&#41;; &#125; &#125;&#41;; 4.评论部分双击事件，这个偷偷有： 双击某条评论，快捷回复；再双击，取消回复此人。 $&#40;'#comments .comment-body'&#41;.dblclick&#40;function&#40;&#41;&#123; //其实也就是用双击事件来模拟用户点击那个“回复”链接的点击事件～ var crl=$&#40;'#cancel-comment-reply-link'&#41;; if&#40;$&#40;this&#41;.next&#40;'#respond'&#41;.length &#62; 0&#41; &#123; crl.click&#40;&#41; &#125;else&#123; $&#40;this&#41;.find&#40;'.comment-reply-link'&#41;.click&#40;&#41;; crl.text&#40;&#34;取消 @&#34;+$&#40;this&#41;.find&#40;'.name'&#41;.text&#40;&#41;&#41;; //上句一个小功能，显示是@回复谁滴～ &#125; [...]]]></description>
			<content:encoded><![CDATA[<p>一晃十二月，FF8下主题文字文章变白的BUG实在是看不下去了。另外，这月将是一场攻坚战，真正意义上的检测：期末考试。SO，此周不折腾更待何时！</p>
<p>主题样式上就把边栏放右边了，此次折腾主要是加入了jQuery，因为这货折腾起来爽撒撒！！</p>
<p><span style="color: #36f;"><strong>1.Slimbox2的图片特效，这个可以有：</strong></span><span id="more-1864"></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:Microsoft Yahei;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.postContent a[rel!=link]:has(img)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>  <span style="color: #006600; font-style: italic;">//判断文章内容区域是否有链接大图的图片，有则：</span>
	$.<span style="color: #660066;">getScript</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;?php bloginfo('template_url'); ?&gt;/js/slimbox2.js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">//动态加载图片特效的js。</span>
	<span style="color: #006600; font-style: italic;">//此处有点作，一个判断只为省下4KB的加载。</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p><span style="color: #36f;"><strong>2.Ajax评论提交，这个必须有：</strong></span></p>
<p>虽说这对博主来说没啥大关系，一般咱都是后台直接回复评论的，反正后台是Ajax的，管他前台呢～一直认为，木有集成Ajax评论提交的主题都是不负责任。现在我想负起来了，就加呗！</p>
<p>实现方法当然还是依旧使用牛XX的Willin大师出品，不过适当的改进还是可以有滴～</p>
<p style="text-align: center;"><a href="http://img1.dnschina.net/files/46/immmmm/201112/dbck2.jpg"><img  alt="" src="http://img1.dnschina.net/files/46/immmmm/201112/dbck2.jpg" title=""></a></p>
<p>比如说，加个新评论提交“双击再编辑”：新评论提交后，突然发现想加个YD的表情？耶，试试双击它～</p>
<p style="text-align: center;"><a href="http://img1.dnschina.net/files/46/immmmm/201112/dbck3jpg"><img  alt="" src="http://img1.dnschina.net/files/46/immmmm/201112/dbck3.jpg" title=""></a></p>
<p>额，有突然不想加了……那就点击“取消编辑”呗～</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:Microsoft Yahei;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#comments .live'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">live</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'dblclick'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">//其实偶就是把那个编辑的链接隐藏了，然后以双击模拟点击，够XD吧～</span></pre></div></div>

<p><span style="color: #36f;"><strong>3.Ctrl+Enter快捷提交，这个当然有：</strong></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:Microsoft Yahei;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'textarea'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">keypress</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">ctrlKey</span> <span style="color: #339933;">&amp;&amp;</span> e.<span style="color: #660066;">which</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">13</span> <span style="color: #339933;">||</span> e.<span style="color: #660066;">which</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><span style="color: #36f;"><strong>4.评论部分双击事件，这个偷偷有：</strong></span></p>
<p style="text-align: center;"><a href="http://img1.dnschina.net/files/46/immmmm/201112/dbck1.jpg"><img  alt="" src="http://img1.dnschina.net/files/46/immmmm/201112/dbck1.jpg" title=""></a></p>
<p>双击某条评论，快捷回复；再双击，取消回复此人。</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:Microsoft Yahei;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#comments .comment-body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">dblclick</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">//其实也就是用双击事件来模拟用户点击那个“回复”链接的点击事件～</span>
	<span style="color: #003366; font-weight: bold;">var</span> crl<span style="color: #339933;">=</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#cancel-comment-reply-link'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#respond'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		crl.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.comment-reply-link'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		crl.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;取消 @&quot;</span><span style="color: #339933;">+</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.name'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #006600; font-style: italic;">//上句一个小功能，显示是@回复谁滴～</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><span style="color: #36f;"><strong>5.暂时木有了……</strong></span></p>
<p>擦，0:38，我去去！</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/no-reason-for-modify-themes.html/feed</wfw:commentRss>
		<slash:comments>83</slash:comments>
		</item>
		<item>
		<title>评论框显示已登录用户的头像</title>
		<link>http://immmmm.com/display-login-user-avatar.html</link>
		<comments>http://immmmm.com/display-login-user-avatar.html#comments</comments>
		<pubDate>Mon, 06 Jun 2011 13:12:51 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[WordPress函数]]></category>
		<category><![CDATA[头像]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1632</guid>
		<description><![CDATA[很早很早有筒子就实现了记录访客信息，第二次评论时不再需要重复输入访客信息，直接显示访客的头像用户名，这一定程度上提高了访客友好度。 WordPress大多主题在用户登录下，评论框上也会显示一句：Logged in as XXX，那是否也能让已登录用户显示头像呢？ 答案当然是肯定的，不然也就没有此文了～ 先来看看WordPress默认主题里关于已登录用户提示的这个代码段（comments.php）： &#160; &#60;?php if &#40; is_user_logged_in&#40;&#41; &#41; : ?&#62; &#160; &#160; &#160; &#60;p&#62;Logged in as &#60;a href=&#34;&#60;?php echo get_option&#40;'siteurl'&#41;; ?&#62;/wp-admin/profile.php&#34;&#62;&#60;?php echo $user_identity; ?&#62;&#60;/a&#62;. &#60;a href=&#34;&#60;?php echo wp_logout_url&#40;get_permalink&#40;&#41;&#41;; ?&#62;&#34; title=&#34;Log out of this account&#34;&#62;Log out &#38;raquo;&#60;/a&#62;&#60;/p&#62; &#160; &#160; &#160; &#60;?php else : ?&#62; 那怎么显示头像呢？这儿直接用 get_avatar() 可是获取不到当前登录用户的头像的，原因也显然，没指定登录用户的邮箱撒，所以得借助一个WordPress函数： get_currentuserinfo 改造后的代码段： &#160; &#60;?php [...]]]></description>
			<content:encoded><![CDATA[<p>很早很早有筒子就实现了记录访客信息，第二次评论时不再需要重复输入访客信息，直接显示访客的头像用户名，这一定程度上提高了访客友好度。</p>
<p>WordPress大多主题在用户登录下，评论框上也会显示一句：Logged in as XXX，那是否也能让已登录用户显示头像呢？</p>
<p style="text-align:center;"><img src="http://img1.dnschina.net/files/46/immmmm/201106/login.jpg" alt="" /></p>
<p><span id="more-1632"></span>答案当然是肯定的，不然也就没有此文了～</p>
<p>先来看看WordPress默认主题里关于已登录用户提示的这个代码段（comments.php）：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_user_logged_in<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&nbsp;
&nbsp;
&lt;p&gt;Logged in as &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/profile.php&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$user_identity</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;. &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wp_logout_url<span style="color: #009900;">&#40;</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;Log out of this account&quot;&gt;Log out &amp;raquo;&lt;/a&gt;&lt;/p&gt;
&nbsp;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>那怎么显示头像呢？这儿直接用 get_avatar() 可是获取不到当前登录用户的头像的，原因也显然，没指定登录用户的邮箱撒，所以得借助一个WordPress函数： <a rel="nofollow" href="http://codex.wordpress.org/Function_Reference/get_currentuserinfo" target="_blank">get_currentuserinfo</a></p>
<p>改造后的代码段：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_user_logged_in<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">;</span>get_currentuserinfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>echo get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_email</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">35</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&nbsp;
&nbsp;
&lt;p&gt;Logged in as &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/profile.php&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$user_identity</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;. &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wp_logout_url<span style="color: #009900;">&#40;</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;Log out of this account&quot;&gt;Log out &amp;raquo;&lt;/a&gt;&lt;/p&gt;
&nbsp;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>当然，这个 <code>get_currentuserinfo</code> 包含的可不止邮箱一个信息，更多内容还请各位童鞋自个儿看WordPress官方文档咯，懂点E文还是相当有用处的撒！～</p>
<p>PS：明儿又是一年高考时？O，考过就好，不评价这玩意儿！</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/display-login-user-avatar.html/feed</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>评论楼层标识及应用</title>
		<link>http://immmmm.com/comments-floor-display.html</link>
		<comments>http://immmmm.com/comments-floor-display.html#comments</comments>
		<pubDate>Wed, 04 May 2011 03:42:15 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[楼层]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1624</guid>
		<description><![CDATA[zww大叔很早就分享了《WP主评论加上楼层》，个人也是很早就集成到主题中了，并在《评论楼层伸缩特效》中分享了自个儿使用的子评论楼层显示代码。 添加了主评论和子评论楼层显示的functions代码： &#160; function mytheme_comment($comment, $args, $depth){ &#160; $GLOBALS['comment'] = $comment; &#160; &#160; &#160; //主评论计数器初始化 begin - by zwwooooo &#160; global $commentcount; &#160; if(!$commentcount) { //初始化楼层计数器 &#160; $page = get_query_var('cpage')-1; &#160; $cpp=get_option('comments_per_page');//获取每页评论数 &#160; $commentcount = $cpp * $page; &#160; } &#160; //主评论计数器初始化 end - by zwwooooo &#160; &#160; &#160; ?&#62; &#160; &#60;li &#60;?php comment_class&#40;&#41;; ?&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>zww大叔很早就分享了<a href="http://zww.me/archives/25161" target="_blank">《WP主评论加上楼层》</a>，个人也是很早就集成到主题中了，并在<a href="http://immmmm.com/wordpress-comment-floor-stretching-effects.html" target="_blank">《评论楼层伸缩特效》</a>中分享了自个儿使用的子评论楼层显示代码。</p>
<p>添加了主评论和子评论楼层显示的functions代码： <span id="more-1625"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
function mytheme_comment($comment, $args, $depth){
&nbsp;
$GLOBALS['comment'] = $comment;
&nbsp;
&nbsp;
&nbsp;
//主评论计数器初始化 begin - by zwwooooo
&nbsp;
	global $commentcount;
&nbsp;
	if(!$commentcount) { //初始化楼层计数器
&nbsp;
		$page = get_query_var('cpage')-1;
&nbsp;
		$cpp=get_option('comments_per_page');//获取每页评论数
&nbsp;
		$commentcount = $cpp * $page;
&nbsp;
	}
&nbsp;
//主评论计数器初始化 end - by zwwooooo
&nbsp;
&nbsp;
&nbsp;
?&gt;
&nbsp;
&lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;li-comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&nbsp;
	&lt;!-- ... ... --&gt;
&nbsp;
	&lt;div class=&quot;floor&quot;&gt;
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$parent_id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_parent</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #990000;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#%1$s'</span><span style="color: #339933;">,</span> <span style="color: #339933;">++</span><span style="color: #000088;">$commentcount</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;!-- 主评论楼层号 by zwwooooo --&gt;
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$depth</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #990000;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'B%1$s'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$depth</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;!-- 子评论楼层号 By ImMmMm.com --&gt;
&nbsp;
	&lt;/div&gt;
&nbsp;
	&lt;!-- ... ... --&gt;</pre></div></div>

<p>应用是啥呢？就是评论多列显示，由于评论的li是不定高的，用inline-block行不通。只有换思路，给li加float:left;然后每3条评论之后输出一段空div用来清除浮动。这个就再集成一句php：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$commentcount</span><span style="color: #339933;">%</span><span style="color:#800080;">3</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;!-- 对主楼层做取模运算，余数是0时添加空div代码段 By ImMmMm.com --&gt;
&nbsp;
&lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;li-comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&nbsp;
	&lt;!-- ... ... --&gt;
&nbsp;
	&lt;div class=&quot;floor&quot;&gt;
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$parent_id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_parent</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #990000;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#%1$s'</span><span style="color: #339933;">,</span> <span style="color: #339933;">++</span><span style="color: #000088;">$commentcount</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;!-- 主评论楼层号 by zwwooooo --&gt;
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$depth</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #990000;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'B%1$s'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$depth</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;!-- 子评论楼层 By ImMmMm.com --&gt;
&nbsp;
	&lt;/div&gt;
&nbsp;
	&lt;!-- ... ... --&gt;</pre></div></div>

<p>当然，CSS里得加一句：</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:Microsoft Yahei;">&nbsp;
.<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>其它什么给评论li定宽，浮动，内外边距的CSS就自个儿根据不同主题搞定咯～</p>
<p>目前这样效果是每3条评论一行，高度是由3条中最高的那个决定的，这样是好是坏个人是没什么发言权，也仅当作是一个尝试。</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/comments-floor-display.html/feed</wfw:commentRss>
		<slash:comments>72</slash:comments>
		</item>
		<item>
		<title>jQuery 评论字数即时统计</title>
		<link>http://immmmm.com/comments-words-statistics-by-jquery.html</link>
		<comments>http://immmmm.com/comments-words-statistics-by-jquery.html#comments</comments>
		<pubDate>Thu, 28 Apr 2011 04:03:04 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1620</guid>
		<description><![CDATA[看图说货： 评论计数之前流行过一段时间，那时一是感觉没啥用，二是要加的代码挺多的。主流也是2种方法，元素JavaScript的（这儿），jQuery的（这儿）。 两者基本原理相同，都采用setInterval()短时间内重复执行，效率不谈，这种思路代码字符肯定在几百+。那是否有另外思路来实现呢？ 答案当然是肯定的！ jQuery核心代码： &#160; //By ImMmMm.com &#160; $&#40;'#comment'&#41;.bind&#40;'focus keyup input paste',function&#40;&#41;&#123; //采用几个事件来触发（已增加鼠标粘贴事件） &#160; $&#40;'#num'&#41;.text&#40;$&#40;this&#41;.attr&#40;&#34;value&#34;&#41;.length&#41; //获取评论框字符长度并添加到ID=&#34;num&#34;元素上 &#160; &#125;&#41;; 另外在需要显示字数的地方添加以下html断： &#160; &#60;i id=&#34;num&#34;&#62;0&#60;/i&#62; 个人是加到了评论框textarea之后，然后CSS美化一下： &#160; #num&#123;float:right;font-size:35px;color:#DDD;margin:-50px 5px 0 0;padding-right:10px;&#125; 收工，进食去～]]></description>
			<content:encoded><![CDATA[<p>看图说货：</p>
<p style="text-align:center;"><a href="https://lh6.googleusercontent.com/_65ZfNm-tR48/TbjgsIr9-hI/AAAAAAAAE20/g5ZzZlf5scs/comments_num.jpg"><img src="https://lh6.googleusercontent.com/_65ZfNm-tR48/TbjgsIr9-hI/AAAAAAAAE20/g5ZzZlf5scs/comments_num.jpg?imgmax=480"  alt=""/></a></p>
<p>评论计数之前流行过一段时间，那时一是感觉没啥用，二是要加的代码挺多的。主流也是2种方法，元素JavaScript的（<a href="http://www.qiqiboy.com/2010/07/14/a-simple-comment-box-counter.html" target="_blank">这儿</a>），jQuery的（<a href="http://wange.im/comment-count-in-wordpress-with-jquery.html" target="_blank">这儿</a>）。</p>
<p><span id="more-1620"></span>两者基本原理相同，都采用setInterval()短时间内重复执行，效率不谈，这种思路代码字符肯定在几百+。那是否有另外思路来实现呢？</p>
<p>答案当然是肯定的！</p>
<p>jQuery核心代码：</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #006600; font-style: italic;">//By ImMmMm.com</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#comment'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'focus keyup input paste'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>  <span style="color: #006600; font-style: italic;">//采用几个事件来触发（已增加鼠标粘贴事件）</span>
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#num'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span>  <span style="color: #006600; font-style: italic;">//获取评论框字符长度并添加到ID=&quot;num&quot;元素上</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>另外在需要显示字数的地方添加以下html断：</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">i</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;num&quot;</span>&gt;</span>0<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">i</span>&gt;</span></pre></div></div>

<p>个人是加到了评论框textarea之后，然后CSS美化一下：</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #cc00cc;">#num</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>font-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span><span style="color: #933;">35px</span><span style="color: #00AA00;">;</span>color<span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#DDD</span><span style="color: #00AA00;">;</span>margin<span style="color: #00AA00;">:</span><span style="color: #933;">-50px</span> <span style="color: #933;">5px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>padding-<span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>收工，进食去～</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/comments-words-statistics-by-jquery.html/feed</wfw:commentRss>
		<slash:comments>92</slash:comments>
		</item>
		<item>
		<title>指定页面评论分页的种种</title>
		<link>http://immmmm.com/specif-page-comments-paginate.html</link>
		<comments>http://immmmm.com/specif-page-comments-paginate.html#comments</comments>
		<pubDate>Sat, 30 Oct 2010 08:47:03 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[分页]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1486</guid>
		<description><![CDATA[WordPress2.7时已经支持评论分页功能了，而也不知何时就有《WordPress 原生评论分页导航》的函数了，一时评论分页变得是多么的Easy。 之后万兄在此文提出一个问题：“我只想要留言板页面单独实现评论分页，而其他日志页面的评论不分页，这要怎么操作呢？”阿邙同学第一时间尝试解决了此问题：《也谈WordPress 指定页面分页功能》。他的成果是提出只要在评论回调函数中加入“&#38;per_page=”即可自定义分页数目。 由此得到解决问题的简单方法：复制comments.php重命名为book-comments.php，添加“&#38;per_page=20”分页显示条数参数，然后留言板页面调用。后台讨论里的分页选择还是勾选，然后把分页数改成1000000000…… 现在已经实现了，就留言板评论20条分一页，其他页面10000000……条评论后才分页。 可问题也随之而来： 各新版本的最新评论插件或集成代码，还有willin大师的邮件回复通知等等，凡是使用函数“get_comment_link()”调用出来的评论链接URL是如“http://……/comment-page-1#comment-555”，而这里包含“comment-page-1”的“1”是页面总评论数÷后台设置的“每页显示评论数”得来的。这样就会造成评论定位不到，如我在万兄留言板回复自己得到的邮件通知里的回访链接 http://wange.im/guestbook/comment-page-2#comment-77860。 而WordPress就是没有独立分页的参数，插件也好代码也好都是直接获取后台分页的设置，我们在回调函数里自定义的评论分页数是获取不到的。就是说，要是后台不勾选分页，所有页面分不了页；要是勾选了，用“get_comment_link()”函数调用出来里都含有“comment-page-”。 而我们希望的是：在分页的页面上有准确的“comment-page-”这部分，没分页的没有这部分。咨询了QiQiBoy说无解，无法分离…… 那只能换个函数调用最新评论的URL了，以willin邮件回复中代码为例： &#160; 您可以點擊 &#60;a href=&#34;' . htmlspecialchars(get_comment_link($parent_id)) . '&#34;&#62;查看回應完整內容&#60;/a&#62; 改成： &#160; 您可以點擊 &#60;a href=&#34;' . htmlspecialchars(get_permalink($comment-&#62;comment_post_ID) . &#34;#comment-&#34;.$comment-&#62;comment_ID) . '&#34;&#62;查看回應完整內容&#60;/a&#62; O了，一刀切完……真让人蛋疼！]]></description>
			<content:encoded><![CDATA[<p>WordPress2.7时已经支持评论分页功能了，而也不知何时就有<a href="http://immmmm.com/wordpress-native-comment-navigation.html" target="_blank">《WordPress 原生评论分页导航》</a>的函数了，一时评论分页变得是多么的Easy。</p>
<p>之后万兄在<a href="http://wange.im/paginate-comments-in-wordpress.html" target="_blank">此文</a>提出一个问题：“我只想要留言板页面单独实现评论分页，而其他日志页面的评论不分页，这要怎么操作呢？”阿邙同学第一时间尝试解决了此问题：<a rel="nofollow" href="http://amangs.com/wordpress-paginate-comments.html" target="_blank">《也谈WordPress 指定页面分页功能》</a>。他的成果是提出只要在评论回调函数中加入“&amp;per_page=”即可自定义分页数目。<span id="more-1486"></span></p>
<p>由此得到解决问题的简单方法：复制comments.php重命名为book-comments.php，添加“&amp;per_page=20”分页显示条数参数，然后留言板页面调用。后台讨论里的分页选择还是勾选，然后把分页数改成1000000000……</p>
<p style="text-align: center;"><img class="pie-img" src="https://lh6.googleusercontent.com/_65ZfNm-tR48/TMvOPeJ5CRI/AAAAAAAAEFc/-FuFgq0NOVM/paginate.jpg?imgmax=800" alt="paginate.jpg" /></p>
<p>现在已经实现了，就留言板评论20条分一页，其他页面10000000……条评论后才分页。</p>
<p>可问题也随之而来：</p>
<p>各新版本的最新评论插件或集成代码，还有willin大师的邮件回复通知等等，凡是使用函数“get_comment_link()”调用出来的评论链接URL是如“http://……/comment-page-1#comment-555”，而这里包含“comment-page-1”的“1”是页面总评论数÷后台设置的“每页显示评论数”得来的。这样就会造成评论定位不到，如我在万兄留言板回复自己得到的邮件通知里的回访链接 <a rel="nofollow" href="http://wange.im/guestbook/comment-page-2#comment-77860" target="_blank">http://wange.im/guestbook/comment-page-2#comment-77860</a>。</p>
<p>而WordPress就是没有独立分页的参数，插件也好代码也好都是直接获取后台分页的设置，我们在回调函数里自定义的评论分页数是获取不到的。就是说，<strong>要是后台不勾选分页，所有页面分不了页；要是勾选了，用“get_comment_link()”函数调用出来里都含有“comment-page-”。</strong></p>
<p>而我们希望的是：在分页的页面上有准确的“comment-page-”这部分，没分页的没有这部分。咨询了<a href="http://www.qiqiboy.com/" target="_blank">QiQiBoy</a>说无解，无法分离……</p>
<p>那只能换个函数调用最新评论的URL了，以willin邮件回复中代码为例：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
您可以點擊 <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;' . htmlspecialchars(get_comment_link(<span style="color: #006699; font-weight: bold;">$parent_id</span>)) . '&quot;</span><span style="color: #339933;">&gt;</span>查看回應完整內容<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span></pre></div></div>

<p>改成：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
您可以點擊 <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;' . htmlspecialchars(get_permalink(<span style="color: #006699; font-weight: bold;">$comment-&gt;comment_post_ID</span>) . &quot;</span><span style="color: #666666; font-style: italic;">#comment-&quot;.$comment-&gt;comment_ID) . '&quot;&gt;查看回應完整內容&lt;/a&gt;</span></pre></div></div>

<p>O了，一刀切完……真让人蛋疼！</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/specif-page-comments-paginate.html/feed</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>[活动通告] 晒沙银水银，速围观</title>
		<link>http://immmmm.com/activities-winners-announced.html</link>
		<comments>http://immmmm.com/activities-winners-announced.html#comments</comments>
		<pubDate>Tue, 31 Aug 2010 16:01:31 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[活动]]></category>
		<category><![CDATA[评论]]></category>
		<category><![CDATA[通告]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1463</guid>
		<description><![CDATA[亲爱滴童鞋们： 为期一个月地《喜迎小站二周年，评论有奖活动》完满落幕啦，掌声起～（再不结束都得疯！） 不办不知道一办吓N跳，那评论数哟，蹭蹭蹭往上涨，无比感谢小张同志免费提供的经得住考验坚挺无比的主机！掌声起～～（话说小张XJJ？嘿，谁说的，谁说的！） 活动开始前几天也是连续调整主题模板，如：统一读者墙评论数的统计时间与活动时间统一，让评论排行实时显示；开启无限嵌套，让童鞋无后顾之忧，尽情言欢；回复邮件通知改用“自主勾选”，以防部分童鞋邮箱被曝；精简AJAX评论提交JS，加速留言等等等等。感谢@hzlzh、@zww、@万戈、@阿邙第一时间的技术支持！掌声起～～ 当然，最最要感谢的就是在这一个月来无比积极无比热心、一点点积极一点点热心、毫不积极毫不热心或只到小站留过一条评论或一条都没留过却无声路过的童鞋们，我真诚的隆重的严肃的深刻的无比激动的有点蛋疼的，感谢你们，感谢你们对小站的支持，感谢你们对本人的认可！起～（什么起？我勒个区，你（吡——）啊！） O了，也就不再累述我这无以言表的鸡冻之情了，以下是——当当当当，当，当当当，当，当当当……（再当就看不到结果了！） 沙银前三是：winy（1 2 3 4 5 6 7 8 9 10），小闇（1 2 3 4 5 6 7 8 9），方丈（1 2）； 水银前三是：小闇，winy，blueandhack。 他们将获得的奖励是： 沙银前三：分别获得￥30、￥20、￥10；以及分别获得mini手电、随身农场、按键灯。 水银前三：分别获得￥30、￥20、￥10；以及分别获得mini手电、随身农场、按键灯。 各位也看到了，小闇和winy这俩银太猛烈，都是双料的，所以小小整理综合下就是： winy童鞋将得到的奖励是：￥30+￥20=￥50，mini手电+随身农场； 小闇童鞋将得到的奖励是：￥30+￥20=￥50，mini手电+随身农场； 方丈童鞋将得到的奖励是：￥10，按键灯； blueandhack童鞋将得到的奖励是：￥10，按键灯； 请以上四位童鞋把你们的：支付宝账户、邮寄地址、邮编、姓名、联系电话，发送至fivemu#gmail.com（#替换为@）。 注意：如果没有支付宝，或者不方便接收礼物，请在邮件中说明。 说明：没有支付宝，这个RMB可以让我帮你充值手机话费，或者其他什么同价值的网络业务，也可以在暖暖为你再挑一件同价值礼物；如果不方便接收礼物，那我会很欣喜的替你接收礼物的。如果没有支付宝也不方便接受礼物，那我会更欣喜更欣喜的统统我替你收了，然后独立写一篇表彰文表以崇高的敬意！ O了，最后还是感谢暖暖美女店长的极力支持，感谢万分；最最后还是感谢各位童鞋的参与，感谢万万分！]]></description>
			<content:encoded><![CDATA[<p>亲爱滴童鞋们：</p>
<p>为期一个月地<a rel="nofollow" href="http://immmmm.com/immmmm-two-years.html" target="_blank">《喜迎小站二周年，评论有奖活动》</a>完满落幕啦，掌声起～（再不结束都得疯！）</p>
<p>不办不知道一办吓N跳，那评论数哟，蹭蹭蹭往上涨，无比感谢<a href="http://hengtian.org/" target="_blank">小张</a>同志免费提供的经得住考验坚挺无比的主机！掌声起～～（话说小张XJJ？嘿，谁说的，谁说的！）</p>
<p>活动开始前几天也是连续调整主题模板，如：统一读者墙评论数的统计时间与活动时间统一，让评论排行实时显示；开启无限嵌套，让童鞋无后顾之忧，尽情言欢；回复邮件通知改用“自主勾选”，以防部分童鞋邮箱被曝；精简AJAX评论提交JS，加速留言等等等等。感谢<a href="http://www.hzlzh.com/" target="_blank">@hzlzh</a>、<a href="http://zww.me/" target="_blank">@zww</a>、<a href="http://wange.im/" target="_blank">@万戈</a>、<a href="http://amangs.com/" target="_blank">@阿邙</a>第一时间的技术支持！掌声起～～<span id="more-1463"></span></p>
<p>当然，最最要感谢的就是在这一个月来无比积极无比热心、一点点积极一点点热心、毫不积极毫不热心或只到小站留过一条评论或一条都没留过却无声路过的童鞋们，我真诚的隆重的严肃的深刻的无比激动的有点蛋疼的，感谢你们，感谢你们对小站的支持，感谢你们对本人的认可！起～（什么起？我勒个区，你（吡——）啊！）</p>
<p>O了，也就不再累述我这无以言表的鸡冻之情了，以下是——当当当当，当，当当当，当，当当当……（再当就看不到结果了！）</p>
<blockquote><p><strong>沙银前三</strong>是：<a href="http://winysky.com/" target="_blank">winy</a>（<a rel="nofollow" href="http://immmmm.com/wordpress-comment-floor-stretching-effects.html#comments" target="_blank">1</a> <a rel="nofollow" href="http://immmmm.com/gae-build-twitter-api.html#comments" target="_blank">2</a> <a rel="nofollow" href="http://immmmm.com/zhoushan-shengsi-three-day-tour.html#comments" target="_blank">3</a> <a rel="nofollow" href="http://immmmm.com/about-my-future.html#comments" target="_blank">4</a> <a rel="nofollow" href="http://immmmm.com/recommended-ui-and-theme-icons.html#comments" target="_blank">5</a> <a rel="nofollow" href="http://immmmm.com/taobao-new-scam-prepaid-recharge.html#comments" target="_blank">6</a> <a rel="nofollow" href="http://immmmm.com/picasa3-complete-login-using-ssh.html#comments" target="_blank">7</a> <a rel="nofollow" href="http://immmmm.com/restore-perfect-of-picasa-and-wordpress.html#comments" target="_blank">8</a> <a rel="nofollow" href="http://immmmm.com/full-featured-version-of-simpledashed-for-sale.html#comments" target="_blank">9</a> <a rel="nofollow" href="http://immmmm.com/comments-awards-event-last-10-days.html#comments" target="_blank">10</a>），<a href="http://www.rinkaiten.com/" target="_blank">小闇</a>（<a rel="nofollow" href="http://immmmm.com/little-adjust-wordpress-unlimited-nested-comments.html#comments " target="_blank">1</a> <a rel="nofollow" href="http://immmmm.com/time-friend.html#comments" target="_blank">2</a> <a rel="nofollow" href="http://immmmm.com/tanabata-2010.html#comments" target="_blank">3</a> <a rel="nofollow" href="http://immmmm.com/wordpress-theme-simple-dashed.html#comments" target="_blank">4</a> <a rel="nofollow" href="http://immmmm.com/jquery-photo-carousel-effects.html#comments" target="_blank">5</a> <a rel="nofollow" href="http://immmmm.com/wordpress-pay-theme-default-love.html#comments" target="_blank">6</a> <a rel="nofollow" href="http://immmmm.com/self-indulgence.html#comments" target="_blank">7</a> <a rel="nofollow" href="http://immmmm.com/notebook-carry-again.html#comments" target="_blank">8</a> <a rel="nofollow" href="http://immmmm.com/give-up-in-order-to-obtain.html#comments" target="_blank">9</a>），<a href="http://www.psfz.net/" target="_blank">方丈</a>（<a rel="nofollow" href="http://immmmm.com/august-15-2010-mourning.html#comments" target="_blank">1</a> <a rel="nofollow" href="http://immmmm.com/gtalk-twitter-robot-twitalker.html#comments" target="_blank">2</a>）；</p>
<p><strong>水银前三</strong>是：<a href="http://www.rinkaiten.com/" target="_blank">小闇</a>，<a href="http://winysky.com/" target="_blank">winy</a>，<a href="http://blueandhack.com/" target="_blank">blueandhack</a>。</p></blockquote>
<p>他们将获得的奖励是：</p>
<p>沙银前三：分别获得￥30、￥20、￥10；以及分别获得<a href="http://item.taobao.com/item.htm?id=4565447825" target="_blank">mini手电</a>、<a href="http://item.taobao.com/item.htm?id=5819126997" target="_blank">随身农场</a>、<a href="http://item.taobao.com/item.htm?id=4006699677" target="_blank">按键灯</a>。</p>
<p>水银前三：分别获得￥30、￥20、￥10；以及分别获得<a href="http://item.taobao.com/item.htm?id=4565447825" target="_blank">mini手电</a>、<a href="http://item.taobao.com/item.htm?id=5819126997" target="_blank">随身农场</a>、<a href="http://item.taobao.com/item.htm?id=4006699677" target="_blank">按键灯</a>。</p>
<p>各位也看到了，小闇和winy这俩银太猛烈，都是双料的，所以小小整理综合下就是：</p>
<blockquote><p><strong>winy</strong>童鞋将得到的奖励是：￥30+￥20=￥50，mini手电+随身农场；</p>
<p><strong>小闇</strong>童鞋将得到的奖励是：￥30+￥20=￥50，mini手电+随身农场；</p>
<p><strong>方丈</strong>童鞋将得到的奖励是：￥10，按键灯；</p>
<p><strong>blueandhack</strong>童鞋将得到的奖励是：￥10，按键灯；</p></blockquote>
<p>请以上四位童鞋把你们的：支付宝账户、邮寄地址、邮编、姓名、联系电话，发送至fivemu#gmail.com（#替换为@）。</p>
<p><strong>注意：</strong>如果没有支付宝，或者不方便接收礼物，请在邮件中说明。</p>
<p><strong>说明：</strong>没有支付宝，这个RMB可以让我帮你充值手机话费，或者其他什么同价值的网络业务，也可以在<a href="http://nnwn.taobao.com/" target="_blank">暖暖为你</a>再挑一件同价值礼物；如果不方便接收礼物，那我会很欣喜的替你接收礼物的。如果没有支付宝也不方便接受礼物，那我会更欣喜更欣喜的统统我替你收了，然后独立写一篇表彰文表以崇高的敬意！</p>
<p>O了，最后还是感谢暖暖美女店长的极力支持，感谢万分；最最后还是感谢各位童鞋的参与，感谢万万分！</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/activities-winners-announced.html/feed</wfw:commentRss>
		<slash:comments>110</slash:comments>
		</item>
		<item>
		<title>号角吹响：评论有奖活动最后十天</title>
		<link>http://immmmm.com/comments-awards-event-last-10-days.html</link>
		<comments>http://immmmm.com/comments-awards-event-last-10-days.html#comments</comments>
		<pubDate>Sun, 22 Aug 2010 14:24:41 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[活动]]></category>
		<category><![CDATA[网站]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1456</guid>
		<description><![CDATA[不知不觉暑假即将到底，9月也即将来临，也就是评论有奖活动的结果即将产生！ 至上篇文章沙发前三分别为：winy （8个）/ 小闇 （4个）/ 方丈（2个）；鼓掌～～ 还有似飘若舞、blueandhack、snowxh、风逐蓝天都有1个。 评论数嘛，看文章末实时排行吧，头三即是；鼓掌～～ 这二十天来感谢各位童鞋的支持，是你们让小站人气直线上升，万分感谢！在最后十天里，前打个预防针，纯表情无意义或恶意刷评论数者，不二话直接封邮箱（评论数以邮箱地址为标识统计的）。 最最后，号角响起： 来吧来吧，最后十天的攻坚战已经打响！]]></description>
			<content:encoded><![CDATA[<p>不知不觉暑假即将到底，9月也即将来临，也就是评论有奖活动的结果即将产生！</p>
<p style="text-align: center;"><img class="pie-img" src="http://lh3.googleusercontent.com/_65ZfNm-tR48/THEyhqMTUyI/AAAAAAAAD90/65__cdIB4O4/haojiao.jpg?imgmax=800" alt="haojiao.jpg" /></p>
<p>至上篇文章沙发前三分别为：<a href="http://winysky.com/" target="_blank">winy</a> （8个）/ <a href="http://www.rinkaiten.com/" target="_blank">小闇</a> （4个）/ <a href="http://psfz.net/" target="_blank">方丈</a>（2个）；鼓掌～～<span id="more-1456"></span></p>
<p>还有<a href="http://www.yanzizhu.org/ " target="_blank">似飘若舞</a>、<a href="http://blueandhack.com/" target="_blank">blueandhack</a>、<a href="http://snowxh.in/" target="_blank">snowxh</a>、<a href="http://www.bestdong.com/" target="_blank">风逐蓝天</a>都有1个。</p>
<p>评论数嘛，看文章末实时排行吧，头三即是；鼓掌～～</p>
<p>这二十天来感谢各位童鞋的支持，是你们让小站人气直线上升，万分感谢！在最后十天里，前打个预防针，<span style="color: #ff0000;"><strong>纯表情无意义或恶意刷评论数者</strong></span>，不二话<span style="color: #ff0000;"><strong>直接封邮箱</strong></span>（评论数以邮箱地址为标识统计的）。</p>
<p>最最后，号角响起：</p>
<p style="text-align: center;"><strong><span style="color: #3366ff;">来吧来吧，最后十天的攻坚战已经打响！</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/comments-awards-event-last-10-days.html/feed</wfw:commentRss>
		<slash:comments>455</slash:comments>
		</item>
		<item>
		<title>WordPress无限嵌套评论一点后话及调整</title>
		<link>http://immmmm.com/little-adjust-wordpress-unlimited-nested-comments.html</link>
		<comments>http://immmmm.com/little-adjust-wordpress-unlimited-nested-comments.html#comments</comments>
		<pubDate>Fri, 06 Aug 2010 11:25:05 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[WordPress函数]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1405</guid>
		<description><![CDATA[为配合小站开展的活动，没想太多就折腾上了无限嵌套评论，喜欢有之不喜欢亦有之。个人觉得这个功能绝对是有必要的，评论交流到一半由于嵌套层数限制而断掉，这是多么让人扫兴啊！ 功能要，那怎样展示出来好些呢？ 在《WordPress无限嵌套评论的那些事儿》中，通过PHP判断在一定层数后CSS添加样式使子回复不再缩进，简单避免了无限嵌套带来的无限缩进问题；如此处理后随之带来不缩进评论部分分不清谁回复谁的问题，再以jQuery处理对不缩进层数的评论回复添加“@用户名”。 经过以上处理后，还是相对完美解决了无限嵌套带来的一些问题。这次是由@winy童鞋提醒，并改进获得一个PHP函数： &#160; &#60;?php echo ' style=&#34;margin-left: ' . ceil&#40;30/sqrt&#40;$depth&#41;&#41; . 'px; &#34;'; ?&#62; “除以(楼层数开平方)再取整，第一层回复 30px, 第四层 15px, 到第 25 层，margin-left 就只有 6px 了。”（via） 如此一来，评论缩进不再是硬生生的折线，而是完美的弧线啦～而且，只要有缩进，jQuery添加“@用户名”的功能也可省去，一举两得！ —————疲—————惫—————的—————割—————线————— 345号到舟山的嵊泗拥抱大海去了，本说那边有网线的，所以出发带上了本本，也没在这儿说明一个。到那后发现那艹蛋的电信ADSL竟然封了路由，只允许同时一台电脑上网，而且用路由还不断断线，所以…… 拍的几G照片不在手边，周日晚可以拿到，到时挑一些给大家看看呗～]]></description>
			<content:encoded><![CDATA[<p>为配合小站开展的活动，没想太多就折腾上了无限嵌套评论，喜欢有之不喜欢亦有之。个人觉得这个功能绝对是有必要的，评论交流到一半由于嵌套层数限制而断掉，这是多么让人扫兴啊！</p>
<p>功能要，那怎样展示出来好些呢？</p>
<p>在<a href="http://immmmm.com/wordpress-unlimited-nested-comments.html" target="_blank">《WordPress无限嵌套评论的那些事儿》</a>中，通过PHP判断在一定层数后CSS添加样式使子回复不再缩进，简单避免了无限嵌套带来的无限缩进问题；如此处理后随之带来不缩进评论部分分不清谁回复谁的问题，再以jQuery处理对不缩进层数的评论回复添加“@用户名”。</p>
<p>经过以上处理后，还是相对完美解决了无限嵌套带来的一些问题。这次是由<a href="http://winysky.com/" target="_blank">@winy</a>童鞋提醒，并改进获得一个PHP函数：<span id="more-1405"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' style=&quot;margin-left: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">ceil</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">30</span><span style="color: #339933;">/</span><span style="color: #990000;">sqrt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$depth</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'px; &quot;'</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>“除以(楼层数开平方)再取整，第一层回复 30px, 第四层 15px, 到第 25 层，margin-left 就只有 6px 了。”（<a rel="nofollow" href="http://fis.io/comment-new-experience.html" target="_blank">via</a>）</p>
<p>如此一来，评论缩进不再是硬生生的折线，而是完美的弧线啦～而且，只要有缩进，jQuery添加“@用户名”的功能也可省去，一举两得！</p>
<p style="text-align: center;">—————疲—————惫—————的—————割—————线—————</p>
<p>345号到舟山的嵊泗拥抱大海去了，本说那边有网线的，所以出发带上了本本，也没在这儿说明一个。到那后发现那艹蛋的电信ADSL竟然封了路由，只允许同时一台电脑上网，而且用路由还不断断线，所以……</p>
<p>拍的几G照片不在手边，周日晚可以拿到，到时挑一些给大家看看呗～</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/little-adjust-wordpress-unlimited-nested-comments.html/feed</wfw:commentRss>
		<slash:comments>345</slash:comments>
		</item>
		<item>
		<title>WordPress无限嵌套评论的那些事儿</title>
		<link>http://immmmm.com/wordpress-unlimited-nested-comments.html</link>
		<comments>http://immmmm.com/wordpress-unlimited-nested-comments.html#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:27:08 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WordPress函数]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1403</guid>
		<description><![CDATA[首先感谢阿邙童鞋的折腾：《WordPress嵌套评论之无限嵌套之补遗》，重复内容此文会简单带过，不懂可查看阿邙详细原文。 WP默认嵌套评论最大深度是8层，可在特殊情况下，比如小站昨天开启了《喜迎小站二周年，评论有奖活动》，好多淫表示套不够用了，这个问题很是严重，大大打击了各位淫的兴头。 经过努力，郑重呼喊：小站套已充足，淫们尽情吧！ 代码折腾正文，分三大步走： 一、增大嵌套层数 在comments.php评论回调函数添加“&#038;max_depth=10000”，即嵌套层数改为10000 &#160; &#60;?php wp_list_comments&#40;'type=comment&#38;callback=mytheme_comment&#38;max_depth=10000'&#41;; ?&#62; 二、样式控制代码 以防嵌套多了后缩进太多，评论太挤，我们要做的就是一定层数后不缩进，使其看上去并列显示。 在functions.php内回调评论函数内找到类似： &#160; &#60;li &#60;?php comment_class&#40;&#41;; ?&#62; id=&#34;comment-&#60;?php comment_ID&#40;&#41; ?&#62;&#34;&#62; 修改成下句代码，其中9和margin-left，共同控制使9层以后不缩进。 &#160; &#60;li &#60;?php comment_class&#40;'clearfix'&#41;; ?&#62;&#60;?php if&#40; $depth &#62; 9&#41;&#123; echo ' style=&#34;margin-left:-35px;&#34;';&#125; ?&#62; id=&#34;comment-&#60;?php comment_ID&#40;&#41; ?&#62;&#34; &#62; 完成一、二两步后，无限嵌套已经是很正常使用了，有个问题也随之出现，9层以后的都是并列按照层次显示，这时就分不清哪条是回复哪条的了。解决方案很简单： 三、添加”回复”输入框自动增加”@用户名” 此功能依旧使用强大的jQuery，以下代码已改进，只在某层数之后才添加。 &#160; //某层数之后，点击回复输入框自动添加&#34;@用户名&#34; By ImMmMm.com &#160; $&#40;'.depth-8'&#41;.children&#40;'.children'&#41;.find&#40;'.reply'&#41;.click&#40;function&#40;&#41;&#123; //class=&#34;.depth-8&#34;子元素class=&#34;.children&#34;下的class=&#34;.reply&#34;的点击事件，注意：模板不同HTML结构可能不同，需调整！ &#160; var rid= $&#40;this&#41;.parent&#40;&#41;.attr&#40;&#34;id&#34;&#41;; //取得所回复的评论id，可能需要调整！ &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>首先感谢阿邙童鞋的折腾：<a href="http://amangs.com/wordpress-infinity-thread-comments-2.html" target="_blank">《WordPress嵌套评论之无限嵌套之补遗》</a>，重复内容此文会简单带过，不懂可查看阿邙详细原文。</p>
<p>WP默认嵌套评论最大深度是8层，可在特殊情况下，比如小站昨天开启了<a href="http://immmmm.com/immmmm-two-years.html" target="_blank">《喜迎小站二周年，评论有奖活动》</a>，好多淫表示套不够用了，这个问题很是严重，大大打击了各位淫的兴头。</p>
<p style="text-align: center;"><strong>经过努力，郑重呼喊：<span style="color: #ff0000;">小站套已充足，淫们尽情吧！</span></strong></p>
<p>代码折腾正文，分三大步走：<span id="more-1403"></span></p>
<p><strong><span style="color: #3366ff;">一、增大嵌套层数</span></strong></p>
<p>在comments.php评论回调函数添加“&#038;max_depth=10000”，即嵌套层数改为10000</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=comment&amp;callback=mytheme_comment&amp;max_depth=10000'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong><span style="color: #3366ff;">二、样式控制代码</span></strong></p>
<p>以防嵌套多了后缩进太多，评论太挤，我们要做的就是一定层数后不缩进，使其看上去并列显示。</p>
<p>在functions.php内回调评论函数内找到类似：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
&lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div>

<p>修改成下句代码，其中9和margin-left，共同控制使9层以后不缩进。</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
&lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_class<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'clearfix'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$depth</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' style=&quot;margin-left:-35px;&quot;'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; &gt;</pre></div></div>

<p>完成一、二两步后，无限嵌套已经是很正常使用了，有个问题也随之出现，9层以后的都是并列按照层次显示，这时就分不清哪条是回复哪条的了。解决方案很简单：</p>
<p><strong><span style="color: #3366ff;">三、添加”回复”输入框自动增加”@用户名”</span></strong></p>
<p>此功能依旧使用强大的jQuery，以下代码已改进，只在某层数之后才添加。</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #006600; font-style: italic;">//某层数之后，点击回复输入框自动添加&quot;@用户名&quot; By ImMmMm.com</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.depth-8'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.children'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.reply'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #006600; font-style: italic;">//class=&quot;.depth-8&quot;子元素class=&quot;.children&quot;下的class=&quot;.reply&quot;的点击事件，注意：模板不同HTML结构可能不同，需调整！</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> rid<span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//取得所回复的评论id，可能需要调整！</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> rna<span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//取得所回复的评论用户名，可能需要调整！</span>
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#comment&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;&lt;a href='#&quot;</span><span style="color: #339933;">+</span>rid<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'&gt;@&quot;</span><span style="color: #339933;">+</span>rna<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/a&gt; &quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066;">focus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//在输入框添加&quot;@用户名&quot;和链接</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#cancel-comment-reply-link'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#comment&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//点击取消回复时清空输入框</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>至此，搞定，收工！</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/wordpress-unlimited-nested-comments.html/feed</wfw:commentRss>
		<slash:comments>322</slash:comments>
		</item>
		<item>
		<title>喜迎小站二周年，评论有奖活动</title>
		<link>http://immmmm.com/immmmm-two-years.html</link>
		<comments>http://immmmm.com/immmmm-two-years.html#comments</comments>
		<pubDate>Sun, 01 Aug 2010 08:15:22 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[活动]]></category>
		<category><![CDATA[网站]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1401</guid>
		<description><![CDATA[去去年8月份，用WordPress创建了自己独立博客。至今，二年啦！ 道路是曲折艰辛的，前途是无限美好的。感谢各位童鞋一如既往的支持，所有的数据统计都是浮云，目前唯一在意的就是和童鞋们评论交流，所以我就用这些浮云带来的收入，来个分享分享，庆祝庆祝，热闹热闹～ 活动时间：本文发布之刻——2010-08-31 24：00 活动奖项： 1.沙银：3名，活动期间沙发数最多的前3人，将分别获得￥30、￥20、￥10； 2.水银：3名，活动期间评论数最多的前3人，将分别获得￥30、￥20、￥10； 活动说明：活动结束后，会通知获奖的银，通过支付宝直接支付，活动的一切解释权归林木木所有！ ^ ^ 炎热的夏天，用你们的热情，来这杀吧啥吧，水吧水吧！ 友情小提示： 1.FO微博抢沙发是王道！ 2.评论巧用双击：想回复哪条评论就双击哪条评论，提交后页面刷新前双击可以再修改。 2010-08-01 22:04补充：感谢@hzlzh、@zww、@万戈强力技术协助，日志末的读者墙的评论的统计时间与活动时间统一，就是说这个时间段内评论排行实时显示，水得更猛烈些吧！ 2010-08-02 13:21补充：感谢@阿邙童鞋的《WordPress嵌套评论之无限嵌套之补遗》，已启用；另，改用回复邮件通知改用“自主勾选”，对今早之前的评论回复对方不会收到邮件通知。 2010-08-06 17:21补充：感谢@hzlzh童鞋的《精简wordpress评论[再编辑]及相关功能》，已启用；不勾选邮件回复留言的速度绝对是扛扛地！]]></description>
			<content:encoded><![CDATA[<p>去去年8月份，用WordPress创建了自己独立博客。至今，二年啦！</p>
<p>道路是曲折艰辛的，前途是无限美好的。感谢各位童鞋一如既往的支持，所有的数据统计都是浮云，目前唯一在意的就是和童鞋们评论交流，所以我就用这些浮云带来的收入，来个分享分享，庆祝庆祝，热闹热闹～</p>
<p>活动时间：本文发布之刻——2010-08-31 24：00</p>
<p><span id="more-1401"></span>活动奖项：</p>
<p>1.沙银：3名，活动期间沙发数最多的前3人，将分别获得￥30、￥20、￥10；</p>
<p>2.水银：3名，活动期间评论数最多的前3人，将分别获得￥30、￥20、￥10；</p>
<p>活动说明：活动结束后，会通知获奖的银，通过支付宝直接支付，活动的一切解释权归林木木所有！ ^ ^</p>
<p style="text-align: center;"><strong><span style="color: #3366ff;">炎热的夏天，用你们的热情，来这杀吧啥吧，水吧水吧！</span></strong></p>
<p>友情小提示：</p>
<p>1.FO微博抢沙发是王道！</p>
<p>2.评论巧用双击：想回复哪条评论就双击哪条评论，提交后页面刷新前双击可以再修改。</p>
<p><strong>2010-08-01 22:04补充：</strong>感谢<a href="http://www.hzlzh.com/" target="_blank">@hzlzh</a>、<a href="http://zww.me/" target="_blank">@zww</a>、<a href="http://wange.im/" target="_blank">@万戈</a>强力技术协助，日志末的读者墙的评论的统计时间与活动时间统一，就是说这个时间段内评论排行实时显示，水得更猛烈些吧！</p>
<p><strong>2010-08-02 13:21补充：</strong>感谢@阿邙童鞋的<a href="http://amangs.com/wordpress-infinity-thread-comments-2.html" target="_blank">《WordPress嵌套评论之无限嵌套之补遗》</a>，已启用；另，改用回复邮件通知改用“自主勾选”，对今早之前的评论回复对方不会收到邮件通知。</p>
<p><strong>2010-08-06 17:21补充：</strong>感谢@hzlzh童鞋的<a href="http://www.hzlzh.com/wordpress-comment-re-edit/" target="_blank">《精简wordpress评论[再编辑]及相关功能》</a>，已启用；不勾选邮件回复留言的速度绝对是扛扛地！</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/immmmm-two-years.html/feed</wfw:commentRss>
		<slash:comments>715</slash:comments>
		</item>
	</channel>
</rss>

