<?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; highlight</title>
	<atom:link href="http://bluehua.org/tag/highlight/feed" rel="self" type="application/rss+xml" />
	<link>http://bluehua.org</link>
	<description>分享所学,backup一切~</description>
	<lastBuildDate>Fri, 13 Apr 2012 14:08:46 +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>WP-Syntax + ZeroClipboard增强版</title>
		<link>http://bluehua.org/2009/08/25/402.html</link>
		<comments>http://bluehua.org/2009/08/25/402.html#comments</comments>
		<pubDate>Tue, 25 Aug 2009 00:22:37 +0000</pubDate>
		<dc:creator>冥王星2011</dc:creator>
				<category><![CDATA[soft]]></category>
		<category><![CDATA[highlight]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=402</guid>
		<description><![CDATA[上次发过一个增强版本,但是使用的复制脚本在flash升级到10版之后就失效了. 这次同样也是修改的0.9版的wp-syntax,跟上一个修改版本不同的就是 删除了存在漏洞的test目录 使用wp内置函数判断是否输出工具栏,使用url rewrite不会出问题 代码复制使用ZeroClipboard,可以兼容所有主流浏览器 效果: &#60;html&#62; &#60;script&#62; alert&#40;'ooxx~'&#41;; &#60;/script&#62; &#60;/html&#62; 使用方法跟上一个版本一样 &#60;pre lang=”javascript” line=”1&#8243; run=”1&#8243;&#62; 把第三个参数设为1即可显示run Code的按钮. 下载点这里:wp-syntax-plus.zip 留言里有个叫whisperer 的同学问我用的啥插件,俺才想起来发一下,一大早起来发我也真不容易]]></description>
			<content:encoded><![CDATA[<p><a href="http://bluehua.org/2008/08/30/52.html" target="_self">上次发过一个增强版本</a>,但是使用的复制脚本在flash升级到10版之后就失效了.</p>
<p>这次同样也是修改的0.9版的wp-syntax,跟上一个修改版本不同的就是</p>
<ul>
<li>删除了存在漏洞的test目录</li>
<li>使用wp内置函数判断是否输出工具栏,使用url rewrite不会出问题</li>
<li>代码复制使用<a href="http://code.google.com/p/zeroclipboard/" target="_blank">ZeroClipboard</a>,可以兼容所有主流浏览器</li>
</ul>
<p>效果:</p>

<div class="wp_syntax"><div class="code overflow"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>html<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ooxx~'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></div>

<p>使用方法跟上一个版本一样</p>
<p>&lt;pre lang=”javascript” line=”1&#8243; run=”1&#8243;&gt;</p>
<p>把第三个参数设为1即可显示run Code的按钮.</p>
<p>下载点这里:<a href="../wp-content/uploads/2009/08/wp-syntax-plus.zip">wp-syntax-plus.zip</a></p>
<p>留言里有个叫<span><cite></cite></span><a rel="external nofollow" href="http://bluehua.org/2009/07/31/355.html/comment-page-1#comment-3488">whisperer</a> 的同学问我用的啥插件,俺才想起来发一下,一大早起来发我也真不容易<img class="xemotion" src="http://bluehua.org/wp-content/plugins/x-emotions/emotions/msn/bofu2_23.gif" border="0" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2009/08/25/402.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress plugin:搜索引擎关键词高亮</title>
		<link>http://bluehua.org/2009/07/22/333.html</link>
		<comments>http://bluehua.org/2009/07/22/333.html#comments</comments>
		<pubDate>Wed, 22 Jul 2009 15:14:30 +0000</pubDate>
		<dc:creator>冥王星2011</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[highlight]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=333</guid>
		<description><![CDATA[下载地址更新 2009.11.8 http://wordpress.org/extend/plugins/keywords-highlight-tool/ &#8212;&#8212;&#8212;- 由于blog的访客多来自搜索引擎,所以关键词高亮会大大的增强访客的浏览体验,帮助访客快速定位感兴趣的内容. 类似插件已有很多,但俺绝不是再造普通的轮子,一定要用浏览器兼容性最好的插件,没有就自己搞.. 现存插件的实现方式有两种,一种用php在后端实现,另一种用js在前端实现. php实现高亮,浏览器兼容性最好,但是有两个问题: 1.效率问题,不如用js实现,将压力分到前端; 2.不支持cache类插件,当然这个问题可以通过hack cache插件解决,但是不可取. js实现高亮: 比较理想的实现方法,搜到一篇文章叫也谈Wordpress关键词高亮 里面讲到用js高亮关键词,但是中文gb转码使用了vbscript,所以仅支持ie浏览器 于是用自己的想法简单实现了一下这个功能, 点击搜索测试 第一个结果就应该是了 screenshot: 跟上面提到插件的主要不同点: 改进了高亮的实现方法,仅替换元素的text节点,防止造成元素事件失效 判断如果不是外链过来的访客将不加载高亮的js脚本 百度链接过来,中文gb转码时使用php后台转码,兼容所有主流浏览器 目前仅添加了对google,yahoo,baidu三个搜索引擎的支持,如果想支持更多,自行修改highlight.js即可 插件下载点这里]]></description>
			<content:encoded><![CDATA[<p>下载地址更新 2009.11.8<br />
<a href="http://wordpress.org/extend/plugins/keywords-highlight-tool/">http://wordpress.org/extend/plugins/keywords-highlight-tool/</a><br />
&#8212;&#8212;&#8212;-<br />
由于blog的访客多来自搜索引擎,所以关键词高亮会大大的增强访客的浏览体验,帮助访客快速定位感兴趣的内容.</p>
<p>类似插件已有很多,但俺绝不是再造普通的轮子,一定要用浏览器兼容性最好的插件,没有就自己搞..</p>
<p>现存插件的实现方式有两种,一种用php在后端实现,另一种用js在前端实现.</p>
<p>php实现高亮,浏览器兼容性最好,但是有两个问题:</p>
<p>1.效率问题,不如用js实现,将压力分到前端; 2.不支持cache类插件,当然这个问题可以通过hack cache插件解决,但是不可取.</p>
<p>js实现高亮:</p>
<p>比较理想的实现方法,搜到一篇文章叫<a href="http://www.jefflei.com/post/1041.html" target="_blank">也谈Wordpress关键词高亮</a> 里面讲到用js高亮关键词,但是中文gb转码使用了vbscript,所以仅支持ie浏览器</p>
<p>于是用自己的想法简单实现了一下这个功能, <a href="http://www.google.cn/search?hl=zh-CN&amp;rlz=1B3GGGL_zh-CNCN330CN331&amp;newwindow=1&amp;q=ajax+document+write+%E6%9D%8E%E5%AE%81+%E5%86%85%E8%81%94%E8%84%9A%E6%9C%AC+%E8%84%9A%E6%9C%AC&amp;btnG=Google+%E6%90%9C%E7%B4%A2" target="_blank">点击搜索测试</a> 第一个结果就应该是了<img class="xemotion" src="http://bluehua.org/wp-content/plugins/x-emotions/emotions/char/icon_lol.gif" border="0" alt="" /></p>
<p>screenshot:</p>
<p><a href="http://bluehua.org/wp-content/uploads/2009/07/2009-7-21-21-48-56.png"><img class="alignnone size-full wp-image-336" title="2009-7-21-21-48-56" src="http://bluehua.org/wp-content/uploads/2009/07/2009-7-21-21-48-56.png" alt="2009-7-21-21-48-56" width="565" height="518" /></a></p>
<p>跟上面提到插件的主要不同点:</p>
<ul>
<li>改进了高亮的实现方法,仅替换元素的text节点,防止造成元素事件失效</li>
<li>判断如果不是外链过来的访客将不加载高亮的js脚本</li>
<li>百度链接过来,中文gb转码时使用php后台转码,兼容所有主流浏览器</li>
</ul>
<p>目前仅添加了对google,yahoo,baidu三个搜索引擎的支持,如果想支持更多,自行修改highlight.js即可</p>
<p><a href="http://sites.google.com/site/sharemyidea09/wordpress-keywords-highlight-tool" target="_blank">插件下载点这里</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2009/07/22/333.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.346 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-22 08:44:49 -->

