<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="http://120.112.17.17/blog/styles/rss.css" type="text/css"?>
<rss version="0.91">

 <channel>
  <title>豬窩</title>
  <link>http://120.112.17.17/blog/shyong</link>
  <description> 小豬的備忘錄,對錯完全不負責 
</description>
    <item>
   <title>加入 Google 翻譯工具</title>
   <description> 
Google 翻譯真是好用,今天在玩朋友的網站時,發現他將 Google 翻譯加在網頁內,實在很不錯,因為根本不用為自己的網頁寫別的語言版本的網頁,只要加入Google 翻譯,它就會將你的網頁翻成各種語言的網頁,真是太方便了.
 
安裝方法: 
 
	 連上Google 翻譯&nbsp; =&gt;&nbsp; http://translate.google.com/translate_tools&nbsp; 
	 若想要進階設定可以將 Show optional settings 打開,選擇後 將 Script 指令 Copy 再貼到網頁證就可以了&nbsp; 
 
 
ps:因為我是貼在 Lifetype , 而 Lifetype 是用 Smarty 樣本,它的標示會與 Script相沖,所以必需用  {literal}  Google 翻譯的 Script&nbsp;  {/literal}  包起來就可以了   
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/416</link>
      <pubDate>Fri, 20 Aug 2010 22:27:06 +0800</pubDate>   
  </item>
    <item>
   <title>lifetype 突然不能用</title>
   <description>教室 lifetype 突然不能用,網上說是 php5.3 的不相容,可是將 php.ini 的 display_errors = On 後,顯示好像是資料庫的問題,用phpMyAdmin 查看 資料庫顯示資料表 lt_articles_text 使用中,用  REPAIR    TABLE   lt_articles_text 修復後,lifetype就能用了,希望確實恢復正常,順便將版本升級到 lifetype-1.2.10_r6971 
 
       
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/381</link>
      <pubDate>Tue, 02 Mar 2010 19:09:45 +0800</pubDate>   
  </item>
    <item>
   <title>Zoundary Raven 測試</title>
   <description> Zoundary Raven 是一套在本機寫 blog 文章,再發表的本機軟件,也可以將線上Blog的文章備份在個人PC上,這才是這次試用的目的   參考: http://enidhua.blogspot.com/2008/09/zoundry-raven-beta.html  </description>
   <link>http://120.112.17.17/blog/shyong/archives/326</link>
      <pubDate>Wed, 07 Oct 2009 08:28:01 +0800</pubDate>   
  </item>
    <item>
   <title>lifetype 找不到指定文章</title>
   <description> 
早上要使用部落格時,突然顯示 找不到指定文章 的畫面,可能是停電主機不正常關機的原因,mysql 資料表出問題,

 
 
	 用 phpMyAdmin 選 lifetype 資料庫的所有資料表 選擇 修復資料表 的功能,修復後就找到文章了 
	 或則登入主機,進入mysql下修復資料表的指令,如下 
	mysql -uroot -p  
	 use lifetype資料庫;
	 
	 repair table 資料表 , 資料表 , ....; 
 
用第一種方法比較簡單 </description>
   <link>http://120.112.17.17/blog/shyong/archives/322</link>
      <pubDate>Mon, 28 Sep 2009 08:56:24 +0800</pubDate>   
  </item>
    <item>
   <title>置頂文章公告 plugins stickyposts</title>
   <description> 
增加置頂文章公告的外掛,我所用的是 stickyposts 1.2 的版本,依照 readme 的說明,先在文章分類新增一個置頂文章公告的分類,在 個人網誌設定=&gt;網誌最近活動管理=&gt;置頂及公告文章設定  中啟動外掛及設定置頂文章分類,然後在樣本中的 main.template 中加入紅色部份
 
 
{if $category}&lt;h2&gt;{$locale-&gt;tr(&quot;category&quot;)}: {$category-&gt;getName()}&lt;/h2&gt;{/if} 
 
 {if empty($showAll) &amp;&amp; $stickyposts-&gt;isEnabled()} 
&nbsp; {assign var=stickys value=$stickyposts-&gt;getArticles('sticky')} 
{if $stickys|@count &gt; 0} 
&lt;div class=&quot;post&quot;&gt; 
&lt;h2&gt;置頂文章&lt;/h2&gt; 
&lt;div class=&quot;posthead&quot;&gt; 
&nbsp; {foreach from=$stickys item=post} 
&nbsp; &lt;a href=&quot;{$url-&gt;postPermalink($post)}&quot;&gt;{$post-&gt;getTopic()}&lt;/a&gt;&amp;nbsp; 
&nbsp; {/foreach} 
&lt;/div&gt; 
&lt;/div&gt; 
{/if} 
{/if}  
 
&nbsp;{foreach from=$posts item=post} 
我的加法是配合樣本格式,及判斷如果沒有置頂公告文章就不顯示區塊,與 readme 有一點不一樣,因為我覺得這個功能對我個人來說不太可能用到,如果沒有置頂文章,卻佔用一個空block區塊,感覺上很奇怪,所以加入,如果沒有置頂文章就不顯示的判斷
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/232</link>
      <pubDate>Sun, 30 Nov 2008 20:13:44 +0800</pubDate>   
  </item>
    <item>
   <title>lifetype 註冊增加帳號判斷</title>
   <description> 
學校老師說想教學生使用 blog ,架 lifetype 不難,可是如何管制學生 blog 的申請有點痳煩,要判斷是否本校學生,及可以用帳號辨別學生,後來想到用學生的Email 帳號來當做使用者帳號,可是在註冊時加入 Email 帳號的判斷一直不是很順,因為只能在 register.php 中直接判斷,而無法加入在class物件,讓判斷含在lifetype的樣本中,好像lifetype本來就有的功能一樣,看來有空要好好研究 lifetype 的程式,以下是暫時的笨方法
 
 
&nbsp;//在 register.php 內加入下面指令
 
 
&nbsp;//判斷是否是 mail 的帳號,利用 imap_open 判斷是否有email 帳號
 
 
 function chkUser($host,$user,$passwd) 
&nbsp;&nbsp;&nbsp; { 
&nbsp;&nbsp;&nbsp; @$mbox = imap_open(&quot;{&quot;.$host.&quot;:110/pop3/notls}&quot;,$user,$passwd); 
&nbsp;&nbsp;&nbsp; return $mbox; 
&nbsp;&nbsp;&nbsp; } 
&nbsp;&nbsp;&nbsp; $mRequest = HttpVars::getRequest(); 
&nbsp;&nbsp;&nbsp; if($mRequest['Register']) 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!chkUser(&quot;mail.xxx.edu.tw&quot;,$mRequest['userName'],$mRequest['userPassword'])) 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; header('Content-Type:text/html;charset=utf-8'); 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; die(&quot;不是Email的帳號密碼 &lt;input type=button value='返回上一頁' onclick=history.back()&gt;&quot;); 
 
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //如果不是email帳號會單獨秀上一行,很不協調 
 
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } 
  
//================================================================================ 
//加入上面的指令
 
 
 &nbsp;&nbsp; // and the registration/sequential controller 
&nbsp;&nbsp;&nbsp; $r = new RegistrationController(); 
&nbsp;&nbsp;&nbsp; $r-&gt;process( HttpVars::getRequest()); 
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/168</link>
      <pubDate>Fri, 19 Sep 2008 20:51:23 +0800</pubDate>   
  </item>
    <item>
   <title>Lifetype 1.2.7 升級 1.2.8</title>
   <description>看到 Lifetype 1.2.8 出來,就很手癢的將它升級,結果是 user 都無法登入管理介面,後來一查是&nbsp; Lifetype1.2.8 在安裝時將&nbsp;   允許登入管理介面  的權限都取消了,只好在將它一一加入,真是手癢</description>
   <link>http://120.112.17.17/blog/shyong/archives/103</link>
      <pubDate>Sun, 22 Jun 2008 21:00:40 +0800</pubDate>   
  </item>
    <item>
   <title>如何讓 Lifetype 使用 embed</title>
   <description> 
在  阿欣部落格 找到這篇教學,以下為複製內容
 
 
在LifeType裡的 TinyMCE  預設是不支援「embed」這語法的。
 
 
所以若要線上顯示影片的播放介面，插入embed的html原始碼後，語法會被吃掉，因為tinymce會認為embed是不合法的參數。
 
 
所以若要使用embed這語法，就必須自己來修改一下tiny_mce-plog.js這檔案了。
 
 
修改 /js/tinymce/tiny_mce-plog.js這檔案，在「extended_valid_elements」裡加上
 
 
	 
	 embed[type|height|width|autostart|src|wmode|FALSE|TRUE|FlashVars] 
	 
 
 
 
 
 
&nbsp;
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/102</link>
      <pubDate>Sat, 21 Jun 2008 22:57:38 +0800</pubDate>   
  </item>
    <item>
   <title>防制垃圾迴響及引用干擾</title>
   <description>之前blog有些垃圾迴響或引用,看起來很討厭,上禮拜加入防制垃圾干擾,就沒有垃圾迴響及引用,我是在  Life Type Plugins  下載 1.2_authimage.zip 及 1.2_validatetrackback.zip,這樣迴響必須輸入驗證碼,那些利用程式的垃圾迴響就不能用,而引用會去確認,就可以減少一些假的廣告引用</description>
   <link>http://120.112.17.17/blog/shyong/archives/100</link>
      <pubDate>Thu, 01 May 2008 20:30:05 +0800</pubDate>   
  </item>
    <item>
   <title>加入 Google 搜尋</title>
   <description> 
看了 鳥哥網站 的利用Google搜尋站內資料的方法很不錯,就在自己的Blog內加入,方法如下:
 
 
	 在所用模版的 panel.template 內,想要顯示的位置加入下面程序 
	 &lt;div class=&quot;block&quot;&gt; 
	&lt;h5&gt;Google search&lt;/h5&gt; 
	&lt;FORM method=GET action=http://www.google.com/custom&gt; 
	&lt;div id=&quot;search&quot;&gt; 
	&lt;INPUT TYPE=text name=q size=14 maxlength=200 value=&quot;&quot;&gt; 
	&lt;INPUT type=submit name=sa VALUE=&quot;Google 搜尋&quot;&gt; 
	&lt;input type=hidden name=cof value=&quot;&quot;&gt; 
	&lt;input type=hidden name=domains value=&quot; fhsh.tp.edu.tw &quot;&gt; 
	&lt;br&gt; 
	&lt;input type=radio name=sitesearch value=&quot; fhsh.tp.edu.tw &quot; checked&gt; 
	以 Google 系統搜尋復興高中網站資料 
	&lt;br&gt; 
	&lt;input type=radio name=sitesearch value=&quot;&quot;&gt; 
	直接以 Google 搜尋全球所有網站資料 
	&lt;/div&gt; 
	&lt;/FORM&gt; 
	&lt;/div&gt; 
	 紅字部份改成要搜尋的網域 
	 上面是仿照鳥哥的方法,可以用,為什麼不知道,去問鳥哥 
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/99</link>
      <pubDate>Fri, 25 Apr 2008 12:08:52 +0800</pubDate>   
  </item>
   </channel>
</rss>

