<?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/"
				  >
<channel>
<title><![CDATA[Saturn's Weblog - 分类：项目日志]]></title>
<link>http://www.cnsaturn.com/category/project_log</link>
<description><![CDATA[我的项目]]></description>
<language>zh-CN</language>
<pubDate>Sat, 31 Jul 2010 16:57:06 -0400</pubDate>
<item>
<title><![CDATA[在Stblog中定制你的代码高亮功能]]></title>
<link>http://www.cnsaturn.com/posts/55</link>
<pubDate>Tue, 25 May 2010 00:20:00 -0400</pubDate>
<description><![CDATA[<p>
 <strong>首先感谢目前正在使用stblog的朋友，正是你们的使用和批评才有了我不断改进-&gt;思考-&gt;改进的动力。当前版本还有诸多BUG和不完善的地方，我会在最近发布一个新的patch修正和完善这些功能。希望大家多提建议，感谢大家！<br />
 </strong></p>
<p>
 国内玩博客的人大部分都是Geek，他们的特点大多是：个性，最求完美，而且或多或少懂些编程的知识。这就是为什么我在开发stblog的第一个版本就引入了代码高亮功能。</p>
<p>
 <a href="http://code.google.com/p/stblog/">stblog</a>的代码高亮采用JavaScript渲染工具<a href="http://code.google.com/p/syntaxhighlighter/">SyntaxHighlighter</a>，使用和Hack方法也与其一致。</p>
<p>
 具体来说，要在stblog中定制和高亮你所需的代码，仅需要在模板中添加和删除对应高亮语法JS文件即可。</p>
<p>
 比如，朋友 <cite class="comment-author"><a href="http://www.rockics.com" rel="external nofollow">rockics</a></cite>提到，当他在后台编辑器中添加C++代码时出现如下弹窗错误：</p>
<p>
 <strong>&ldquo;can&#39;t find brush for ：cpp&rdquo;</strong></p>
<p>
 这是因为没有引入Cpp的高亮语法，解决方法很简单。</p>
<p>
 用支持代码编辑的文本编辑器（请勿使用windows自带的记事本）打开模板文件：</p>
<p>
 <strong>./themes/default/footer.php</strong></p>
<p>
 找到如下代码并修改：</p>
<pre class="brush:xml;">&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shCore.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shBrushPhp.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shBrushXml.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shBrushCSharp.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shBrushCss.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shBrushJava.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shBrushJScript.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shBrushSql.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shBrushBash.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shBrushPython.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
  SyntaxHighlighter.config.clipboardSwf = &#39;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/clipboard.swf&#39;;
  SyntaxHighlighter.all();
 &lt;/script&gt;
</pre>
<p>
 加入你需要的高亮语法JS文件，比如这里是C++的，那么加入：</p>
<pre class="brush:xml;">&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(). ST_PLUGINS_DIR;?&gt;/editor/syntaxhighlighter/scripts/shBrushCpp.js&quot;&gt;&lt;/script&gt;
</pre>
<p>
 请注意以上<strong>shBrushCpp.js</strong>，这里是我们要引入的Cpp高亮语法JS文件。对应SyntaxHighlighter所支持的语法，请详见<a href="http://github.com/stblog/Stblog/tree/master/st_plugins/editor/syntaxhighlighter/scripts/">./st_plugins/editor/syntaxhighlighter/scripts目录</a>或<a href="http://code.google.com/p/stblog/">参考SyntaxHighilighter的说明</a>。</p>
<p>
 修改完成后，请上传至服务器并覆盖掉原文件。</p>
<p>
 <strong>Update：</strong>本来修改模板文件可以在后台进行，不过现在发现在后台修改模板会将部分代码转义，从而使模板功能失效。这里证实是一个BUG（下一个小版本中修正），请手动修改并上传服务器。</p>]]></description>
<author><![CDATA[Saturn]]></author>
<guid isPermaLink="true" >http://www.cnsaturn.com/posts/55</guid>
</item>
<item>
<title><![CDATA[图标吾爱搬到了新家]]></title>
<link>http://www.cnsaturn.com/posts/migrate-icon52-to-a-new-host</link>
<pubDate>Mon, 31 Aug 2009 11:42:00 -0400</pubDate>
<description><![CDATA[<p>再次对图标吾爱进行了整体优化，上次优化主要集中在<a href="/logs/2009/08/18/icon52-dot-one-beta-online">搜索算法和程序逻辑</a>。</p> <p>此次优化主要集中对前端的优化，严格遵循<a href="http://developer.yahoo.com/performance/rules.html">Yahoo优化小组的这34个标准</a>。由于涉及到大量的JS/CSS文件，所以优化的效果非常明显，YSlow给出的图标吾爱首页的评分是95。</p> <p>另外，我将图标吾爱从IXWebhosting搬到了国内的<a href="http://www.elinkhost.com/" target="_blank">易联主机</a>。由于目前身处国外，暂时感觉不到有多少明显的变化，请国内的朋友帮忙测试下网站的响应速度。IXWebhosting最近似乎不是很稳定，经常出现掉包的现象，而且MySQL数据库反映缓慢（也有可能是我的网络的原因）。</p> <p>说来很有意思，一个对设计并不擅长的代码工人现在却做了一个对设计要求比较高的图标搜索站。我也不知道自己对这个站的愿景是什么，也不对它的发展抱多大的期望，但是我总希望自己能够为国内UI和UED的发展做出些什么，虽然我只是个程序员:)</p> <p>在未出国之时，我就发现国内的网站相比国外，普遍不重视网站的User Interface、Web Accessibility和Web Usability。到了国外，这种感觉就更加强烈了，就拿银行业的网站来说，国内有多少个银行网站能够兼容所有主流浏览器的？似乎很少，于是就有了用户为了<a href="http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla:zh-CN:official&hs=BoE&q=建行+firefox&aq=f&oq;=&aqi;=" target="_blank">使用网银而特地打开一个IE浏览器的笑话</a>。再比较一下<a href="http://www.cs-air.com/cn/index.asp">国内某著名航空公司</a>和<a href="http://www.qantas.com.au/travel/airlines/home/au/en">澳洲某著名航空公司</a>网站的界面设计和用户体验，你就不难发现其中的差距。</p> <p>而我认为，图标作为Web设计中重要的一个细节，对UI设计应当有相当大的改善和促进作用。很多时候，一个图标的有效表达可抵千言万语。</p> <p>额&hellip;&hellip;似乎写着写着就跑题了，就到这里吧。</p>]]></description>
<author><![CDATA[Saturn]]></author>
<guid isPermaLink="true" >http://www.cnsaturn.com/posts/migrate-icon52-to-a-new-host</guid>
</item>
<item>
<title><![CDATA[修改了几个BUG，图标吾爱升级版本0.1.1]]></title>
<link>http://www.cnsaturn.com/posts/icon52-dot-one-beta-online</link>
<pubDate>Mon, 17 Aug 2009 11:14:00 -0400</pubDate>
<description><![CDATA[<p>这几天抽空对图标吾爱的源码进行了完善，主要以解决BUG和算法升级为主。</p> <p>具体升级细节Ver 0.1.1：</p> <p>1、开启整站GZIP压缩</p> <p>2、修正ICO图标下载失败的BUG</p> <p>3、整合多个CSS文件至单一CSS文件</p> <p>4、重写搜索、分词、智能提示（？）的核心算法</p> <p>5、压缩所有JS CSS文件</p> <p>6、检查整站是否存在安全漏洞</p> <p>7、加入DB Cache功能</p> <p>总的来说，是在做性能优化，不过由于主机用到是IXWebHosting，国内访问速度还是慢。等有空了，开始租用国内的LINUX主机，做下调查先。</p> <p>下一步将直接升级到Ver 0.2，以功能升级为主：</p> <p>1、加入Favicon在线生成</p> <p>2、加入图片格式在线转换</p>]]></description>
<author><![CDATA[Saturn]]></author>
<guid isPermaLink="true" >http://www.cnsaturn.com/posts/icon52-dot-one-beta-online</guid>
</item>
<item>
<title><![CDATA[新项目：图标吾爱上线]]></title>
<link>http://www.cnsaturn.com/posts/new-project-named-icon52-launched</link>
<pubDate>Tue, 11 Aug 2009 10:56:00 -0400</pubDate>
