r41530 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41529‎ | r41530 | r41531 >
Date:05:50, 2 October 2008
Author:dale
Status:old
Tags:
Comment:
fixed oggHandler check
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_flashEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -123,10 +123,8 @@
124124 $wgAutoloadClasses['MV_ImageGallery'] = dirname( __FILE__ ) . '/MV_ImageGallery.php';
125125 $wgAutoloadClasses['MV_Image'] = dirname( __FILE__ ) . '/MV_Image.php';
126126 $wgAutoloadClasses['MV_Stream'] = dirname( __FILE__ ) . '/MV_Stream.php';
127 - $wgAutoloadClasses['MV_StreamFile'] = dirname( __FILE__ ) . '/MV_StreamFile.php';
 127+ $wgAutoloadClasses['MV_StreamFile'] = dirname( __FILE__ ) . '/MV_StreamFile.php';
128128
129 - $wgAutoloadClasses['mvOggHandler'] = dirname( __FILE__ ) . '/MV_OggHandler.php';
130 -
131129 $wgAutoloadClasses['MV_StreamImage'] = dirname( __FILE__ ) . '/MV_StreamImage.php';
132130 $wgAutoloadClasses['MV_ParserCache'] = dirname( __FILE__ ) . '/MV_ParserCache.php';
133131 $wgAutoloadClasses['MV_MagicWords'] = dirname( __FILE__ ) . '/MV_MagicWords.php';
@@ -208,9 +206,10 @@
209207 * OggHandler extension overides
210208 * if the OggHandler is included remap the object for copatibility with metavid
211209 * MV_OggHandler.php hanndles all the re-mapping
212 - */
 210+ */
213211 global $wgMediaHandlers;
214212 if($wgMediaHandlers['application/ogg'] == 'OggHandler'){
 213+ $wgAutoloadClasses['mvOggHandler'] = dirname( __FILE__ ) . '/MV_OggHandler.php';
215214 $wgMediaHandlers['application/ogg']='mvOggHandler';
216215 $wgParserOutputHooks['OggHandler'] = array( 'mvOggHandler', 'outputHook' );
217216 foreach($wgHooks['LanguageGetMagic'] as & $hook_function){
@@ -225,10 +224,9 @@
226225 }
227226 }
228227 }
229 - }
 228+ }
230229
231230
232 -
233231 // $wgHooks['BeforePageDisplay'][] = 'mvDoSpecialPage';
234232 // $wgHooks['ArticleViewHeader'][] = 'mvArticleViewOpts';
235233 /**********************************************/
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_flashEmbed.js
@@ -48,7 +48,7 @@
4949 }
5050 },
5151 getEmbedHTML: function (){
52 - setTimeout('document.getElementById(\''+this.id+'\').postEmbedJS()', 150);
 52+ setTimeout('$j(\''+this.id+'\').get(0).postEmbedJS()', 150);
5353 return this.wrapEmebedContainer( this.getEmbedObj() );
5454 },
5555 getEmbedObj:function(){
@@ -76,8 +76,10 @@
7777 }
7878 if (this.flashVars) {
7979 html += 'flashvars=\'';
 80+ var and = '';
8081 for(var key in this.flashVars) {
81 - html += [key] + '=' + asString(this.flashVars[key]) + '&';
 82+ html +=and+ [key] + '=' + asString(this.flashVars[key]);
 83+ and = '&';
8284 }
8385 html += '\'';
8486 }
@@ -96,13 +98,16 @@
9799 }
98100 if (this.flashVars) {
99101 html += '\n\t<param name="flashvars" value=\'';
 102+ var and = '';
100103 for(var key in this.flashVars) {
101 - html += [key] + '=' + asString(this.flashVars[key]) + '&';
 104+ html += and + [key] + '=' + asString(this.flashVars[key]) ;
 105+ and = '&';
102106 }
103107 html += '\' />';
104108 }
105109 html += "</object>";
106110 }
 111+ js_log('embed code:'+ html);
107112 return html;
108113 },
109114 postEmbedJS: function()
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -1790,7 +1790,13 @@
17911791 },
17921792 isPlayableType:function(mime_type)
17931793 {
1794 - return mime_type=='video/ogg' || mime_type=='ogg/video' || mime_type=='video/annodex' || mime_type=='video/x-flv';
 1794+ if(embedTypes.players.defaultPlayer(mime_type)){
 1795+ return true;
 1796+ }else{
 1797+ return false;
 1798+ }
 1799+ //if(this.selected_player){
 1800+ //return mime_type=='video/ogg' || mime_type=='ogg/video' || mime_type=='video/annodex' || mime_type=='video/x-flv';
17951801 },
17961802 /** Adds a single mediaSource using the provided element if
17971803 the element has a 'src' attribute.

Status & tagging log