2008年9月16日 星期二

ostube 修正中文tag問題

原文-http://163.21.22.6/plog/post/1/378

修正中文無法作為標籤(tag)問題,tag請選css
   將ostube/include/class.mediainformation.php中的function setTagsRaw($mid, $tags_raw)
由下方程式完全取代,約在961行左右:


function setTagsRaw($mid, $tags_raw){
      $array = array();
      $tags = array();
      $pattern="#^\s*([^,\s]+)\s*$|^\s*([^,\s]+)\s*,|\s*([^,\s]+)\s*,|\s*([^,\s]+)\s*$#msi";
      preg_match_all($pattern, $tags_raw, $array);
      $tags = array();
      each($array);
      while(list($key, $arrayx) = each($array)){
       while(list($key, $val) = each($arrayx)){
          $tag = trim($val);
          if(!empty($tag)) {
            if(!in_array($tag, $tags)) {$tags[]=$tag; }
          }
        }
      }
      $this ->  setTags($mid, $tags);
  }


修正過後可以加入中文的tag 名稱,..可是tagcloud 並不會顯示出中文的tag


2008年9月9日 星期二

commentform.template 設定

迴響的模版 commentform.template 放在

/usr/local/www/apache22/data/lifetype/templates/default/下

找到下面....加入value="Re:{$post->getTopic()}"

<input tabindex="1" id="subject" name="commentTopic" value="Re:{$post->getTopic()}" >

如此一來,就會預設出現 Re: 文章標題



2008年8月13日 星期三

apache22 新的設定方法

apache22 的 httpd.conf 設定方法,...和原本的 apache2 的不一樣,

apache22 中httpd.conf 把一部份的東西放到 extra 的目錄中, user home directory

放到 http-userdir.conf 檔案中, 把httpd.conf 中

Include etc/apache22/extra/httpd-userdir.conf

前面的 # 取消掉...

再把 httpd-userdir.conf 中

改成 userDir www

<Directory "/home/*/www">

.............

......

就ok了



2008年7月15日 星期二

97新生抽籤程式

將原本安裝在win98的系統換成2000系統,..

1.用A7N266vm主機板(用教師辦公室的Ghost檔做)

2.安裝speaker 程式,

3.將97新生註冊的資料庫檔copy進去

4.先啟動speaker 程式

5.控制台->電腦管理-> 服務->ClipBook 設定成自動,啟動

這樣speaker在執行時就不會一直跳出錯誤

=================================

2.把舊的硬碟Ghost 到新的硬碟中

1.原本的硬碟有兩個開機選項,ghost後 沒辦法啟動,先用spfdisk-> 進階功能->將開機磁區修復-->修復後只能第一個開機磁區(剛好要用的就是在第一個開機磁區中)..

2.用P-III 800的電腦就可以直接使用



2008年7月14日 星期一

FireFox3 IE-Tab

遇到一些在 Firefox 顯示不正常的網頁,可以用這元件來開啟 IE 瀏覽。

一、下載網頁:https://addons.mozilla.org/zh-TW/firefox/addon/1419


在網頁上按下右鍵,就可以選取




2008年6月26日 星期四

無線AP設定-Air Station G54

initial Buffalo Air station G54

重設後 ip :192.168.11.1

舊的三台有 router - nat 的功能



2008年6月13日 星期五

部落格預設模板修改

www 主機加裝了 mt blog系統m..

修改default-templates.pl檔,..

1.修改 迴響表情圖示,..

2.css樣式(預設為 summer)

3.css 中新增 blog2..迴響預覽,迴響錯誤,的blog標籤改成 blog2標籤

(以 note-book 改)



123123

2008年5月19日 星期一

google 應用相關教學影片

 這是提供校本網路進修使用的簡單操作影片。從申請帳號開始,才可以使用更多為自己規劃的Google應用喔!另外,感謝多位老師分享更詳細的教學影片 喔!

0.申請帳號

1.Gmail使用  ,感謝碧華國小邱組長與紀老師的分享教學影片

2.Talk即時通訊

3.日曆,感謝碧華國小邱組長與紀老師的分享教學影片

4.文件

5.相片處理Picasa軟體網路相簿

6.各種搜尋應用與快訊

7.影片網站Youtube

8.地圖與地球 ,謝謝呂聰賢組長分享教學影片

9.翻譯

10.筆記本

11.Blogger,感謝碧華國小邱組長與紀老師的分享教學影片



2008年5月6日 星期二

氣象語法2

<script>
  var type = "1";
  var url = "";
  //var dd,hh;

  function menu() {
    if (type == "1")
      type = "3";
    else if (type == "3")
      type = "0";
    else
      type = "1";
    map(type);
  }

  function map(type) {
    var d = new Date();
    var da = d.getDate();
    if (da<10) da = '0'+da;
    var m = d.getMonth()+1;
    if (m<10) m = '0'+m;
    var h = d.getHours()-1;
    if (h>21) h=21;
    if (h < 0) h = '00';
    else if(h<10) h = '0'+h;
    var y = d.getYear();  if (y < 2000) y += 1900;
    dd = da; hh = h;
    //url = "http://www.cwb.gov.tw/V5/observe/satellite/Data/s"+type+"p/s"+type+"p-"+  h+'-'+da+'-'+m+'-'+ y + ".jpg";
    url = "http://www.cwb.gov.tw/V5/observe/satellite/Data/s"+type+"p/s"+type+"p-"+  y+'-'+m+'-'+da+'-'+ h + ".jpg";
    document.getElementById('SPAN1').innerHTML = "<img src="+url+" width='200px' height='200px' oncontextmenu='menu();return false;'/>";
  }
</script>

<body>
<a href='http://www.cwb.gov.tw/V5/observe/satellite/sat.htm' target='_blank'
   title='按左鈕連氣象局雲圖網站;按右鈕換圖'>
<span id='SPAN1'> </span>
</a>
</body>

<script>
  map(type);
  //document.write(dd+' '+hh);
</script><br>
按左鈕連氣象局網站;按右鈕換圖


氣象語法

登入奇摩帳號→到自己的部落格→管理部落格→管理自訂欄位→打上標題→輸入內容

台北語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="
http://udn.com/WEATHER/IMAGES/taipeiicon.gif" width="38"/></td><td colspan="3">
<strong>
<a href="
http://udn.com/WEATHER/taipei.htm" style="text-decoration: none">台北</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/taipeilowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/taipeihightemp.gif" width="27"/></td></tr></table>

基隆語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/jilungicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a href="
http://udn.com/WEATHER/jilung.htm" style="text-decoration: none">基隆</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/jilunglowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/jilunghightemp.gif" width="27"/></td></tr></table>

桃園語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/taoyuanicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a href="
http://udn.com/WEATHER/taoyuan.htm" style="text-decoration: none">桃園</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/taoyuanlowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/taoyuanhightemp.gif" width="27"/></td></tr></table>

新竹語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/xinjuicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="
http://udn.com/WEATHER/xinju.htm">新竹</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/xinjulowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/xinjuhightemp.gif" width="27"/></td></tr></table>

苗栗語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/miaoliicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a href="
http://udn.com/WEATHER/miaoli.htm" style="text-decoration: none">苗栗</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/miaolilowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/miaolihightemp.gif" width="27"/></td></tr></table

台中語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/taichungicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a href="
http://udn.com/WEATHER/taichung.htm" style="text-decoration: none">台中</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/taichunglowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/taichunghightemp.gif" width="27"/></td></tr></table>

彰化語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/zhanghuaicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a href="
http://udn.com/WEATHER/zhanghua.htm" style="text-decoration: none">彰化</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/zhanghualowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/zhanghuahightemp.gif" width="27"/></td></tr></table>

南投語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/nantouicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="
http://http:/udn.com/WEATHER/nantou.htm">南投</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/nantoulowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/nantouhightemp.gif" width="27"/></td></tr></table>

雲林語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/yunlinicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="
http://udn.com/WEATHER/yunlin.htm">雲林</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/yunlinlowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/yunlinhightemp.gif" width="27"/></td></tr></table>

高雄語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/kaoshiungicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a href="
http://udn.com/WEATHER/kaoshiung.htm" style="text-decoration: none">高雄</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/kaoshiunglowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/kaoshiunghightemp.gif" width="27"/></td></tr></table>

台南語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/tainanicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a href="
http://udn.com/WEATHER/tainan.htm" style="text-decoration: none">台南</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/tainanlowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/tainanhightemp.gif" width="27"/></td></tr></table>

台東語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/taitungicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="
http://udn.com/WEATHER/taitung.htm">台東</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/taitunglowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/taitunghightemp.gif" width="27"/></td></tr></table>

屏東語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/pingtongicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="
http://udn.com/WEATHER/pingtong.htm">屏東</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/pingtonglowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/pingtonghightemp.gif" width="27"/></td></tr></table>

花蓮語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/hualianicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="
http://udn.com/WEATHER/hualian.htm">花蓮</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/hualianlowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/hualianhightemp.gif" width="27"/></td></tr></table>

宜蘭語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/yilanicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="
http://udn.com/WEATHER/yilan.htm">宜蘭</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/yilanlowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/yilanhightemp.gif" width="27"/></td></tr></table>

馬祖語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/matsuicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="
http://udn.com/WEATHER/matsu.htm">馬祖</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/matsulowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/matsuhightemp.gif" width="27"/></td></tr></table>

金門語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/jinmengicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="
http://udn.com/WEATHER/jinmeng.htm">金門</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/jinmenglowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/jinmenghightemp.gif" width="27"/></td></tr></table>

澎湖語法

<table cellspacing="0" cellpadding="3" border="0"><tr><td rowspan="2">
<img height="31" src="http://udn.com/WEATHER/IMAGES/penghuicon.gif
" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="
http://udn.com/WEATHER/penghu.htm">澎湖</a></strong></td></tr><tr><td>
<img height="13" src="
http://udn.com/WEATHER/IMAGES/penghulowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/penghuhightemp.gif" width="27"/></td></tr></table>