內海


Strict Standards: Non-static method Title::legalChars() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1982

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952

Strict Standards: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /var/www/html/mediawiki/includes/Parser.php on line 1952
From PHSea

(Difference between revisions)
Revision as of 20:23, 27 April 2008
Smilelong (Talk | contribs)

← Previous diff
Current revision
Smilelong (Talk | contribs)

Line 1: Line 1:
[[Image:內海.jpg|710px]] [[Image:內海.jpg|710px]]
-'''Contributed by Jimmy Lvo'''+Here’s how I referenced the extension as a template:
-__TOC__ 
-== TuneWiki是什么? == 
-TuneWiki是一款免费易用的歌词实时显示软件, 目前支持iPhone/iPod Touch [[download:Software|[点击这里下载]]], 有了他你可以边听音乐边看歌词, 就算是周杰伦的歌你也能清楚的知道唱的是什么了. LOL.<br> 
-<br> TuneWiki有着庞大的歌词库, 并且完全免费向大家开放, 你的参与可以让更多的人更好的享受到这项服务. 你可以增加库中没有的歌词, 也可以修改有错误的歌词 [[Help:IPhone#Syncing on the iPhone/iTouch|[歌词同步帮助]]], 你可以让TuneWiki更完美, 让大家用的更顺心.<br>+title=My test YouTube dealee
 +movie_url=http://www.youtube.com/v/yWQhBnpFEpg
 +embed_source_url=http://www.youtube.com/v/yWQhBnpFEpg
 +wrap = yes
 +width=500
 +height=400
-<br> [[Special:Userlogin|请加入我们吧]], 让每首歌都能找到他自己的歌词吧.<br><br> 
-<whtml> 
-<table border =0> 
-<tr><td width = 35%> 
-<object width="400" height="220"><param name="movie" value="http://www.youtube.com/v/bBfKi2hHD_w&rel=1&color1=0xe1600f&color2=0xfebd01&border=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/bBfKi2hHD_w&rel=1&color1=0xe1600f&color2=0xfebd01&border=1" type="application/x-shockwave-flash" wmode="transparent" width="300" height="200"></embed></object> 
-</td><td> 
-<b>多语言支持的TuneWiki 2.1发布了,快去installer升级吧!!</b><br><br> 
-<b>Jesus Diaz在GizModo上发表了TuneWiki的最新消息, 
-<a href="http://gizmodo.com/339048/tunewiki-is-the-karaoke+like-lyrics-app-apple-must-include-in-iphone" >去看看吧</a> 或者 <a href="http://www.everythingicafe.com/forum/third-party-applications/tunewiki-20256.html#post177440"> 
-看看用户的评价</a> 
-<br/> 
-<br>点击menu你可以看到YouTube上更多关于TuneWiki的视频内容. 
-</td></tr></table> 
-</whtml> 
-==固件升级==+Here’s the css:
-已在TuneWiki 2.1版本中解决了1.1.3+ 固件所引起的问题,请使用installer升级!!+
-== TuneWiki的使用者都在哪儿? == 
-<table> 
-<tr><td><br> 
-根据统计:  
-<br> 
-这里有 '''30,000''' 多首法文歌曲 
-<br> 
-这里有 '''70,000''' 多首西班牙文歌曲 
-<br> 
-大量的德文歌曲 (这要归功于 LeMMi 了 :-) 
-<br> 
-中文歌词正在快速增加中 
-<br> 
-当然也少不了英文歌曲... 
-</td><td> 
-[[Image:TWstats1-10.JPG]] 
-</td></tr> 
-</table> 
-== 奖 励 ==+#youtube {
 + margin: 0px 0px 40px 0px;
 + float:left;
 + width:300px;
 + height:200px;
 + position:relative;
 + border:0px solid #333333;
 +}
-'''为什么要 [[Special:Userlogin|注册]] 呢?''' 相信看了这个, 你一定会动心:+Here’s the php script called youtub_extension.php:
-== 更新进程 == 
-- 全语言支持<br/> 
-- Bug 修补<br/> 
-- 支持更多的硬件!!<br/> 
-- 聊天室<br/> 
-== iPhone和iPod Touch帮助 ==+ * title=My test YouTube dealee
-'''在iPhone/iPod Touch里同步歌词'''<br/>+ * movie_url=http://www.youtube.com/v/yWQhBnpFEpg
-[[Image:TuneWiki.jpg]]+ * embed_source_url=http://www.youtube.com/v/yWQhBnpFEpg
 + * wrap = yes
 + * width=500
 + * height=400
 + *
 +*/
 +$wgExtensionFunctions[] = ‘registerYouTubeExtension’;
 +$wgExtensionCredits[’parserhook’][] = array(
 +‘name’ => ‘YouTube’,
 +‘author’ => ‘Patrick Ragsdale’,
 +‘url’ => ‘http://www.scriptalias.com’,
 +);
-当歌曲播放时看一看右上方“Re-Sync(再同步)”按钮<br/>+function registerYouTubeExtension() {
-如果按钮是红色的,说明这个歌词尚未被同步,请依照下面指示操作:<br/>+ global $wgParser;
-1、当这首歌曲的第一行歌词结束,并且下一行将开始时,轻点正方形的中部(即专辑封面区域)<br/>+ $wgParser->setHook(’YouTube’, ‘renderYouTube’);
-2、同步了歌曲的每一行歌词,至歌曲播放结束,歌词方可上传并储存到TuneWiki服务器中,如有遗漏词段或者频繁点击歌词(时间间隔为0.1秒即认定为非法点击),视为无效同步,将不会被服务器储存。<br/>+
-如果按钮是蓝色的,意味着这首歌曲的歌词已被另一名用户同步,歌曲播放后将自动滚动的歌词。如果你发现歌词时间轴不正确,请使用上述指示,点击“再同步”按钮,重新同步这首歌曲的歌词。<br/>+}
-Wiki的精神在于共享奉献,这就是我们要做TuneWiki的初衷,要让所有的用户,可以互相帮助享受音乐。<br/>+/**
 +*
 +* We can provide values based on parameters listed between the
 +* and tags
 +*
 +**/
-感谢TuneWiki团队。<br/>+function renderYouTube($YouTube) {
-== 更改歌词存放目录LRC的位置 ==+ global $wgTitle;
-'''更改歌词存放目录LRC的位置'''<br/>+
-你可以按照自己的喜好变更位置,下面我写了个例子,这里我将LRC目录连接到Media下,以节省Applications的安装空间容量:<br/>+
-(一)命令行方式<br/>+
-cd /Applications/TuneWiki.app<br/>+
-cp -R LRC /var/root/Media<br/>+
-rm -rf LRC<br/>+
-ln -s /var/root/Media/LRC LRC<br/>+
-(二)WinSCP方式<br/>+ $YouTubearea = new YouTubearea();
-进入/Applications/TuneWiki.app<br/>+ getYouTubeOptions($YouTubearea->title,$YouTube,’title’);
-复制LRC到/var/root/Media/*.*<br/>+ getYouTubeOptions($YouTubearea->movie_url,$YouTube,’movie_url’);
-删除TuneWiki.app目录下的LRC,并“新建-连接-添加连接/快捷方式“<br/>+ getYouTubeOptions($YouTubearea->embed_source_url,$YouTube,’embed_source_url’);
-连接/快捷方式文件(L):<br/>+ getYouTubeOptions($YouTubearea->wrap,$YouTube,’wrap’);
-LRC<br/>+ getYouTubeOptions($YouTubearea->width,$YouTube,’width’);
-建立连接/快捷方式到(P):<br/>+ getYouTubeOptions($YouTubearea->height,$YouTube,’height’);
-/var/root/Media/LRC<br/>+ $YouTubehtml = $YouTubearea->render();
-----+ $YouTubehtml=str_replace(”{{PAGENAME}}”,$wgTitle->getText(),$YouTubehtml);
 + if($YouTubehtml) {
 + return $YouTubehtml;
 + } else {
 + return “ Input box ‘{$YouTube->type}’ not
 +defined.“;
 + }
 +}
-<br/>+/**
 +*
 +* This function will collect the values and define them in the
 +* function renderTest
 +*
 +**/
-'''现在有哪些功能呢?'''<br>+function getYouTubeOptions(&$value,&$YouTube,$name,$isNumber=false) {
-TuneWiki的数据库是所有现有及未来服务的根本, 他需要大家共同的努力!+
 + if(preg_match(”/^\s*$name\s*=\s*(.*)/mi”,$YouTube,$matches)) {
 + if($isNumber) {
 + $value=intval($matches[1]);
 + } else {
 + $value=htmlspecialchars($matches[1]);
 + }
 + }
 +}
-点击查看TuneWiki现在提供的下载支持 [http://tunewiki.com/wiki/index.php/Downloads TuneWiki下载]+/**
 +*
 +* The class is define here. We set it above on line 42
 +* and requested an instance of it on line 46
 +*
 +**/
 + 
 +class YouTubearea {
 + 
 + function render() {
 + if ($this->wrap == “yes”) {
 + $csstop =”
 +“;
 + $cssbottom = “
 + 
 +“;
 + $width = “300″;
 + $height = “200″;
 + }
 + else {
 + $csstop =”";
 + $cssbottom = “”;
 + $width = $this->width;
 + $height = $this->height;
 + }
 + 
 + $YouTube=<<title

Current revision

Here’s how I referenced the extension as a template:



title=My test YouTube dealee movie_url=http://www.youtube.com/v/yWQhBnpFEpg embed_source_url=http://www.youtube.com/v/yWQhBnpFEpg wrap = yes width=500 height=400


Here’s the css:


  1. youtube {

margin: 0px 0px 40px 0px; float:left; width:300px; height:200px; position:relative; border:0px solid #333333; }

Here’s the php script called youtub_extension.php:


* title=My test YouTube dealee
* movie_url=http://www.youtube.com/v/yWQhBnpFEpg
* embed_source_url=http://www.youtube.com/v/yWQhBnpFEpg
* wrap = yes
* width=500
* height=400
* 
  • /

$wgExtensionFunctions[] = ‘registerYouTubeExtension’; $wgExtensionCredits[’parserhook’][] = array( ‘name’ => ‘YouTube’, ‘author’ => ‘Patrick Ragsdale’, ‘url’ => ‘http://www.scriptalias.com’, );

function registerYouTubeExtension() {

global $wgParser; $wgParser->setHook(’YouTube’, ‘renderYouTube’);

}

/**

  • We can provide values based on parameters listed between the
  • and tags
    • /

function renderYouTube($YouTube) {

global $wgTitle;

$YouTubearea = new YouTubearea(); getYouTubeOptions($YouTubearea->title,$YouTube,’title’); getYouTubeOptions($YouTubearea->movie_url,$YouTube,’movie_url’); getYouTubeOptions($YouTubearea->embed_source_url,$YouTube,’embed_source_url’); getYouTubeOptions($YouTubearea->wrap,$YouTube,’wrap’); getYouTubeOptions($YouTubearea->width,$YouTube,’width’); getYouTubeOptions($YouTubearea->height,$YouTube,’height’); $YouTubehtml = $YouTubearea->render();

$YouTubehtml=str_replace(”內海”,$wgTitle->getText(),$YouTubehtml); if($YouTubehtml) { return $YouTubehtml; } else { return “ Input box ‘{$YouTube->type}’ not defined.“; } }

/**

  • This function will collect the values and define them in the
  • function renderTest
    • /

function getYouTubeOptions(&$value,&$YouTube,$name,$isNumber=false) {

     if(preg_match(”/^\s*$name\s*=\s*(.*)/mi”,$YouTube,$matches)) {

if($isNumber) { $value=intval($matches[1]); } else { $value=htmlspecialchars($matches[1]); } } }

/**

  • The class is define here. We set it above on line 42
  • and requested an instance of it on line 46
    • /

class YouTubearea {

function render() { if ($this->wrap == “yes”) { $csstop =” “; $cssbottom = “

“; $width = “300″; $height = “200″; } else { $csstop =”"; $cssbottom = “”; $width = $this->width; $height = $this->height; }

$YouTube=<<title