Help:Extension/HookInsert

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Extension
 
{{Extension
 
|author=K, Suwa
 
|author=K, Suwa
|version=0.1
+
|version=0.12
 +
|type=other
 
}}
 
}}
  
Line 16: Line 17:
 
リストページ内の文言であれば、自由に表示項目を変更できるようになります。
 
リストページ内の文言であれば、自由に表示項目を変更できるようになります。
  
 +
== Example ==
 +
以下の3ページを利用します。
 +
# [[Index:TestList]]
 +
# [[Template:EditButton]]
 +
# [[Template:EditButton/CheckList]]
 +
 +
* ソース(view sourceで確認して下さい)
 +
++Test++A、D、E1、F、F2++Test++
 +
<nowiki>{{EditButton</nowiki>
 +
<nowiki>|jumppage=Template:EditButton/CheckList</nowiki>
 +
<nowiki>|listpage=Index:TestList</nowiki>
 +
<nowiki>|initset=++Test++A、D、E1、F、F2++Test++</nowiki>
 +
<nowiki>|title=Test</nowiki>
 +
<nowiki>|separator=、</nowiki>
 +
<nowiki>}}</nowiki>
 +
 +
* 実行例
 +
++Test++A、D、E1、F、F2++Test++
 +
{{EditButton
 +
|jumppage=Template:EditButton/CheckList
 +
|listpage=Index:TestList
 +
|initset=++Test++A、D、E1、F、F2++Test++
 +
|title=Test
 +
|separator=、
 +
}}
 +
 +
<span style="color: red">※Lua5.1系列が必要です。</span><br />
 +
<span style="color: red">※mod_rewriteで<nowiki>http://URL/wiki/~でアクセスできるようにして下さい。</nowiki></span><br />
 +
<span style="color: red">※0.12より、ログインユーザのみ変更可能です。</span><br />
  
 
== Requirements ==
 
== Requirements ==
None
+
* [[Help:Extension/HTMLForm|HTMLForm]]
 +
* [[Help:Extension/ScriptFunctions|ScriptFunctions]](必ずしも必要ではないが、Exampleの実行には必要)
  
 
== Download ==
 
== Download ==
 
<table border="1" cellpadding="3" cellspacing="1">
 
<table border="1" cellpadding="3" cellspacing="1">
 
  <tr><td>version</td><td>source</td><td>md5</td><td>OperationCheck version</td></tr>
 
  <tr><td>version</td><td>source</td><td>md5</td><td>OperationCheck version</td></tr>
  <tr><td>0.1(January 23,2009)</td><td>{{#ifexistfile:/data/src/HookInsert/HookInsert.phps}}</td><td><pre style="border: 0px; background-color: white; padding: 0em; line-height: 0em">00d3cc19b0bb0452d8bf09ddadb03a76</pre></td><td>1.11.1, 1.16.2</td></tr>
+
<tr><td>0.12(March 24,2011)</td><td>{{#ifexistfile:/data/src/HookInsert/HookInsert.phps}}</td><td><pre style="border: 0px; background-color: white; padding: 0em; line-height: 0em">fc0e07af172c17fd9009f931a021f69f</pre></td><td>1.16.2</td></tr>
 +
<tr><td>0.11(February 22,2011)</td><td>{{#ifexistfile:/data/src/HookInsert/previous/HookInsert-0.11.phps}}</td><td><pre style="border: 0px; background-color: white; padding: 0em; line-height: 0em">d4ef297db9c828847cad5cc3158dc07f</pre></td><td>1.11.1, 1.16.2</td></tr>
 +
  <tr><td>0.1(January 23,2009)</td><td>{{#ifexistfile:/data/src/HookInsert/previous/HookInsert-0.1.phps}}</td><td><pre style="border: 0px; background-color: white; padding: 0em; line-height: 0em">00d3cc19b0bb0452d8bf09ddadb03a76</pre></td><td>1.11.1, 1.16.2</td></tr>
 
</table>
 
</table>
  
Line 39: Line 72:
 
</li>
 
</li>
 
</ol>
 
</ol>
 +
 +
== Changes ==
 +
0.12
 +
* ログインユーザのみリスト項目の変更が行えるように変更しました。

Latest revision as of 12:43, 24 March 2011

Extension Information
Implementation
Description
Author(s)K, Suwa
Version0.12
MediaWiki
License
Hooks used
Token typeother

Contents


HookInsertは入力者による、同じモノを指す場合でも文言が違う事を無くすため 文言を統一するためのextensionです。

文言をあらかじめ、Index名前空間のページ(リストページ)に作成しておき 表示するページでは、リストページ内の文言を選択・表示できるようにします。 リストページ内で、選択可能な項目は「#」か「*」で始まる行が一つの項目に対応します。

表示側のページでは一切wikiソースに手を加えることなく リストページ内の文言であれば、自由に表示項目を変更できるようになります。

[edit] Example

以下の3ページを利用します。

  1. Index:TestList
  2. Template:EditButton
  3. Template:EditButton/CheckList
  • ソース(view sourceで確認して下さい)
A、D、E1、F、F2
{{EditButton
|jumppage=Template:EditButton/CheckList
|listpage=Index:TestList
|initset=A、D、E1、F、F2
|title=Test
|separator=、
}}
  • 実行例

A、D、E1、F、F2

※Lua5.1系列が必要です。
※mod_rewriteでhttp://URL/wiki/~でアクセスできるようにして下さい。
※0.12より、ログインユーザのみ変更可能です。

[edit] Requirements

[edit] Download

versionsourcemd5OperationCheck version
0.12(March 24,2011)HookInsert.phps
fc0e07af172c17fd9009f931a021f69f
1.16.2
0.11(February 22,2011)HookInsert-0.11.phps
d4ef297db9c828847cad5cc3158dc07f
1.11.1, 1.16.2
0.1(January 23,2009)HookInsert-0.1.phps
00d3cc19b0bb0452d8bf09ddadb03a76
1.11.1, 1.16.2

[edit] Installtion

  1. Download the source code and rename it to HookInsert.php.
  2. Place it in the extensions/ directory.
  3. Insert the follow lines to LocalSettings.php
    require_once( "$IP/extensions/HookInsert.php" );
    $wgExtraNamespaces = array( ...
       xxx => "Index", xxx+1 => "Index_Talk",
       ...
    );

    Use 100 or larger numbers for xxx.

[edit] Changes

0.12

  • ログインユーザのみリスト項目の変更が行えるように変更しました。
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox