MediaWiki extensions: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
Line 38: Line 38:
</pre>
</pre>


{{Tip | tip=若遭遇錯誤訊息「Input box: type not defined.」,請刪除 type=create 該行結束的空白字元。 }}
{{Tip | tip=
若遭遇錯誤訊息「Input box: type not defined.
: 請刪除 type=create 該行結尾處的空白字元。 }}


== 擴充套件: 匯入自由圖像 ==
== 擴充套件: 匯入自由圖像 ==

Revision as of 22:54, 3 July 2007

Ψ 架設Wiki之前 --> MediaWiki安裝 --> 本地化設置 --> 介面修改 --> 功能擴充 --> 備份與管理 | 工具箱 Ψ

擴充套件的安裝

  • 下載擴充套件
  • 放置於 {mediawiki}/extensions/
  • 修改LocalSettings.php
    • 注意檔首無BOM格式
    • (選擇性) 在檔尾嵌入: require_once("extensions/ExtensionFunctions.php"); ## 下載ExtensionFunctions.php
    • 在檔尾嵌入擴充套件 require_once("extensions/ExtensionName.php");
避免放在 require_once( "includes/DefaultSettings.php" ); 之前

擴充套件: 自訂新增文章的格式

用途

  • 事先自訂新文章的格式,方便使用者編輯


安裝「輸入欄」和「新增文章」套件

require_once("extensions/inputbox.php");
require_once("extensions/CreateArticle.php" );


Demo: 學習單範本

<center>在此輸入學習單標題</center>
<inputbox> 
type=create
default=學習單_
width=30
preload=Template:New_worksheet
buttonlabel= 新增學習單
</inputbox>
若遭遇錯誤訊息「Input box: type not defined.」
請刪除 type=create 該行結尾處的空白字元。

擴充套件: 匯入自由圖像

用途:

  • 匯入Flickr中創用CC授權的相片


安裝方法

  • 檢查PHP.ini的 allow_url_fopen 是On
  • 下載安裝ImportFreeImagesphpFlickr套件
  • 修改LocalSettings.php: 啟用ImportFreeImages套件
  • 修改ImportFreeImages套件
    • 取得Flickr API Key,並填入ImportFreeImages.php中的$wgIFI_FlickrAPIKey
    • 修正phpflickr的位置(原ImportFreeImages.php 中指到 extensions/phpFlickr-2.0.0)
  • 連結到 Special:ImportFreeImages
  • 修改Template:flickrx 其中x是創用CC的授權ID

Demo


擴充套件: 展示FreeMind心智圖

用途: 上載FreeMind心智圖到MediaWiki,透過支援flash player的瀏覽器即可展示。

安裝

  • 下載FreeMind extension
    • 下載freemind/ 共11個檔案,置於{mediawiki}/extensions/freemind
    • 下載FreeMind.php,置於 {mediawiki}/extensions
  • 修改LocalSettings.php
    • 嵌入FreeMind套件: LocalSettings.php 檔尾加入 require_once("extensions/FreeMind.php");
    • 增加FreeMind的檔案類型(.mm)

使用

  • 在文章中的編輯語法
<mm>[[Image:filename.mm]]</mm>