「AsciiArtsExtension」の版間の差分

提供: Yourpedia
移動: 案内検索
1行目: 1行目:
==使用方法==
+
zyjjs]\xYzN}{NQbOyxRdpwne]ka`ijVX]\iiUjkZgVzgb{poiv
# 以下のソースをコピペして、$IP/extensions/AsciiArts/aa.php を作る。
+
{krV}q{`ehmfN\sYVT\\arOk_[OllxOTvlg}dwxwuZ]]g|biim
# LocalSettings.php に、require_once( "extensions/AsciiArts/aa.php" ); を追加する。
+
Y[sYkudO|{lRRikogUjp}giQQfXrcUz\u]WgS}qjRpYd[^slyu
<!-- s -->
+
gdQYytby{dNTaXxlfs^z^fxc{XQZTZfUR[]t]jhoWZj_wkypYV
 
+
Teciwm{tmewce^umXP}\Znd^o|R[q_fxoex|We_Qfgu]_Vwq{e
==ソースコード==
+
aRqajvWe|qWswadbugOSQgeiTQ\Wqq^|bttmQlgb[UcTrY^dsq
<pre>
+
g`X^rbNwsiYsX|vY\|afjiyOoXqhsTXdickmtziVlsxpb}fzae
<?php
+
b}et\VqYkekY]vZTT}SiOx`}v`cX{pZ`]xc[ntQ^wY_k[Pukjw
if ( ! defined( 'MEDIAWIKI' ) )
+
Yhgcg_kjtTkq_vXqztvohPO|gsxjoQePk_y`XRPw\yPUj^|^by
die();
+
\pNvjVjXnlS}\ctt\w|]{pd`pfPpbxUQx_ZXPnQRd}wXiWjQjP
 
+
{Xv[TPuj\e`wXuRSTOyncjqfSYTsumZR||gPsQv[STPce|bfVa
$wgExtensionCredits['parserhook'][] = array(
+
}\yWOpQxSpNatWgpxYzl{OPUidtnP^UhtajQU`v}ov}SqeU|P]
'name' => 'AsciiArts',
+
pw|niarq]sTtl|We_Pkq}a`]i^we^YvSn]abfOecfTvPqt|o`m
'author' => 'Beyond',
+
iZ{kNmZgoOY^tt[crrPgYbzh^z\X|Ytowb[dR}zXaZOSQx`sWu
'description' => '<nowiki><aa>夕べのロース売れんかいなぁ!</aa></nowiki>',
+
OrVvoWeYf`pydo]rcbbvoXv`WpeftTxtZftg^jqVWe^hgTSbko
'url' => 'http://ja.yourpedia.org/wiki/AsciiArtsExtension'
+
hpqOtgjnhxPOmWznklnxlzVn`NvVrz\cjcyVehoTRT\zNVvOSn
);
+
gY\Z\s|sx}`rnTRgntO[OkkcOOTxWcdeSV{Q`]\^fbVaX\fSYa
 
+
|wrZk]RVuvuqviXVOfkcgYWl}`cR`qbVbv_Y[Z|UZYgqqRnqrp
$wgExtensionFunctions[] = 'wfAsciiArtsExtension';
+
t]tjes[hvOww`z{NOPqrVV\We|^xNP{xdS}jupjnZZsN|u^xYx
 
+
V\wQqxYycrPzRfSnYaQZPmV{|mm_c|vXcQx|Svxpji[WorxePf
function wfAsciiArtsExtension() {
+
Qywlckj^\Qbr}XnYaaig}jiug_zt|qZS\fvbYPewarcawaq|yx
    global $wgParser;
+
{Um^zn]{[cfyoN[XdXoduqSknr\jbQYWpVSTSkurZX_UW`Vw[v
    $wgParser->setHook( 'aa', 'asciiArts' );
+
N_rtZs{Ns[krxhrbuUnvg]O{^mkqT[Rt]hdX_bR[e]ceNbXS[h
}
+
RUjSRt\ZqX}]qYuwtUjP[qifbSunz`nuWav\[[pSbojT`_mtXR
 
+
bVozXaPtSb`pfUubdpsgs`W\syg\NXixpktlYsuP`yr\zOdO|x
function asciiArts($aainput) {
+
`bmjvxOcnYPj`_|WcaevYnUxylS[lbu{[ReXi{WjN^ZrSo\ceO
$aaoutput = htmlspecialchars($aainput);
+
cQTxji[hhqUaXa]`TrvmRvmRdy\Pkvq^\m^dvsawrjWu\c}sqQ
return '<pre style="font-family:\'MS Pゴシック\',IPAMonaPGothic; background:#fff; border:0; margin-left: 1em;">'."$aaoutput".'&lt;/pre>';
+
guYpdOgvrioxnXXP_[r^tbY}ZfjXbeUlS}t_\kka|TqbfSNTOt
}
+
UcjrdRV|ihf\wkakZk[OXStwh{Pigqvyhi}m{rt^R{`r`wkXc]
 
+
{stba[]{c`j^]`rXS{XtjumZXmhgX{Y\rOzykWw{yaPszb|iVV
?>
+
PqazQ]uuVSp^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