<?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; WordPress技巧</title>
	<atom:link href="http://immmmm.com/tag/wordpress%e6%8a%80%e5%b7%a7/feed" rel="self" type="application/rss+xml" />
	<link>http://immmmm.com</link>
	<description>不问明天，悠然浪费</description>
	<lastBuildDate>Mon, 21 May 2012 12:03:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>WordPress3.3 编辑器自定义按钮添加新方法</title>
		<link>http://immmmm.com/custom-quicktags-into-wordpress-editor.html</link>
		<comments>http://immmmm.com/custom-quicktags-into-wordpress-editor.html#comments</comments>
		<pubDate>Wed, 18 Jan 2012 08:31:36 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[quicktags]]></category>
		<category><![CDATA[WordPress技巧]]></category>
		<category><![CDATA[自定义按钮]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1916</guid>
		<description><![CDATA[Mark文一篇，原文见 @ihacklog 博文（1 &#038; 2）。 如果你使用了WP3.3，即可以用以下方法快捷方便的在后台HTML编辑器中加入自定义按钮，不必再在更新一下在 /wp-includes/js/quicktags.js 动一次手脚咯。 首先创建一个 my-quicktags.js，丢入以下内容： QTags.addButton&#40; '&#60;', '&#60;', '&#38;lt;', '' &#41;; //快捷输入&#60;的html代码 QTags.addButton&#40; '&#62;', '&#62;', '&#38;gt;', '' &#41;; QTags.addButton&#40; 'hr', 'hr', &#34;\n&#60;hr /&#62;\n&#34;, '' &#41;; //快捷输入一个hr横线，点一下即可 QTags.addButton&#40; 'h1', 'h1', &#34;\n&#60;h1&#62;&#34;, &#34;&#60;/h1&#62;\n&#34; &#41;; //快捷输入h1标签 QTags.addButton&#40; 'h2', 'h2', &#34;\n&#60;h2&#62;&#34;, &#34;&#60;/h2&#62;\n&#34; &#41;; QTags.addButton&#40; 'h3', 'h3', &#34;\n&#60;h3&#62;&#34;, &#34;&#60;/h3&#62;\n&#34; &#41;; //QTags.addButton( 'my_id', 'my button', '\n&#60;/span&#62;', [...]]]></description>
			<content:encoded><![CDATA[<p>Mark文一篇，原文见 <a href="http://ihacklog.com/" target="_blank">@ihacklog</a> 博文（<a href="http://ihacklog.com/php/wordpress/wpskills/the-right-way-to-insert-custom-quicktags-into-the-wordpress-editor-revisioned.html" target="_blank">1</a> &#038; <a href="http://ihacklog.com/php/wordpress/wpskills/the-right-way-to-insert-custom-quicktags-into-the-wordpress-editor.html" target="_blank">2</a>）。</p>
<p>如果你使用了WP3.3，即可以用以下方法快捷方便的在后台HTML编辑器中加入自定义按钮，不必再在更新一下在 /wp-includes/js/quicktags.js 动一次手脚咯。</p>
<p>首先创建一个 <code>my-quicktags.js</code>，丢入以下内容：</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:Microsoft Yahei;">QTags.<span style="color: #660066;">addButton</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'&lt;'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&lt;'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&amp;lt;'</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;">//快捷输入&lt;的html代码</span>
QTags.<span style="color: #660066;">addButton</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'&gt;'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&gt;'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&amp;gt;'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
QTags.<span style="color: #660066;">addButton</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'hr'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'hr'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&lt;hr /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&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;">//快捷输入一个hr横线，点一下即可</span>
QTags.<span style="color: #660066;">addButton</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'h1'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'h1'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&lt;h1&gt;&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;&lt;/h1&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">//快捷输入h1标签</span>
QTags.<span style="color: #660066;">addButton</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'h2'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'h2'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&lt;h2&gt;&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;&lt;/h2&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
QTags.<span style="color: #660066;">addButton</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'h3'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'h3'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&lt;h3&gt;&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;&lt;/h3&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">//QTags.addButton( 'my_id', 'my button', '\n&lt;/span&gt;', '&lt;/span&gt;\n' );  </span>
<span style="color: #006600; font-style: italic;">//这儿共有四对引号，分别是按钮的ID、显示名、点一下输入内容、再点一下关闭内容（此为空则一次输入全部内容），\n表示换行。</span></pre></div></div>

<p><span id="more-1916"></span>然后把此js丢入主题文件夹，再在主题 <code>functions.php</code> 中加入代码：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;"><span style="color: #666666; font-style: italic;">// 自定义HTML编辑器按钮</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_print_scripts'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my_quicktags'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> my_quicktags<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    wp_enqueue_script<span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'my_quicktags'</span><span style="color: #339933;">,</span>
        get_stylesheet_directory_uri<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/my-quicktags.js'</span><span style="color: #339933;">,</span>
        <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'quicktags'</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>O了，进后台编辑器HTML模式下瞅瞅呗～</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/custom-quicktags-into-wordpress-editor.html/feed</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>强化WP后台“可视化”编辑器</title>
		<link>http://immmmm.com/streng-wordpress-visual-editor.html</link>
		<comments>http://immmmm.com/streng-wordpress-visual-editor.html#comments</comments>
		<pubDate>Sat, 13 Nov 2010 12:56:56 +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=1499</guid>
		<description><![CDATA[参考来源:《强化你的 WordPress 后台编辑器》 强化什么呢？其实也就是把主题style.css内对文章定义的样式属性，应用到WordPress后台可视化编辑模式中来。如以一来，本要保存一下再点预览才看得到文章发布后显示出来的样式，而我们折腾后做到了“即时预览”。 步骤也很简单： 1.添加功能代码至functions.php： function editor_styles&#40;$url&#41; &#123; &#160; if &#40;!empty&#40;$url&#41;&#41; $url .= ','; &#160; $url .= trailingslashit&#40;get_stylesheet_directory_uri&#40;&#41;&#41;.'editor.css'; &#160; return $url; &#160; &#125; &#160; if&#40;current_user_can&#40;'edit_posts'&#41;&#41;: &#160; add_filter&#40;'mce_css', 'editor_styles'&#41;; &#160; endif; 2.创建editor.css放至主题文件夹，这个CSS样式里放什么代码呢？这个就得根据不同主题来写了～ 一般来说直接写pimgblockquotecode等标签就好了。想看实例的，请移步@loo2k同学的那篇文章。 最后来一张截图： 发科鸡负打不溜！]]></description>
			<content:encoded><![CDATA[<p>参考来源:<a rel="nofollow" href="http://loo2k.com/wordpress-editor/" target="_blank">《强化你的 WordPress 后台编辑器》</a></p>
<p>强化什么呢？其实也就是把主题<code>style.css</code>内对文章定义的样式属性，应用到WordPress后台可视化编辑模式中来。如以一来，本要保存一下再点预览才看得到文章发布后显示出来的样式，而我们折腾后做到了“即时预览”。</p>
<p><strong>步骤也很简单：</strong><span id="more-1499"></span></p>
<p>1.添加功能代码至<code>functions.php</code>：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;"><span style="color: #000000; font-weight: bold;">function</span> editor_styles<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$url</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">','</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$url</span> <span style="color: #339933;">.=</span> trailingslashit<span style="color: #009900;">&#40;</span>get_stylesheet_directory_uri<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: #0000ff;">'editor.css'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$url</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'edit_posts'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
&nbsp;
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mce_css'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'editor_styles'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span></pre></div></div>

<p>2.创建<code>editor.css</code>放至主题文件夹，这个CSS样式里放什么代码呢？这个就得根据不同主题来写了～</p>
<p>一般来说直接写<code>p</code><code>img</code><code>blockquote</code><code>code</code>等标签就好了。想看实例的，请移步<a href="http://loo2k.com" target="_blank">@loo2k</a>同学的那篇文章。</p>
<p>最后来一张截图：</p>
<p style="text-align: center;"><a href="http://lh5.googleusercontent.com/_65ZfNm-tR48/TN6Kx8rzxLI/AAAAAAAAEJc/vPbS_PWAYnA/edit.jpg?imgmax=800"><img class="pie-img" src="http://lh5.googleusercontent.com/_65ZfNm-tR48/TN6Kx8rzxLI/AAAAAAAAEJc/vPbS_PWAYnA/edit.jpg?imgmax=512" alt="edit.jpg" /></a></p>
<p>发科鸡负打不溜！</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/streng-wordpress-visual-editor.html/feed</wfw:commentRss>
		<slash:comments>67</slash:comments>
		</item>
		<item>
		<title>恢复Picasa与WordPress完美结合</title>
		<link>http://immmmm.com/restore-perfect-of-picasa-and-wordpress.html</link>
		<comments>http://immmmm.com/restore-perfect-of-picasa-and-wordpress.html#comments</comments>
		<pubDate>Wed, 18 Aug 2010 14:33:30 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[软件技巧]]></category>
		<category><![CDATA[picasa]]></category>
		<category><![CDATA[WordPress技巧]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1451</guid>
		<description><![CDATA[刚确认一个好消息，功夫网已解封PicasaWeb的图片形如lh3.googleusercontent.com开头的外链地址，就是说只要我们能获取到图片的外链地址，插入到博文中就可以正常显示了。 上传： 1.直接访问http://picasaweb.google.co.jp或http://picasaweb.google.ca，该怎么上传就怎么上传； 2.用Picasa本地客户端，挂SSH登录帐户，把文件夹同步了，想怎么丢图片就怎么丢图片。 调用：picasa-images-express插件谁用谁知道。 上传方便，调用也方便，有不用的道理吗？ 小站从建站后的文中所有插图也已全部转移至Picasa，好处不用多说，降低站点流量，减少站点空间，大大方便了空间转移，这也是我一直不想把图传自己空间的原因。下图也是我同步管理方案，一个月一个文件夹～ 唯一让人遗憾的就是Picasa只支持JPG格式的图片……]]></description>
			<content:encoded><![CDATA[<p>刚确认一个好消息，功夫网已解封PicasaWeb的图片形如lh3.googleusercontent.com开头的外链地址，就是说只要我们能获取到图片的外链地址，插入到博文中就可以正常显示了。</p>
<p><strong>上传：</strong></p>
<p><strong></strong>1.直接访问<a rel="nofollow" href="http://picasaweb.google.co.jp" target="_blank">http://picasaweb.google.co.jp</a>或<a rel="nofollow" href="http://picasaweb.google.ca" target="_blank">http://picasaweb.google.ca</a>，该怎么上传就怎么上传；</p>
<p>2.用Picasa本地客户端，挂SSH登录帐户，把文件夹同步了，想怎么丢图片就怎么丢图片。<span id="more-1451"></span></p>
<p><strong>调用：</strong><a rel="nofollow" href="http://www.cisvi.com/bo/picasa-image-express-965/" target="_blank">picasa-images-express</a>插件谁用谁知道。</p>
<p>上传方便，调用也方便，有不用的道理吗？</p>
<p>小站从建站后的文中所有插图也已全部转移至Picasa，好处不用多说，降低站点流量，减少站点空间，大大方便了空间转移，这也是我一直不想把图传自己空间的原因。下图也是我同步管理方案，一个月一个文件夹～</p>
<p style="text-align: center;"><img class="aligncenter" src="https://lh6.googleusercontent.com/_65ZfNm-tR48/TGvs2nJMyCI/AAAAAAAAD7A/GEjEIzq9l8w/picasa.jpg?imgmax=800" alt="picasa.jpg" /></p>
<p>唯一让人遗憾的就是Picasa只支持JPG格式的图片……</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/restore-perfect-of-picasa-and-wordpress.html/feed</wfw:commentRss>
		<slash:comments>205</slash:comments>
		</item>
		<item>
		<title>jQuery 折腾小记及汇总</title>
		<link>http://immmmm.com/jquery-small-note-and-summary.html</link>
		<comments>http://immmmm.com/jquery-small-note-and-summary.html#comments</comments>
		<pubDate>Sun, 28 Mar 2010 14:00:11 +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=1275</guid>
		<description><![CDATA[从去年的11月发了篇《JQuery Adding》正式开始折腾jQuery，至现在用jQuery加的效果也有好一些了，所以就特来整理整理也汇算个总。 说白了jQuery就是JS，它只是把JS内的很多函数封装了，而且封装的相当不错，让懂点网页基础知识很容易就可以上手。 目前我所获得关于jQuery方面的知识不外乎来自于 jQuery 中文文档、《锋利的jQuery》以及网络搜索。我是极力推荐对jQuery有兴趣的同学看看锋利这本书的，我自己也是看完PDF版特地买了本收藏，也算支持作者一把，毕竟是我们国人作者自己写的！ 额，接下来就一篇篇文章来了： 《如何正确使用jQuery代码》：简单的说明了两种使用jQuery代码的方式，这也是整合或者添加jQuery代码的基础篇； 《关闭/显示 WordPress侧边栏》：通过点击来关闭或者显示侧边栏，有助于访客阅读文章正文内容； 《美妙的标题提示》：鼠标移到超链接上时显示把alt和title酷酷的显示出来，非常吸引眼球； 《为附件添加个性图标》：给不同类型的附件加上小图标标识，虽CSS也可实现，关键是jQuery出来的效果兼容IE6； 《新窗口中打开评论者链接》：不动任何WP程序代码，一句jQuery即实现； 《“返回顶部”加强版》：点击滑动到页首页尾或者评论，IE6下显示有问题； 《Tab切换效果》：很经典的效果，如果页面内容太多繁多用这个不错，尤其用在侧边栏上； 《导航伸缩效果》：鼠标移到导航各位标题名称上时会向下滑动，移开则回复原样； 《恢复Picasa图片显示代码》：利用GAE搭建的程序加上jQuery，Picasa图完美显示； 《Ajax comments For Simple-Lines》：给Simple-Lines主题（官方提交版）整的专版AJAX评论提交； 《牛X的导航栏》：浏览器滚动条超过导航条时，导航附在浏览器的顶部并渐隐，耍酷专用； 更多代码尽在：http://immmmm.com/wp-content/themes/simplelines/js/all-gae.js 题外话： 之前有把simplelines做成收费主题的想法，主要就是给主题加个后台和一些jQuery特效，经过几个月的考虑我还是放弃了，因为我看到太多优秀的主题都是免费分享的，我收费我惭愧啊！ 暂时做了个变通，就是在主题页面加了个支付宝的捐赠地址，然后我有个想法： 如果有童鞋需要添加以上特效到主题中，可联系我，价格优惠！当然，也接受其他WP主题相关的小活~欢迎咨询！ PS：小站的广告位闲的蛋疼，咳……]]></description>
			<content:encoded><![CDATA[<p>从去年的11月发了篇<a href="http://immmmm.com/jquery-adding.html" target="_blank">《JQuery Adding》</a>正式开始折腾jQuery，至现在用jQuery加的效果也有好一些了，所以就特来整理整理也汇算个总。</p>
<p>说白了jQuery就是JS，它只是把JS内的很多函数封装了，而且封装的相当不错，让懂点网页基础知识很容易就可以上手。</p>
<p>目前我所获得关于jQuery方面的知识不外乎来自于 <a rel="nofollow" href="http://jquery-api-zh-cn.googlecode.com/svn/trunk/xml/jqueryapi.xml" target="_blank">jQuery 中文文档</a>、<a href="http://immmmm.com/recommend-book-about-css-jquery.html" target="_blank">《锋利的jQuery》</a>以及网络搜索。我是极力推荐对jQuery有兴趣的同学看看锋利这本书的，我自己也是看完PDF版特地买了本收藏，也算支持作者一把，毕竟是我们国人作者自己写的！</p>
<p><span id="more-1275"></span>额，接下来就一篇篇文章来了：</p>
<p><a href="http://immmmm.com/how-to-use-jquery-code.html" target="_blank"><strong>《如何正确使用jQuery代码》</strong></a>：简单的说明了两种使用jQuery代码的方式，这也是整合或者添加jQuery代码的基础篇；</p>
<p style="text-align: center;"><img class="pie-img" src="http://lh5.googleusercontent.com/_65ZfNm-tR48/Su5HvTb1g6I/AAAAAAAADA0/YTP1bvpK4UY/csidebar_01.jpg?imgmax=800" alt="csidebar_01.jpg" /> <img class="pie-img" src="http://lh4.googleusercontent.com/_65ZfNm-tR48/Su5Htv_Xh2I/AAAAAAAADAw/Mb9bxZuyZuU/csidebar_02.jpg?imgmax=800" alt="csidebar_02.jpg" /></p>
<p><a href="http://immmmm.com/close-show-sidebar-simple-code.html" target="_blank"><strong>《关闭/显示 WordPress侧边栏》</strong></a>：通过点击来关闭或者显示侧边栏，有助于访客阅读文章正文内容；</p>
<p style="text-align: center;"><img class="pie-img" src="http://lh3.googleusercontent.com/_65ZfNm-tR48/Su-4HbiOuGI/AAAAAAAADBU/6M-nADvjG7A/title-tips.jpg?imgmax=800" alt="title-tips.jpg" /></p>
<p><a href="http://immmmm.com/jquery-study-notes-the-wonderful-title-tips.html" target="_blank"><strong>《美妙的标题提示》</strong></a>：鼠标移到超链接上时显示把alt和title酷酷的显示出来，非常吸引眼球；</p>
<p style="text-align: center;"><img class="pie-img" src="http://lh4.googleusercontent.com/_65ZfNm-tR48/S69VgG1YYWI/AAAAAAAADpU/52xxT5nU9FA/jquery1.jpg?imgmax=800" alt="jquery1.jpg" /></p>
<p><a href="http://immmmm.com/jquery-study-notes-add-different-icon-for-attachment.html" target="_blank"><strong>《为附件添加个性图标》</strong></a>：给不同类型的附件加上小图标标识，虽CSS也可实现，关键是jQuery出来的效果兼容IE6；</p>
<p><a href="http://immmmm.com/jquery-notes-open-comment-link-new-window.html" target="_blank"><strong>《新窗口中打开评论者链接》</strong></a>：不动任何WP程序代码，一句jQuery即实现；</p>
<p style="text-align: center;"><img class="pie-img" src="http://lh3.googleusercontent.com/_65ZfNm-tR48/SxYa4Qb3wGI/AAAAAAAADHw/iy6-F5MraDA/huadong.jpg?imgmax=800" alt="huadong.jpg" /></p>
<p><a href="http://immmmm.com/added-sliding-effect-enhanced.html" target="_blank"><strong>《“返回顶部”加强版》</strong></a>：点击滑动到页首页尾或者评论，IE6下显示有问题；</p>
<p style="text-align: center;"><a class="highslide" rel="highslide" href="http://lh3.googleusercontent.com/_65ZfNm-tR48/S1q7iFfw6DI/AAAAAAAADR4/mJaWhgtz0n8/tab-1.jpg?imgmax=800"><img class="pie-img" src="http://lh3.googleusercontent.com/_65ZfNm-tR48/S1q7iFfw6DI/AAAAAAAADR4/mJaWhgtz0n8/tab-1.jpg?imgmax=200" alt="tab-1.jpg" /></a> <a class="highslide" rel="highslide" href="http://lh5.googleusercontent.com/_65ZfNm-tR48/S1q7iqWUlGI/AAAAAAAADR8/wgukGuvO-Ho/tab-2.jpg?imgmax=800"><img class="pie-img" src="http://lh5.googleusercontent.com/_65ZfNm-tR48/S1q7iqWUlGI/AAAAAAAADR8/wgukGuvO-Ho/tab-2.jpg?imgmax=200" alt="tab-2.jpg" /></a> <a class="highslide" rel="highslide" href="http://lh5.googleusercontent.com/_65ZfNm-tR48/S1q7jFw66KI/AAAAAAAADSA/vNHY_JRqIEA/tab-3.jpg?imgmax=800"><img class="pie-img" src="http://lh5.googleusercontent.com/_65ZfNm-tR48/S1q7jFw66KI/AAAAAAAADSA/vNHY_JRqIEA/tab-3.jpg?imgmax=200" alt="tab-3.jpg" /></a></p>
<p><a href="http://immmmm.com/jquery-tab-switch-code-improved.html" target="_blank"><strong>《Tab切换效果》</strong></a>：很经典的效果，如果页面内容太多繁多用这个不错，尤其用在侧边栏上；</p>
<p style="text-align: center;"><img class="pie-img" src="http://lh4.googleusercontent.com/_65ZfNm-tR48/S1w4V2tcr5I/AAAAAAAADSg/68z0hEFEzco/animate1.jpg?imgmax=800" alt="animate1.jpg" /> <img class="pie-img" src="http://lh5.googleusercontent.com/_65ZfNm-tR48/S1w4V3j5lfI/AAAAAAAADSk/XYfdmqFTJ20/animate2.jpg?imgmax=800" alt="animate2.jpg" /></p>
<p><a href="http://immmmm.com/use-jquery-animate-margin.html" target="_blank"><strong>《导航伸缩效果》</strong></a>：鼠标移到导航各位标题名称上时会向下滑动，移开则回复原样；</p>
<p><a href="http://immmmm.com/restore-to-normal-display-picasa-images.html" target="_blank"><strong>《恢复Picasa图片显示代码》</strong></a>：利用GAE搭建的程序加上jQuery，Picasa图完美显示；</p>
<p><a href="http://immmmm.com/ajax-comment-for-theme-simple-lines.html" target="_blank"><strong>《Ajax comments For Simple-Lines》</strong></a>：给Simple-Lines主题（官方提交版）整的专版AJAX评论提交；</p>
<p style="text-align: center;"><a class="highslide" rel="highslide" href="http://lh3.googleusercontent.com/_65ZfNm-tR48/S6jNNrUs5LI/AAAAAAAADno/ulK0hO6skMk/daoh-1.jpg?imgmax=800"><img class="pie-img" src="http://lh3.googleusercontent.com/_65ZfNm-tR48/S6jNNrUs5LI/AAAAAAAADno/ulK0hO6skMk/daoh-1.jpg?imgmax=288" alt="daoh-1.jpg" /></a> <a class="highslide" rel="highslide" href="https://lh6.googleusercontent.com/_65ZfNm-tR48/S6jNO0zGiuI/AAAAAAAADns/ZI4NsV7VMcE/daoh-2.jpg?imgmax=800"><img class="pie-img" src="https://lh6.googleusercontent.com/_65ZfNm-tR48/S6jNO0zGiuI/AAAAAAAADns/ZI4NsV7VMcE/daoh-2.jpg?imgmax=288" alt="daoh-2.jpg" /></a></p>
<p><a href="http://immmmm.com/shock-navigation-bar.html" target="_blank"><strong>《牛X的导航栏》</strong></a>：浏览器滚动条超过导航条时，导航附在浏览器的顶部并渐隐，耍酷专用；</p>
<p>更多代码尽在：<a href="http://immmmm.com/wp-content/themes/simplelines/js/all-gae.js" target="_blank">http://immmmm.com/wp-content/themes/simplelines/js/all-gae.js</a></p>
<p><strong><span style="color: #3366ff;">题外话：</span></strong></p>
<p><strong><span style="color: #3366ff;"> </span></strong>之前有把simplelines做成收费主题的想法，主要就是给主题加个后台和一些jQuery特效，经过几个月的考虑我还是放弃了，因为我看到太多优秀的主题都是免费分享的，我收费我惭愧啊！</p>
<p>暂时做了个变通，就是在主题页面加了个支付宝的捐赠地址，然后我有个想法：</p>
<p>如果有童鞋需要添加以上特效到主题中，可联系我，价格优惠！当然，也接受其他WP主题相关的小活~欢迎咨询！</p>
<p>PS：小站的广告位闲的蛋疼，咳……</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/jquery-small-note-and-summary.html/feed</wfw:commentRss>
		<slash:comments>92</slash:comments>
		</item>
		<item>
		<title>[非插件] 实现 WordPress 分页导航</title>
		<link>http://immmmm.com/wordpress-page-navigation-without-plugins.html</link>
		<comments>http://immmmm.com/wordpress-page-navigation-without-plugins.html#comments</comments>
		<pubDate>Tue, 16 Mar 2010 12:39:29 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[WordPress技巧]]></category>
		<category><![CDATA[分页导航]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1268</guid>
		<description><![CDATA[距上一次真正折腾WP已经相隔好几个月了，是由于期间各种原因叠加所致，无奈呀，杯具呀！ 话说WP自带的就“较早文章”和“最近文章”两个内置函数，首页文章显示数又有限，如果要看很早以前的，那要翻得哟~所以我们希望有一排数字，可以让我们喜欢点哪一页就哪一页。目前可实现这个功能的插件太多太多，之前我使用的也曾推荐过的是：《WordPress 分页导航插件: Paginator》。 今天分享的是用纯代码来实现分页导航，先看效果图： 怎样？效果还过得去吧！有俺强力CSS代码技术做后盾，不怕做不出就怕想不出好样式~哇哈哈，臭屁臭屁了…… 进入折腾步骤： 一、添加功能代码至 functions.php（的php循环内） &#160; function par_pagenavi&#40;$range = 9&#41;&#123; &#160; global $paged, $wp_query; &#160; if &#40; !$max_page &#41; &#123;$max_page = $wp_query-&#62;max_num_pages;&#125; &#160; if&#40;$max_page &#62; 1&#41;&#123;if&#40;!$paged&#41;&#123;$paged = 1;&#125; &#160; if&#40;$paged != 1&#41;&#123;echo &#34;&#60;a href='&#34; . get_pagenum_link&#40;1&#41; . &#34;' class='extend' title='跳转到首页'&#62; 返回首页 &#60;/a&#62;&#34;;&#125; &#160; previous_posts_link&#40;' 上一页 '&#41;; &#160; if&#40;$max_page &#62; $range&#41;&#123; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>距上一次真正折腾WP已经相隔好几个月了，是由于期间各种原因叠加所致，无奈呀，杯具呀！</p>
<p>话说WP自带的就“较早文章”和“最近文章”两个内置函数，首页文章显示数又有限，如果要看很早以前的，那要翻得哟~所以我们希望有一排数字，可以让我们喜欢点哪一页就哪一页。目前可实现这个功能的插件太多太多，之前我使用的也曾推荐过的是：<a rel="nofollow" href="http://immmmm.com/wordpress-plugins-paginator.html" target="_blank">《WordPress 分页导航插件: Paginator》</a>。</p>
<p>今天分享的是用纯代码来实现分页导航，先看效果图：</p>
<p style="text-align: center;"><img class="pie-img" src="http://lh4.googleusercontent.com/_65ZfNm-tR48/S59x446FfaI/AAAAAAAADlo/tWwqSRVlFZA/page-nav.jpg?imgmax=800" alt="page-nav.jpg" /></p>
<p>怎样？效果还过得去吧！有俺强力CSS代码技术做后盾，不怕做不出就怕想不出好样式~哇哈哈，臭屁臭屁了……</p>
<p><span id="more-1268"></span>进入折腾步骤：</p>
<p><strong>一、添加功能代码至 functions.php</strong>（的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;">function</span> par_pagenavi<span style="color: #009900;">&#40;</span><span style="color: #000088;">$range</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$paged</span><span style="color: #339933;">,</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$max_page</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #000088;">$max_page</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">max_num_pages</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$max_page</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: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$paged</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$paged</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$paged</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> get_pagenum_link<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;' class='extend' title='跳转到首页'&gt; 返回首页 &lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
&nbsp;
	previous_posts_link<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' 上一页 '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$max_page</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$range</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$paged</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$range</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$range</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: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> get_pagenum_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">==</span><span style="color: #000088;">$paged</span><span style="color: #009900;">&#41;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; class='current'&quot;</span><span style="color: #339933;">;</span>echo <span style="color: #0000ff;">&quot;&gt;<span style="color: #006699; font-weight: bold;">$i</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$paged</span> <span style="color: #339933;">&gt;=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$max_page</span> <span style="color: #339933;">-</span> <span style="color: #990000;">ceil</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$range</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$max_page</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$range</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$max_page</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> get_pagenum_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">==</span><span style="color: #000088;">$paged</span><span style="color: #009900;">&#41;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; class='current'&quot;</span><span style="color: #339933;">;</span>echo <span style="color: #0000ff;">&quot;&gt;<span style="color: #006699; font-weight: bold;">$i</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$paged</span> <span style="color: #339933;">&gt;=</span> <span style="color: #000088;">$range</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$paged</span> <span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$max_page</span> <span style="color: #339933;">-</span> <span style="color: #990000;">ceil</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$range</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$paged</span> <span style="color: #339933;">-</span> <span style="color: #990000;">ceil</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$range</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$paged</span> <span style="color: #339933;">+</span> <span style="color: #990000;">ceil</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$range</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> get_pagenum_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">;</span>if<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">==</span><span style="color: #000088;">$paged</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; class='current'&quot;</span><span style="color: #339933;">;</span>echo <span style="color: #0000ff;">&quot;&gt;<span style="color: #006699; font-weight: bold;">$i</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$max_page</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> get_pagenum_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">==</span><span style="color: #000088;">$paged</span><span style="color: #009900;">&#41;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; class='current'&quot;</span><span style="color: #339933;">;</span>echo <span style="color: #0000ff;">&quot;&gt;<span style="color: #006699; font-weight: bold;">$i</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span>
&nbsp;
	next_posts_link<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' 下一页 '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$paged</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$max_page</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> get_pagenum_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$max_page</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;' class='extend' title='跳转到最后一页'&gt; 最后一页 &lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>二、添加美化代码至主题style.css</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #6666ff;">.page_navi</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>height<span style="color: #00AA00;">:</span><span style="color: #933;">36px</span><span style="color: #00AA00;">;</span>line-<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">36px</span><span style="color: #00AA00;">;</span>text-align<span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>overflow<span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>padding-<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">1em</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.page_navi</span> a<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #933;">8px</span><span style="color: #00AA00;">;</span>margin<span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>text-decoration<span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>color<span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#888</span><span style="color: #00AA00;">;</span>border<span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccf</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.page_navi</span> a<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span><span style="color: #6666ff;">.page_navi</span> a<span style="color: #6666ff;">.current</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#356aa0</span><span style="color: #00AA00;">;</span>color<span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#356aa0</span><span style="color: #00AA00;">;</span>font-weight<span style="color: #00AA00;">:</span><span style="color: #993333;">bolder</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>三、添加调用代码至主题index.php、archive.php、category.php、search.php</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
&lt;div class=&quot;page_navi&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> par_pagenavi<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;</pre></div></div>

<p>OK，大功造成！又可以干掉一个已为数不多的插件咯！</p>
<p>注:文内核心代码来源于 <a target='_blank' rel='nofollow' href='http://www.ei2u.com/wordpress/work/273.html'>http://www.ei2u.com/wordpress/work/273.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/wordpress-page-navigation-without-plugins.html/feed</wfw:commentRss>
		<slash:comments>176</slash:comments>
		</item>
		<item>
		<title>给WordPress主题添加短代码功能</title>
		<link>http://immmmm.com/add-shortcodes-wordpress-theme.html</link>
		<comments>http://immmmm.com/add-shortcodes-wordpress-theme.html#comments</comments>
		<pubDate>Sun, 31 Jan 2010 11:15:05 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[WordPress技巧]]></category>
		<category><![CDATA[短代码]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1253</guid>
		<description><![CDATA[貌似这功能早在WP2.5已经支持，详细的描述请看：http://codex.wordpress.org/Shortcode_API 此文不解释原理（因为俺也说不清），就直接说具体的应用： 一、MP3播放器 1.添加：把以下代码复制至functions.php（注意在php循环内），然后下载mp3player.swf并放至主题根目录，MP3默认不自动播放 &#160; function mp3player&#40;$atts, $content=null&#41;&#123; &#160; extract&#40;shortcode_atts&#40;array&#40;&#34;auto&#34;=&#62;'0'&#41;,$atts&#41;&#41;; &#160; return '&#60;embed src=&#34;'.get_bloginfo&#40;&#34;template_url&#34;&#41;.'/mp3player.swf?url='.$content.'&#38;amp;autoplay='.$auto.'&#34; type=&#34;application/x-shockwave-flash&#34; wmode=&#34;transparent&#34; allowscriptaccess=&#34;always&#34; width=&#34;400&#34; height=&#34;30&#34;&#62;'; &#160; &#125; &#160; add_shortcode&#40;'mp3','mp3player'&#41;; 2.使用：撰写文章时在“HTML模式”下插入以下格式代码即可 &#160; [mp3]MP3文件URL[/mp3] 自动播放代码格式: &#160; [mp3 auto=&#34;1&#34;]MP3文件URL[/mp3] 3.演示： &#160; [mp3]http://storage.live.com/items/6E6B92BD0BA88634!163?filename=L.O.V.E.mp3[/mp3] [mp3]http://storage.live.com/items/6E6B92BD0BA88634!163?filename=L.O.V.E.mp3[/mp3] 二、Google文档预览 1.添加代码：默认宽600高300居中显示 &#160; function docsGoogle&#40;$atts, $content=null&#41;&#123; &#160; return '&#60;p style=&#34;text-align: center;&#34;&#62;&#60;iframe style=&#34;border-style: none;&#34; src=&#34;http://docs.google.com/viewer?url='.$content.'&#38;embedded=true&#34; width=&#34;600&#34; height=&#34;300&#34;&#62;&#60;/iframe&#62;&#60;/p&#62;'; &#160; &#125; &#160; add_shortcode&#40;'docs','docsGoogle'&#41;; 2.使用格式：目前Google文档查看器只“支持 [...]]]></description>
			<content:encoded><![CDATA[<p>貌似这功能早在WP2.5已经支持，详细的描述请看：<a rel="nofollow" href="http://codex.wordpress.org/Shortcode_API" target="_blank">http://codex.wordpress.org/Shortcode_API</a></p>
<p>此文不解释原理（因为俺也说不清），就直接说具体的应用：</p>
<p><strong><span style="color: #3366ff;">一、MP3播放器</span></strong></p>
<p><strong>1.添加：</strong>把以下代码复制至functions.php（注意在php循环内），然后下载<a target='_blank' rel='nofollow' href='https://dl-web.dropbox.com/u/837457/mp3player.swf'>mp3player.swf</a>并放至主题根目录，MP3默认不自动播放</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> mp3player<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span>shortcode_atts<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'0'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;embed src=&quot;'</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;template_url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/mp3player.swf?url='</span><span style="color: #339933;">.</span><span style="color: #000088;">$content</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;amp;autoplay='</span><span style="color: #339933;">.</span><span style="color: #000088;">$auto</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; allowscriptaccess=&quot;always&quot; width=&quot;400&quot; height=&quot;30&quot;&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mp3'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'mp3player'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><span id="more-1253"></span><strong>2.使用：</strong>撰写文章时在“HTML模式”下插入以下格式代码即可</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:Microsoft Yahei;">&nbsp;
[mp3]MP3文件URL[/mp3]</pre></div></div>

<p>自动播放代码格式:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:Microsoft Yahei;">&nbsp;
[mp3 auto=&quot;1&quot;]MP3文件URL[/mp3]</pre></div></div>

<p><strong>3.演示：</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:Microsoft Yahei;">&nbsp;
[mp3]http://storage.live.com/items/6E6B92BD0BA88634!163?filename=L.O.V.E.mp3[/mp3]</pre></div></div>

<p>[mp3]http://storage.live.com/items/6E6B92BD0BA88634!163?filename=L.O.V.E.mp3[/mp3]</p>
<p><strong><span style="color: #3366ff;">二、Google文档预览</span></strong></p>
<p><strong>1.添加代码：</strong>默认宽600高300居中显示</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> docsGoogle<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;p style=&quot;text-align: center;&quot;&gt;&lt;iframe style=&quot;border-style: none;&quot; src=&quot;http://docs.google.com/viewer?url='</span><span style="color: #339933;">.</span><span style="color: #000088;">$content</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;embedded=true&quot; width=&quot;600&quot; height=&quot;300&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'docs'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'docsGoogle'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>2.使用格式：</strong>目前Google文档查看器只“支持 PDF 文档、PowerPoint 演示文稿和 TIFF 文件”</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:Microsoft Yahei;">&nbsp;
[docs]Docs(.pdf、.ppt、.tiff)文件URL[/docs]</pre></div></div>

<p><strong>3.效果演示：</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:Microsoft Yahei;">&nbsp;
[docs]http://storage.live.com/items/6E6B92BD0BA88634!158?filename=how-to-build-your-own-web-site.pdf[/docs]</pre></div></div>

<p>[docs]http://storage.live.com/items/6E6B92BD0BA88634!158?filename=how-to-build-your-own-web-site.pdf[/docs]</p>
<p><strong><span style="color: #3366ff;">三、Flash快捷插入</span></strong></p>
<p><strong>1.添加代码：</strong>默认宽480高360居中显示</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> swf_player<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;p style=&quot;text-align: center;&quot;&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;480&quot; height=&quot;360&quot; src=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$content</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;&lt;/embed&gt;&lt;/p&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'swf'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'swf_player'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>2.使用格式及效果：</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:Microsoft Yahei;">&nbsp;
[swf]http://immmmm.com/download/chatnoir.swf[/swf]</pre></div></div>

<p>[swf]http://immmmm.com/download/chatnoir.swf[/swf]</p>
<p><strong><span style="color: #3366ff;">四、待添加……</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/add-shortcodes-wordpress-theme.html/feed</wfw:commentRss>
		<slash:comments>127</slash:comments>
<enclosure url="http://storage.live.com/items/6E6B92BD0BA88634!163?filename=L.O.V.E.mp3" length="" type="564984" />
		</item>
		<item>
		<title>WordPress 原生评论分页导航</title>
		<link>http://immmmm.com/wordpress-native-comment-navigation.html</link>
		<comments>http://immmmm.com/wordpress-native-comment-navigation.html#comments</comments>
		<pubDate>Mon, 25 Jan 2010 08:54:46 +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=1248</guid>
		<description><![CDATA[刚翻阅GR看到万戈童鞋几周前写的一篇文章：《免插件实现评论分页导航》，差点就错过了这么好的东东！原来不知什么时候WP已经自带了评分分页导航的函数，囧…… 效果上： 代码上： &#160; &#60;div id=&#34;comments-nav&#34;&#62; &#160; &#60;?php paginate_comments_links&#40;'prev_text=上一页&#38;next_text=下一页'&#41;;?&#62; &#160; &#60;/div&#62; 用上面这段代码替换原 comments.php 内的以下两句（其他主题类似）： &#160; &#60;div class=&#34;left_border&#34;&#62;&#60;?php previous_comments_link&#40;'上一页'&#41; ?&#62;&#60;/div&#62; &#160; &#60;div class=&#34;right_border&#34;&#62;&#60;?php next_comments_link&#40;'下一页'&#41; ?&#62;&#60;/div&#62; 外送我的CSS美化代码： &#160; #comments-nav&#123;text-align:center;&#125; &#160; #comments-nav a&#123;padding:5px 10px;border:1px solid #ccf;&#125; &#160; #comments-nav a:hover&#123;border:1px solid #356aa0;color:#356aa0;&#125; &#160; #comments-nav span.current&#123;font-weight:700;border:1px solid #356aa0;color:#356aa0;padding:5px 10px;&#125;]]></description>
			<content:encoded><![CDATA[<p>刚翻阅GR看到万戈童鞋几周前写的一篇文章：<a rel="nofollow" href="http://wange.im/paginate-comments-without-plugins-in-wordpress.html" target="_blank">《免插件实现评论分页导航》</a>，差点就错过了这么好的东东！原来不知什么时候WP已经自带了评分分页导航的函数，囧……</p>
<p><strong>效果上：</strong></p>
<p style="text-align: center;"><img class="pie-img" src="https://lh6.googleusercontent.com/_65ZfNm-tR48/S11fxPKI6pI/AAAAAAAADUM/oDmidGLWGCs/nav.jpg?imgmax=800" alt="nav.jpg" /></p>
<p><strong>代码上：</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
&lt;div id=&quot;comments-nav&quot;&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> paginate_comments_links<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'prev_text=上一页&amp;next_text=下一页'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;/div&gt;</pre></div></div>

<p><span id="more-1248"></span>用上面这段代码替换原 comments.php 内的以下两句（其他主题类似）：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&nbsp;
&lt;div class=&quot;left_border&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> previous_comments_link<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'上一页'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
&nbsp;
&lt;div class=&quot;right_border&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> next_comments_link<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'下一页'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&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: #cc00cc;">#comments-nav</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#comments-nav</span> a<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>border<span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccf</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#comments-nav</span> a<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#356aa0</span><span style="color: #00AA00;">;</span>color<span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#356aa0</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#comments-nav</span> span<span style="color: #6666ff;">.current</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">700</span><span style="color: #00AA00;">;</span>border<span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#356aa0</span><span style="color: #00AA00;">;</span>color<span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#356aa0</span><span style="color: #00AA00;">;</span>padding<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/wordpress-native-comment-navigation.html/feed</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
		<item>
		<title>JQuery Adding……</title>
		<link>http://immmmm.com/jquery-adding.html</link>
		<comments>http://immmmm.com/jquery-adding.html#comments</comments>
		<pubDate>Sun, 01 Nov 2009 07:30:17 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WordPress技巧]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1210</guid>
		<description><![CDATA[对主题一直追求原生简洁快速，几周前再三考虑是否加上Willin大师的《WordPress Ajax comments》，终于在强大的功能和效果下，我从了它！之后，我一直在琢磨给小站加上更多的应用jQuery的特效，可不能单单为一个Ajax评论提交就加载好几十KB的它，这也太奢侈了！ 这回三休日（别羡慕~），也看了些文章，也给小站加了些新的应用： 1. 《不用插件解决Picasa图片不能显示的方法》 由于众所不周知的原因，天朝把Picasa给墙了，至今仍在墙外。不过上有墙下有洞，咱们就利用Google App Engine来给墙开个门！开门具体方法见上文，简单来说就是在GAE上放个代理程序，然后加段jQuery代码让页面内所有图片链接通过代理访问，既然是GG的，速度和稳定性当然没问题！ 这样我就又可以进后台把——PIKA插件给禁用了！ 2.《如何使用 JQUERY 伸縮欄位》 想看内容，点我试试？ 很早万戈童鞋就向我表示过，我的那Simple-Lines主题发布页FAQ太长了，建议我采用伸缩的并推荐了相应的代码。我那时好像也试验过，不过操作太复杂，也就放弃了！ 几天前发现整好Willin大师写了篇上文，昨晚12点泡了杯家里竟还有且仅存最后一包的雀巢速溶咖啡，然后开始折腾。整个实现时间不长，加上jQuery代码，在html下相应修改了下文章结构。 3.《SHRINKTHEWEB – 網頁縮略圖服務》 还是Willin大师出品，而且用上他私用的jQuery代码，效果不是一般的酷！目前，您可在文章内链接、首页侧边栏的友情链接、评论者昵称，鼠标经过它们时有效果显示！当然，如果为了让小站更快地显示贵网站的缩略图，可通过http://www.shrinktheweb.com/左下方手动保存缩略图（200&#215;150）后发邮件我，我即刻就把您的缩略图放在本地主机上！嘻嘻~ 4.《JQuery 学习笔记之：关闭/显示 WordPress侧边栏》 可点击导航栏最右侧“关闭侧边栏”试试，阅读文章爽歪歪，具体方法见上文！ 5.更多jQuery的应用添加中…… PS：有好的jQuery特效，希望各位童鞋朋友大力推荐哦~~]]></description>
			<content:encoded><![CDATA[<p>对主题一直追求原生简洁快速，几周前再三考虑是否加上Willin大师的<a href="http://immmmm.com/wordpress-ajax-comments-native-powerful.html">《WordPress Ajax comments》</a>，终于在强大的功能和效果下，我从了它！之后，我一直在琢磨给小站加上更多的应用jQuery的特效，可不能单单为一个Ajax评论提交就加载好几十KB的它，这也太奢侈了！</p>
<p>这回三休日（别羡慕~），也看了些文章，也给小站加了些新的应用：</p>
<p><a href="http://sivan.in/blog/solve-picasa-xx-without-plugin/"><strong><span style="color: #3366ff;">1. 《不用插件解决Picasa图片不能显示的方法》</span></strong></a></p>
<p>由于众所不周知的原因，天朝把Picasa给墙了，至今仍在墙外。不过上有墙下有洞，咱们就利用Google App Engine来给墙开个门！开门具体方法见上文，简单来说就是在GAE上放个代理程序，然后加段jQuery代码让页面内所有图片链接通过代理访问，既然是GG的，速度和稳定性当然没问题！</p>
<p>这样我就又可以进后台把——<a href="http://www.storyday.com/html/y2009/2496_pika-released-plug-ins.html">PIKA插件</a>给禁用了！<span id="more-1210"></span></p>
<p><strong><span style="color: #3366ff;"><a href="http://kan.willin.org/?p=1281"><span style="color: #3366ff;">2.《如何使用 JQUERY 伸縮欄位》</span></a> </span></strong></p>
<p class="menuheader" style="text-align: center;">想看内容，点我试试？</p>
<ul class="toggle">很早<a href="http://www.life-studio.cn/">万戈童鞋</a>就向我表示过，我的那<a href="http://immmmm.com/wordpress-theme-simple-lines.html">Simple-Lines主题</a>发布页FAQ太长了，建议我采用伸缩的并推荐了相应的代码。我那时好像也试验过，不过操作太复杂，也就放弃了！</p>
<p>几天前发现整好<a href="http://kan.willin.org/">Willin大师</a>写了篇上文，昨晚12点泡了杯家里竟还有且仅存最后一包的雀巢速溶咖啡，然后开始折腾。整个实现时间不长，加上jQuery代码，在html下相应修改了下文章结构。</ul>
<p><a href="http://kan.willin.org/?p=1275"><span style="color: #3366ff;"><strong>3.《SHRINKTHEWEB – 網頁縮略圖服務》</strong></span></a></p>
<p style="text-align: center;"><img class="pie-img" src="https://lh6.googleusercontent.com/_65ZfNm-tR48/Su2Tp5mtL4I/AAAAAAAAC_Q/jhjmF5yJums/webshot1.jpg?imgmax=720" alt="webshot1.jpg" /></p>
<p>还是<a href="http://kan.willin.org/">Willin大师</a>出品，而且用上他私用的jQuery代码，效果不是一般的酷！目前，您可在文章内链接、首页侧边栏的友情链接、评论者昵称，鼠标经过它们时有效果显示！当然，如果为了让小站更快地显示贵网站的缩略图，可通过<a href="http://www.shrinktheweb.com/">http://www.shrinktheweb.com/</a>左下方手动保存缩略图（200&#215;150）后发邮件我，我即刻就把您的缩略图放在本地主机上！嘻嘻~</p>
<p><a href="http://immmmm.com/off-display-wordpress-sidebar.html"><strong><span style="color: #3366ff;">4.《JQuery 学习笔记之：关闭/显示 WordPress侧边栏》</span></strong></a></p>
<p>可点击导航栏最右侧“关闭侧边栏”试试，阅读文章爽歪歪，具体方法见上文！</p>
<p>5.更多jQuery的应用添加中……</p>
<p><strong>PS：</strong>有好的jQuery特效，希望各位童鞋朋友大力推荐哦~~</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/jquery-adding.html/feed</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>添加“原生嵌套评论 Ajax 提交”功能</title>
		<link>http://immmmm.com/add-submit-ajax-comments.html</link>
		<comments>http://immmmm.com/add-submit-ajax-comments.html#comments</comments>
		<pubDate>Wed, 07 Oct 2009 09:24:34 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WordPress技巧]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1199</guid>
		<description><![CDATA[这几天小站不知怎么了，页面打开得都挺快的，就是提交评论慢死，实际上已经提交了，但页面就是刷新不出来，卡住…… 向GG大大请教，说大多是服务器负载过高的关系。嗨，服务器，我又折腾不到，所以索性自己动手丰衣足食，给小站加上了早以不稀奇的Ajax评论提交功能。经选择采用了Willin童鞋的方法。 经过下午的折腾，已经修改出Simple-Lines主题专用美化版（comments-ajax.7z）。使用方法： 1.解压——把 comments-ajax.js 及 comments-ajax.php 放在simplelines主题文件夹内； 2.在 header.php 中找到： &#60;?php if &#40; is_singular&#40;&#41; &#41; wp_enqueue_script&#40; 'comment-reply' &#41;; ?&#62; 修改为： &#160; &#60;?php if &#40; is_singular&#40;&#41; &#41;&#123; ?&#62; &#160; &#60;script type=&#34;text/javascript&#34; src=&#34;http://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js&#34;&#62;&#60;/script&#62; &#160; &#60;script type=&#34;text/javascript&#34; src=&#34;&#60;?php bloginfo&#40;'template_directory'&#41;; ?&#62;/comments-ajax.js&#34;&#62;&#60;/script&#62; &#160; &#60;?php &#125; ?&#62; OK！就这么简单！再次感谢Willin童鞋！ 另，有兴趣深入折腾的可前往《WordPress 內置嵌套評論專用 Ajax comments》。 另另，推荐后续相关阅读：《Ajax comments 評論回應郵件通知》]]></description>
			<content:encoded><![CDATA[<p>这几天小站不知怎么了，页面打开得都挺快的，就是提交评论慢死，实际上已经提交了，但页面就是刷新不出来，卡住……</p>
<p>向GG大大请教，说大多是服务器负载过高的关系。嗨，服务器，我又折腾不到，所以索性自己动手丰衣足食，给小站加上了早以不稀奇的Ajax评论提交功能。经选择采用了<strong>Willin童鞋</strong>的方法。</p>
<p>经过下午的折腾，已经修改出Simple-Lines主题专用美化版（<a href="https://dl-web.dropbox.com/u/837457/comments-ajax.7z">comments-ajax.7z</a>）。使用方法：</p>
<p><span id="more-1199"></span>1.解压——把 comments-ajax.js 及 comments-ajax.php 放在simplelines主题文件夹内；</p>
<p>2.在 header.php 中找到：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_singular<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> wp_enqueue_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'comment-reply'</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>修改为：</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_singular<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js&quot;&gt;&lt;/script&gt;
&nbsp;
&lt;script type=&quot;text/javascript&quot; src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/comments-ajax.js&quot;&gt;&lt;/script&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>OK！就这么简单！再次感谢<strong>Willin童鞋</strong>！</p>
<p>另，有兴趣深入折腾的可前往<a href="http://kan.willin.org/?p=1271">《WordPress 內置嵌套評論專用 Ajax comments》</a>。</p>
<p>另另，推荐后续相关阅读：<a href="http://kan.willin.org/?p=1279">《Ajax comments 評論回應郵件通知》</a></p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/add-submit-ajax-comments.html/feed</wfw:commentRss>
		<slash:comments>104</slash:comments>
		</item>
		<item>
		<title>添加“动态标识当前导航页”的判断语句</title>
		<link>http://immmmm.com/dynamic-highlight-menu.html</link>
		<comments>http://immmmm.com/dynamic-highlight-menu.html#comments</comments>
		<pubDate>Sat, 29 Aug 2009 05:55:23 +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=1185</guid>
		<description><![CDATA[每一次折腾一个东西后，都会有冲动写成文，告诉或是分享给大家，可也每每发现这题目很难表述，说不清！所以，我们还是来看看到底是啥东东吧： 之前，只有鼠标移到“折腾WP”上时，才会出现此效果，这是利用CSS的hover属性实现。而现在是在“折腾WP”分页时就突出显示原hover样式，这利用了一句php的判断语句： &#60;?php if &#40; is_category&#40;6&#41; &#41; &#123; echo ' class=&#34;nav_hover&#34;'; &#125; ?&#62; 把此判断语句添加至导航的li标签中： &#60;li&#60;?php if &#40; is_category&#40;6&#41; &#41; &#123; echo ' class=&#34;nav_hover&#34;'; &#125; ?&#62;&#62;&#60;a href=&#34;&#60;?php bloginfo&#40;'url'&#41;; ?&#62;/wordpress&#34;&#62;折腾WP&#60;/a&#62;&#60;/li&#62; 添加后会有什么效果呢？就是检测当前是否为ID=6的分类页，是的则添加class属性”nav_hover” 到li标签中，这样就简单实现了“动态标识当前导航页”了！ 更多其他判断语句： is_page , is_home&#40;&#41; , is_category&#40;&#41; , is_archive&#40;&#41; , is_search&#40;&#41; , is_single&#40;&#41; , is_date&#40;&#41; 再以“关于”页面为例，简单说个步骤： 1.查询到关于页面的ID，到后台页面编辑中即可获知，我的关于页面ID为258； 2.添加判断语句至li标签中： &#60;?php if &#40; is_page&#40;258&#41; &#41; &#123; echo ' [...]]]></description>
			<content:encoded><![CDATA[<p>每一次折腾一个东西后，都会有冲动写成文，告诉或是分享给大家，可也每每发现这题目很难表述，说不清！所以，我们还是来看看到底是啥东东吧：</p>
<p style="text-align: center;"><img class="pie-img" src="https://lh6.googleusercontent.com/_65ZfNm-tR48/Spi66WNk_CI/AAAAAAAACr8/d8hBFtWch1Q/dh1.jpg?imgmax=720" alt="dh1.jpg" /></p>
<p>之前，只有鼠标移到“折腾WP”上时，才会出现此效果，这是利用CSS的hover属性实现。而现在是在“折腾WP”分页时就突出显示原hover样式，这利用了一句php的判断语句：<span id="more-1185"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' class=&quot;nav_hover&quot;'</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>把此判断语句添加至导航的<strong>li</strong>标签中：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&lt;li<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' class=&quot;nav_hover&quot;'</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wordpress&quot;&gt;折腾WP&lt;/a&gt;&lt;/li&gt;</pre></div></div>

<p>添加后会有什么效果呢？就是检测当前是否为ID=6的分类页，是的则添加class属性”nav_hover” 到<strong>li</strong>标签中，这样就简单实现了“动态标识当前导航页”了！</p>
<p>更多其他判断语句：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">is_page <span style="color: #339933;">,</span> is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">,</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">,</span> is_archive<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">,</span> is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">,</span> is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">,</span> is_date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>再以<strong>“关于”页面</strong>为例，简单说个步骤：</p>
<p>1.查询到关于页面的ID，到后台页面编辑中即可获知，我的关于页面ID为258；</p>
<p>2.添加判断语句至<strong>li</strong>标签中：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">258</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' class=&quot;nav_hover&quot;'</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">&lt;li<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">258</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' class=&quot;nav_hover&quot;'</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/about&quot;&gt;关于此地&lt;/a&gt;&lt;/li&gt;</pre></div></div>

<p>3.更新文件即可！</p>
<p>文末说说个人感觉，这样做可以让访客清楚地明白自己在网站的哪个页面中，到底有啥好处呢？仁者见仁智者见智啦，各位童鞋！</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/dynamic-highlight-menu.html/feed</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
	</channel>
</rss>

