Extension:NicoVideo
From MediaWiki.org
| Language: | English • 日本語 |
|---|
|
NicoVideo Release status: unknown |
|
|---|---|
| Implementation | Tag |
| Description | indicate Nico Nico Douga's image-information. |
| Author(s) | Hanakayu |
| Last version | 2011-05-08 (2011-05-08) |
| License | No license specified |
| Download | #Code |
|
Check usage (experimental) |
|
This has the mediawiki indicate Nico Nico Douga's image-information.
[edit] Example
<nico>sm12167935</nico>
[edit] Installation
- Please save #Code to "nicoVideo.php"
- upload nicoVideo.php on your server(extensions/nicoVideo.php).
- Add the following text to your LocalSettings.php:
require_once( "extensions/nicoVideo.php" );
[edit] Code
<?php if ( ! defined( 'MEDIAWIKI' ) ) die(); $wgExtensionCredits['parserhook'][] = array( 'name' => 'nicoVideo', 'author' => 'Hanakayu', 'description' => '<nowiki><nico>sm12167935</nico></nowiki>', 'url' => 'http://www.mediawiki.org/wiki/Extension:NicoVideo/ja' ); $wgExtensionFunctions[] = 'wfnicoVideoExtension'; function wfnicoVideoExtension() { global $wgParser; $wgParser->setHook( 'nico', 'nicoVideo' ); } function nicoVideo($nicoinput) { $nicooutput = htmlspecialchars($nicoinput); return '<iframe width="312" height="176" src="http://ext.nicovideo.jp/thumb/'."$nicooutput".'" scrolling="no" style="border:solid 1px #CCC;" frameborder="0"><a href="http://www.nicovideo.jp/watch/'."$nicooutput".'">,</a></iframe>'; } ?>
