2007年8月7日 星期二

調整MediaWiki顯示時間

預設系統時間與台灣時間不一樣,系統採用國際換日線時間,若要調整系統時間,在LocalSettings.php,做設定台灣時間。

#Set Default Timezone
$wgLocaltimezone = "Asia/Taipei";
#Calculate the timezone offset with UTC
$oldtz = getenv("TZ");
putenv("TZ=$wgLocaltimezone");
# $wgLocalTZoffset = date("Z") / 3600; # Versions before 1.7.0 used $wgLocalTZoffset as hours.
$wgLocalTZoffset = date("Z") / 60; # After 1.7.0 offset as minutes
putenv("TZ=$oldtz");

http://www.tsima.org.tw/wiki/index.php/%E6%9C%9F%E5%88%8A/MediaWiki%E7%B6%B2%E7%AB%99%E6%9E%B6%E8%A8%AD%E8%A8%AD%E5%AE%9A#.E9.96.8B.E5.95.9F.E5.AD.90.E9.A0.81.E9.9D.A2.E5.8A.9F.E8.83.BD

若個別使者,可以 My preferences,date and time,設定自己的時間。

2007年6月25日 星期一

joomla 轉移

從一個站台搬到另外一個站台的步驟:
  1. copy整個網站資料
  2. 備份並還原資料庫
  3. Edit your configuration.php file to reflect the new values:
    $mosConfig_user = 'joomla_joomla';

$mosConfig_password = 'password';

$mosConfig_db = 'joomla_joomla';

$mosConfig_absolute_path = '/home/joomla/public_html';

$mosConfig_live_site = 'http://www.joomla.org';

$mosConfig_cachepath = '/your absolute path/cache';

2007年6月16日 星期六

測試你網站的速度

http://www.pingdom.com/tools/fpt/

可以測試你網站的速度。

2007年4月27日 星期五

如何將WIKI搬家,或複製一份

提供異地備份或mirror site 的方法。根據官方說法,建議在同樣的平台與software的情況下運作。官方網站

步驟如下:
1.備份資料庫。

2.複製全部的wiki 資料。包括skin、 extensions、 LocalSettings.php

3.re-create the database
在新的一台機器建立資料庫名稱,與建立一個 wiki 的使用者,有權限存取wiki 的資料夾。
註:你可以在 LocalSettings.php 查到當初設定的使用者名稱與密碼。$wgDBuser and $wgDBpassword two parameters.

4.import database
可以用 dump的方法,或 phpmyadmin 將資料複製。

5.Import wiki file

6.check the configuration file
See
LocalSettings.php

$IP Needs to be correct for the paths on the new server
$wgScriptPath Needs to be correct for the path on the new server
$wgDBserver Check the database server name is correct
$wgDBname This might have changed in a shared hosting environment
$wgDBuser This might have changed in a shared hosting environment
$wgDBpassword Check this is correct for the new user


2007年4月25日 星期三

如何修改 navigation bar

要如何修改 navigation bar。
可以參考 http://www.mediawiki.org/wiki/Manual:Navigation_bar

但在1.9 已後的版本,並沒有 mediawiki:Sidebar 這個頁面。

我的作法是先去安裝,Inputbox,這extenions,就可以隨意建置一個新頁面。

再去修改 mediawiki:Sidebar 的屬性,即可修改屬性,

* navigation
** mainpagemainpage
** portal-urlportal
** e-info環境新聞
** currentevents-urlcurrentevents
** recentchanges-urlrecentchanges
** randompage-urlrandompage
** helppagehelp
** sitesupport-urlsitesupport

* 其他
**test測試

RSS extensions

安裝與用法

1. 下載 rss.php 檔案。
原網址:http://www.mediawiki.org/wiki/GISWiki/RSS

2. 下載magpierss。http://magpierss.sourceforge.net/

3. 修改rss.php 檔案內容

4. 使用參數

* charset= The charset used by the feed. iconv is used to convert this. (設定編碼)
* short Do not show the description text for each news item.(設定簡短描述)
* max=x Shows x most recent headlines. (設定筆數)
* highlight= term1 term2 The terms separated by a space are highlighted.
* filter= term1 term2 Show only rss items containing at least one of the terms. (設定篩選參數)
* reverse display the rss items in reverse order.
* title=x display an alternative title instead of chanel name.
* title = none dont display any title.
# * date display the date and time stamp below the title.

2007年3月28日 星期三

上傳照片

基本上傳語法,[[圖像:tree1.jpg]]

設定縮圖,[[圖像:tree1.jpgthumb]] 

設定縮圖大小(100px), [[圖像:tree1.jpg100pxthumb]] 

2007年3月27日 星期二

KML Export

安裝
1. Created directory of "KMLExport" in extensions
2. Edit LocalSettings.php , addong
require_once( $IP . '/extensions/KMLExport/KMLExport.php' );

設定
1. create a template named [[Template:GeoDeg]]

Coordinates: [http://maps.google.com/?q={{{10}}},{{{20}}}&t=h&z=14 {{#lat_deg2dms:{{{10}}}}} {{#long_deg2dms:{{{20}}}}}]
{{#kml.placemark:Point({{{10}}},{{{20}}}){{{3}}}}}
[[Category:Pages with geographic coordinates{{PAGENAME}}]]


2. create a template named [[Template:GeoDMS]]
{{GeoDeg{{
#lat_dms2deg:{{{10}}}{{{20}}}{{{30}}}{{{40}}}}}{{
#long_dms2deg:{{{50}}}{{{60}}}{{{70}}}{{{80}}}}}{{{9}}}
}}


3. 使用:
{{GeoDMS22575S431239W}}).

4. 匯出 KML :
[[Special:KMLExport]]


其他參數設定

1. {{#lat_deg2dms: value}} 緯度轉換:十進位轉度分秒

{{#long_deg2dms: value}} 經度轉換:十進位轉度分秒

2. {{#lat_dms2deg: degrees minutes seconds hemisphere }} 緯度轉換:度分秒轉十進位
{{#long_dms2deg: degrees minutes seconds hemisphere }} 經度轉換:度分秒轉十進位




參考:
http://juliano.info/en/Projects/KML_Export/Manual

2007年2月28日 星期三

如何修改Toolbar

請參考 :http://meta.wikimedia.org/wiki/Customizing:Edit_Toolbar

如在工具列中新增分類的icon,步驟如下:
1. 在 includes\EditPage.php檔案中,大約1648 lines,會看到一系列陣列。
2. 加入
array( 'image' =>'Button_category.png', //icon圖示
'open' => '[[Category: ]]', //wiki語法
'close' => '',
'sample'=> '',
'tip' => 'Category:頁面分類', //說明
'key' => 'C'
),

2007年2月15日 星期四

web 2.0 各自表述

收集一些經典的話



詹先生提到Web 1.0 時代是內容出版的成本降低,重點在Content ,因此經營典範是搜尋引擎。因此,能夠快速協助人們找到內容的企業,業務就會增長。

而Web 2.0 卻是人與人聯繫的成本降低,重點在Connectivity。能夠協助人類彼此聯繫的企業,業務就會大幅增長。然而經營典範是什麼?這就是令人興奮的地方,正如97年的網路時代,大家都在摸索。

http://www.digitalwall.com/scripts/display.asp?UID=334


2007年2月13日 星期二

其他WIKI

今天不介紹 Mediawiki,今天改推薦 TiddlyWiki

下面是找到不錯的網站:
1.老貓出版社

2007年2月9日 星期五

wiki 設定

1. 權限設定。如新增帳號,開放匿名 存取權限等設定方法。


  • $wgGroupPermissions['*']['createaccount'] = false; flase 不開放; true 開放
  • $wgGroupPermissions['*']['edit'] = false; flase 不開放匿名編寫; true 開放匿名編寫
  • $wgGroupPermissions['*']['read'] = false; 限制非註冊用戶「不可讀」,參考 http://www.mw.net.tw/user/kaurjmeb/blog/2006/10/14/26611/40269/
2. 系統如何備份 ?


3. 參數設定

  • 上傳權限$wgEnableUploads = true; # Enable uploads
  • $wgDefaultSkin ; 預設skin;
  • $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'wmz', 'doc', 'pdf', 'xls', 'mm' ); // 開放上傳檔案 新增 doc、pdf、mm

2007年2月6日 星期二

安裝WIKI

目前系統:

1. MySQL 版本 4.1.12a(不建議使用5.0 以上)

2. PHP Version 5.0.4(一定要5 以上)

3. Apache/2.0.54 (Win32)

4. MediaWiki 1.9.1



安裝步驟

  1. 設定新的資料庫,並指定為latin1_general_ci 編碼。
  2. 開始安裝。

  3. Move the config/LocalSettings.php file into the parent directory (安裝完成後,將config/LocalSettings.php 檔案搬到 跟目錄)

延伸閱讀:

安裝MediaWiki(from KJ

Mediawiki安裝教學(from 澎湖人NO1)

MediaWiki 與 MySQL 的 UTF-8 問題

問題思考(有待尋找解答):

1. 如何upgrade?前幾天才下載 1.9.1 版本,今天去看,又出現1.9.2

2. 如何將現有資料庫轉換到Wiki?,資料庫結構?

3. 如何建立新使用者? (參考 http://kc0122.blogspot.com/2007/02/wiki_09.html 2/24

2007年2月5日 星期一

wiki extension

Wiki 上面的 Extensions,下面是我試過,覺得還不錯用。


  1. Google Serch:google serch (for Metawiki),Google serch(Mediawiki),還沒有試出功能。


  2. google map,新增地圖服務 : GISWiki/GoogleMapExtensionExtension:Google Maps (目前使用這個)


  3. Category,(目前使用這個)


  4. Calendar,(目前使用這個,但詞條若為中文,會出現問題)


Wiki 相關網站

教學類

  1. 大陸天下維克
  2. 南投高中的wiki有很多很不錯的說明
有趣類

  1. 地圖WIKI
  2. 看不出來用Wiki做的網站

個人Blog

  1. KJ在中文維基百科的日子

第一篇BOLG

第一篇 文章