r40961 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40960‎ | r40961 | r40962 >
Date:18:26, 17 September 2008
Author:dale
Status:old
Tags:
Comment:
minnor bug/style updates
Modified paths:
  • /trunk/extensions/MetavidWiki/MV_LocalSettings.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Title.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/mv_oneTime_fixes.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_allpages.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/mvFlvServer.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/maintenance/mv_oneTime_fixes.php
@@ -25,8 +25,26 @@
2626 case 'strip_speech_by' :
2727 strip_speech_by();
2828 break;
 29+ case 'update_stream_time_dur':
 30+ update_stream_time_dur();
 31+ break;
2932 }
30 -
 33+/*function update_stream_time_dur(){
 34+ $streams_res = $dbr->select('mv_streams','*');
 35+ while($stream = $dbr->fetchObject( $streams_res )){
 36+ //check if we have the duration in the file:
 37+ $stream_files_res = $dbr->select('mv_stream_files','*',array('stream_id'=>$stream->id));
 38+ while($stream_file = $dbr->fetchObject( $streams_res )){
 39+ if($stream_file->duration!=0){
 40+ $dur = $stream_file->duration;
 41+ break;
 42+ }else{
 43+ $file_loc = $stream_file->path;
 44+ }
 45+ }
 46+
 47+ }
 48+}*/
3149 function strip_speech_by(){
3250 global $mvDryRun;
3351 $dbr = wfGetDB(DB_SLAVE);
Index: trunk/extensions/MetavidWiki/MV_LocalSettings.php
@@ -9,6 +9,6 @@
1010 * eventually we should have some documentation somewhere ;)
1111 */
1212 $mvExternalImages = true;
13 -$mvExternalImgServerPath = 'http://metavid.ucsc.edu/mvw-exp/index.php';
 13+$mvExternalImgServerPath = 'http://metavid.ucsc.edu/wiki/index.php';
1414
15 -?>
\ No newline at end of file
 15+?>
Index: trunk/extensions/MetavidWiki/includes/MV_Title.php
@@ -329,11 +329,12 @@
330330 }
331331
332332 $stream_web_url = $this->getWebStreamURL($mvDefaultVideoQualityKey);
 333+ $flash_stream_url = $this->getWebStreamURL($mvDefaultFlashQualityKey);
333334 //print "lookign for q: $mvDefaultFlashQualityKey ";
334335
335336 //print "FOUND: $flash_stream_url";
336337 $roe_url = $this->getROEURL();
337 - if($stream_web_url){
 338+ if($stream_web_url || $flash_stream_url){
338339 $o='';
339340 /*if($this->dispVideoPlayerTime){
340341 $o.='<span id="mv_videoPlayerTime">'.$this->getStartTime().' to '.
@@ -355,8 +356,7 @@
356357 $o.='<source type="'.
357358 htmlspecialchars(MV_StreamFile::getTypeForQK($mvDefaultVideoQualityKey)) .
358359 '" src="'.$stream_web_url .'"></source>';
359 -
360 - $flash_stream_url = $this->getWebStreamURL($mvDefaultFlashQualityKey);
 360+
361361 if($flash_stream_url)
362362 $o.='<source type="'.
363363 htmlspecialchars(MV_StreamFile::getTypeForQK($mvDefaultFlashQualityKey)) .
Index: trunk/extensions/MetavidWiki/skins/mv_allpages.js
@@ -2,11 +2,11 @@
33
44 mv_addLoadEvent(mv_setup_allpage);
55 var mv_setup_allpage_flag=false;
6 -if( wgServer && wgScript){
 6+/*if( typeof wgServer!='undefined' && typeof wgScript != 'undefined'){
77 var base_roe_url = wgServer + wgScript + '?title=Special:MvExportStream&feed_format=roe&stream_name=';
88 }else{
99 var base_roe_url='';
10 -}
 10+}*/
1111 var gMvd={};
1212 function mv_setup_allpage(){
1313 js_log("mv embed done loading now setup 'all page'");
Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php
@@ -22,8 +22,8 @@
2323 $sample_embed = array();
2424
2525 $sample_embed[0]['tag']='<video id="embed_vid"
26 -thumbnail="http://metavid.ucsc.edu/mvw-exp/index.php?action=ajax&rs=mv_frame_server&stream_id=501&t=0:01:32&amp;size=400x300"
27 -roe="http://metavid.ucsc.edu/mvw-exp/index.php?title=Special:MvExportStream&stream_name=House_proceeding_01-28-08&feed_format=roe&t=0:01:32/0:03:20"
 26+thumbnail="http://metavid.ucsc.edu/wiki/index.php?action=ajax&rs=mv_frame_server&stream_id=501&t=0:01:32&amp;size=400x300"
 27+roe="http://metavid.ucsc.edu/wiki/index.php?title=Special:MvExportStream&stream_name=House_proceeding_01-28-08&feed_format=roe&t=0:01:32/0:03:20"
2828 style="width:400px;height:300px"
2929 controls="true" embed_link="true" >
3030 <source type="video/ogg" src="http://128.114.20.64/media/house_proceeding_01-28-08.ogg.anx?t=0:01:32/0:03:20"></source>
@@ -40,7 +40,7 @@
4141 //$sample_embed[1]['tag'] = '<video roe="http://192.168.0.104/mvWiki/index.php?title=Special:MvExportStream&feed_format=roe&stream_name=Senate_proceeding_08-01-07&t=0:00:00/0:05:00">';
4242 //$sample_embed[1]['desc'] = 'Demo of json ROE attribute';
4343
44 -$sample_embed[3]['tag'] = '<video roe="http://metavid.ucsc.edu/mvw-exp/index.php?title=Special:MvExportStream&feed_format=roe&stream_name=Senate_proceeding_08-01-07&t=0:11:40/0:12:20" ></video>';
 44+$sample_embed[3]['tag'] = '<video roe="http://metavid.ucsc.edu/wiki/index.php?title=Special:MvExportStream&feed_format=roe&stream_name=Senate_proceeding_08-01-07&t=0:11:40/0:12:20" ></video>';
4545 $sample_embed[3]['desc'] = 'Demo of ROE only attribute';
4646
4747
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -169,15 +169,15 @@
170170 //plugin libs var names and paths:
171171 lib_jquery:{'window.jQuery':'jquery/jquery-1.2.6.min.js'},
172172 lib_plugins:{
173 - '$j.timer.global':'jquery/plugins/jquery.timers.js', //we may be able to remove the timer
174 - '$j.ui.progressbar':'jquery/jquery-ui-personalized-1.6rc1.debug.js'
175 - },
176 - /*old lib includes:
177 - '$j.fn.offsetParent':'jquery/plugins/jquery.dimensions.js',
 173+ '$j.timer.global':'jquery/plugins/jquery.timers.js', //we should try and factor out the timer
 174+ '$j.fn.offsetParent':'jquery/plugins/jquery.dimensions.js',
178175 '$j.ui.mouseInteraction':'jquery/plugins/ui.mouse.js',
179176 '$j.ui.slider':'jquery/plugins/ui.slider.js',
180177 '$j.ui.draggable':'jquery/plugins/ui.draggable.js', //include draggable
181 - '$j.ui.droppable':'jquery/plugins/ui.droppable.js'
 178+ '$j.ui.droppable':'jquery/plugins/ui.droppable.js'
 179+ },
 180+ /*old lib includes:
 181+ '$j.ui.progressbar':'jquery/jquery-ui-personalized-1.6rc1.debug.js'
182182 */
183183 pc:null, //used to store pointer to parent clip (when in playlist mode)
184184 load_libs:function(callback){
Index: trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/mvFlvServer.php
@@ -12,7 +12,7 @@
1313 * something like:
1414 * /flvserver/my_file/start_time/end_time
1515 */
16 -define('BASE_LOCAL_CLIP_PATH', '/var/www/flv_clips');
 16+define('BASE_LOCAL_CLIP_PATH', '/metavid/video_archive');
1717
1818 define('WEB_CLIP_PATH', '/flv_cips');
1919 define('FLASH_VIDEO_CONTENT_TYPE', 'video/x-flv');