<?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>RockFu.Net - Rock my life! &#187; WebSite</title>
	<atom:link href="http://www.rockfu.net/blog/category/website/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rockfu.net/blog</link>
	<description>讓生活多一點浪漫</description>
	<lastBuildDate>Wed, 08 Feb 2012 05:26:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>wordpress 開發插件必看文章</title>
		<link>http://www.rockfu.net/blog/2011/12/website/wordpress/wordpress-%e9%96%8b%e7%99%bc%e6%8f%92%e4%bb%b6%e5%bf%85%e7%9c%8b%e6%96%87%e7%ab%a0/</link>
		<comments>http://www.rockfu.net/blog/2011/12/website/wordpress/wordpress-%e9%96%8b%e7%99%bc%e6%8f%92%e4%bb%b6%e5%bf%85%e7%9c%8b%e6%96%87%e7%ab%a0/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 14:46:49 +0000</pubDate>
		<dc:creator>rockfu</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[插件]]></category>
		<category><![CDATA[開發]]></category>

		<guid isPermaLink="false">http://www.rockfu.net/blog/?p=2912</guid>
		<description><![CDATA[<br/>要開發wordpress 插件，當然少不了就是要熟悉一下wordpress的環境，然後再看開發說明啦。不過說明書實在太多了，如何入手都成問題，多數還是會參考別人的插件，再設計自己的插件。要上手，還是有些文章值得參考。 1. 教學：如何開發wordpress 插件 http://www.devlounge.net/extras/how-to-write-a-wordpress-plugin 十分詳細 2.官方開發說明書 http://codex.wordpress.org/Developer_Documentation 3.官方提供插件開發資源 http://codex.wordpress.org/Plugin_Resources wordpress 有個十分重要的概念就是hook，因此要了解清楚。 插件開發有幾個十分重要，就喺action, filter,post,loop等，下面推薦收藏 http://codex.wordpress.org/Plugin_API http://codex.wordpress.org/The_Loop filter 介紹：http://codex.wordpress.org/Plugin_API/Filter_Reference 插入文章tag: http://codex.wordpress.org/Function_Reference/add_shortcode http://codex.wordpress.org/Function_Reference/add_filter]]></description>
			<content:encoded><![CDATA[<br/><p>要開發wordpress 插件，當然少不了就是要熟悉一下wordpress的環境，然後再看開發說明啦。不過說明書實在太多了，如何入手都成問題，多數還是會參考別人的插件，再設計自己的插件。要上手，還是有些文章值得參考。</p>
<p>1. 教學：如何開發wordpress 插件</p>
<p><a href="http://www.devlounge.net/extras/how-to-write-a-wordpress-plugin">http://www.devlounge.net/extras/how-to-write-a-wordpress-plugin</a></p>
<p>十分詳細</p>
<p>2.官方開發說明書</p>
<p><a href="http://codex.wordpress.org/Developer_Documentation">http://codex.wordpress.org/Developer_Documentation</a></p>
<p>3.官方提供插件開發資源</p>
<p><a href="http://codex.wordpress.org/Plugin_Resources">http://codex.wordpress.org/Plugin_Resources</a></p>
<p>wordpress 有個十分重要的概念就是hook，因此要了解清楚。</p>
<p>插件開發有幾個十分重要，就喺action, filter,post,loop等，下面推薦收藏</p>
<p><a href="http://codex.wordpress.org/Plugin_API">http://codex.wordpress.org/Plugin_API</a></p>
<p><a href="http://codex.wordpress.org/The_Loop">http://codex.wordpress.org/The_Loop</a></p>
<p>filter 介紹：<a href="http://codex.wordpress.org/Plugin_API/Filter_Reference">http://codex.wordpress.org/Plugin_API/Filter_Reference</a></p>
<p>插入文章tag: <a href="http://codex.wordpress.org/Function_Reference/add_shortcode">http://codex.wordpress.org/Function_Reference/add_shortcode</a></p>
<p>http://codex.wordpress.org/Function_Reference/add_filter</p>
<div style="text-align:center;width:100%;"><div style="margin:0px 0px 0px 0px;"><script type="text/javascript"><!--
google_ad_client = "pub-5237544886808594";
/* 300x250, 已建立 2009/2/20 */
google_ad_slot = "8308848689";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div><img src="http://www.rockfu.net/blog/?ak_action=api_record_view&id=2912&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.rockfu.net/blog/2011/12/website/wordpress/wordpress-%e9%96%8b%e7%99%bc%e6%8f%92%e4%bb%b6%e5%bf%85%e7%9c%8b%e6%96%87%e7%ab%a0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>joomla 1.7 筆記</title>
		<link>http://www.rockfu.net/blog/2011/09/website/joomla-website/joomla-1-7-%e7%ad%86%e8%a8%98/</link>
		<comments>http://www.rockfu.net/blog/2011/09/website/joomla-website/joomla-1-7-%e7%ad%86%e8%a8%98/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 14:57:13 +0000</pubDate>
		<dc:creator>rockfu</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[joomla 1.7]]></category>
		<category><![CDATA[login form]]></category>
		<category><![CDATA[登入]]></category>

		<guid isPermaLink="false">http://www.rockfu.net/blog/?p=2890</guid>
		<description><![CDATA[<br/>雖然Joomla 1.5 用得很順暢，不過最近心癢，為其中一個客戶裝上1.7，結果也看到了不是新就是好的問題。其實1.6 和1.7 joomla 真的不知道在搞什麼飛機，功能上不算強大了(對比wordpress)，但有些地方卻退步了。 今天的筆記就是joomla 1.7 的登入。在用戶體驗方面，1.7 好像忽略了這點(希望不是我的無知)，在無法瀏覽的地方，都給上error： 『you are not authorized to view this resource』。真的很嚇人，就這麼一句，那要人怎麼才能看呢？不知道，沒下文。其實看到這句，有幾個問題會導致： 1. 文章已經被移到垃圾桶，或不發布，但連接還在 2.權限問題，無法看 3.地址已經被改了 4.有些文章設定了閱讀期限，過期了 其實在1.6後有一個redirect 的東西，就是把錯誤的東西都重新轉到某一個網頁。不過這方法在一些權限問題無法解決，例如某文章需要登入觀看，不能一個一個redirect吧。而且提示錯誤不是很好的做法，網上找不到插件，因此我只能對內核進行修改！ joomla 1.7 無法瀏覽時提示登入的方法： 修改文件，記得先備份：components/com_content/views/article/view.html.php 查找if ($item-&#62;params-&#62;get(&#8216;access-view&#8217;) 你會看到下面有這幾個 JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR')); return 把他刪除，用下面代替，  // 提示登入頁面      &#8230; <a href="http://www.rockfu.net/blog/2011/09/website/joomla-website/joomla-1-7-%e7%ad%86%e8%a8%98/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<br/><p>雖然Joomla 1.5 用得很順暢，不過最近心癢，為其中一個客戶裝上1.7，結果也看到了不是新就是好的問題。其實1.6 和1.7 joomla 真的不知道在搞什麼飛機，功能上不算強大了(對比wordpress)，但有些地方卻退步了。</p>
<p>今天的筆記就是joomla 1.7 的登入。在用戶體驗方面，1.7 好像忽略了這點(希望不是我的無知)，在無法瀏覽的地方，都給上error： 『you are not authorized to view this resource』。真的很嚇人，就這麼一句，那要人怎麼才能看呢？不知道，沒下文。其實看到這句，有幾個問題會導致：</p>
<p>1. 文章已經被移到垃圾桶，或不發布，但連接還在</p>
<p>2.權限問題，無法看</p>
<p>3.地址已經被改了</p>
<p>4.有些文章設定了閱讀期限，過期了</p>
<p>其實在1.6後有一個redirect 的東西，就是把錯誤的東西都重新轉到某一個網頁。不過這方法在一些權限問題無法解決，例如某文章需要登入觀看，不能一個一個redirect吧。而且提示錯誤不是很好的做法，網上找不到插件，因此我只能對內核進行修改！</p>
<p>joomla 1.7 無法瀏覽時提示登入的方法：</p>
<p>修改文件，記得先備份：components/com_content/views/article/view.html.php</p>
<p>查找if ($item-&gt;params-&gt;get(&#8216;access-view&#8217;)</p>
<p>你會看到下面有這幾個</p>
<pre>JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR'));

				return</pre>
<p>把他刪除，用下面代替，</p>
<pre> // 提示登入頁面
           $uri = JFactory::getURI();
           $app-&gt;redirect('index.php?option=com_users&amp;view=login&amp;return=' . base64_encode($uri), JText::_('此頁面需要會員登入才能登入'));

           return;</pre>
<p>這樣就修改完成，在提示無權時就會出現登入窗口，在此做一個記號，希望有用。</p>
<img src="http://www.rockfu.net/blog/?ak_action=api_record_view&id=2890&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.rockfu.net/blog/2011/09/website/joomla-website/joomla-1-7-%e7%ad%86%e8%a8%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>joomla framework</title>
		<link>http://www.rockfu.net/blog/2011/09/website/joomla-website/joomla-framework/</link>
		<comments>http://www.rockfu.net/blog/2011/09/website/joomla-website/joomla-framework/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 10:56:51 +0000</pubDate>
		<dc:creator>rockfu</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[模板]]></category>
		<category><![CDATA[風格]]></category>

		<guid isPermaLink="false">http://www.rockfu.net/blog/?p=2869</guid>
		<description><![CDATA[<br/>Joomla 是一個非常出名的CMS系統，在很早的時候就認識它，一開始還是mambo，以前讀中學的時候知識少，英文也很弱，中文的支援很少，到現在，假如說joomla，應該是台灣對這方面的支援比較多，香港機會沒見。 在對joomla 的template 風格製作後，才慢慢懂得joomla 整個系統的功能，現在對整個系統可以說算是熟悉。但是在自己開發製作風格時，很多時候都會遇到問題，例如Menu, content 等，製作一個風格是很花時間的事，因為每一樣都需要時間去定義設計。而且還要適應不同瀏覽器，有沒有比較簡單的方法呢？ 做過風格的人應該都有同樣的煩惱，因此一些以風格製作為生的外國人製作一些framework，也就是一些框架。framework 這些年來很流行，例如jQuery就是一個很出面的framework，利用那的框架就能很簡單的實現一些效果，如漸變。joomla template framework 也是用同樣道理，把複雜的東西簡單化，framework 已經提供了很多框架給你，設計者只需開關，對不同的位置的外觀添加自己的css，就已經可以改變的外貌。而且framework已經自帶了很多JS，例如menu 的js，不用擔心不會寫多層次的menu js，你需要的是定義樣式。 目前比較流行的joomla template framework 幾個，主要是一些很出名風格開發者製作的 1. JA T3 開發者：JoomlArt.com http://wiki.joomlart.com/wiki/JA_T3_Framework_2/Overview joomlart 開發的風格模板相信很多人都見過，而它提供的framework更是功能強大，而且配合ajax，很容易控制。 開發指南：http://wiki.joomlart.com/wiki/JA_T3_Framework_2/Guides joomlart 還提供了視頻教學，教導你如何製作風格，十分全面，入門不難。 http://www.youtube.com/user/JoomlArt#p/c/4/NU2-a0lLKQ0 2.Gantry 開發者：RocketTheme.com http://gantry-framework.org/ gantry 比起JA T3 比較直觀簡單，支援960 grid 系統，教學指導比起JA 專業很多哦。 &#8230; <a href="http://www.rockfu.net/blog/2011/09/website/joomla-website/joomla-framework/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<br/><p>Joomla 是一個非常出名的CMS系統，在很早的時候就認識它，一開始還是mambo，以前讀中學的時候知識少，英文也很弱，中文的支援很少，到現在，假如說joomla，應該是台灣對這方面的支援比較多，香港機會沒見。</p>
<p>在對joomla 的template 風格製作後，才慢慢懂得joomla 整個系統的功能，現在對整個系統可以說算是熟悉。但是在自己開發製作風格時，很多時候都會遇到問題，例如Menu, content 等，製作一個風格是很花時間的事，因為每一樣都需要時間去定義設計。而且還要適應不同瀏覽器，有沒有比較簡單的方法呢？ 做過風格的人應該都有同樣的煩惱，因此一些以風格製作為生的外國人製作一些framework，也就是一些框架。framework 這些年來很流行，例如jQuery就是一個很出面的framework，利用那的框架就能很簡單的實現一些效果，如漸變。joomla template framework 也是用同樣道理，把複雜的東西簡單化，framework 已經提供了很多框架給你，設計者只需開關，對不同的位置的外觀添加自己的css，就已經可以改變的外貌。而且framework已經自帶了很多JS，例如menu 的js，不用擔心不會寫多層次的menu js，你需要的是定義樣式。</p>
<p>目前比較流行的joomla template framework 幾個，主要是一些很出名風格開發者製作的</p>
<p>1. JA T3 開發者：JoomlArt.com</p>
<p><a href="http://wiki.joomlart.com/wiki/JA_T3_Framework_2/Overview">http://wiki.joomlart.com/wiki/JA_T3_Framework_2/Overview</a></p>
<p>joomlart 開發的風格模板相信很多人都見過，而它提供的framework更是功能強大，而且配合ajax，很容易控制。</p>
<p>開發指南：<a href="http://wiki.joomlart.com/wiki/JA_T3_Framework_2/Guides">http://wiki.joomlart.com/wiki/JA_T3_Framework_2/Guides</a></p>
<p>joomlart 還提供了視頻教學，教導你如何製作風格，十分全面，入門不難。</p>
<p><a href="http://www.youtube.com/user/JoomlArt#p/c/4/NU2-a0lLKQ0">http://www.youtube.com/user/JoomlArt#p/c/4/NU2-a0lLKQ0</a></p>
<p>2.Gantry 開發者：RocketTheme.com</p>
<p><a href="http://gantry-framework.org/">http://gantry-framework.org/</a></p>
<p>gantry 比起JA T3 比較直觀簡單，支援960 grid 系統，教學指導比起JA 專業很多哦。</p>
<p>3.Warp yootheme.com</p>
<p><a href="http://www.yootheme.com/warp/Warp">http://www.yootheme.com/warp/Warp</a></p>
<p>warp 已經到5.5 了， 其提供了很多開發工具，而且也提供了很多module ，如slider,gallery 等給用家，有了這些工具，也許就不需要頭疼去找一些可用的模組了</p>
<p><a href="http://www.yootheme.com/docs/home/category/yootools">http://www.yootheme.com/docs/home/category/yootools</a></p>
<p>4.T3 開發者：Gavick.com</p>
<p><a href="http://www.gavickmagazine.com/home/itemlist/category/33-gavern-framework.html">http://www.gavickmagazine.com/home/itemlist/category/33-gavern-framework.html</a></p>
<p>這個還是比較少人用，對比前3個，支援方面也是比較少，也許與團隊有關。</p>
<p>5. Zend Grid 開發者：JoomlaBamboo</p>
<p><a href="http://docs.joomlabamboo.com/zen-grid-framework">http://docs.joomlabamboo.com/zen-grid-framework</a></p>
<p>&nbsp;</p>
<p>joomlabamboo 提供的不止是zend grid, 還有jb library，zend grid 商業性質很重，支援也不見多。</p>
<p>6. yougrids 開發者：youjoomla.com</p>
<p><a href="http://yjsimplegrid.com/">http://yjsimplegrid.com/</a></p>
<p>目前我見過的就是以上framework，入門很簡單，對設計的工作可以起到很大作用，起碼省了很多時間去適應不同的瀏覽器。</p>
<p>&nbsp;</p>
<img src="http://www.rockfu.net/blog/?ak_action=api_record_view&id=2869&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.rockfu.net/blog/2011/09/website/joomla-website/joomla-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress wp ecommerce last product</title>
		<link>http://www.rockfu.net/blog/2011/08/website/wordpress/wordpress-wp-ecommerce/</link>
		<comments>http://www.rockfu.net/blog/2011/08/website/wordpress/wordpress-wp-ecommerce/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 08:53:31 +0000</pubDate>
		<dc:creator>rockfu</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[last product]]></category>
		<category><![CDATA[wp ecommerce]]></category>

		<guid isPermaLink="false">http://www.rockfu.net/blog/?p=2845</guid>
		<description><![CDATA[<br/>wordpress 設計theme 時需要在首頁取得wp ecommerce 的最新產品資料，可以用以下方法，輸出圖片，和title，網上找沒什麼資料，只好自己在widget 改一下那來用 global $wpdb; $args = wp_parse_args( (array)$args, array( &#039;number&#039; =&#62; 5 ) ); $number = 3; $image = true; $width = 150; $height = 150; $latest_products = get_posts( array( &#039;post_type&#039; =&#62; &#039;wpsc-product&#039;, &#039;numberposts&#039; =&#62; $number, &#8230; <a href="http://www.rockfu.net/blog/2011/08/website/wordpress/wordpress-wp-ecommerce/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<br/><p>wordpress 設計theme 時需要在首頁取得wp ecommerce 的最新產品資料，可以用以下方法，輸出圖片，和title，網上找沒什麼資料，只好自己在widget 改一下那來用</p>
<pre class="brush: php">
	global $wpdb;
	$args = wp_parse_args( (array)$args, array( &#039;number&#039; =&gt; 5 ) );

	$number  = 3;
	$image  = true;

		$width = 150;

		$height = 150;

	$latest_products = get_posts( array(
		&#039;post_type&#039;   =&gt; &#039;wpsc-product&#039;,
		&#039;numberposts&#039; =&gt; $number,
		&#039;orderby&#039;     =&gt; &#039;post_date&#039;,
		&#039;post_parent&#039; =&gt; 0,
		&#039;post_status&#039; =&gt; &#039;publish&#039;,
		&#039;order&#039;       =&gt; &#039;DESC&#039;
	) );
	$output = &#039;&#039;;

	if ( count( $latest_products ) &gt; 0 ) {
		$output .= &#039;&lt;ul class=&quot;wpsc-latest-products&quot;&gt;&#039;;
		foreach ( $latest_products as $latest_product ) {
			$output .= &#039;&lt;li class=&quot;wpsc-latest-product&quot;&gt;&#039;;
			// Thumbnails, if required
			if ($image) {
				$output .= &#039;&lt;div class=&quot;item_image&quot;&gt;&#039;;
				$output .= &#039;&lt;a href=&quot;&#039; . wpsc_product_url( $latest_product-&gt;ID, null ) . &#039;&quot;&gt;&#039;;
				$attached_images = (array)get_posts( array(
					&#039;post_type&#039;   =&gt; &#039;attachment&#039;,
					&#039;numberposts&#039; =&gt; 1,
					&#039;post_status&#039; =&gt; null,
					&#039;post_parent&#039; =&gt; $latest_product-&gt;ID,
					&#039;orderby&#039;     =&gt; &#039;menu_order&#039;,
					&#039;order&#039;       =&gt; &#039;ASC&#039;
				) );
				$attached_image = $attached_images[0];
				if ( $attached_image-&gt;ID &gt; 0 )
						$output .= &#039;&lt;img src=&quot;&#039; . wpsc_product_image( $attached_image-/&gt;ID, $width, $height ) . &#039;&quot; title=&quot;&#039; . $latest_product-&gt;post_title . &#039;&quot; alt=&quot;&#039; . $latest_product-&gt;post_title . &#039;&quot; /&gt;&#039;;
				else
					$output .=&#039;&lt;img class=&quot;no-image&quot; id=&quot;product_image_&#039;.wpsc_the_product_id().&#039;&quot; alt=&quot;No Image&quot; title=&quot;&#039;.wpsc_the_product_title().&#039;&quot; src=&quot;&#039;.WPSC_URL.&#039;/wpsc-theme/wpsc-images/noimage.png&quot; width=&quot;&#039; . $width . &#039;&quot; height=&quot;&#039; . $height . &#039;&quot; /&gt;&#039;;

				$output .= &#039;&lt;/a&gt;&#039;;
				$output .= &#039;&lt;/div&gt;&#039;;
			}
			// Link
			$output .= &#039;&lt;a href=&quot;&#039; . wpsc_product_url( $latest_product-&gt;ID, null ) . &#039;&quot; class=&quot;wpsc-product-title&quot;&gt;&#039;.stripslashes( $latest_product-&gt;post_title ).&#039;&lt;/a&gt;&#039;;
			$output .= &#039;&lt;/li&gt;&#039;;
		}
		$output .= &quot;&lt;/ul&gt;&quot;;
	}
	echo $output;
</pre>
<img src="http://www.rockfu.net/blog/?ak_action=api_record_view&id=2845&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.rockfu.net/blog/2011/08/website/wordpress/wordpress-wp-ecommerce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>優化css 性能</title>
		<link>http://www.rockfu.net/blog/2011/07/website/css/%e5%84%aa%e5%8c%96css-%e6%80%a7%e8%83%bd/</link>
		<comments>http://www.rockfu.net/blog/2011/07/website/css/%e5%84%aa%e5%8c%96css-%e6%80%a7%e8%83%bd/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 06:55:27 +0000</pubDate>
		<dc:creator>rockfu</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[selector]]></category>

		<guid isPermaLink="false">http://www.rockfu.net/blog/?p=2834</guid>
		<description><![CDATA[<br/>在製作theme 時經常會碰到的問題就是css 的object, element等如何去定義樣式，由於自己以上沒有什麼習慣，做了一次放下了後，之後要跟進覺得很難，後來有空看了一些高手的文章後，慢慢懂得在id 和class 之間的取捨，還有就是element 的定義，今天看了一個ppt：taming css selectors 馴服css 選擇器。簡單的幾版很簡單，不過卻說了一些以前經常會犯的問題，一些習慣遵守了，有利於查看，修改，更能優化css 效率，減少錯誤，值得一看哦。 http://www.slideshare.net/stubbornella/taming-css-selectors &#160;]]></description>
			<content:encoded><![CDATA[<br/><p>在製作theme 時經常會碰到的問題就是css 的object, element等如何去定義樣式，由於自己以上沒有什麼習慣，做了一次放下了後，之後要跟進覺得很難，後來有空看了一些高手的文章後，慢慢懂得在id 和class 之間的取捨，還有就是element 的定義，今天看了一個ppt：taming css selectors 馴服css 選擇器。簡單的幾版很簡單，不過卻說了一些以前經常會犯的問題，一些習慣遵守了，有利於查看，修改，更能優化css 效率，減少錯誤，值得一看哦。</p>
<p><a href="http://www.slideshare.net/stubbornella/taming-css-selectors">http://www.slideshare.net/stubbornella/taming-css-selectors</a></p>
<p>&nbsp;</p>
<img src="http://www.rockfu.net/blog/?ak_action=api_record_view&id=2834&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.rockfu.net/blog/2011/07/website/css/%e5%84%aa%e5%8c%96css-%e6%80%a7%e8%83%bd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress 判斷首頁</title>
		<link>http://www.rockfu.net/blog/2011/07/website/wordpress/wordpress-is-front-page/</link>
		<comments>http://www.rockfu.net/blog/2011/07/website/wordpress/wordpress-is-front-page/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 05:56:02 +0000</pubDate>
		<dc:creator>rockfu</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[is front page]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.rockfu.net/blog/?p=2821</guid>
		<description><![CDATA[<br/>wordpress theme 製作記錄 今日製作到sidebar 時，突然常用的is_front_page() 不能使用，於是改用了is_home() 代之，又正常了，沒有時間去查證，初步估計可能是因為設定了首頁為某指定頁面有關。]]></description>
			<content:encoded><![CDATA[<br/><p>wordpress theme 製作記錄</p>
<p>今日製作到sidebar 時，突然常用的is_front_page() 不能使用，於是改用了is_home() 代之，又正常了，沒有時間去查證，初步估計可能是因為設定了首頁為某指定頁面有關。</p>
<img src="http://www.rockfu.net/blog/?ak_action=api_record_view&id=2821&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.rockfu.net/blog/2011/07/website/wordpress/wordpress-is-front-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>discuz facebook connect</title>
		<link>http://www.rockfu.net/blog/2011/06/website/discuz/discuz-facebook-connect/</link>
		<comments>http://www.rockfu.net/blog/2011/06/website/discuz/discuz-facebook-connect/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 06:53:18 +0000</pubDate>
		<dc:creator>rockfu</dc:creator>
				<category><![CDATA[discuz]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[facebook connect]]></category>
		<category><![CDATA[x1.5]]></category>
		<category><![CDATA[x2.0]]></category>
		<category><![CDATA[同步]]></category>

		<guid isPermaLink="false">http://www.rockfu.net/blog/?p=2815</guid>
		<description><![CDATA[<br/>一直有留意facebook 與discuz x1.5 connect 的發展，之前討論過一些插件，不過不是很完美。這次介紹一個比較好的，雖然不能說完美，但已經可以實現用facebook登入。 來自tw-cf.net的discuz x1.5，discuz x2.0 facebook connect 插件，其功能可以實現facebook 進行註冊和登入，為何說是註冊呢？ 因為discuz 的不可以同名的，而且還是有密碼的，因此第一次註冊時是需要填寫用戶名和密碼，不同人在討論區都想有自己獨特的名字，跟facebook就不同了，自訂密碼可以直接用用戶名登入，回到大陸時也可以繼續用。 我用discuz x1.5 做了測試，效果還不錯，就是安裝時還需要人手改動系統文件，其實這是我最不想要的，因為更改核心對以後升級很不方便。 因此假如你需要安裝，切記你已經更改過相關文件，下次升級也要一同對比更改。 再來是沒有相應的控制台可以查看用facebook 註冊的會員，基本上都是在數據庫修改，不是很方便，希望可以以後更新繼續更新。 安裝方法： 1. 將 facebook_connect 整個目錄，放至插件資料夾 ./source/plugin。 2. 後台啟用插件，並進行設置插件，輸入您的Facebook應用程式ID、密鑰、UCenter路徑 (若DZ與UC是分開安裝，才需要輸入UCenter路徑)。 3. 將[替換檔案]資料夾內所有檔案上傳覆蓋。 4. 到後台更新緩存。 discuz x1.5  facebook connect下載： http://www.multiupload.com/I7K6LFZBXI 解壓密碼：tw-cf.net discuz &#8230; <a href="http://www.rockfu.net/blog/2011/06/website/discuz/discuz-facebook-connect/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<br/><p>一直有留意facebook 與discuz x1.5 connect 的發展，之前討論過一些插件，不過不是很完美。這次介紹一個比較好的，雖然不能說完美，但已經可以實現用facebook登入。</p>
<p>來自tw-cf.net的discuz x1.5，discuz x2.0 facebook connect 插件，其功能可以實現facebook 進行註冊和登入，為何說是註冊呢？ 因為discuz 的不可以同名的，而且還是有密碼的，因此第一次註冊時是需要填寫用戶名和密碼，不同人在討論區都想有自己獨特的名字，跟facebook就不同了，自訂密碼可以直接用用戶名登入，回到大陸時也可以繼續用。</p>
<p>我用discuz x1.5 做了測試，效果還不錯，就是安裝時還需要人手改動系統文件，其實這是我最不想要的，因為更改核心對以後升級很不方便。</p>
<p>因此假如你需要安裝，切記你已經更改過相關文件，下次升級也要一同對比更改。</p>
<p>再來是沒有相應的控制台可以查看用facebook 註冊的會員，基本上都是在數據庫修改，不是很方便，希望可以以後更新繼續更新。</p>
<p>安裝方法：</p>
<p>1. 將 facebook_connect 整個目錄，放至插件資料夾 ./source/plugin。<br />
2. 後台啟用插件，並進行設置插件，輸入您的Facebook應用程式ID、密鑰、UCenter路徑 (若DZ與UC是分開安裝，才需要輸入UCenter路徑)。<br />
3. 將[替換檔案]資料夾內所有檔案上傳覆蓋。<br />
4. 到後台更新緩存。</p>
<p>discuz x1.5  facebook connect下載：</p>
<p><a rel="no-re" href="http://www.multiupload.com/I7K6LFZBXI" target="_blank">http://www.multiupload.com/I7K6LFZBXI</a><br />
解壓密碼：<strong>tw-cf.net</strong></p>
<p>discuz x2.0  facebook connect下載：</p>
<p><a rel="no-re" href="http://www.multiupload.com/CBN5H2RAFR" target="_blank">http://www.multiupload.com/CBN5H2RAFR</a><br />
解壓密碼：<strong>tw-cf.net</strong></p>
<p>上面的網址可能失效或不是最新版本，請看來源：</p>
<p>discuz x1.5  facebook connect：http://tw-cf.net/?p=2893</p>
<p>discuz x2.0  facebook connect：http://tw-cf.net/?p=2916</p>
<img src="http://www.rockfu.net/blog/?ak_action=api_record_view&id=2815&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.rockfu.net/blog/2011/06/website/discuz/discuz-facebook-connect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress 自定rss 內容</title>
		<link>http://www.rockfu.net/blog/2011/05/website/code/wordpress-diy-rss-feed/</link>
		<comments>http://www.rockfu.net/blog/2011/05/website/code/wordpress-diy-rss-feed/#comments</comments>
		<pubDate>Thu, 19 May 2011 15:09:08 +0000</pubDate>
		<dc:creator>rockfu</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.rockfu.net/blog/?p=2802</guid>
		<description><![CDATA[<br/>wordprss 可以選擇訂閱內容全部顯示或部分顯示，假如部分顯示，也許有些東西在底部推薦給讀者的看不到，這裡有個方法，在function 裡面加上一段 if ( !function_exists(&#039;custom_feed_footer&#039;) ){        function custom_feed_footer($content)         {                if(is_feed())                $content .= &#039;自定內容&#039;;              &#8230; <a href="http://www.rockfu.net/blog/2011/05/website/code/wordpress-diy-rss-feed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<br/><p>wordprss 可以選擇訂閱內容全部顯示或部分顯示，假如部分顯示，也許有些東西在底部推薦給讀者的看不到，這裡有個方法，在function 裡面加上一段</p>
<pre class="brush: php">

if ( !function_exists(&#039;custom_feed_footer&#039;) ){        function custom_feed_footer($content)         {                if(is_feed())                $content .= &#039;自定內容&#039;;                return $content;        }        add_filter(&#039;the_excerpt_rss&#039;, &#039;custom_feed_footer&#039;);        add_filter(&#039;the_content&#039;, &#039;custom_feed_footer&#039;);}
</pre>
<p>記錄一下，希望有用</p>
<p>來自：<a href="http://www.wordpress.la/custom-feed-bottom-content.html">http://www.wordpress.la/custom-feed-bottom-content.html</a></p>
<img src="http://www.rockfu.net/blog/?ak_action=api_record_view&id=2802&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.rockfu.net/blog/2011/05/website/code/wordpress-diy-rss-feed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wordprss taxonomy 是什麼</title>
		<link>http://www.rockfu.net/blog/2011/05/website/wordpress/wordprss-taxonomy-%e6%98%af%e4%bb%80%e9%ba%bc/</link>
		<comments>http://www.rockfu.net/blog/2011/05/website/wordpress/wordprss-taxonomy-%e6%98%af%e4%bb%80%e9%ba%bc/#comments</comments>
		<pubDate>Mon, 09 May 2011 04:21:00 +0000</pubDate>
		<dc:creator>rockfu</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.rockfu.net/blog/2011/05/website/wordpress/wordprss-taxonomy-%e6%98%af%e4%bb%80%e9%ba%bc/</guid>
		<description><![CDATA[<br/>Taxonomy 的意思是一個分類學，wordpress 運用taxonomy 的地方很多，例如category(類別)，tag(標籤)，link category(連結分類)。到了2.3版本後，custom taxonomies 開始實現，用戶可以自定自己的分類 WordPress 是如何註冊一個taxonomy的？ 利用下面的代碼可以建議一個&#8221;people&#8221;的taxonomy，文章類型是post function people_init() { // create a new taxonomy register_taxonomy( &#039;people&#039;, &#039;post&#039;, array( &#039;label&#039; = __(&#039;People&#039;), &#039;sort&#039; = true, &#039;args&#039; = array(&#039;orderby&#039; = &#039;term_order&#039;), &#039;rewrite&#039; =array(&#039;slug&#039; = &#039;person&#039;) ) ); } &#8230; <a href="http://www.rockfu.net/blog/2011/05/website/wordpress/wordprss-taxonomy-%e6%98%af%e4%bb%80%e9%ba%bc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<br/><p>Taxonomy 的意思是一個分類學，wordpress 運用taxonomy 的地方很多，例如category(類別)，tag(標籤)，link category(連結分類)。到了2.3版本後，custom taxonomies 開始實現，用戶可以自定自己的分類</p>
<p>WordPress 是如何註冊一個taxonomy的？</p>
<p>利用下面的代碼可以建議一個&#8221;people&#8221;的taxonomy，文章類型是post</p>
<pre class="brush: php">
function people_init() {
// create a new taxonomy
register_taxonomy(
&#039;people&#039;,
&#039;post&#039;,
array(
&#039;label&#039; = __(&#039;People&#039;),
&#039;sort&#039; = true,
&#039;args&#039; = array(&#039;orderby&#039; = &#039;term_order&#039;),
&#039;rewrite&#039; =array(&#039;slug&#039; = &#039;person&#039;)
)
);
}
add_action( &#039;init&#039;, &#039;people_init&#039; );
</pre>
<p>通常都會給這些特殊的分類自定風格主題，因此會給他們定義terms</p>
<p>the_terms( $post-&gt;ID, &#8216;people&#8217;, &#8216;People: &#8216;, &#8216;, &#8216;, &#8216; &#8216; );</p>
<p>如何列出主題呢？</p>
<p>query_posts( array( &#8216;people&#8217; =&gt; &#8216;bob&#8217;, &#8216;posts_per_page&#8217; =&gt; 10 ) );</p>
<p>&nbsp;</p>
<p>根據風格主題文件查詢表可以知道，taxonomy 是先查詢taxonomy-taxonomy-term.php 再查詢taxonomy-taxonomy.php最後才是taxonomy.php</p>
<p>參考文章：<a href="http://codex.wordpress.org/Taxonomies">http://codex.wordpress.org/Taxonomies</a></p>
<p><a href="http://codex.wordpress.org/File:Template_Hierarchy.png">http://codex.wordpress.org/File:Template_Hierarchy.png</a></p>
<img src="http://www.rockfu.net/blog/?ak_action=api_record_view&id=2794&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.rockfu.net/blog/2011/05/website/wordpress/wordprss-taxonomy-%e6%98%af%e4%bb%80%e9%ba%bc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress attachment images</title>
		<link>http://www.rockfu.net/blog/2011/05/website/code/wordpress-attachment-images/</link>
		<comments>http://www.rockfu.net/blog/2011/05/website/code/wordpress-attachment-images/#comments</comments>
		<pubDate>Sat, 07 May 2011 03:14:16 +0000</pubDate>
		<dc:creator>rockfu</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.rockfu.net/blog/?p=2787</guid>
		<description><![CDATA[<br/>最近做主題時要用到wordpress 附件圖片，在看數據庫時發現，原來每一個附件都是作為一個post插入數據庫，只是post-type不同，而且還有是屬於哪個post。在文章中也可以直接插入gallery。 看到這些功能，心動了，只是這些自帶的功能缺乏的東西就是附件圖片的描述。 根據說明，取得附件的function 是wp_get_attachment_image($id,size)，這樣加一個foreach就能取得到post裡面的所有附件圖片，不過就是缺少介紹。 用google找到了一篇不錯的文件，寫了一個hack，可以取得附件圖片的title, description /** * Retrieves the attachment data such as Title, Caption, Alt Text, Description * @param int $post_id the ID of the Post, Page, or Custom Post Type * @param String $size The desired &#8230; <a href="http://www.rockfu.net/blog/2011/05/website/code/wordpress-attachment-images/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<br/><p>最近做主題時要用到wordpress 附件圖片，在看數據庫時發現，原來每一個附件都是作為一個post插入數據庫，只是post-type不同，而且還有是屬於哪個post。在文章中也可以直接插入gallery。</p>
<p>看到這些功能，心動了，只是這些自帶的功能缺乏的東西就是附件圖片的描述。</p>
<p>根據說明，取得附件的function 是wp_get_attachment_image($id,size)，這樣加一個foreach就能取得到post裡面的所有附件圖片，不過就是缺少介紹。</p>
<p>用google找到了一篇不錯的文件，寫了一個hack，可以取得附件圖片的title, description</p>
<pre class="brush: php">
/**
* Retrieves the attachment data such as Title, Caption, Alt Text, Description
* @param int $post_id the ID of the Post, Page, or Custom Post Type
* @param String $size The desired image size, e.g. thumbnail, medium, large, full, or a custom size
* @return stdClass If there is only one result, this method returns a generic
* stdClass object representing each of the image&#039;s properties, and an array if otherwise.
*/
function getImageAttachmentData( $post_id, $size = &#039;thumbnail&#039;, $count = 1 )
{
$objMeta = array();
$meta;// (stdClass)
$args = array(
&#039;numberposts&#039; =$count,
&#039;post_parent&#039; =$post_id,
&#039;post_type&#039; = &#039;attachment&#039;,
&#039;nopaging&#039; =false,
&#039;post_mime_type&#039; =&#039;image&#039;,
&#039;order&#039; = &#039;ASC&#039;, // change this to reverse the order
&#039;orderby&#039; = &#039;menu_order ID&#039;, // select which type of sorting
&#039;post_status&#039; = &#039;any&#039;
);

$attachments = get_children($args);

if( $attachments )
{
foreach( $attachments as $attachment )
{
$meta = new stdClass();
$meta-ID = $attachment-ID;
$meta-title = $attachment-post_title;
$meta-caption = $attachment-post_excerpt;
$meta-description = $attachment-post_content;
$meta-alt = get_post_meta($attachment-ID, &#039;_wp_attachment_image_alt&#039;, true);

// Image properties
$props = wp_get_attachment_image_src( $attachment-ID, $size, false );

$meta-properties[&#039;url&#039;] = $props[0];
$meta-properties[&#039;width&#039;] = $props[1];
$meta-properties[&#039;height&#039;] = $props[2];

$objMeta[] = $meta;
}

return ( count( $attachments ) == 1 ) ? $meta : $objMeta;
}
}
</pre>
<p>如何使用：</p>
<pre class="brush: php">
getImageAttachmentData( $_posts-ID, &#039;full&#039; );
</pre>
<p>參考來源：<a href="http://www.farfromfearless.com/">http://www.farfromfearless.com/</a></p>
<p><a href="http://www.newvibes.com/blog/wordpress-get-attachment-title-and-description/">http://www.newvibes.com/blog/wordpress-get-attachment-title-and-description/</a></p>
<img src="http://www.rockfu.net/blog/?ak_action=api_record_view&id=2787&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.rockfu.net/blog/2011/05/website/code/wordpress-attachment-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

