Help:Extension/Persistency

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 7: Line 7:
 
__TOC__
 
__TOC__
  
Persistency機能は、PersistリンクとPersist名前空間の二つで構成されます。
+
Persistency is realized by Persist link and Persist namespace.  This function is allowed only for users logged in.  See also [[Help:Extension/Volatile|Volatile]].
  
 +
;Persist link : <nowiki>[[Persist:~]]</nowiki> specifies a page title in Persist namespace, a template, and its parameters.  In the specified page, the template is expanded with the parameters and its wiki code is saved as the page contents (without cash).
  
Persistリンクは<nowiki>[[Persist:~]]</nowiki>で作ることができ、飛ばすPersist名前空間のページと使用するTemplateと引数を指定します。
+
; Persist namespace : There is no need to create pages. When a specified page title exists, the contents are overwritten.
 
+
Persistリンクからアクセスされたページでは、与えられたTemplateと引数が展開され、その状態がデータベースに保存されます(キャッシュはされません)。
+
 
+
Persist名前空間にあらかじめページを用意する必要はありません。指定されたページが存在すれば上書きされ、存在しなければ新しく作られます。
+
 
+
ただし、これはログインしているユーザに限られ、ログインしていないユーザがアクセスした場合、ページは変化しません。以前の状態が保たれます。
+
 
+
 
+
Volatile機能と比較するならば、Volatile機能は引数を持ってTemplateに飛び込みましたが、Persistency機能はさらにTemplateまで持って飛び込むイメージです。
+
  
 
== Requirements ==
 
== Requirements ==
Line 41: Line 33:
 
   ...
 
   ...
 
);</pre>
 
);</pre>
$egPhpBinを定義しなかった場合、ページの作成は行われません。<br>
+
$egPhpBin is required to generate pages.<br>
xxxは既に存在する名前空間番号と競合しない100番以降の番号を指定して下さい。</li>
+
Use 100 or larger numbers for xxx.</li>
 
</ol>
 
</ol>
  
 
== Function ==
 
== Function ==
# [[Doc:Extensions#Persist_Page__.7B.7B.23persist:pagename.7Cbutton_title.7Ctemplate_name.7Cnumber_of_args.7Cargs.7Cseparator.3D.3B.7D.7D|persistency]]
+
# [[Help:Extensions#Persist_Page__.7B.7B.23persist:pagename.7Cbutton_title.7Ctemplate_name.7Cnumber_of_args.7Cargs.7Cseparator.3D.3B.7D.7D|persistency]]

Revision as of 17:30, 20 September 2008

Extension Information
Implementation
Description
Author(s)K, Suwa
Version0.1
MediaWiki1.11.1
License
Hooks used
Token type

Contents


Persistency is realized by Persist link and Persist namespace. This function is allowed only for users logged in. See also Volatile.

Persist link 
[[Persist:~]] specifies a page title in Persist namespace, a template, and its parameters. In the specified page, the template is expanded with the parameters and its wiki code is saved as the page contents (without cash).
Persist namespace 
There is no need to create pages. When a specified page title exists, the contents are overwritten.

Requirements

HTMLForm

Download

versionsourcesize
0.1(September 11,2008)Persistency.phps

Installtion

  1. Download source and rename to Persistency.php.
  2. Put in extensions/ directory.
  3. Insert follow line to LocalSettings.php
    require_once( "$IP/extensions/Persistency.php" );
    $egPhpBin = "path to php binary";
    $wgExtraNamespaces = array( ...
       xxx => "Persist", xxx+1 => "Persist_Talk",
       ...
    );

    $egPhpBin is required to generate pages.

    Use 100 or larger numbers for xxx.

Function

  1. persistency
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox