ラフコンセンサスと動くWikidot構文
SCP-Japan Wiki Engineering Task Forceは、SCP WikiのWiki操作やタグ、サイトテンプレート、bot、コードコンポーネントなどの技術仕様をまとめるための、SCP Wiki参加者のフロントエンドエンジニアやバックエンドエンジニア、Wikidotマスター、すごい人のゆるい情報交換のためのサイトルール的実態のない活動上だけのゆるいつながりです。
2017年4月27日:現在、一切の効力を発していない。
メインDiscord:
https://discord.gg/SK4MUmE
参加資格は、それぞれのワーキンググループに対する専門知識がある、あるいは、非常に興味があればオッケーです。何かを決定しなければならない時は、チャットで鼻歌などのなんとなく了解(ラフコンセンサス)が決まれば、動くWiki構文やプログラム(ランニングコード)を優先します。
s Request for Comment
sRFC2 - 2017年5月3日
私が作ったプレイヤーと財団標準MP3プレイヤーとの比較は下記ページをお願いします。
音楽を流す直った
これが財団の標準プレイヤーが呼び出している大元のコードのコピペです。
<!DOCTYPEhtml><htmllang="ja"><head><metacharset="utf-8"/><title>MP3プレーヤー</title><!-- Created by James Kanjo 2009 Edited by Dr Devan 2014 --></head><body><scripttype="text/javascript"src="http://ko.scp-wiki.net/local--files/component%3Aaudio/audio-player.js"></script><scripttype="text/javascript"> var url_params = /^#([^#]*)(#autoplay)?$/; var match = url_params.exec(unescape(window.location.hash)); if (match) { document.write('<audiocontrols '); if (match[2]) { document.write('autoplay'); } document.write(' style="width: 300px; height: 30px;"><sourcesrc="' + match[1]); document.write('"type="audio/mpeg">'); document.write('<objecttype="application/x-shockwave-flash"data="http://ko.scp-wiki.net/local--files/component%3Aaudio/player.swf"id="audioplayer1"height="24"width="290">'); document.write('<paramname="movie"value="http://ko.scp-wiki.net/local--files/component%3Aaudio/player.swf">'); document.write('<paramname="FlashVars"value="playerID=1&soundFile=' + match[1]); if (match[2]) { document.write('&autostart=yes'); } document.write('">'); document.write('<paramname="quality"value="high">'); document.write('<paramname="menu"value="false">'); document.write('<paramname="wmode"value="transparent">'); document.write('<i>Flash has been disabled, or is not installed. This MP3 player requires <atarget="_blank"href="http://get.adobe.com/flashplayer/">Flash</a> to function.</i>'); document.write('</object>'); document.write('</audio>'); } else document.write('<i>Invalid URL syntax</i>'); </script><noscript><i>Your Javascript has been disabled. This MP3 player requires Javascript to function.</i></noscript></body></html>
こいつは呼び出された時に
自身のURL(http://ja.scp-wiki.net/local--code/component:audio) + #"音楽ファイルのURL" + "自動再生の設定"
というURLになっているかどうかで音楽を再生します。
例えば「http://shitake-crude-production.wikidot.com/local--files/audioplay/Chopin-Poronase-Heroic.mp3」という音楽ファイルを流す際は[[iframe http://ja.scp-wiki.net/local--code/component:audio#http://shitake-crude-production.wikidot.com/local--files/audioplay/Chopin-Poronase-Heroic.mp3 frameborder="0" scrolling="no" width="320px" height="40px"]]
という呼び出し方をします。自動再生をする際は
[[iframe http://ja.scp-wiki.net/local--code/component:audio#http://shitake-crude-production.wikidot.com/local--files/audioplay/Chopin-Poronase-Heroic.mp3#autoplay frameborder="0" scrolling="no" width="320px" height="40px"]]
という呼び出し方をします。
Wiki構文にある
[[include component:audio-player
|URL=mp3-url
]]とは上記のiframeを生成するinclude文です。
しかし、上記のinclude文はなんやかんやあって
[[iframe http://ja.scp-wiki.net/local--code/component:audio#http://shitake-crude-production.wikidot.com/local--files/audioplay/Chopin-Poronase-Heroic.mp3{$autoplay_false} frameborder="0" scrolling="no" width="320px" height="40px"]]
という呼び出し方をします。
そのせいで、大元のコードが適切にmp3ファイルを読み込めず、動作ができないのです。本当の改善点
1.Wiki構文でのMP3プレイヤーが動かないのは読み込んでいるファイルが原因です。
2.本来備わっていたはずのautoplay(ページ読み込み時に自動演奏)の機能が死んでいたので、これが機能するように直す必要があります
3.どうせ直ってもサンドボックスじゃ動きません
修正案です
財団標準プレイヤー一層目:
http://ja.scp-wiki.net/component:audio-player[[include component:audio-player-base
|URL={$URL}
|autoplay={$autoplay_{$autoplay}}
|autoplay=false
|autoplay_TRUE={$autoplay_true} |autoplay_True={$autoplay_true} |autoplay_yes=>
{$autoplay_true} |autoplay_YES={$autoplay_true} |autoplay_Yes={$autoplay_true}
|autoplay_{$autoplay}={$autoplay_false}
|autoplay_true=#autoplay |autoplay_false=[!----]
]]修正
↓[[include component:audio-player-base
|URL={$URL}
|autoplay2={$autoplay_{$autoplay}}
|autoplay = {$autoplay}
|autoplay = false
|autoplay_TRUE={$autoplay_true} |autoplay_True={$autoplay_true} |autoplay_yes=
{$autoplay_true} |autoplay_YES={$autoplay_true} |autoplay_Yes={$autoplay_true}
|autoplay_true=#autoplay |autoplay_false=[!----]
]]財団標準プレイヤー2層目:
http://ja.scp-wiki.net/component:audio-player-base[[iframe http://ja.scp-wiki.net/local--code/component:audio#{$URL}{$autoplay} frameborder="0" scrolling="no" width="320px" height="40px"]]
修正
↓[[iframe http://ja.scp-wiki.net/local--code/component:audio#{$URL}{$autoplay2} frameborder="0" scrolling="no" width="320px" height="40px"]]]
sRFC1 - 2017年4月27日
sは、「すごく」とか「少し」とか「scp-jp」とか、sから始まる任意言語、あるいは任意のサ行から始まる日本語を意味します。sRFCはSCP WikiのWiki操作やタグ、サイトテンプレート、bot、コードコンポーネントなどに関連する公開しておくべきだと思われる情報を公開するための管理された文書シリーズです。少なくとも番号と日付で管理されます。内容には特に制限はないですが、実際にsRFCをメインWikiの標準にするか否かを決定するのは管理者です。元ネタはIETFです。
メインWikiで実際運用されているincカテゴリ
タグ周り。先延ばし。
クレジット付き評価モジュールとは
(図1)
従来の評価モジュールと導入例の比較。
(図2)
ポップアップの表示例。CC BY-SA 3.0における表示・継承をこのポップアップ一つで参照できる。
クレジット付き評価モジュールって何?
作品ページからその作品のクレジット — 作者及びメタタイトル — の確認をできるようにするモジュールのことです。本モジュール導入前まではその作品の作者は履歴から、メタタイトルは一覧からしか確認できないため、これの導入はクレジットの参照性を大幅に向上する要因となります。
どうやってクレジットを参照するの?
図1をご覧ください。クレジット付き評価モジュールを導入した場合、評価モジュールの横にボタン()が追加されていますね。このボタンを押すと、図2のようなポップアップが出現します。
クレジット付き評価モジュールの導入
どうやって導入するの?
導入する記事から従来の評価モジュールを削除し、ページの先頭に以下の折りたたみ内の記述をしてください。
[[include credit:start]]
**タイトル:** SCP-XXXX - メタタイトル
**著者:** ©︎[[*user 著者名]]
**作成年:** 2018
[[include credit:otherwise]]
ここに記事に使用された画像のソース並びにライセンスを表記。
[[include credit:end]]
注: 赤字は翻訳記事のみの要素です。
[[include credit:start]]
**タイトル:** SCP-XXXX - メタタイトル
**著者:** ©︎[[*user 著者名]]
**訳者:** ©︎[[*user 訳者名]]
**原記事:** http://www.scp-wiki.net/scp-xxxx
**作成年:** 2018
[[include credit:otherwise]]
ここに記事に使用された画像のソース並びにライセンスを表記。
All rights reservedの画像が使用されているSCP-173等の特殊なライセンスの下にある記事の場合、留意事項を特に記述すること。
[[include credit:end]]
殿堂入り記事へ導入する時は何をすればいいの?
何もしなくて大丈夫です。このモジュールは「殿堂入り(EN・FR・JP)」の各種タグに反応し、図3のように見た目が変わります。
(図3)
図2の例に「殿堂入り-fr」タグを付与すると...
http://ja.scp-wiki.net/licensing-guide