Help:Extension/JDXFunctions
From Metabolomics.JP
(Difference between revisions)
(Created page with "{{Extension |author=K, Suwa |version=0.1 }} __TOC__ JDXファイルのパス、及びファイルサイズを取得します。JDXファイルはgz圧縮されている必要...") |
|||
(3 intermediate revisions by one user not shown) | |||
Line 2: | Line 2: | ||
|author=K, Suwa | |author=K, Suwa | ||
|version=0.1 | |version=0.1 | ||
+ | |type=Parser function | ||
}} | }} | ||
Line 8: | Line 9: | ||
JDXファイルのパス、及びファイルサイズを取得します。JDXファイルはgz圧縮されている必要があります。 | JDXファイルのパス、及びファイルサイズを取得します。JDXファイルはgz圧縮されている必要があります。 | ||
+ | == Example == | ||
+ | File名前空間にアップロードした[[File:Test.jdx.gz]]を使用します。 | ||
+ | gzファイルをアップロードできるようにするには、LocalSettings.phpに以下を追加して下さい。 | ||
+ | |||
+ | $wgFileExtensions[] = 'gz'; | ||
+ | |||
+ | === <nowiki>{{#jdxfilepath:gz圧縮したJDXファイル名}}</nowiki> === | ||
+ | * ソース | ||
+ | <nowiki>{{#jdxfilepath:Test.jdx.gz}}</nowiki> | ||
+ | |||
+ | * 実行例 | ||
+ | {{#jdxfilepath:Test.jdx.gz}} | ||
+ | |||
+ | === <nowiki>{{#jdxfilesize:gz圧縮したJDXファイル名}}</nowiki> === | ||
+ | * ソース | ||
+ | <nowiki>{{#jdxfilesize:Test.jdx.gz}}</nowiki> | ||
+ | |||
+ | * 実行例 | ||
+ | {{#jdxfilesize:Test.jdx.gz}} | ||
== Requirements == | == Requirements == | ||
Line 24: | Line 44: | ||
<li>Insert the follow lines to LocalSettings.php | <li>Insert the follow lines to LocalSettings.php | ||
<pre>require_once( "$IP/extensions/JDXFunctions.php" );</pre></li> | <pre>require_once( "$IP/extensions/JDXFunctions.php" );</pre></li> | ||
+ | <li>gz拡張子のファイルをアップロードするために、LocalSettings.phpに以下を追加して下さい。 | ||
+ | <pre> $wgFileExtensions[] = 'gz';</pre> | ||
</ol> | </ol> | ||
== Function == | == Function == | ||
− | # jdxfilepath | + | # [[Help:Extensions#.7B.7B.23jdxfilepath:filename.7D.7D|jdxfilepath]] |
− | # jdxfilesize | + | # [[Help:Extensions#.7B.7B.23jdxfilesize:filename.7D.7D|jdxfilesize]] |
Latest revision as of 14:14, 1 March 2011
Extension Information | |
Implementation | |
Description | |
Author(s) | K, Suwa |
Version | 0.1 |
MediaWiki | |
License | |
Hooks used | |
Token type | Parser function |
Contents |
JDXファイルのパス、及びファイルサイズを取得します。JDXファイルはgz圧縮されている必要があります。
[edit] Example
File名前空間にアップロードしたFile:Test.jdx.gzを使用します。 gzファイルをアップロードできるようにするには、LocalSettings.phpに以下を追加して下さい。
$wgFileExtensions[] = 'gz';
[edit] {{#jdxfilepath:gz圧縮したJDXファイル名}}
- ソース
{{#jdxfilepath:Test.jdx.gz}}
- 実行例
/mediawiki/images/9/9b/Test.jdx.gz
[edit] {{#jdxfilesize:gz圧縮したJDXファイル名}}
- ソース
{{#jdxfilesize:Test.jdx.gz}}
- 実行例
2273703
[edit] Requirements
None
[edit] Download
version | source | md5 | OperationCheck version |
0.1(December 09,2009) | JDXFunctions.phps | f274360fb7d643b5e5a3e2ab78ecfcc1 | 1.11.1, 1.16.2 |
[edit] Installtion
- Download the source code and rename it to JDXFunctions.php
- Place it in the extensions/ directory.
- Insert the follow lines to LocalSettings.php
require_once( "$IP/extensions/JDXFunctions.php" );
- gz拡張子のファイルをアップロードするために、LocalSettings.phpに以下を追加して下さい。
$wgFileExtensions[] = 'gz';