<?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>ls /proc &#187; coolcode</title>
	<atom:link href="http://www.lsproc.com/blog/tag/coolcode/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lsproc.com/blog</link>
	<description>lsproc.com</description>
	<lastBuildDate>Fri, 21 May 2010 14:29:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>为wordpress添加coolcode插件的quicktag</title>
		<link>http://www.lsproc.com/blog/add_coolcode_quicktag_for_wordpress/</link>
		<comments>http://www.lsproc.com/blog/add_coolcode_quicktag_for_wordpress/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 17:39:52 +0000</pubDate>
		<dc:creator>lostsnow</dc:creator>
				<category><![CDATA[Program&Database]]></category>
		<category><![CDATA[coolcode]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[quicktags]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.lostk.com/blog/add_coolcode_quicktag_for_wordpress/</guid>
		<description><![CDATA[转载时请标明文章原始出处和作者信息, 作者: lostsnow.http://www.lsproc.com/blog/add_coolcode_quicktag_for_wordpress/ 修改 wp-includes/js/quicktags.js 文件 1. 找到 edButtons[edButtons.length] = new edButton(&#039;ed_code&#039; ,&#039;code&#039; ,&#039;&#60;code&#62;&#039; ,&#039;&#60;/code&#62;&#039; ,&#039;c&#039; ); 在后面添加 edButtons[edButtons.length] = new edButton(&#039;ed_coolcode&#039; ,&#039;coolcode&#039; ,&#039;&#039; ,&#039;&#60;/coolcode&#62;&#039; ,&#039;x&#039; ); 2. 找到 else if (button.id == &#039;ed_link&#039;) { document.write(&#039;&#60;input type=&#34;button&#34; id=&#34;&#039; + button.id + &#039;&#34; accesskey=&#34;&#039; + button.access + &#039;&#34; class=&#34;ed_button&#34; onclick=&#34;edInsertLink(edCanvas, &#039; + i + &#039;);&#34; value=&#34;&#039; [...]]]></description>
			<content:encoded><![CDATA[<p>转载时请标明文章原始出处和作者信息, 作者: <a href="http://www.lsproc.com/blog/">lostsnow</a>.<br /><a href="http://www.lsproc.com/blog/add_coolcode_quicktag_for_wordpress/">http://www.lsproc.com/blog/add_coolcode_quicktag_for_wordpress/</a></p>
<p>修改 wp-includes/js/quicktags.js 文件</p>
<p>1. 找到</p>
<pre class="brush: javascript">
edButtons[edButtons.length] =
new edButton(&#039;ed_code&#039;
,&#039;code&#039;
,&#039;&lt;code&gt;&#039;
,&#039;&lt;/code&gt;&#039;
,&#039;c&#039;
);</pre>
<p>在后面添加</p>
<pre class="brush: javascript">
edButtons[edButtons.length] =
new edButton(&#039;ed_coolcode&#039;
,&#039;coolcode&#039;
,&#039;&#039;
,&#039;&lt;/coolcode&gt;&#039;
,&#039;x&#039;
);</pre>
<p>2. 找到</p>
<pre class="brush: javascript">
	else if (button.id == &#039;ed_link&#039;) {
		document.write(&#039;&lt;input type=&quot;button&quot; id=&quot;&#039; + button.id + &#039;&quot; accesskey=&quot;&#039; + button.access + &#039;&quot; class=&quot;ed_button&quot; onclick=&quot;edInsertLink(edCanvas, &#039; + i + &#039;);&quot; value=&quot;&#039; + button.display + &#039;&quot; /&gt;&#039;);
	}</pre>
<p>在后面添加</p>
<pre class="brush: javascript">
    else if (button.id == &#039;ed_coolcode&#039;) {
		document.write(&#039;&lt;input type=&quot;button&quot; id=&quot;&#039; + button.id + &#039;&quot; accesskey=&quot;&#039; + button.access + &#039;&quot; class=&quot;ed_button&quot; onclick=&quot;edInsertCoolcode(edCanvas, &#039; + i + &#039;);&quot; value=&quot;&#039; + button.display + &#039;&quot; /&gt;&#039;);
	}</pre>
<p>3. 在文件末尾添加</p>
<pre class="brush: javascript">
function edInsertCoolcode(myField, i, defaultLang, defaultLine) {
    if (!defaultLang) {
		defaultLang = &#039;php&#039;;
	}
    if (!defaultLine) {
		defaultLine = &#039;off&#039;;
	}
    if (!edCheckOpenTags(i)) {
        var codeLang = prompt(&#039;输入需要加亮的程序语言&#039;, defaultLang);
        var codeLine = prompt(&#039;是否显示行号(on, off)&#039;, defaultLine);
        edButtons[i].tagStart = &#039;&lt;&#039; + &#039;coolcode&#039;;
        if (codeLang) {
            edButtons[i].tagStart = edButtons[i].tagStart + &#039; lang=&quot;&#039;
                                    + codeLang + &#039;&quot;&#039;
        }
        if (codeLine) {
            edButtons[i].tagStart = edButtons[i].tagStart + &#039; linenum=&quot;&#039;
                                    + codeLine + &#039;&quot;&#039;;
        }
        edButtons[i].tagStart = edButtons[i].tagStart + &#039;&gt;&#039;;
        edInsertTag(myField, i);
    }
    else {
		edInsertTag(myField, i);
	}
}</pre>
<p>-- EOF --</p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>2007-04-05 -- <a href="http://www.lsproc.com/blog/top_30_wordpress_plugins_in_blogosphere/" title="博客世界最受欢迎的30个插件">博客世界最受欢迎的30个插件</a> (0)</li><li>2007-05-16 -- <a href="http://www.lsproc.com/blog/wordpress_22_final/" title="WordPress 2.2 final">WordPress 2.2 final</a> (0)</li><li>2007-03-18 -- <a href="http://www.lsproc.com/blog/wordpress_shortcut_key/" title="wordpress 快捷键">wordpress 快捷键</a> (2)</li><li>2006-12-27 -- <a href="http://www.lsproc.com/blog/mysql_encode_error_in_wordpress/" title="再谈Wordpress的MySQL乱码问题解决方法">再谈Wordpress的MySQL乱码问题解决方法</a> (3)</li><li>2006-07-03 -- <a href="http://www.lsproc.com/blog/mysql-encode-wordpress/" title="Mysql4.1编码详解及WordPress编码完善">Mysql4.1编码详解及WordPress编码完善</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.lsproc.com/blog/add_coolcode_quicktag_for_wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
