<?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://blog.frost.tw/tag/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.frost.tw</link>
	<description>夢醒之時，驚覺一切都是虛幻。前行吧！迷途者。</description>
	<lastBuildDate>Wed, 26 Oct 2011 13:28:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://blog.frost.tw/?pushpress=hub'/>
		<item>
		<title>WordPress 購物車製作筆記(1)</title>
		<link>http://blog.frost.tw/web-project/poston-2011-03-27/postid-1144</link>
		<comments>http://blog.frost.tw/web-project/poston-2011-03-27/postid-1144#comments</comments>
		<pubDate>Sun, 27 Mar 2011 11:18:54 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[網站專案]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[生活]]></category>
		<category><![CDATA[程式]]></category>
		<category><![CDATA[網站]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=1144</guid>
		<description><![CDATA[似乎已經很久沒有寫網誌了～ 最近和備審、面試對抗，難得抽出時間來寫。 （直到上週都是備審，之後又是個面試大戰呢！） 弦也運氣不錯，申請六所上四所。 （沒上那兩所也是差了一點點就上了，大約1~2級分左右。） 這次會做主要是因為我大學的伙食費阿（誤 主要還是寒假那個老爸的 Project 拉！ 不過使用WordPress如有神助呢！ 至少到現在，都還沒有自己寫過GUI控制（增加Meta Box算是簡單的加上吧……） 其餘的，大多是使用Custom Post Type就完成了！ 就這方面來看，使用WordPress這個決定真是太正確了！ 目前商品的設定項都差不多了，接下來就是比較進階的訂單和金流的處理摟！ （期待我完成的那天，因為可以開始領傳說中的維護費……） 休息一下就來繼續製作～<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-02-14%2Fpostid-1107&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-03-27%2Fpostid-1144">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress 的「裁切」功能</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2010-09-29%2Fpostid-731&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-03-27%2Fpostid-1144">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress MU + BuddyPress</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-01-22%2Fpostid-344&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-03-27%2Fpostid-1144">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress Theme有中文教學了！</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2011-01-06%2Fpostid-930&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-03-27%2Fpostid-1144">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress 的孩子 BackPress</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>似乎已經很久沒有寫網誌了～<br />
最近和備審、面試對抗，難得抽出時間來寫。<br />
（直到上週都是備審，之後又是個面試大戰呢！）</p>
<p>弦也運氣不錯，申請六所上四所。<br />
（沒上那兩所也是差了一點點就上了，大約1~2級分左右。）<br />
<span id="more-1144"></span><br />
這次會做主要是因為我大學的伙食費阿（誤</p>
<p>主要還是寒假那個老爸的 Project 拉！<br />
不過使用WordPress如有神助呢！</p>
<p>至少到現在，都還沒有自己寫過GUI控制（增加Meta Box算是簡單的加上吧……）<br />
其餘的，大多是使用Custom Post Type就完成了！</p>
<p>就這方面來看，使用WordPress這個決定真是太正確了！</p>
<p>目前商品的設定項都差不多了，接下來就是比較進階的訂單和金流的處理摟！<br />
（期待我完成的那天，因為可以開始領傳說中的維護費……）</p>
<p>休息一下就來繼續製作～</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-02-14%2Fpostid-1107&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-03-27%2Fpostid-1144">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress 的「裁切」功能</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2010-09-29%2Fpostid-731&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-03-27%2Fpostid-1144">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress MU + BuddyPress</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-01-22%2Fpostid-344&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-03-27%2Fpostid-1144">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress Theme有中文教學了！</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2011-01-06%2Fpostid-930&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-03-27%2Fpostid-1144">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress 的孩子 BackPress</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/web-project/poston-2011-03-27/postid-1144/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>弦也式 WP 版面製作之三 – Footer 檔尾</title>
		<link>http://blog.frost.tw/web-project/poston-2011-02-17/postid-1114</link>
		<comments>http://blog.frost.tw/web-project/poston-2011-02-17/postid-1114#comments</comments>
		<pubDate>Thu, 17 Feb 2011 11:12:03 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[網站專案]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[教學]]></category>
		<category><![CDATA[版面]]></category>
		<category><![CDATA[設計]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=1114</guid>
		<description><![CDATA[距離上次的文章不知道又過了多久。 我才想起來，我竟然忘記寫後續了啦！ 於是就選了一天看似有點閒的日子趕緊再寫個一篇。 頁尾，大致上就是內容結束。 底下要放些版權訊息時使用的部份。 假設你打算讓整個版面都顯示側邊欄，那麼也可以把側邊欄寫在這個區段裡面。 下面為 貳夢之弦 V5 的 Footer 檔案內容。 &#60;div id="sidebar"&#62; &#60;!-- 側邊攔 --&#62; &#60;div id="menu"&#62; &#60;!-- 選單 --&#62; &#60;?php wp_nav_menu( array( 'container_class' =&#62; 'menu-header', 'theme_location' =&#62; 'primary' ) ); ?&#62; &#60;/div&#62; &#60;?php get_sidebar(); ?&#62; &#60;/div&#62; &#60;/div&#62; &#8230; <a href="http://blog.frost.tw/web-project/poston-2011-02-17/postid-1114">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之一 – 工具篇" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之一 – 工具篇</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之二 – Header 檔首" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之二 – Header 檔首</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之二 – 切版與架構篇" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198259.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之二 – 切版與架構篇</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="網誌新版面設計" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198362.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">網誌新版面設計</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>距離上次的文章不知道又過了多久。<br />
我才想起來，我竟然忘記寫後續了啦！</p>
<p>於是就選了一天看似有點閒的日子趕緊再寫個一篇。<br />
<span id="more-1114"></span><br />
頁尾，大致上就是內容結束。<br />
底下要放些版權訊息時使用的部份。</p>
<p>假設你打算讓整個版面都顯示側邊欄，那麼也可以把側邊欄寫在這個區段裡面。</p>
<p>下面為 貳夢之弦 V5 的 Footer 檔案內容。</p>
<pre class="brush: html">&lt;div id="sidebar"&gt; &lt;!-- 側邊攔 --&gt;
 &lt;div id="menu"&gt; &lt;!-- 選單 --&gt;
 &lt;?php wp_nav_menu( array( 'container_class' =&gt; 'menu-header', 'theme_location' =&gt; 'primary' ) ); ?&gt;
 &lt;/div&gt;
 &lt;?php get_sidebar(); ?&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div id="footer"&gt; &lt;!-- 頁尾 --&gt;
 &lt;div id="foot-ad"&gt; &lt;!-- 頁尾廣告 --&gt;
 &lt;/div&gt;
 &lt;div id="about"&gt; &lt;!-- 關於站長 --&gt;
 &lt;div&gt;
 &lt;?php echo get_avatar( get_bloginfo('admin_email'), 100 ); ?&gt;
 &lt;/div&gt;
 &lt;div&gt;
 &lt;strong&gt;&lt;?php the_author_meta('nickname', 1); ?&gt;&lt;/strong&gt;
 &lt;p&gt;
 &lt;!-- 目前高三，是快被玩死的考生。喜愛架站、動漫、畫畫、設計、程式等。夢想是成為獨一無二的網頁設計師…… --&gt;
 &lt;?php the_author_meta('description', 1); ?&gt;
 &lt;/p&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div id="copyright"&gt; &lt;!-- 版權 --&gt;
 &lt;div id="icons"&gt; &lt;!-- 頁尾圖示 --&gt;
 &lt;a href="http://blog.frost.tw" title="貳夢之弦"&gt;&lt;img src="&lt;?php bloginfo('template_url'); ?&gt;/images/2ds_logo.gif" alt="貳夢之弦" /&gt;&lt;/a&gt;&lt;a href="http://wordpress.org" title="WordPress" target="_WordPress"&gt;&lt;img src="&lt;?php bloginfo('template_url'); ?&gt;/images/wordpress_logo.gif" alt="WordPress" /&gt;&lt;/a&gt;
 &lt;/div&gt;
 © 2010 &lt;a href="http://blog.frost.tw" title="貳夢之弦"&gt;貳夢の弦&lt;/a&gt;. Powered by &lt;a href="http://wordpress.org" title="WordPress" target="_blank"&gt;WordPress&lt;/a&gt; &lt;?php bloginfo('version'); ?&gt;. 2Dreams[Changing] Desigened by &lt;a href="http://frost.tw" title="蒼時弦也" target="_blank"&gt;Aotoki&lt;/a&gt;.
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;?php
 //After Every things end, run wp_footer();
 wp_footer();

 if(is_home() || is_front_page()){
 ?&gt;
 &lt;script type="text/javascript"&gt;
 var $j = jQuery.noConflict();
 //Slide Show Function
 function slideSwitch()
 {
 var $active = $j('#slidebox div.slide-active');
 if ( $active.length == 0 ) $active = $j('#slidebox div.slide:last');
 var $next =  $active.next().length ? $active.next() : $j('#slidebox div.slide:first');

 $active.removeClass('slide-active').hide();
 $next.fadeIn(1000).addClass('slide-active');
 }

 $j(function() {
 setInterval( "slideSwitch()", 5000 );
 });
 &lt;/script&gt;
 &lt;?php
 }
 ?&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>側邊欄的部份弦也是使用 get_sidebar() 來呼叫。<br />
之後還會和大家介紹 get_header() 和 get_footer() 兩個函式。<br />
這些都是 WordPress 用來輸出檔首、檔尾的函式。</p>
<p>從 貳夢之弦V5 的版面來看，可以看到下面這些東西。</p>
<ol>
<li>側邊欄</li>
<li>選單（弦也的選單和側邊欄一組）</li>
<li>版權資訊</li>
<li>站長個人介紹</li>
</ol>
<p>這些也是頁尾常見的資訊。</p>
<p>其中我們又會看見一個很熟悉的函式 bloginfo()<br />
在 WordPress 版面中，關於網誌的基本資訊都可以利用他來呼叫。<br />
如：網誌名稱、簡介、版本等等……</p>
<p>而在這個版面中，新出現的函式有幾組。<br />
一個是 wp_nav_menu() 函式，用於呼叫「自訂選單」<br />
如果你現在使用的版面支援自訂選單，那麼應該可以找到他的使用方法。<br />
不過這方面的使用還需要在 functions.php 這個進階一點的檔案做些琢磨，因此就暫時不介紹了！</p>
<p>另一個函式為 the_author_meta() 函式。<br />
Meta 是 -Press 系列網站使用的一種欄位，用來儲存各種資料。<br />
而 the_author_meta 就是查詢某個「作者」的某項資訊。<br />
弦也用這個方式來呼叫自己的暱稱(nickname)<br />
因為弦也是自己撰寫網誌，所以就沒有呼叫問題，直接指定 ID 為1的作者（弦也）</p>
<p>如果你在某些WordPress網誌文章上看見「作者」的簡介，那就是利用這個函式產生的。</p>
<p>get_avatar 則是抓取頭像，我想有使用 GAvatar 的朋友應該就知道WordPress的頭像怎麼出來的。<br />
並且使用 get_bloginfo() 函式取得站長（弦也）的信箱。<br />
get_bloginfo() 是被 bloginfo() 呼叫的一個函式。</p>
<p>bloginfo() 其實就是 echo get_bloginfo() 的意思。<br />
（程式中，輸出與傳入一個值是有差的。）</p>
<p>其實頁尾是一個很簡單使用的部份。<br />
下一次就是告訴大家如何製作 index.php 這個頁面摟！<br />
完成後，就要來介紹一些特別的函式以及運用。</p>
<p>寫到這邊，弦也才發現……<br />
WordPress 的版面設計真的不難，麻煩的還是 HTML/CSS 的切版、製版阿～～</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之一 – 工具篇" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之一 – 工具篇</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之二 – Header 檔首" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之二 – Header 檔首</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之二 – 切版與架構篇" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198259.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之二 – 切版與架構篇</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="網誌新版面設計" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198362.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">網誌新版面設計</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/web-project/poston-2011-02-17/postid-1114/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 的「裁切」功能</title>
		<link>http://blog.frost.tw/code/poston-2011-02-14/postid-1107</link>
		<comments>http://blog.frost.tw/code/poston-2011-02-14/postid-1107#comments</comments>
		<pubDate>Mon, 14 Feb 2011 11:09:56 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[程式語言]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[生活]]></category>
		<category><![CDATA[程式]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=1107</guid>
		<description><![CDATA[最近因為案子的關係，需要做一個「幻燈片」功能在 WordPress 首頁上。 不過，裁切圖片、縮圖的問題倒是很困擾我的。 再加上我還未嘗試過「讀取特色圖片以外」的圖檔，以及「自行上傳圖檔」的處理。 不過，當我看到 WordPress 的 Custom Header 功能後，我馬上知道我該怎麼做了！ WordPress 內建一款名為 imgAreaSelect 的切圖 jQuery Plguin 不過，似乎只有在使用 Custom Header 時比較容易見到他。 （據說在媒體庫上傳時也能使用，不過大家通常都是隨文章上傳吧……） 那麼，我想另外呼叫又該如何做呢？ 以 WordPress 的作法，是三部曲。 上傳、裁切、儲存三個部份。 首先我們來看看裁切中的畫面。 實際上用起來沒有 Flash 的靈敏，不過已經算很方便了！ 當裁切完成後，製作成 Slideshow 時，效果又如何呢？ （某弦案子的製成品，會如下圖所示……） 抓取的區域會被切下（圖片解析度不夠大時，會被拉大，裁切時請注意喔！） 那麼，分別來解釋這個「三部曲」吧！ （大部分原始碼都來自 Custom Header &#8230; <a href="http://blog.frost.tw/code/poston-2011-02-14/postid-1107">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-03-27%2Fpostid-1144&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-02-14%2Fpostid-1107">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress 購物車製作筆記(1)</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2010-09-29%2Fpostid-731&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-02-14%2Fpostid-1107">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress MU + BuddyPress</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-01-19%2Fpostid-953&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-02-14%2Fpostid-1107">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 中的 Function (函式) 數值傳遞測試（無解）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2011-01-14%2Fpostid-944&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-02-14%2Fpostid-1107">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">12月 ~ 1月程式隨手札記</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>最近因為案子的關係，需要做一個「幻燈片」功能在 WordPress 首頁上。<br />
不過，裁切圖片、縮圖的問題倒是很困擾我的。<br />
再加上我還未嘗試過「讀取特色圖片以外」的圖檔，以及「自行上傳圖檔」的處理。</p>
<p>不過，當我看到 WordPress 的 Custom Header 功能後，我馬上知道我該怎麼做了！<br />
<span id="more-1107"></span><br />
WordPress 內建一款名為 imgAreaSelect 的切圖 jQuery Plguin<br />
不過，似乎只有在使用 Custom Header 時比較容易見到他。<br />
（據說在媒體庫上傳時也能使用，不過大家通常都是隨文章上傳吧……）</p>
<p>那麼，我想另外呼叫又該如何做呢？<br />
以 WordPress 的作法，是三部曲。</p>
<p>上傳、裁切、儲存三個部份。</p>
<p>首先我們來看看裁切中的畫面。<br />
<a href="http://blog.frost.tw/wp-content/uploads/2011/02/2011-02-14-18-43-26.png" rel="lightbox[1107]" title="幻燈片 - 裁切中"><img class="alignnone size-medium wp-image-1108" title="幻燈片 - 裁切中" src="http://blog.frost.tw/wp-content/uploads/2011/02/2011-02-14-18-43-26-179x300.png" alt="" width="179" height="300" /></a></p>
<p>實際上用起來沒有 Flash 的靈敏，不過已經算很方便了！</p>
<p>當裁切完成後，製作成 Slideshow 時，效果又如何呢？<br />
（某弦案子的製成品，會如下圖所示……）<br />
<a href="http://blog.frost.tw/wp-content/uploads/2011/02/2011-02-14-18-46-26.png" rel="lightbox[1107]" title="幻燈片 - 展示"><img class="alignnone size-medium wp-image-1109" title="幻燈片 - 展示" src="http://blog.frost.tw/wp-content/uploads/2011/02/2011-02-14-18-46-26-300x173.png" alt="" width="300" height="173" /></a></p>
<p>抓取的區域會被切下（圖片解析度不夠大時，會被拉大，裁切時請注意喔！）</p>
<p>那麼，分別來解釋這個「三部曲」吧！<br />
（大部分原始碼都來自 Custom Header 的原始碼、弦也Slideshow的原始碼）</p>
<p><strong>第一步，上傳。</strong><br />
（簡單建立一個上傳的From即可）</p>
<pre class="brush:html">&lt;h3&gt;新增幻燈片&lt;/h3&gt;
 &lt;form enctype="multipart/form-data" id="upload-form" method="post" action="&lt;?php echo esc_attr( add_query_arg( 'step', 2 ) ) ?&gt;"&gt;
 &lt;label for="upload"&gt;&lt;?php _e( 'Choose an image from your computer:' ); ?&gt;&lt;/label&gt;&lt;br /&gt;
 &lt;input type="file" id="upload" name="import" /&gt;&lt;br /&gt;
 &lt;label for="title"&gt;標題&lt;/label&gt;
 &lt;input type="text" name="title" /&gt;&lt;br /&gt;
 &lt;label for="link"&gt;連結&lt;/label&gt;
 &lt;input type="text" name="link" /&gt;&lt;br /&gt;
 &lt;label for="des"&gt;說明&lt;/label&gt;
 &lt;textarea name="des" cols="20" rows="5"&gt;&lt;?php echo $slides['des']; ?&gt;&lt;/textarea&gt;&lt;br /&gt;
 &lt;?php wp_nonce_field( 'moho-slide', '_wpnonce-moho-slide' ) ?&gt;
 &lt;input type="submit" value="&lt;?php esc_attr_e( 'Upload' ); ?&gt;" /&gt;
 &lt;/form&gt;</pre>
<p>esc_attr( add_query_arg( &#8216;step&#8217;, 2 ) ) 會產生一個 http://網址/wp-admin/目前頁面.php?page=插件註冊名&amp;step=2 的查詢串。<br />
要判斷目前為第幾步，使用 if(intval($_GET['step']) == 2) 這類判斷式即可。</p>
<p><strong>第二步，裁切。</strong><br />
（要先用引入相關JS/Style才能使用，弦也是寫在Themes附上的模組，所以直接在 functions.php 加入下列語法）</p>
<pre class="brush:php">wp_enqueue_style('imgareaselect');
wp_enqueue_script('imgareaselect');</pre>
<p>接收上傳檔案的地方要先做第一階段處理（儲存檔案、計算放大縮小倍率、插入到媒體庫）</p>
<pre class="brush:php">check_admin_referer('moho-slide', '_wpnonce-moho-slide');
 $overrides = array('test_form' =&gt; false);

 if(!empty($_FILES['import']['tmp_name'])){
 $file = wp_handle_upload($_FILES['import'], $overrides);

 if ( isset($file['error']) )
 wp_die( $file['error'],  __( 'Image Upload Error' ) );

 $url = $file['url'];
 $type = $file['type'];
 $file = $file['file'];
 $filename = basename($file);
 }

 if(isset($_POST['ss_id']) &amp;&amp; isset($_POST['attachment_id'])){
 if(!empty($_POST['title']) &amp;&amp; !empty($_POST['des'])){
 $slides[$_POST['ss_id']]['title'] = htmlspecialchars($_POST['title']);
 $slides[$_POST['ss_id']]['link'] = htmlspecialchars($_POST['link']);
 $slides[$_POST['ss_id']]['des'] = htmlspecialchars($_POST['des']);
 update_option('slideshow', $slides);
 if(empty($_FILES['import']['tmp_name'])){
 call_step_1($slides);
 return;
 }
 }
 }else{
 if(!empty($_POST['title']) &amp;&amp; !empty($_POST['des']) &amp;&amp; !empty($_FILES['import']['tmp_name'])){
 $slide = array(
 'title' =&gt; htmlspecialchars($_POST['title']),
 'link' =&gt; htmlspecialchars($_POST['link']),
 'des' =&gt; htmlspecialchars($_POST['des']),
 'attachment_id' =&gt; $id,
 'imgurl' =&gt; $url
 );
 array_push($slides, $slide);
 update_option('slideshow', $slides);
 $_POST['ss_id'] = count($slides)-1;
 }else{
 call_step_1($slides);
 return;
 }

 }

 $object = array(
 'post_title' =&gt; $filename,
 'post_content' =&gt; $url,
 'post_mime_type' =&gt; $type,
 'guid' =&gt; $url);

 //Save Data
 $id = wp_insert_attachment($object, $file);

 list($width, $height, $type, $attr) = getimagesize( $file );

 if ( $width == 600 &amp;&amp; $height == 300 ) {
 // Add the meta-data
 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );

 set_theme_mod('header_image', esc_url($url));
 do_action('wp_create_file_in_uploads', $file, $id); // For replication
 return $this-&gt;finished();
 } elseif ( $width &gt; 600 ) {
 $oitar = $width / 600;
 $image = wp_crop_image($file, 0, 0, $width, $height, 600, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file));
 if ( is_wp_error( $image ) )
 wp_die( __( 'Image could not be processed.  Please go back and try again.' ), __( 'Image Processing Error' ) );

 $image = apply_filters('wp_create_file_in_uploads', $image, $id); // For replication

 $url = str_replace(basename($url), basename($image), $url);
 $width = $width / $oitar;
 $height = $height / $oitar;
 } else {
 $oitar = 1;
 }</pre>
<p>完成後產生一個只有 Submit 的表單，其餘都是隱藏值（把切割資訊傳給 WordPress 處理）<br />
（而還需要 jQuery 幫忙處理表單值和啟動裁切功能）</p>
<pre class="brush:html">&lt;form method="post" action="&lt;?php echo esc_attr(add_query_arg('step', 3)); ?&gt;"&gt;
 &lt;p&gt;&lt;?php _e('Choose the part of the image you want to use as your header.'); ?&gt;&lt;/p&gt;
 &lt;p&gt;&lt;strong&gt;&lt;?php _e( 'You need Javascript to choose a part of the image.'); ?&gt;&lt;/strong&gt;&lt;/p&gt;

 &lt;div id="crop_image" style="position: relative"&gt;
 &lt;img src="&lt;?php echo esc_url( $url ); ?&gt;" id="upload" width="&lt;?php echo $width; ?&gt;" height="&lt;?php echo $height; ?&gt;" /&gt;
 &lt;/div&gt;

 &lt;p&gt;
 &lt;input type="hidden" name="x1" id="x1" value="0"/&gt;
 &lt;input type="hidden" name="y1" id="y1" value="0"/&gt;
 &lt;input type="hidden" name="width" id="width" value="&lt;?php echo esc_attr( $width ); ?&gt;"/&gt;
 &lt;input type="hidden" name="height" id="height" value="&lt;?php echo esc_attr( $height ); ?&gt;"/&gt;
 &lt;input type="hidden" name="attachment_id" id="attachment_id" value="&lt;?php echo esc_attr( $id ); ?&gt;" /&gt;
 &lt;input type="hidden" name="oitar" id="oitar" value="&lt;?php echo esc_attr( $oitar ); ?&gt;" /&gt;
 &lt;input type="hidden" name="ss_id" id="ss_id" value="&lt;?php echo $_POST['ss_id']; ?&gt;" /&gt;
 &lt;?php wp_nonce_field( 'moho-slide-crop' ) ?&gt;
 &lt;input type="submit" value="&lt;?php esc_attr_e( 'Crop and Publish' ); ?&gt;" /&gt;
 &lt;/p&gt;
 &lt;/form&gt;
 &lt;script type="text/javascript"&gt;
 /* &lt;![CDATA[ */
 function onEndCrop( coords ) {
 jQuery( '#x1' ).val(coords.x);
 jQuery( '#y1' ).val(coords.y);
 jQuery( '#width' ).val(coords.w);
 jQuery( '#height' ).val(coords.h);
 }

 jQuery(document).ready(function() {
 var xinit = &lt;?php echo 600; ?&gt;;
 var yinit = &lt;?php echo 300; ?&gt;;
 var ratio = xinit / yinit;
 var ximg = jQuery('img#upload').width();
 var yimg = jQuery('img#upload').height();

 if ( yimg &lt; yinit || ximg &lt; xinit ) {
 if ( ximg / yimg &gt; ratio ) {
 yinit = yimg;
 xinit = yinit * ratio;
 } else {
 xinit = ximg;
 yinit = xinit / ratio;
 }
 }

 jQuery('img#upload').imgAreaSelect({
 handles: true,
 keys: true,
 aspectRatio: xinit + ':' + yinit,
 show: true,
 x1: 0,
 y1: 0,
 x2: xinit,
 y2: yinit,
 maxHeight: &lt;?php echo 600; ?&gt;,
 maxWidth: &lt;?php echo 300; ?&gt;,
 onInit: function () {
 jQuery('#width').val(xinit);
 jQuery('#height').val(yinit);
 },
 onSelectChange: function(img, c) {
 jQuery('#x1').val(c.x1);
 jQuery('#y1').val(c.y1);
 jQuery('#width').val(c.width);
 jQuery('#height').val(c.height);
 }
 });
 });
 /* ]]&gt; */
 &lt;/script&gt;</pre>
<p>完成後，就讓他送出吧！</p>
<p><strong>第三步，儲存。</strong><br />
這部份就是單純的 PHP 呼叫，去更改摟！<br />
（依照應用面去儲存，弦也用在Slideshow所以是存到我儲存Slideshow資訊的變數內）</p>
<pre class="brush:php">$slides = get_option('slideshow');
 $slides = empty($slides) ? array() : $slides;

 if(intval($_GET['step']) != 2){
 if(intval($_GET['step']) == 3)
 {
 check_admin_referer('moho-slide-crop');
 if ( $_POST['oitar'] &gt; 1 ) {
 $_POST['x1'] = $_POST['x1'] * $_POST['oitar'];
 $_POST['y1'] = $_POST['y1'] * $_POST['oitar'];
 $_POST['width'] = $_POST['width'] * $_POST['oitar'];
 $_POST['height'] = $_POST['height'] * $_POST['oitar'];
 }

 $original = get_attached_file( $_POST['attachment_id'] );

 $cropped = wp_crop_image($_POST['attachment_id'], $_POST['x1'], $_POST['y1'], $_POST['width'], $_POST['height'], 600, 300);
 if ( is_wp_error( $cropped ) )
 wp_die( __( 'Image could not be processed.  Please go back and try again.' ), __( 'Image Processing Error' ) );

 $cropped = apply_filters('wp_create_file_in_uploads', $cropped, $_POST['attachment_id']); // For replication

 $parent = get_post($_POST['attachment_id']);
 $parent_url = $parent-&gt;guid;
 $url = str_replace(basename($parent_url), basename($cropped), $parent_url);

 // Construct the object array
 $object = array(
 'ID' =&gt; $_POST['attachment_id'],
 'post_title' =&gt; basename($cropped),
 'post_content' =&gt; $url,
 'post_mime_type' =&gt; 'image/jpeg',
 'guid' =&gt; $url
 );

 // Update the attachment
 wp_insert_attachment($object, $cropped);
 wp_update_attachment_metadata( $_POST['attachment_id'], wp_generate_attachment_metadata( $_POST['attachment_id'], $cropped ) );

 if(isset($_POST['ss_id'])){
 $slide = &amp;$slides[$_POST['ss_id']];
 $slide['imgurl'] = $url;
 }else{
 $slide = array_pop($slides);
 $slide['imgurl'] = $url;
 array_push($slides, $slide);
 }
 update_option('slideshow', $slides);

 // cleanup
 $medium = str_replace(basename($original), 'midsize-'.basename($original), $original);
 @unlink( apply_filters( 'wp_delete_file', $medium ) );
 @unlink( apply_filters( 'wp_delete_file', $original ) );
 }
 call_step_1($slides);</pre>
<p><strong>補充說明：</strong><br />
在 WordPress 的 Custom Header 功能中，其設計為「頁面物件」<br />
整個產生都是由物件輔助，主要理由是因為 Step 3 結束後返回呼叫 Step 1 來避免多餘的換頁。</p>
<p>註：call_step_1() 是弦也產生預設頁面（第一步）的函式，這樣才會減少一次換頁。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-03-27%2Fpostid-1144&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-02-14%2Fpostid-1107">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress 購物車製作筆記(1)</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2010-09-29%2Fpostid-731&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-02-14%2Fpostid-1107">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress MU + BuddyPress</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-01-19%2Fpostid-953&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-02-14%2Fpostid-1107">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 中的 Function (函式) 數值傳遞測試（無解）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2011-01-14%2Fpostid-944&from=http%3A%2F%2Fblog.frost.tw%2Fcode%2Fposton-2011-02-14%2Fpostid-1107">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">12月 ~ 1月程式隨手札記</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/code/poston-2011-02-14/postid-1107/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>弦也式 WP 版面製作之二 – Header 檔首</title>
		<link>http://blog.frost.tw/web-project/poston-2011-02-02/postid-992</link>
		<comments>http://blog.frost.tw/web-project/poston-2011-02-02/postid-992#comments</comments>
		<pubDate>Wed, 02 Feb 2011 11:50:02 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[網站專案]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[教學]]></category>
		<category><![CDATA[版面]]></category>
		<category><![CDATA[設計]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=992</guid>
		<description><![CDATA[現今的網站，已經鮮少有一頁一頁製作的情況。 現在的「動態網頁」大多會 Load 三個部份。 檔首、內容、頁尾。 稍微區分開來，檔首切割到「內容開始」 如果你的選單在內容之前，就該到選單把內容切掉。 不過，這樣說明似乎還不是很清楚。 我們先來看一下下面這段 HTML 的區段。 &#60;html&#62; &#60;head&#62; &#60;title&#62; Title &#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;div id="wrap"&#62; &#60;div id="header"&#62; 我是選單 &#60;/div&#62; &#60;!-- 以上為頁首 --&#62; &#60;div id="container"&#62; 我是文章 &#60;/div&#62; &#60;!-- 此為內容 --&#62; &#60;div id="footer"&#62; 我是版權 &#60;/div&#62; &#60;!-- 之後頁尾 &#8230; <a href="http://blog.frost.tw/web-project/poston-2011-02-02/postid-992">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之一 – 工具篇" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之一 – 工具篇</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之二 – 切版與架構篇" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198259.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之二 – 切版與架構篇</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之三 – Footer 檔尾" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之三 – Footer 檔尾</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="網誌新版面設計" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198362.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">網誌新版面設計</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>現今的網站，已經鮮少有一頁一頁製作的情況。<br />
現在的「動態網頁」大多會 Load 三個部份。<br />
檔首、內容、頁尾。</p>
<p>稍微區分開來，檔首切割到「內容開始」<br />
如果你的選單在內容之前，就該到選單把內容切掉。<br />
<span id="more-992"></span><br />
不過，這樣說明似乎還不是很清楚。</p>
<p>我們先來看一下下面這段 HTML 的區段。</p>
<pre class="brush: html">&lt;html&gt;
&lt;head&gt;
&lt;title&gt; Title &lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div id="wrap"&gt;
    &lt;div id="header"&gt; 我是選單 &lt;/div&gt; &lt;!-- 以上為頁首 --&gt;
    &lt;div id="container"&gt; 我是文章 &lt;/div&gt; &lt;!-- 此為內容 --&gt;
    &lt;div id="footer"&gt; 我是版權 &lt;/div&gt; &lt;!-- 之後頁尾 --&gt;
  &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>其實這樣說明還是不太清楚，不過弦也超懶不想話圖拉！</p>
<p>簡單來說，你在你的頁面畫出兩條水平線。<br />
內容（文章、主要部份）的地方以上是頁首。<br />
反之，以下部份是頁尾，中間則是內容。</p>
<p>以弦也 V5 來看 Slideshow + Logo 屬於頁首。<br />
而 文章 + 選單 + 側欄 屬於主體（選單分類在主體，是因為他屬於側攔，側欄又是次要內容。）<br />
剩下的部份即為「頁尾」</p>
<p>好吧，其實這樣說明還是非常不清楚，不過得跟上進度摟～<br />
（其實你隨意分段都行，不過頁首、頁尾是比較不常變動內容的區段）</p>
<p>再來，我們參考一下貳夢  V5 的 header 部份。</p>
<pre class="brush:html">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=&lt;?php bloginfo( 'charset' ); ?&gt;" /&gt;
&lt;title&gt;&lt;?php
 //Print Title
 wp_title( '-', true, 'right' );

 //Print Site Name
 bloginfo( 'name' );

 //If in Home Page, Print Description
 $site_description = get_bloginfo( 'description', 'display' );
 if ( $site_description &amp;&amp; ( is_home() || is_front_page() ) )
 echo " - {$site_description}";

 // Add a page number if necessary
 if ( $paged &gt;= 2 || $page &gt;= 2 )
 echo ' | ' . sprintf( __( 'Page %s', '2ds' ), max( $paged, $page ) );

 ?&gt;&lt;/title&gt;
&lt;!-- YUI 3.0 CSS Reset --&gt;
&lt;link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.3.0/build/cssreset/reset-min.css" /&gt;
&lt;link rel="profile" href="http://gmpg.org/xfn/11" /&gt;
&lt;link rel="stylesheet" type="text/css" media="all" href="&lt;?php bloginfo( 'stylesheet_url' ); ?&gt;" /&gt;
&lt;link rel="pingback" href="&lt;?php bloginfo( 'pingback_url' ); ?&gt;" /&gt;
&lt;?php
 //Load jQuery
 wp_enqueue_script("jquery");
 //Show Head Tags
 wp_head();
?&gt;
&lt;/head&gt;

&lt;body&gt;
 &lt;div id="wrap"&gt; &lt;!-- 主框架 --&gt;
 &lt;div id="header"&gt; &lt;!-- 頁首 --&gt;
 &lt;div id="slideshow"&gt; &lt;!-- Slide Show --&gt;
 &lt;div id="slidebox"&gt;
 &lt;?php
 if(is_home() || is_front_page()){
 $recent_post = wp_get_recent_posts( 5 );
 foreach( $recent_post as $key =&gt; $current_post ) {
 ?&gt;
 &lt;div &lt;?php echo ($key != 0) ? 'style="display:none;"' : ''; ?&gt;&gt;
 &lt;a href="&lt;?php echo get_permalink($current_post['ID']); ?&gt;" title="&lt;?php echo $current_post['post_title']; ?&gt;"&gt;
 &lt;?php
 //This must be in one loop
 if(has_post_thumbnail($current_post['ID'])) {
 echo get_the_post_thumbnail($current_post['ID'], '2ds_thumbnails');
 } else {
 echo '&lt;img src="'.get_bloginfo("template_url").'/images/slideshow_default.jpg" alt="預設圖片" /&gt;';
 }
 ?&gt;
 &lt;/a&gt;
 &lt;div&gt;
 &lt;h3&gt;&lt;a href="&lt;?php echo get_permalink($current_post['ID']); ?&gt;" title="&lt;?php echo $current_post['post_title']; ?&gt;"&gt;&lt;?php echo $current_post['post_title']; ?&gt;&lt;/a&gt;&lt;/h3&gt;
 &lt;div&gt;
 &lt;?php
 $content = explode('&lt;!--more--&gt;', $current_post['post_content']);
 echo cut_word($content[0], 300);
 ?&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;?php
 }
 }else{
 $current_post = wp_get_single_post();
 ?&gt;
 &lt;div&gt;
 &lt;?php
 if(has_post_thumbnail($current_post-&gt;ID)) {
 echo get_the_post_thumbnail($current_post-&gt;ID, '2ds_thumbnails');
 } else {
 echo '&lt;img src="'.get_bloginfo("template_url").'/images/slideshow_default.jpg" alt="預設圖片" /&gt;';
 }

 if($current_post){
 ?&gt;
 &lt;div&gt;
 &lt;h3&gt;&lt;a href="&lt;?php echo get_permalink($current_post-&gt;ID); ?&gt;" title="&lt;?php echo $current_post-&gt;post_title; ?&gt;"&gt;&lt;?php echo $current_post-&gt;post_title; ?&gt;&lt;/a&gt;&lt;/h3&gt;
 &lt;div&gt;
 &lt;?php
 $content = explode('&lt;!--more--&gt;', $current_post-&gt;post_content);
 echo cut_word($content[0], 300);
 ?&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;?php
 }
 ?&gt;
 &lt;/div&gt;
 &lt;?php
 }
 ?&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div id="logo"&gt; &lt;!-- Logo --&gt;
 &lt;?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?&gt;
 &lt;&lt;?php echo $heading_tag; ?&gt; id="site-title"&gt;
 &lt;a href="&lt;?php echo home_url( '/' ); ?&gt;" title="&lt;?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?&gt;"&gt;
 &lt;?php bloginfo( 'name' ); ?&gt;
 &lt;/a&gt; &lt;!-- 網誌標題（連結） --&gt;
 &lt;/&lt;?php echo $heading_tag; ?&gt;&gt;
 &lt;span id="site-description"&gt;&lt;?php bloginfo( 'description' ); ?&gt;&lt;/span&gt; &lt;!-- 網誌說明文字 --&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div id="container"&gt; &lt;!-- 主體 --&gt;</pre>
<p>超長，對吧！</p>
<p>不過我們只要在這篇學會三個重點即可。</p>
<p>重點一 ： 顯示網誌標題。<br />
焦點放到這段原始碼。</p>
<pre class="brush:html">&lt;title&gt;&lt;?php
 //Print Title
 wp_title( '-', true, 'right' );

 //Print Site Name
 bloginfo( 'name' );

 //If in Home Page, Print Description
 $site_description = get_bloginfo( 'description', 'display' );
 if ( $site_description &amp;&amp; ( is_home() || is_front_page() ) )
 echo " - {$site_description}";

 // Add a page number if necessary
 if ( $paged &gt;= 2 || $page &gt;= 2 )
 echo ' | ' . sprintf( __( 'Page %s', '2ds' ), max( $paged, $page ) );

 ?&gt;&lt;/title&gt;</pre>
<p>上面這段是由WordPress預設風格所複製過來使用的。<br />
其中你要學會的函式，就是 bloginfo 了！<br />
bloginof( &#8216;Key&#8217; );<br />
而這個 Key 可以在 WordPress CodeX 或者 WordPress啦！ 找到。</p>
<p>在標題列顯示網誌名稱只要如下動作。</p>
<pre class="brush:php">&lt;title&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;</pre>
<p>當然，之後你還得為你的頁首顯示標題。<br />
（網站標題、Logo通常都在頁首。）</p>
<p>重點二：輸出頁首需要的語法</p>
<p>前面有一段語法中包涵了 wp_head() 這個函式。<br />
其作用會 Load 一些 CSS 進入 WordPress, 像是本站的語法高亮，就是透過這個才能實踐。<br />
大多數的 Plugin 需要透過這個去追加 JavaScript 來使用。</p>
<p>使用方法很簡單，只需要在 head 之間加入。</p>
<pre class="brush:php">&lt;?php wp_head(); ?&gt;</pre>
<p>就算是完成了！</p>
<p>重點三：讀取網誌的 Style.css 文件。</p>
<p>現今網站都使用 CSS 排版，沒有讀取的話，版面肯定會很慘。<br />
（這邊直接複製 WordPress 預設版面的語法，其中包涵一些WP功能相依，這部份就不用管了！）</p>
<pre class="brush:html">&lt;link rel="profile" href="http://gmpg.org/xfn/11" /&gt;
&lt;link rel="stylesheet" type="text/css" media="all" href="&lt;?php bloginfo( 'stylesheet_url' ); ?&gt;" /&gt; &lt;!-- 引入CSS的語法 --&gt;
&lt;link rel="pingback" href="&lt;?php bloginfo( 'pingback_url' ); ?&gt;" /&gt;</pre>
<p>發現了嗎？<br />
上面都是使用 bloginfo 函式去讀取喔！<br />
bloginfo 會儲存一些基本的 WP 資訊，只需要在有需要時去呼叫即可。</p>
<p>最後，稍微整理一下，製成一個簡單的 WP Header 檔吧！<br />
檔名為 header.php</p>
<pre class="brush:html">&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=&lt;?php bloginfo( 'charset' ); ?&gt;" /&gt; &lt;!-- 設定編碼（以WP為準）--&gt;
&lt;title&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;
&lt;link rel="profile" href="http://gmpg.org/xfn/11" /&gt;
&lt;link rel="stylesheet" type="text/css" media="all" href="&lt;?php bloginfo( 'stylesheet_url' ); ?&gt;" /&gt; &lt;!-- Load CSS --&gt;
&lt;link rel="pingback" href="&lt;?php bloginfo( 'pingback_url' ); ?&gt;" /&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div id="wrap"&gt; &lt;!-- 主框架 --&gt;
    &lt;div id="header"&gt; &lt;!-- 頁首 --&gt;
      &lt;h1&gt;
        &lt;?php bloginfo('name'); ?&gt;
        &lt;span class="description"&gt;&lt;?php bloginfo('description'); ?&gt;&lt;/div&gt;
      &lt;/h1&gt;
    &lt;/div&gt;
    &lt;div id="contanier"&gt;</pre>
<p>一樣，弦也省略了宣告，還是要自己加上喔！<br />
（這篇很明顯開始敷衍了！）</p>
<p>好！我們朝著簡陋的 WP 版面前進吧（喂<br />
註：想做的精美只需要在後期自己慢慢修飾即可摟！</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之一 – 工具篇" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之一 – 工具篇</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之二 – 切版與架構篇" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198259.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之二 – 切版與架構篇</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之三 – Footer 檔尾" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之三 – Footer 檔尾</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="網誌新版面設計" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198362.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">網誌新版面設計</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/web-project/poston-2011-02-02/postid-992/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>弦也式 WP 版面製作之二 – 切版與架構篇</title>
		<link>http://blog.frost.tw/web-project/poston-2011-01-26/postid-974</link>
		<comments>http://blog.frost.tw/web-project/poston-2011-01-26/postid-974#comments</comments>
		<pubDate>Wed, 26 Jan 2011 11:13:27 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[網站專案]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[教學]]></category>
		<category><![CDATA[版面]]></category>
		<category><![CDATA[設計]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=974</guid>
		<description><![CDATA[今天再來一篇～ 明天就要學測了，不過一點都不緊張（苦笑 唯一擔心的是能不能在八點左右去睡覺（喂 那麼，開始吧！ 版面的切版處理 這邊會簡單帶過，畢竟每個人作法不大相同。 只要有一個大方向即可。 我們的 Model &#8211; 貳夢之弦 V5 版面 （好吧，雖然V4非常精緻，不過在內文呈現真的美中不足，我整個想快點更換。） 這次弦也選用的是藍色/白色系的配色，主要還是之前說的「白底黑字」原則。 當然，其中已經做了很多針對網誌的排版調整，不過這邊是討論切版，就不多做討論了！ 切版原則、說明（應該有高手更熟，下面是我的習慣） 不需切下部份者不切 盡可能重複利用圖片 &#62; 如弦也側欄的標題，皆是由藍色的長條組成（切下原因：有陰影處理） 可用CSS設定者不切 &#62; 如版面背景是白色，僅需將頁首、頁尾切下即可 避免大面積切割 &#62; 弦也頁首的漸層可以用圖片+背景色處理，因此不需要整片切割，只需要將圖片部份做好去背。 小圖示集中處理 &#62; 如果有使用小圖示、或者有變化的背景（可重複利用）則切好放到同一張圖，用CSS對位即可 切版還要依照你的版面架構來做調整。 （如貳夢之弦 V4 是背景寬度隨頁面切換，因此都只集中切中央部份。） 切版完成後，不一定要馬上存檔，可以在建立架構時再決定是否做微調。 確立架構 每種版面的架構並不會完全相同，就 V5 和 V4 &#8230; <a href="http://blog.frost.tw/web-project/poston-2011-01-26/postid-974">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">弦也式 WP 版面製作之三 – Footer 檔尾</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">弦也式 WP 版面製作之一 – 工具篇</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">弦也式 WP 版面製作之二 – Header 檔首</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">網誌新版面設計</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>今天再來一篇～<br />
明天就要學測了，不過一點都不緊張（苦笑<br />
唯一擔心的是能不能在八點左右去睡覺（喂</p>
<p>那麼，開始吧！<br />
<span id="more-974"></span><br />
<strong>版面的切版處理</strong></p>
<p>這邊會簡單帶過，畢竟每個人作法不大相同。<br />
只要有一個大方向即可。</p>
<p>我們的 Model &#8211; 貳夢之弦 V5 版面<br />
（好吧，雖然V4非常精緻，不過在內文呈現真的美中不足，我整個想快點更換。）<br />
<a href="http://blog.frost.tw/wp-content/uploads/2011/01/V5.png" rel="lightbox[974]" title="貳夢之弦 V5"><img class="alignnone size-medium wp-image-975" title="貳夢之弦 V5" src="http://blog.frost.tw/wp-content/uploads/2011/01/V5-272x300.png" alt="" width="272" height="300" /></a></p>
<p>這次弦也選用的是藍色/白色系的配色，主要還是之前說的「白底黑字」原則。<br />
當然，其中已經做了很多針對網誌的排版調整，不過這邊是討論切版，就不多做討論了！</p>
<p><strong>切版原則、說明</strong>（應該有高手更熟，下面是我的習慣）</p>
<ol>
<li>不需切下部份者不切</li>
<li>盡可能重複利用圖片<br />
&gt; 如弦也側欄的標題，皆是由藍色的長條組成（切下原因：有陰影處理）</li>
<li>可用CSS設定者不切<br />
&gt; 如版面背景是白色，僅需將頁首、頁尾切下即可</li>
<li>避免大面積切割<br />
&gt; 弦也頁首的漸層可以用圖片+背景色處理，因此不需要整片切割，只需要將圖片部份做好去背。</li>
<li>小圖示集中處理<br />
&gt; 如果有使用小圖示、或者有變化的背景（可重複利用）則切好放到同一張圖，用CSS對位即可</li>
</ol>
<p>切版還要依照你的版面架構來做調整。<br />
（如貳夢之弦 V4 是背景寬度隨頁面切換，因此都只集中切中央部份。）</p>
<p>切版完成後，不一定要馬上存檔，可以在建立架構時再決定是否做微調。</p>
<p><strong>確立架構</strong><br />
每種版面的架構並不會完全相同，就 V5 和 V4 的比較來看。<br />
V5 是由一個 Wrap 圖層包裹，而 V4 則是沒有 Wrap 圖層包裹。<br />
（差異在 V5 背景只有上半部，而V4背景圖較多，切版下來後無法統一呈現。）</p>
<p>弦也的 V5 預定架構（註：其實還要加上 XHTML 宣告，不過弦也跳過了！）</p>
<pre class="brush: html">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;網頁名稱&lt;/title&gt;
&lt;!-- JS, CSS, Meta 資訊區塊 --&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div id="wrap"&gt; &lt;!-- 主框架 --&gt;
    &lt;div id="header"&gt; &lt;!--頁首 --&gt;
      &lt;div id="sideshow"&gt; &lt;!-- Sideshow 區域 --&gt;
      &lt;/div&gt;
      &lt;div id="logo"&gt; &lt;!-- 網站 Logo --&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="container"&gt; &lt;!-- 主體 --&gt;
      &lt;div id="content"&gt; &lt;!-- 內容區 --&gt;
      &lt;/div&gt;
      &lt;div id="menu"&gt; &lt;!-- 選單 --&gt;
      &lt;/div&gt;
      &lt;div id="sidebar"&gt; &lt;!-- 側欄 --&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="footer"&gt; &lt;!-- 頁尾 --&gt;
      &lt;div id="ad"&gt; &lt;!-- 頁尾廣告區 --&gt; &lt;/div&gt;
      &lt;div id="copyright"&gt; &lt;!-- 版權宣告 --&gt; &lt;/div&gt;
      &lt;div id="aboutme"&gt; &lt;!-- 關於我 --&gt; &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>設計時可以加上註解，增加之後修改的方便性。</p>
<p>圖層的配置以「由上到下」並且「由左到右」的原則排列。<br />
這樣一來，就可以避免事後移動位子的問題。<br />
註：如果像是 V4 頁底有特別的錯位，這個排列就可以減少錯位時移動像素數的計算複雜度。</p>
<p>到了這裡，我想應該已經花上五、六個小時在製作了！<br />
（如果你很用心的設計版面、切割版面）<br />
不過，接下來可能還有長達數十小時的細部處理。</p>
<p>後面的文章會分別從 header.php, index.php, footer.php 等檔案做介紹。<br />
當你的 Theme 架構檔案越多，你的 WP 版面功能就越強。<br />
（因為如果沒有該檔案，那麼WP就會找 index.php 或預設版模來替代，你能做的變化就會減少。）</p>
<p>那麼，下次再見摟！</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">弦也式 WP 版面製作之三 – Footer 檔尾</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">弦也式 WP 版面製作之一 – 工具篇</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">弦也式 WP 版面製作之二 – Header 檔首</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">網誌新版面設計</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/web-project/poston-2011-01-26/postid-974/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>弦也式 WP 版面製作之一 &#8211; 工具篇</title>
		<link>http://blog.frost.tw/web-project/poston-2011-01-25/postid-972</link>
		<comments>http://blog.frost.tw/web-project/poston-2011-01-25/postid-972#comments</comments>
		<pubDate>Tue, 25 Jan 2011 11:42:40 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[網站專案]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[教學]]></category>
		<category><![CDATA[版面]]></category>
		<category><![CDATA[設計]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=972</guid>
		<description><![CDATA[前幾天換了新版面後，感覺自己差不多能掌握 WordPress 版面設計的要點了！ 想一想，其實WordPress版面還能做很多變化。 不分享出來，就覺得心裡怪怪的。 雖然自己目前功力還不到家，不過能做出版面就算是不錯了！ 尤其是有蠻多網友想做，卻不知道怎麼下手。 如果是這樣的話，可以先參考這篇的內容看看。 工欲善其事，必先利其器。 所以，在開始製作之前，我們得先準備好各種武器。 Google 搜尋引擎 在你不知道該如何進行時，隨時都是你最好的幫手。 WordPress 啦！ 對岸的 WordPress 資源站，其最大幫助就是將 WP 官方的 Codex Docs 大量翻譯。 一個好用的編輯器 弦也愛用 Dreamweaver 和 Notepad++, 而你要用 NetBeans 都可，但是一定要你善用。 優質的繪圖軟體 要說的話，大概就是能讓你做設計的軟體。如 PhotoShop, Fireworks, Illustarator 等…… 各種瀏覽器 FireFox, Chrome, &#8230; <a href="http://blog.frost.tw/web-project/poston-2011-01-25/postid-972">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之二 – 切版與架構篇" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198259.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之二 – 切版與架構篇</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之二 – Header 檔首" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之二 – Header 檔首</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之三 – Footer 檔尾" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之三 – Footer 檔尾</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="網誌新版面設計" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198362.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">網誌新版面設計</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>前幾天換了新版面後，感覺自己差不多能掌握 WordPress 版面設計的要點了！<br />
想一想，其實WordPress版面還能做很多變化。<br />
不分享出來，就覺得心裡怪怪的。</p>
<p>雖然自己目前功力還不到家，不過能做出版面就算是不錯了！<br />
尤其是有蠻多網友想做，卻不知道怎麼下手。<br />
如果是這樣的話，可以先參考這篇的內容看看。<br />
<span id="more-972"></span><br />
工欲善其事，必先利其器。<br />
所以，在開始製作之前，我們得先準備好各種武器。</p>
<ol>
<li><a href="http://google.com.tw" target="_blank">Google 搜尋引擎</a><br />
在你不知道該如何進行時，隨時都是你最好的幫手。</li>
<li><a href="http://www.wordpress.la/" target="_blank">WordPress 啦！</a><br />
對岸的 WordPress 資源站，其最大幫助就是將 WP 官方的 Codex Docs 大量翻譯。</li>
<li>一個好用的編輯器<br />
弦也愛用 Dreamweaver 和 Notepad++, 而你要用 NetBeans 都可，但是一定要你善用。</li>
<li>優質的繪圖軟體<br />
要說的話，大概就是能讓你做設計的軟體。如 PhotoShop, Fireworks, Illustarator 等……</li>
<li>各種瀏覽器<br />
FireFox, Chrome, IE7+ 這幾款主流，都要備好來測試。</li>
<li>標記語言、程式語言的工具書<br />
如果你已經精通，那麼就沒有這個必要。不然，最好有 HTML, CSS, PHP 的參考書幫助你。</li>
<li>jQuery 的資料<br />
如果你想和弦也一樣做個簡單的 Slideshow, 或者其他特效，建議你使用 jQuery 輔助。</li>
<li>Web Server 或 *AMP 環境<br />
不論你用虛擬主機，或者像弦也搞個 LAMP 環境，還是用 WAMP 環境都行。</li>
<li>其他<br />
如果你想在這個網誌版面上用上什麼，別忘記帶上！像是相片、色票等等</li>
</ol>
<p>當這些備齊後，我們就可以開始摟！</p>
<p>不過，因為這篇只介紹工具，所以只能很唬爛的說明下去。</p>
<p><strong>Google</strong><br />
再講下去也是廢話，一有不會馬上 Google it!<br />
（弦也的 Slideshow 也是靠 Google 讀程式碼改出來的！）</p>
<p><strong>WordPress La!</strong><br />
不用說你也知道，看中文絕對比看英文簡單。<br />
雖然沒有完整的翻譯，但也好歹有個 70% 左右。<br />
當你想像弦也一樣做個 Slideshow 或者 特殊的分類排版，那你就不能再繼續用預設的產生文章方式了！<br />
（如弦也的 Slideshow 就是另外用程式碼產生，而非預設的方式。）</p>
<p><strong>好用的編輯器</strong><br />
唔，這個其實攸關效率阿！<br />
當你用著 Dreamewaver CS5 的時候，你會知道你大多數的 PHP 錯誤。<br />
使用 Notepad++ 時，你可以很清楚的區分保留字、變數。<br />
這對於製作版面這種費力的任務，有很大的幫助。</p>
<p><strong>優質的繪圖軟體</strong><br />
即便你想走簡潔風，或者 CSS3 大師秀，你還是會需要他的幫助。<br />
除非你百分之百不使用任何圖片元素在你的版面上。<br />
Photoshop &#8211; 適合現代感的網頁設計（預設的功能上，比較適合）<br />
Illustrator &#8211; 適合向量風格的設計（因為本身就是向量軟體阿！如果你擅長剪影，那麼成品會很美的！）<br />
Fireworks &#8211; 本身就是做網頁設計的軟體，結合 PS 和 Ill 的特色。<br />
其他還有什麼軟體，就看各位的私藏摟！</p>
<p><strong>各種瀏覽器</strong><br />
先不論你偏好哪個，身為設計者，你必須先考慮你的讀者（訪客）<br />
因此，一定要有足夠的測試確認各版本的瀏覽器都能正常使用。<br />
假使你和弦也一樣認為 IE6 已經不合時宜，那也可以不用準備。<br />
（但你得確保你的訪客幾乎不會使用IE6以及版面勉強可以閱讀。）</p>
<p><strong>標記語言、程式語言的工具書</strong><br />
唔，如果你是第一次做，而且沒有足夠的 HTML, CSS, PHP 經驗，那麼最好備著。<br />
弦也自己也有一本 CSS 手冊，不過因為已經很熟了，所以也沒什麼在使用。<br />
（如果 PHP 不熟，也沒有版面上的特殊需求，可以跳過。）</p>
<p><strong>jQuery 的資料</strong><br />
在省力方面，選用 jQuery 做特效真是個明智的選擇。<br />
而且他也有 CDN (Google Code) 支援，以及 WordPress 內建。<br />
就各方面來看，他會協助你在版面製作上很多。</p>
<p><strong>網站環境</strong><br />
如果你已經有 WordPress 了，還是建議在本機測試後在上傳使用。<br />
Windows 環境下可以選用 Appserv, XAMPP 等軟體。<br />
在 Linux 環境，使用指令安裝 Apach, PHP, MySQL 即可。<br />
（不過 Linux 環境得稍微注意檔案權限的問題。）</p>
<p><strong>其他</strong><br />
像弦也的版面，就用到蠻多額外的元素。<br />
如 Slideshow 預設圖，就是網路上的圖片素材。<br />
Logo 上的字體、頁底的裝飾等等，都是網路素材。</p>
<p>當然，弦也還使用到了 Yahoo 的 CSS Reset 語法。<br />
（非常建議使用 CSS Reset, 他會幫助你在各瀏覽器顯示的更齊一、優良。）</p>
<p>很好，一篇文章唬爛到此結束！<br />
學測考完後雖然時間不多，不過弦也仍會繼續找時間把這套教學做完。<br />
（網路上有很多大大都有很高超的教學，看我的最好參考其他大大的教學一起學習吧！）</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 584px; width: 1px; height: 1px; overflow: hidden;">http://www.wordpress.la/</div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之二 – 切版與架構篇" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-26%2Fpostid-974&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198259.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之二 – 切版與架構篇</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之二 – Header 檔首" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-02%2Fpostid-992&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之二 – Header 檔首</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="弦也式 WP 版面製作之三 – Footer 檔尾" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-02-17%2Fpostid-1114&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">弦也式 WP 版面製作之三 – Footer 檔尾</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="網誌新版面設計" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2011-01-25%2Fpostid-972">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198362.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">網誌新版面設計</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/web-project/poston-2011-01-25/postid-972/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>貳夢之弦，登場。</title>
		<link>http://blog.frost.tw/site-built/poston-2011-01-23/postid-965</link>
		<comments>http://blog.frost.tw/site-built/poston-2011-01-23/postid-965#comments</comments>
		<pubDate>Sun, 23 Jan 2011 09:56:24 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[網站架設]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[架站]]></category>
		<category><![CDATA[生活]]></category>
		<category><![CDATA[設計]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=965</guid>
		<description><![CDATA[說要製作網誌版面似乎是很久以前的事情了！ 今天，終於換上新的版面。 不過，後面還有很多挑戰要對抗吧！ 如：是否適合閱讀、設計和實際美觀上的差異、設計缺失等等…… 我想，白底黑字真的會比較適合閱讀。 不過，目前的弦也還不夠能力設計更好的版面。 光是這個設計，從打版型到製作出成品，就花上了約十二小時。 也許大家聽起來不長，不過這也還只是「不完美版本」的時間。 弦也想，這個版面如果真的要完成，至少還要好幾天吧！ 伴隨這次改版，網誌的名稱也改動了！ 其中，算是有一些小故事。 當然，大家也別忘記去注意一下「關於」這個分頁。 因為弦也偷偷地更新摟！ 為什麼會叫做「貳夢」呢？ 其一是取其諧音「惡夢」 再來，就是弦也想表現的一些心情和感覺摟！ 沒記錯，那時候還不太能調是高三面臨考試的壓力。 當然，即使我在怎麼能夠適應，也總得需要調適。 而我所追求的設計，倒是有點瓶頸。 想了很多次版面，也還是沒有一個所以然。 此時，剛好接觸到剪影的呈現風格。 我就有了一個「用夢一般」的方式呈現版面吧！ 於是，「貳夢」就這樣產生了！ 雖然這次的版面其實沒有很強烈的「夢」或者「惡夢」的感覺。 不過，倒是讓人感覺蠻穩定的。 也許下次我該挑戰更強烈的感覺吧！ 白底黑字，下次的目標。 （大概，又會是半年之後……）<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="兩本設計新書入手" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2011-01-24%2Fpostid-966&from=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2011-01-23%2Fpostid-965">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198416.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">兩本設計新書入手</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="網誌新版面設計" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2011-01-23%2Fpostid-965">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198362.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">網誌新版面設計</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="架站機適應性" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-04-24%2Fpostid-506&from=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2011-01-23%2Fpostid-965">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">架站機適應性</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="貳夢之弦 – 即將登場" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2011-01-22%2Fpostid-961&from=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2011-01-23%2Fpostid-965">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198466.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">貳夢之弦 – 即將登場</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>說要製作網誌版面似乎是很久以前的事情了！<br />
今天，終於換上新的版面。</p>
<p>不過，後面還有很多挑戰要對抗吧！<br />
如：是否適合閱讀、設計和實際美觀上的差異、設計缺失等等……</p>
<p>我想，白底黑字真的會比較適合閱讀。<br />
<span id="more-965"></span><br />
不過，目前的弦也還不夠能力設計更好的版面。<br />
光是這個設計，從打版型到製作出成品，就花上了約十二小時。<br />
也許大家聽起來不長，不過這也還只是「不完美版本」的時間。</p>
<p>弦也想，這個版面如果真的要完成，至少還要好幾天吧！</p>
<p>伴隨這次改版，網誌的名稱也改動了！<br />
其中，算是有一些小故事。</p>
<p>當然，大家也別忘記去注意一下「關於」這個分頁。<br />
因為弦也偷偷地更新摟！</p>
<p>為什麼會叫做「貳夢」呢？<br />
其一是取其諧音「惡夢」<br />
再來，就是弦也想表現的一些心情和感覺摟！</p>
<p>沒記錯，那時候還不太能調是高三面臨考試的壓力。<br />
當然，即使我在怎麼能夠適應，也總得需要調適。<br />
而我所追求的設計，倒是有點瓶頸。</p>
<p>想了很多次版面，也還是沒有一個所以然。<br />
此時，剛好接觸到剪影的呈現風格。<br />
我就有了一個「用夢一般」的方式呈現版面吧！</p>
<p>於是，「貳夢」就這樣產生了！</p>
<p>雖然這次的版面其實沒有很強烈的「夢」或者「惡夢」的感覺。<br />
不過，倒是讓人感覺蠻穩定的。</p>
<p>也許下次我該挑戰更強烈的感覺吧！<br />
白底黑字，下次的目標。<br />
（大概，又會是半年之後……）</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="兩本設計新書入手" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2011-01-24%2Fpostid-966&from=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2011-01-23%2Fpostid-965">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198416.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">兩本設計新書入手</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="網誌新版面設計" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2011-01-23%2Fpostid-965">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198362.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">網誌新版面設計</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="架站機適應性" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-04-24%2Fpostid-506&from=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2011-01-23%2Fpostid-965">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">架站機適應性</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="貳夢之弦 – 即將登場" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2011-01-22%2Fpostid-961&from=http%3A%2F%2Fblog.frost.tw%2Fsite-built%2Fposton-2011-01-23%2Fpostid-965">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198466.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">貳夢之弦 – 即將登場</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/site-built/poston-2011-01-23/postid-965/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>貳夢之弦 &#8211; 即將登場</title>
		<link>http://blog.frost.tw/design/poston-2011-01-22/postid-961</link>
		<comments>http://blog.frost.tw/design/poston-2011-01-22/postid-961#comments</comments>
		<pubDate>Sat, 22 Jan 2011 13:43:24 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[設計創作]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[架站]]></category>
		<category><![CDATA[生活]]></category>
		<category><![CDATA[網誌]]></category>
		<category><![CDATA[網頁]]></category>
		<category><![CDATA[設計]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=961</guid>
		<description><![CDATA[經過一番苦戰，弦也終於完成了這個版面。 雖然目前暫時無法使用（製成WordPress版面戰況慘烈……） 如果情況良好，也許明天寫網誌之前就能開始啟用了吧！ 不過，現在我們先來看看設計圖過過乾癮…… 我想，成品和原圖多少會有差異的！ （在繪圖軟體裡面呈現的總是會比較好看些……） 總之，我們先來看看吧！ 整體來看，是個非常精緻的版面呢！ 不過，距離完成還有很長的一段路。 雖然弦也不是第一次製作WordPress版面了！ 不過這次不但需求多，也有許多設定要做處理。 相較以往的製作，這次真的費時耗力。 目前預定的版本號為 1.0 版。 之後會隨著HTML, CSS, WordPress 發展而持續的修改。 我想是一個會用上好一陣子的網誌版面。 最快是預定明天就能上線使用。 最慢，也許要學測考完了！ 明天還得把兩個東西做好處理，不然時間會有點不足。 接下來就是寒假，也要去做老爸的 Project, 不是那麼輕鬆。 只能稱現在這僅存的空閒時間，去努力摟！<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜歡：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="網誌新版面設計" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2010-10-29%2Fpostid-797&from=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2011-01-22%2Fpostid-961">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198362.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">網誌新版面設計</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="兩本設計新書入手" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2011-01-24%2Fpostid-966&from=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2011-01-22%2Fpostid-961">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198416.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">兩本設計新書入手</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="網誌發文開始減少" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Flife%2Fposton-2010-05-09%2Fpostid-528&from=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2011-01-22%2Fpostid-961">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">網誌發文開始減少</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Fly Angain 入口頁設計" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.frost.tw%2Fweb-project%2Fposton-2010-04-29%2Fpostid-513&from=http%3A%2F%2Fblog.frost.tw%2Fdesign%2Fposton-2011-01-22%2Fpostid-961">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/05/01/7198497.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Fly Angain 入口頁設計</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>經過一番苦戰，弦也終於完成了這個版面。<br />
雖然目前暫時無法使用（製成WordPress版面戰況慘烈……）</p>
<p>如果情況良好，也許明天寫網誌之前就能開始啟用了吧！<br />
不過，現在我們先來看看設計圖過過乾癮……<br />
<span id="more-961"></span><br />
我想，成品和原圖多少會有差異的！<br />
（在繪圖軟體裡面呈現的總是會比較好看些……）</p>
<p>總之，我們先來看看吧！<br />
<a href="http://blog.frost.tw/wp-content/uploads/2011/01/V4-2.png" rel="lightbox[961]" title="貳夢之弦 V4 二版"><img class="alignnone size-thumbnail wp-image-962" title="貳夢之弦 V4 二版" src="http://blog.frost.tw/wp-content/uploads/2011/01/V4-2-150x150.png" alt="" width="150" height="150" /></a></p>
<p>整體來看，是個非常精緻的版面呢！</p>
<p>不過，距離完成還有很長的一段路。<br />
雖然弦也不是第一次製作WordPress版面了！</p>
<p>不過這次不但需求多，也有許多設定要做處理。<br />
相較以往的製作，這次真的費時耗力。</p>
<p>目前預定的版本號為 1.0 版。<br />
之後會隨著HTML, CSS, WordPress 發展而持續的修改。<br />
我想是一個會用上好一陣子的網誌版面。</p>
<p>最快是預定明天就能上線使用。<br />
最慢，也許要學測考完了！<br />
明天還得把兩個東西做好處理，不然時間會有點不足。</p>
<p>接下來就是寒假，也要去做老爸的 Project, 不是那麼輕鬆。<br />
只能稱現在這僅存的空閒時間，去努力摟！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/design/poston-2011-01-22/postid-961/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 中的 Function (函式) 數值傳遞測試（無解）</title>
		<link>http://blog.frost.tw/code/poston-2011-01-19/postid-953</link>
		<comments>http://blog.frost.tw/code/poston-2011-01-19/postid-953#comments</comments>
		<pubDate>Wed, 19 Jan 2011 11:29:34 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[程式語言]]></category>
		<category><![CDATA[bbPress]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[生活]]></category>
		<category><![CDATA[程式]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=953</guid>
		<description><![CDATA[在 bbPress/WordPress 中，使用 Hook 製作插件時。 Filter 功能，如果直接使用 echo 輸出內容，那麼優先度在其之後者都無法顯示。 但是，如果將訊息處理後 return 回去，後面的函式又可以繼續處理。 但，似乎沒有使用 &#38; 去參照，到底是什麼情況呢？ 弦也決定親身測試，這個神覓得東西！ 測試 1 &#8211; 單純輸出 function do_func( $str ){ call_user_func_array('op2', array($str)); call_user_func_array('op3', array($str)); } function op1( $str ){ //Return to op2 return do_func($str); } function &#8230; <a href="http://blog.frost.tw/code/poston-2011-01-19/postid-953">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>在 bbPress/WordPress 中，使用 Hook 製作插件時。<br />
Filter 功能，如果直接使用 echo 輸出內容，那麼優先度在其之後者都無法顯示。</p>
<p>但是，如果將訊息處理後 return 回去，後面的函式又可以繼續處理。<br />
但，似乎沒有使用 &amp; 去參照，到底是什麼情況呢？</p>
<p>弦也決定親身測試，這個神覓得東西！<br />
<span id="more-953"></span><br />
測試 1 &#8211; 單純輸出</p>
<pre class="brush:php">
function do_func( $str ){
	call_user_func_array('op2', array($str));
	call_user_func_array('op3', array($str));
}

function op1( $str ){
	//Return to op2
	return do_func($str);
}

function op2( $str ){
	echo $str.'2';
}

function op3( $str ){
	echo $str.'3';
}

echo op1('hello');
</pre>
<p>結果：hello2hello3</p>
<p>測試2 &#8211; op2改為return</p>
<pre class="brush:php">
function op2( $str ){
	return $str.'2';
}
</pre>
<p>結果：hello3<br />
看起來，此時的 hello2 已經被 hello3 蓋過去了！<br />
再來測試 op3 也改為 return 時，是否會傳遞參數。</p>
<pre class="brush: php">
function op3( $str ){
	return $str.'3';
}
</pre>
<p>結果：空<br />
看起來，似乎是不會做任何傳遞動作的！</p>
<p>加上參照看看！</p>
<pre class="brush: php">
function do_func( &#038;$str ){
	call_user_func_array('op2', array($str));
	call_user_func_array('op3', array($str));
}
</pre>
<p>結果：空<br />
看起來也不行，也許哪裡漏了些東西！</p>
<p>打開 function.plugin-api.php 看看。</p>
<pre class="brush:php">
function apply_filters($tag, $value) {
	global $wp_filter, $merged_filters, $wp_current_filter;

	$args = array();
	$wp_current_filter[] = $tag;

	// Do 'all' actions first
	if ( isset($wp_filter['all']) ) {
		$args = func_get_args();
		_wp_call_all_hook($args);
	}

	if ( !isset($wp_filter[$tag]) ) {
		array_pop($wp_current_filter);
		return $value;
	}

	// Sort
	if ( !isset( $merged_filters[ $tag ] ) ) {
		ksort($wp_filter[$tag]);
		$merged_filters[ $tag ] = true;
	}

	reset( $wp_filter[ $tag ] );

	if ( empty($args) )
		$args = func_get_args();

	do {
		foreach( (array) current($wp_filter[$tag]) as $the_ )
			if ( !is_null($the_['function']) ){
				$args[1] = $value;
				$value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args']));
			}

	} while ( next($wp_filter[$tag]) !== false );

	array_pop( $wp_current_filter );

	return $value;
}
</pre>
<p>看起來我們的 call_user_func_array() 也沒有問題，在 -Press 中也沒有使用 &#038; 做參照。<br />
對 op1 做調整看看。</p>
<pre class="brush:php">
function op1( $str ){
	//Return to op2
	echo $str;
	do_func($str);
}
</pre>
<p>結果：hello<br />
問題也不在 op1 身上，這倒是讓整個過程成了一個謎阿！</p>
<p>既然現在無解，就只好暫時放在一邊。<br />
也許哪天做測試時，會測出 -Press 為什麼可以傳遞數值的原因！<br />
（弦也自己寫的 Hook 也做不到，真是神奇！）</p>
<p>&#8212;<br />
17:49 補充</p>
<p>原來，一個一直有一個盲點。<br />
「程式的『循序』原則！」</p>
<p>因為 -Press 都用 Loop 去做，所以我們沒發現他不斷地 Replace $value 這個變數。<br />
正解：</p>
<pre class="brush: php">
function do_func( $str ){
	for($i = 2; $i < 3; $i++){
	$str = call_user_func_array('op2', array($str));
	$str = call_user_func_array('op3', array($str));

	return $str;
}
</pre>
<p>這樣一來，就能不斷串接了！<br />
（也可以避開一些用echo直接輸出的問題呢！）</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/code/poston-2011-01-19/postid-953/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>12月 ~ 1月程式隨手札記</title>
		<link>http://blog.frost.tw/life/poston-2011-01-14/postid-944</link>
		<comments>http://blog.frost.tw/life/poston-2011-01-14/postid-944#comments</comments>
		<pubDate>Fri, 14 Jan 2011 11:08:53 +0000</pubDate>
		<dc:creator>蒼時弦や</dc:creator>
				<category><![CDATA[生活雜記]]></category>
		<category><![CDATA[BackPress]]></category>
		<category><![CDATA[bbPress]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[架站]]></category>
		<category><![CDATA[程式]]></category>

		<guid isPermaLink="false">http://blog.frost.tw/?p=944</guid>
		<description><![CDATA[最近在程式上沒什麼新進展，所以就來回顧一下這一個半月的程式狀況。 概觀來看，又是一個很豐富的生活阿！ 但，我的設計到底去哪裡了（拭淚 不過我想，應該很快就有機會多多練習了～ （畢竟我現在除了看程式外，就去吸收設計方面的資訊。） 首先大概是十一、十二月左右，開始接觸 bbPress 吧！ 那時剛好老師請我幫忙弄學校的 Project 因此又開始回溫 PHP 了！ （在此之前都是與 Java 為伍……） 而在 bbPress 的開發上，感受到了 -Press 系列（bbPress, WordPress）的 Plugin 系統強大。 與 Discuz 相比，我猜 Press 的運行速度會略慢（整個架構都是以 Plugin 為核心，需要做很多的 Function 處理） 不過在可變性的優勢，就是 Discuz 遠遠所不能及。 雖然 Discuz 的 Core &#8230; <a href="http://blog.frost.tw/life/poston-2011-01-14/postid-944">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>最近在程式上沒什麼新進展，所以就來回顧一下這一個半月的程式狀況。<br />
概觀來看，又是一個很豐富的生活阿！</p>
<p>但，我的設計到底去哪裡了（拭淚<br />
不過我想，應該很快就有機會多多練習了～<br />
（畢竟我現在除了看程式外，就去吸收設計方面的資訊。）<br />
<span id="more-944"></span><br />
首先大概是十一、十二月左右，開始接觸 bbPress 吧！<br />
那時剛好老師請我幫忙弄學校的 Project 因此又開始回溫 PHP 了！<br />
（在此之前都是與 Java 為伍……）</p>
<p>而在 bbPress 的開發上，感受到了 -Press 系列（bbPress, WordPress）的 Plugin 系統強大。<br />
與 Discuz 相比，我猜 Press 的運行速度會略慢（整個架構都是以 Plugin 為核心，需要做很多的 Function 處理）<br />
不過在可變性的優勢，就是 Discuz 遠遠所不能及。</p>
<p>雖然 Discuz 的 Core 在 X1 推出後，也逐漸有越來越多的 Template Hook 可以插入區塊。<br />
但相較 bbPress 的 Fliter 機制，就遜色很多。<br />
（一個是自訂，一個是套用系統函式者就能調整。）</p>
<p>接下來就是一月初，老爸和我說完我將要做的 Project 後。<br />
我接觸了兩個東西，一個是 BackPress 另一個是插花的 Conduit Toolbar 了！</p>
<p>首先來簡單過 Conduit Toolbar 的功能。<br />
其整體架構很簡單，但多了 API 可運用（嚴格來說是可以插入網頁）<br />
但，又有 JavaScript 與其他配，讓他多了更多變化（Refresh機制）</p>
<p>這個 Refresh 機制可以讓 Toolbar 刷新，只要搭配 PHP, Perl, ASP, JSP 等 CGI 程式就能做出變化。<br />
（登入 &gt; 刷新 &gt; 請求網頁[Session/Cookie紀錄已登入] &gt; 回應新頁面[因為登入關係顯示的圖示增加]）</p>
<p>最後就是 BackPress 這個部份（WordPress, bbPress 的 Core 技術）<br />
整體上來看，其實是從 WordPress 將一些優秀的 Function, Class 抽取出來。<br />
並且加以整合後發布的 PHP Library ，但其功能強大可以稱做一個小型的 Framework 了！</p>
<p>而弦也個人認為 BackPress 最有特色的地方莫過於其 Database 的強化。<br />
原本 WP 僅支援單一資料庫，但在 BackPress 則追加了 Multi DB 的 Class 在其中。<br />
而 Plugin API 也是一項優秀的處理。<br />
（如同前面所述，效能可能稍差，但擁有極強的延展性。）</p>
<p>以上就是這一個半月在程式上的經歷。<br />
希望往後還能繼續分享各種在程式、設計上的經驗給大家。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.frost.tw/life/poston-2011-01-14/postid-944/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

