<?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>Horn Network &#187; WordPress</title>
	<atom:link href="http://klcin.tw/net/tag/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://klcin.tw/net</link>
	<description>Horn Network (.NET, ASP.NET, C#, VB.NET, JavaScript, Ubuntu, Android ...)</description>
	<lastBuildDate>Fri, 04 Mar 2011 07:25:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>[WP-Plugin]Sidebar Widget 基礎架構（wp-plugin-base.php）</title>
		<link>http://klcin.tw/net/wp-plugin-base-sidebar-widget</link>
		<comments>http://klcin.tw/net/wp-plugin-base-sidebar-widget#comments</comments>
		<pubDate>Wed, 27 Aug 2008 12:37:26 +0000</pubDate>
		<dc:creator>klcintw</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WP-Plugin]]></category>
		<category><![CDATA[sidebar]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://klcin.tw/net/?p=78</guid>
		<description><![CDATA[本文利用 wp-plugin-base.php 簡單介紹 wordpress plugin 的架構。 前台產生標準 widget 的外觀，內容則是印出設定值。 後台 widget 設定介面，可以修改設定值。 沒有直接（使用 SQL ）變更資料庫。 plugin 基本資料 請參考下圖： 程式碼 &#60;?php /* Plugin Name: widget_name Plugin URI: 網址 Version: 0.1 (版本) Description: 說明文字 Author: klcintw(作者) */ /* 版權宣告 */ /* 常數宣告 */ $_X_WIDGET_NAME = &#34;widget_name&#34;; // 顯示在後台的 widget 名稱 $_X_WIDGET_ID = &#34;widget_id&#34;; // 程式用 widget id [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://klcin.tw/net/wp-content/uploads/2008/08/1.png"><img title="widget" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="155" alt="widget" src="http://klcin.tw/net/wp-content/uploads/2008/08/1-thumb.png" width="176" border="0" style="float:right;"/></a>
<p>本文利用 wp-plugin-base.php 簡單介紹 wordpress plugin 的架構。</p>
<ul>
<li>前台產生標準 widget 的外觀，內容則是印出設定值。</li>
<li>後台 widget 設定介面，可以修改設定值。</li>
<li>沒有直接（使用 SQL ）變更資料庫。</li>
</ul>
<p>  <span id="more-78"></span><br />
<h2>plugin 基本資料</h2>
<p>請參考下圖：</p>
<p align="center"><a href="http://klcin.tw/net/wp-content/uploads/2008/08/snap040.png"><img title="plugin 基本資料" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="262" alt="plugin 基本資料" src="http://klcin.tw/net/wp-content/uploads/2008/08/snap040-thumb.png" width="404" border="0" /></a> </p>
<h2>程式碼</h2>
<p>
<pre class="brush: php">&lt;?php
/*
Plugin Name:    widget_name
Plugin URI:       網址
Version:            0.1 (版本)
Description:     說明文字
Author:             klcintw(作者)
*/
/*  版權宣告 */

/* 常數宣告 */
$_X_WIDGET_NAME = &quot;widget_name&quot;; // 顯示在後台的 widget 名稱
$_X_WIDGET_ID = &quot;widget_id&quot;; // 程式用 widget id
$_X_OPTIONS_KEY = &#039;myWidgetOptions&#039;; // 設定存到資料庫的識別鍵
$_X_OPTIONS_WIDTH = 300; // 後台設定的寬度
$_X_OPTIONS_HEIGHT = 200; // 後台設定的高度
$_X_OPTIONS_DEFAILT[&#039;title&#039;] = &#039;TITLE&#039;;
$_X_OPTIONS_DEFAILT[&#039;int&#039;] = 123;

### Function: 起始Widget
function widget_X_init() {
	if (!function_exists(&#039;register_sidebar_widget&#039;)) return;

	### Function: 功能
	function widget_content($args) {
		// 將 $args 陣列的資訊展開
		extract($args);
		/*  可用 arg 清單：
			$before_widget =&gt; &lt;li id=&quot;widget_name&quot; class=&quot;widget widget_content&quot;&gt;
			$after_widget =&gt; &lt;/li&gt;
			$before_title =&gt; &lt;h2 class=&quot;widgettitle&quot;&gt;
			$after_title =&gt; &lt;/h2&gt;

			$name =&gt; 側邊欄 1
			$id =&gt; sidebar-1
			$widget_id =&gt; widget_name // register_sidebar_widget
			$widget_name =&gt; widget_name // register_sidebar_widget
		*/
		// 取得設定值
		$options = GET_OPTIONS();
		// 輸出前台UI
		echo $before_widget;
		echo $before_title . $options[title] . $after_title;
		echo &#039;&lt;pre&gt;&#039;;
		print_r($options);
		echo &#039;&lt;/pre&gt;&#039;;
		echo $after_widget;
	} // function

	### Function: 設定
	function widget_options() {
		global $_X_OPTIONS_KEY, $_X_WIDGET_ID;
		$options = GET_OPTIONS();

		if ($_POST[$_X_WIDGET_ID.&#039;_is_postback&#039;]) {
			// 讀取新設定值
			$options[&#039;title&#039;] = strip_tags($_POST[$_X_WIDGET_ID.&#039;_title&#039;]);
			$options[&#039;int&#039;] = intval($_POST[$_X_WIDGET_ID.&#039;_int&#039;]);
			update_option($_X_OPTIONS_KEY, $options);
		} // if

		/* 設定畫面 */
		echo &#039;
&lt;p&gt;&lt;label for=&quot;&#039;.$_X_WIDGET_ID.&#039;_title&quot;&gt;標題：&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;&#039;.$_X_WIDGET_ID.&#039;_title&quot; value=&quot;&#039;.$options[&#039;title&#039;].&#039;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;label for=&quot;&#039;.$_X_WIDGET_ID.&#039;_int&quot;&gt;數字：&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;&#039;.$_X_WIDGET_ID.&#039;_int&quot; value=&quot;&#039;.$options[&#039;int&#039;].&#039;&quot; /&gt;&lt;/p&gt;
&lt;input type=&quot;hidden&quot; name=&quot;&#039;.$_X_WIDGET_ID.&#039;_is_postback&quot; id=&quot;is_postback&quot; value=&quot;1&quot; /&gt;
&#039;;
	} // function

	### Helper Function : 取得設定
	function GET_OPTIONS() {
		global $_X_OPTIONS_KEY, $_X_OPTIONS_DEFAILT;
		$options = get_option($_X_OPTIONS_KEY);
		if (!is_array($options)) {
			$options = $_X_OPTIONS_DEFAILT;
		} // if
		return $options;
	}

	/* 註冊 Widget */
	global $_X_WIDGET_NAME,$_X_OPTIONS_WIDTH,$_X_OPTIONS_HEIGHT;
	register_sidebar_widget($_X_WIDGET_NAME, &#039;widget_content&#039;);
	register_widget_control($_X_WIDGET_NAME, &#039;widget_options&#039;,$_X_OPTIONS_WIDTH, $_X_OPTIONS_HEIGHT);

} // function

/* 加入WP系統 */
//add_action(&#039;wp_head&#039;, &#039;AddScriptOrCss&#039;);
add_action(&#039;plugins_loaded&#039;, &#039;widget_X_init&#039;);
?&gt;
</pre>
</p>
<h3>註冊及登記</h3>
<ol>
<li>add_action(<strong>&#8216;plugins_loaded&#8217;</strong>, <strong>&#8216;widget_X_init&#8217;</strong>);      <br />將 widget_X_init 註冊到 WP 系統中，在 plugins_loaded 的事件中呼叫執行。</li>
<li>register_sidebar_widget($_X_WIDGET_NAME, <strong>&#8216;widget_content&#8217;</strong>);      <br />向 WP 系統登記這個 plugin 支援 widget，其內容裡 widget_content 負責處理。</li>
<li>register_widget_control($_X_WIDGET_NAME, <strong>&#8216;widget_options&#8217;</strong>,$_X_OPTIONS_WIDTH, $_X_OPTIONS_HEIGHT);      <br />向 WP 系統登記這個 plugin 的 widget 可以由使用者變更設定值 ，其內容裡 widget_options 負責處理。</li>
</ol>
<h3>其它函式</h3>
<ul>
<li>function widget_content($args)     <br />前台UI呈現</li>
<li>function widget_options()     <br />後台設定</li>
<li>function GET_OPTIONS()     <br />取得設定，若資料庫沒有就傳回預設參數。</li>
</ul>
<h2>重覆使用 wp-plugin-base.php</h2>
<ol>
<li>取代字串「_X_」成為您的新名稱，避免函式名稱重複而發生系統錯誤。</li>
<li>修改 plugin 的基本資料，如作者、說明、版本等。</li>
<li>修改常數宣告的部份以符合您的需求。     <br /><a href="http://klcin.tw/net/wp-content/uploads/2008/08/snap042.png"><img title="常數宣告" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="105" alt="常數宣告" src="http://klcin.tw/net/wp-content/uploads/2008/08/snap042-thumb.png" width="384" border="0" /></a>       <br /><a href="http://klcin.tw/net/wp-content/uploads/2008/08/2.png"><img title="後台設定" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="230" alt="後台設定" src="http://klcin.tw/net/wp-content/uploads/2008/08/2-thumb.png" width="384" border="0" /></a></li>
<li>改寫前台 widget_content </li>
<li>改寫後台 widget_options</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://klcin.tw/net/wp-plugin-base-sidebar-widget/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[WP]修改theme增加Sidebar</title>
		<link>http://klcin.tw/net/wp-register-sidebar</link>
		<comments>http://klcin.tw/net/wp-register-sidebar#comments</comments>
		<pubDate>Mon, 04 Aug 2008 12:00:21 +0000</pubDate>
		<dc:creator>klcintw</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://klcin.tw/net/?p=20</guid>
		<description><![CDATA[以 WP 預設就有的 default 佈景主題（如上圖）為例，要如何在頁尾(footer)的地方可以動態的加上模組(widget) 呢？ 修改 functions.php 註冊新的 sidebar 修改 footer.php 決定 sidebar 的位置 從管理介面增加模組 修改 functions.php 在 \wp-content\themes\default\functions.php 一開始就就註冊（register_sidebar#1）了原本右邊的sidebar。 只要在下面接著加入這段程式就可以在管理介面中看到新的 sidebar 了。 if ( function_exists(&#039;register_sidebar&#039;) ) register_sidebar(array( &#039;name&#039; =&#62; &#039;Sidebar_bottom&#039;, &#039;before_widget&#039; =&#62; &#039;&#60;li id=&#34;%1$s&#34; class=&#34;widget %2$s&#34; x&#62;&#039;, &#039;after_widget&#039; =&#62; &#039;&#60;/li&#62;&#039;, &#039;before_title&#039; =&#62; &#039;&#60;h2 class=&#34;widgettitle&#34;&#62;&#039;, &#039;after_title&#039; =&#62; &#039;&#60;/h2&#62;&#039;, )); 修改 footer.php 接下來就要決定 Sidebar_bottom 要放那兒了。 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://klcin.tw/net/images/WPthemeSidebar_DE3F/snap087.png"><img title="snap087" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="163" alt="snap087" src="http://klcin.tw/net/images/WPthemeSidebar_DE3F/snap087_thumb.png" width="244" border="0" /></a> </p>
<p>以 WP 預設就有的 default 佈景主題（如上圖）為例，要如何在頁尾(footer)的地方可以動態的加上模組(widget) 呢？</p>
<ul>
<li>修改 functions.php 註冊新的 sidebar </li>
<li>修改 footer.php 決定 sidebar 的位置 </li>
<li>從管理介面增加模組 </li>
</ul>
<p> <span id="more-20"></span>
</p>
</p>
<h2>修改 functions.php</h2>
<p>在 \wp-content\themes\default\functions.php 一開始就就註冊（register_sidebar<sup>#1</sup>）了原本右邊的sidebar。</p>
<p><a href="http://klcin.tw/net/images/WPthemeSidebar_DE3F/snap092.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://klcin.tw/net/images/WPthemeSidebar_DE3F/snap092_thumb.png" width="500" border="0" /></a> </p>
<p>只要在下面接著加入這段程式就可以在管理介面中看到新的 sidebar 了。</p>
<pre class="brush: php">if ( function_exists(&#039;register_sidebar&#039;) )
    register_sidebar(array(
    	&#039;name&#039; =&gt; &#039;Sidebar_bottom&#039;,
        &#039;before_widget&#039; =&gt; &#039;&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot; x&gt;&#039;,
        &#039;after_widget&#039; =&gt; &#039;&lt;/li&gt;&#039;,
        &#039;before_title&#039; =&gt; &#039;&lt;h2 class=&quot;widgettitle&quot;&gt;&#039;,
        &#039;after_title&#039; =&gt; &#039;&lt;/h2&gt;&#039;,
    )); </pre>
<p><a href="http://klcin.tw/net/images/WPthemeSidebar_DE3F/snap093.png"><img title="snap093" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="121" alt="snap093" src="http://klcin.tw/net/images/WPthemeSidebar_DE3F/snap093_thumb.png" width="207" border="0" /></a> </p>
<h2>修改 footer.php</h2>
<p>接下來就要決定 Sidebar_bottom 要放那兒了。    <br />因為我們要放在版面下方，所以要修改 footer.php 。</p>
<p>在 \wp-content\themes\default\footer.php 檔案一開始加入程式。</p>
<pre class="brush: php">&lt;br clear=&quot;all&quot; /&gt;
&lt;div id=&quot;Sidebar_bottom&quot;&gt;
&lt;?php if ( !function_exists(&#039;dynamic_sidebar&#039;) ||
	!dynamic_sidebar(&#039;Sidebar_bottom&#039;) ) : ?&gt;
&lt;p&gt;可以從「Design \ Widgets」設定此內容&lt;/p&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;</pre>
<p>如果使用者沒有在 Sidebar_bottom 加入模組就會顯示中間的文字。</p>
<p><a href="http://klcin.tw/net/images/WPthemeSidebar_DE3F/snap094.png"><img title="snap094" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="59" alt="snap094" src="http://klcin.tw/net/images/WPthemeSidebar_DE3F/snap094_thumb.png" width="244" border="0" /></a> </p>
<h2>從管理介面增加模組</h2>
<p>進入管理介面後就可以隨意的加入模組了。</p>
<h4>說明：</h4>
<ol>
<li>register_sidebar 定義在 wp-includes/widget.php</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://klcin.tw/net/wp-register-sidebar/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[WLW]配合WPvideo使用的Windows Live Writer Plug-in</title>
		<link>http://klcin.tw/net/wlw-plugin-wpvideo</link>
		<comments>http://klcin.tw/net/wlw-plugin-wpvideo#comments</comments>
		<pubDate>Fri, 04 Jul 2008 09:26:40 +0000</pubDate>
		<dc:creator>klcintw</dc:creator>
				<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Windows Live Writer]]></category>
		<category><![CDATA[檔案下載]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[metacafe]]></category>
		<category><![CDATA[myvideo]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WPvideo]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[Youtube]]></category>

		<guid isPermaLink="false">http://klcin.tw/net/?p=6</guid>
		<description><![CDATA[WPvideo 簡介： Author: SKaRCHa｜Plugin Site: WPvideo 它可以用[video]http://www.youtube.com/watch?v=osTrMe76kes[/video]這樣的型式在網誌中加入影片。 目前（1.10）支援：youtube.com, video.google.com, video.yahoo.com, www.myvideo.es, www.metacafe.com等影音平台。 其他網站介紹：wordpress.com.tw » Blog Archive » WPvideo 其他網站介紹：活人的幻想世界 » WPvideo &#8211; 在你的部落格內插入影片 其他網站介紹：[外掛] WordPress 對 Youtube 的外掛程式 » Partner Studio WordPress Plugin : 請先到這裡下載並安裝WPvideo的plugin。 Windows Live Writer Plugin : 請先下載 WPvideo.dll 然後複製到 C:\Program Files\Windows Live Writer\Plugins目錄。 啟動Windows Live Writer程式後應該可以看到右下角會多一個項目，如下圖。 用滑鼠點「Insert WPvideo」後會出現如下的畫面： 輸入影片網址再勾選你要的選項然後按「插入程式碼」即可。]]></description>
			<content:encoded><![CDATA[<h2>WPvideo 簡介：</h2>
<ul>
<li>Author: <a href="http://www.skarcha.com/">SKaRCHa</a>｜Plugin Site: <a href="http://www.skarcha.com/wp-plugins/wpvideo/#english">WPvideo</a></li>
<li>它可以用<code>[video]http://www.youtube.com/watch?v=osTrMe76kes[/video]</code>這樣的型式在網誌中加入影片。</li>
<li>目前（1.10）支援：youtube.com, video.google.com, video.yahoo.com, www.myvideo.es, www.metacafe.com等影音平台。</li>
<li>其他網站介紹：<a href="http://www.wordpress.com.tw/wp/?p=33" target="_blank">wordpress.com.tw » Blog Archive » WPvideo</a></li>
<li>其他網站介紹：<a href="http://www.sonax2k.com/php/wordpress/?p=166" target="_blank">活人的幻想世界 » WPvideo &#8211; 在你的部落格內插入影片</a></li>
<li>其他網站介紹：<a href="http://patw.idv.tw/blog/archives/47/" target="_blank">[外掛] WordPress 對 Youtube 的外掛程式 » Partner Studio</a></li>
</ul>
<p><span id="more-6"></span><br />
<h2>WordPress Plugin :</h2>
<ul>
<li>請先到<a title="WPvideo" href="http://www.skarcha.com/wp-plugins/wpvideo/#english" target="_blank">這裡</a>下載並安裝WPvideo的plugin。</li>
</ul>
<h2>Windows Live Writer Plugin :</h2>
<ol>
<li>請先下載 <a href="http://www.box.net/shared/vy7jsgftw0" target="_blank"><strong>WPvideo.dll</strong></a> 然後複製到 <strong>C:\Program Files\Windows Live Writer\Plugins</strong>目錄。</li>
<li>啟動Windows Live Writer程式後應該可以看到右下角會多一個項目，如下圖。<br />
<a href="http://klcin.tw/net/images/WLWWPvideoWindowsLiveWriterPlugin_EFDC/snap069.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="Insert WPvideo" src="http://klcin.tw/net/images/WLWWPvideoWindowsLiveWriterPlugin_EFDC/snap069_thumb.png" border="0" alt="Insert WPvideo" width="205" height="276" /></a></li>
<li>用滑鼠點「Insert WPvideo」後會出現如下的畫面：<br />
<a href="http://klcin.tw/net/images/WLWWPvideoWindowsLiveWriterPlugin_EFDC/snap070.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://klcin.tw/net/images/WLWWPvideoWindowsLiveWriterPlugin_EFDC/snap070_thumb.png" border="0" alt="" width="469" height="216" /></a></li>
<li>輸入影片網址再勾選你要的選項然後按「插入程式碼」即可。</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://klcin.tw/net/wlw-plugin-wpvideo/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[WP]Lightbox加強版-可播放Youtube影片</title>
		<link>http://klcin.tw/net/wp-plugin-lightbox-youtube</link>
		<comments>http://klcin.tw/net/wp-plugin-lightbox-youtube#comments</comments>
		<pubDate>Tue, 01 Jul 2008 15:49:15 +0000</pubDate>
		<dc:creator>klcintw</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[檔案下載]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[swfobject]]></category>
		<category><![CDATA[Youtube]]></category>

		<guid isPermaLink="false">http://klcin.tw/net/?p=4</guid>
		<description><![CDATA[Lightbox 效果已經有許多現成的方法了，Blogspot界有hack在Wordpress界裡也有Plugin可以套用。但是今天要介紹的可不單單只是show show圖片而已，它還能播放Youtube的影片呢！ 效果： 請點 許願池的希臘少女 說明： 這個方法主要是改造由Giuseppe Argento製作的外掛程式(plugin) &#8211; Lightbox 2 資料來源：http://wordpress.org/extend/plugins/lightbox-2-wordpress-plugin/ This plugin includes the new Lightbox JS v2.04 javascript written by Lokesh Dhakar and got transformed into a WordPress Plugin by me. Use the title attribute if you want to show a caption. Plugin Homepage 並參考Javascritp套件 &#8211; Videobox: Lightbox for videos 資料來源：http://videobox-lb.sourceforge.net/ [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Lightbox </strong>效果已經有許多現成的方法了，Blogspot界有hack在Wordpress界裡也有Plugin可以套用。但是今天要介紹的可不單單只是show show圖片而已，它還能播放Youtube的影片呢！</p>
<p>
<h2>效果：</h2>
</p>
<p>請點 <a title="許願池的希臘少女" href="http://tw.youtube.com/watch?v=3gluvKTtTNw" rel="lightbox">許願池的希臘少女</a></p>
</p>
<p><span id="more-4"></span></p>
<h2>說明：</h2>
</p>
<p>這個方法主要是改造由Giuseppe Argento製作的外掛程式(plugin) &#8211; Lightbox 2</p>
<blockquote><p>資料來源：<a title="http://wordpress.org/extend/plugins/lightbox-2-wordpress-plugin/" href="http://wordpress.org/extend/plugins/lightbox-2-wordpress-plugin/">http://wordpress.org/extend/plugins/lightbox-2-wordpress-plugin/</a>       <br />This plugin includes the new <a href="http://www.lokeshdhakar.com/projects/lightbox2/" target="_blank">Lightbox JS</a> v2.04 javascript written by Lokesh Dhakar and got transformed into a WordPress Plugin by me. Use the title attribute if you want to show a caption. <a href="http://www.4mj.it/lightbox-js-v20-wordpress/">Plugin Homepage</a></p>
</blockquote>
<p>並參考Javascritp套件 &#8211; Videobox: Lightbox for videos</p>
<blockquote><p>資料來源：<a title="http://videobox-lb.sourceforge.net/" href="http://videobox-lb.sourceforge.net/">http://videobox-lb.sourceforge.net/</a>       <br />Videobox is a <strong>6kb</strong> script, which shows your videos in the page with an overlay. It was inspired from <a href="http://www.huddletogether.com/projects/lightbox2/">Lightbox.v2</a> and uses some of the <a href="http://www.digitalia.be/software/slimbox/">Slimbox</a>&#8216;s code. It&#8217;s written for the wonderful <a href="http://mootools.net">mootools</a> library. And used <a href="http://blog.deconcept.com/swfobject/">swfobject</a> to embed flash.</p>
</blockquote>
<p>改寫成prototype適用的方法並加入<a href="http://blog.deconcept.com/swfobject/">swfobject</a>處理Youtube影片播放。</p>
<p>
<h2>安裝：</h2>
</p>
<ol>
<li>下載外掛程式 <a href="http://wordpress.org/extend/plugins/lightbox-2-wordpress-plugin/" target="_blank">Lightbox 2</a>，並將檔案解壓縮（如C:\WP\Plugins）。 </li>
<li>下載 <a href="http://code.google.com/p/swfobject/" target="_blank">swfobject</a>，取出其中的 swfobject.js 複製到 C:\WP\Plugins\lightbox-2-wordpress-plugin\lightbox\js </li>
<li>下載經過修改的 <a href="http://www.box.net/shared/kl7hviqkg4" target="_blank">lightbox2.js</a> 更名為 lightbox.js 再複製到 C:\WP\Plugins\lightbox-2-wordpress-plugin\lightbox\js       <br />或       <br />修改 C:\WP\Plugins\lightbox-2-wordpress-plugin\lightbox.php 將 其中的 lightbox.js 改成 lightbox2.js </li>
<li>將C:\WP\Plugins\lightbox-2-wordpress-plugin 整個目錄上傳到網站上的/wp-content/plugins/ </li>
<li>進入管理介面，啟用(activate)外掛程式Lightbox 2。 </li>
</ol>
<p>PS：如果嫌麻煩這裡有打包好的<a href="http://www.box.net/shared/6vq2jdhc08" target="_blank">懶人包</a>，請下載使用。</p>
<p>
<h2>用法：</h2>
</p>
<ul>
<li>在要使用這個效果的連結加上 rel=”lightbox”，程式會判斷是一般圖片或是Youtube的影片。      <br />加上 title=”說明”會在lightbox左下角出現說明。       
<pre class="brush: html">&lt;a title=&quot;許願池的希臘少女&quot; href=&quot;http://tw.youtube.com/watch?v=3gluvKTtTNw&quot; rel=&quot;lightbox&quot;&gt;許願池的希臘少女&lt;/a&gt;</pre>
<p><a href="http://klcin.tw/net/images/WPPlugin_142AA/snap002.png" rel="lightbox"><img title="snap002" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="177" alt="snap002" src="http://klcin.tw/net/images/WPPlugin_142AA/snap002_thumb.png" width="244" border="0" /></a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://klcin.tw/net/wp-plugin-lightbox-youtube/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

