Index: trunk/extensions/MetavidWiki/maintenance/scrape_and_insert.inc.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * scrape_and_insert.inc.php Created on Feb 14, 2008 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
Index: trunk/extensions/MetavidWiki/maintenance/video_ocr_thumb_insert.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * video_ocr_thumb_insert.php Created on January, 2009 |
5 | 5 | * based on ogg_thumb_insert |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | // include commandLine.inc from the mediaWiki maintance dir: |
16 | 16 | require_once ( '../../../maintenance/commandLine.inc' ); |
17 | 17 | require_once ( 'metavid2mvWiki.inc.php' ); |
18 | | - |
| 18 | + |
19 | 19 | // include util functions: |
20 | 20 | require_once( 'maintenance_util.inc.php' ); |
21 | 21 | |
— | — | @@ -23,13 +23,13 @@ |
24 | 24 | USAGE |
25 | 25 | php video_thumb_insert.php stream_name interval [options] |
26 | 26 | |
27 | | -EXAMPLE" we get a frame every 5 seconds from input file stream.mpeg: |
28 | | - video2image2mvwiki.php stream_name [options] |
| 27 | +EXAMPLE" we get a frame every 5 seconds from input file stream.mpeg: |
| 28 | + video2image2mvwiki.php stream_name [options] |
29 | 29 | |
30 | 30 | OPTIONS: |
31 | 31 | --interval @default 5 seconds |
32 | | - --overwrite_image @default no overwrite; if set will force image output |
33 | | - --use_file $file //the full path to the file you want to use to generate thumbnails |
| 32 | + --overwrite_image @default no overwrite; if set will force image output |
| 33 | + --use_file $file //the full path to the file you want to use to generate thumbnails |
34 | 34 | |
35 | 35 | DURATION is scraped from ffmpeg |
36 | 36 | |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | if(isset($args[0])){ |
45 | 45 | $stream_name = $args[0]; |
46 | 46 | }else{ |
47 | | - die('no stream name provided'."\n"); |
| 47 | + die('no stream name provided'."\n"); |
48 | 48 | } |
49 | 49 | //default options: |
50 | 50 | $interval = 5; |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | $filename = $options['use_file']; |
62 | 62 | }else{ |
63 | 63 | $filename = $workingdir .'/'. $stream_name . '.mpeg'; |
64 | | -} |
| 64 | +} |
65 | 65 | $duration = getDuration($filename); |
66 | 66 | |
67 | 67 | |
— | — | @@ -68,36 +68,36 @@ |
69 | 69 | $srt_file = $workingdir . '/' . $stream_name . '.srt'; |
70 | 70 | $srt_ary = file( $srt_file ); |
71 | 71 | if($srt_ary === false) |
72 | | - die(' could not find srt file: ' . $srt_file); |
73 | | - |
74 | | -//time stamp: |
75 | | -$org_start_time = intval( trim( str_replace( 'starttime' , '', $srt_ary[2] )) ); |
76 | | - |
77 | | -class streamObject{ }; |
| 72 | + die(' could not find srt file: ' . $srt_file); |
| 73 | + |
| 74 | +//time stamp: |
| 75 | +$org_start_time = intval( trim( str_replace( 'starttime' , '', $srt_ary[2] )) ); |
| 76 | + |
| 77 | +class streamObject{ }; |
78 | 78 | $stream = new streamObject(); |
79 | 79 | $stream->name = $stream_name; |
80 | | -$stream->date_start_time = $org_start_time; |
| 80 | +$stream->date_start_time = $org_start_time; |
81 | 81 | $stream->sync_status = 'in_sync'; |
82 | 82 | $stream->duration = $duration; |
83 | | - |
84 | 83 | |
| 84 | + |
85 | 85 | $mvTitle = new MV_Title( 'Stream:' . $stream_name ); |
86 | 86 | if ( !$mvTitle->doesStreamExist() ) { |
87 | 87 | print $stream_name . " does not exist ... creating\n"; |
88 | | - // print 'do stream desc'."\n"; |
89 | | - |
| 88 | + // print 'do stream desc'."\n"; |
| 89 | + |
90 | 90 | if(!isset($MVStreams)) |
91 | 91 | $MVStreams = array(); |
92 | | - |
93 | | - // init the stream (legacy from old stream insert system) |
94 | | - $MVStreams[ $stream->name ] = new MV_Stream( $stream ); |
95 | | - |
| 92 | + |
| 93 | + // init the stream (legacy from old stream insert system) |
| 94 | + $MVStreams[ $stream->name ] = new MV_Stream( $stream ); |
| 95 | + |
96 | 96 | do_add_stream( $mvTitle, $stream ); |
97 | 97 | } |
98 | 98 | $stream_id = $mvTitle->getStreamId(); |
99 | 99 | print 'got stream id: '. $stream_id . "\n"; |
100 | 100 | |
101 | | -//check for & update stream files: |
| 101 | +//check for & update stream files: |
102 | 102 | do_stream_file_check( $stream ); |
103 | 103 | |
104 | 104 | |
— | — | @@ -108,9 +108,9 @@ |
109 | 109 | } |
110 | 110 | echo "working on: $filename \n"; |
111 | 111 | $ocroutput = ""; |
112 | | -//@@TODO we should do sequential output and parse the OCR file if it already exists. |
| 112 | +//@@TODO we should do sequential output and parse the OCR file if it already exists. |
113 | 113 | |
114 | | -//make sure we can write to the ocr file: |
| 114 | +//make sure we can write to the ocr file: |
115 | 115 | $ocrfileloc = "$workingdir/$stream_name.ocr"; |
116 | 116 | $fh = @fopen($ocrfileloc, 'a') or die ("\nError: can't write to ocr file\n"); |
117 | 117 | fclose($fh); |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | |
120 | 120 | $dbw = $dbr = wfGetDB( DB_MASTER ); |
121 | 121 | for ( $i = 0; $i < $duration; $i += $interval ) { |
122 | | - //only run the ffmpeg cmd if we have to: |
| 122 | + //only run the ffmpeg cmd if we have to: |
123 | 123 | if(!is_file("{$filedir}/{$i}.jpg") || $overwrite_image){ |
124 | 124 | if( is_file("{$filedir}/{$i}.jpg") ){ |
125 | 125 | print "overwriting image: {$i}.jpg\n"; |
— | — | @@ -126,23 +126,23 @@ |
127 | 127 | } |
128 | 128 | shell_exec( "ffmpeg -ss $i -i {$filename} -vcodec mjpeg -vframes 1 -an -f rawvideo -y {$filedir}/{$i}.jpg 2>&1" ); |
129 | 129 | } |
130 | | - |
| 130 | + |
131 | 131 | if(is_file("{$filedir}/{$i}.jpg")){ |
132 | 132 | //insert the image into the db: |
133 | 133 | $dbw->query( "INSERT INTO `mv_stream_images` (`stream_id`, `time`) VALUES ($stream_id, $i)" ); |
134 | | - |
| 134 | + |
135 | 135 | //get ocr: |
136 | 136 | shell_exec("convert {$filedir}/{$i}.jpg -crop 457x30+63+358 {$workingdir}/temp.{$stream_id}.ocr.tif && convert {$workingdir}/temp.{$stream_id}.ocr.tif -resize 300% -level 10%,1,20% -monochrome +compress {$workingdir}/temp.{$stream_id}.ocr.tif"); |
137 | 137 | shell_exec("tesseract {$workingdir}/temp.{$stream_id}.ocr.tif {$workingdir}/ocrtemp{$stream_id} nobatch lettersonly 2>&1"); |
138 | 138 | $ocr = shell_exec("tail {$workingdir}/ocrtemp{$stream_id}.txt") ." at " . seconds2npt($i) ." \n"; |
139 | 139 | echo 'got ocr:'. $ocr; |
140 | | - $ocroutput .= $ocr; |
141 | | - |
| 140 | + $ocroutput .= $ocr; |
| 141 | + |
142 | 142 | }else{ |
143 | | - print "failed to create file: {$filedir}/{$i}.jpg \n"; |
| 143 | + print "failed to create file: {$filedir}/{$i}.jpg \n"; |
144 | 144 | } |
145 | 145 | } |
146 | | -//remove temporary files: |
| 146 | +//remove temporary files: |
147 | 147 | shell_exec("rm {$workingdir}/ocrtemp{$i}.txt"); |
148 | 148 | shell_exec("rm {$workingdir}/temp.{$stream_id}.ocr.tif"); |
149 | 149 | |
Index: trunk/extensions/MetavidWiki/maintenance/MV_TaskRunner.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_taskRunner.php Created on Nov 29, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
Index: trunk/extensions/MetavidWiki/maintenance/ogg_thumb_insert.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * ogg_thum_insert.php Created on Mar 13, 2008 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
Index: trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * metavid2mvWiki.php Created on May 8, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
— | — | @@ -19,12 +19,12 @@ |
20 | 20 | |
21 | 21 | // include util functions: |
22 | 22 | require_once( 'maintenance_util.inc.php' ); |
23 | | -/* |
| 23 | +/** |
24 | 24 | * assume the wiki user has access to the metavid table and that the |
25 | 25 | * metavid table is titled `metavid` |
26 | 26 | */ |
27 | 27 | |
28 | | -/* |
| 28 | +/** |
29 | 29 | * default pages (@@todo move to install script) |
30 | 30 | |
31 | 31 | |
— | — | @@ -90,19 +90,19 @@ |
91 | 91 | 'all_sync_past_date' --date [mm/dd/yy] all in_sync streams past date (-d option required) |
92 | 92 | [stream_name] will insert all records for the given stream name |
93 | 93 | 'people' [person_name] will insert all the people articles optional followed by a person name |
94 | | - 'bill' [bill_key]? ...empty bill key will insert all bills based on gov track subject page |
| 94 | + 'bill' [bill_key]? ...empty bill key will insert all bills based on gov track subject page |
95 | 95 | 'interest' will insert interests (uses people as base so run people first) |
96 | 96 | 'update_templates' will update templates & some semantic properties |
97 | 97 | 'file_check' checks inserted streams file urls/pointers |
98 | 98 | 'do_stream_date_check' |
99 | | - 'do_remove_orphaned_streams' |
100 | | - 'mvd_consistancy_check' makes sure all mvd text layers are consistent |
| 99 | + 'do_remove_orphaned_streams' |
| 100 | + 'mvd_consistancy_check' makes sure all mvd text layers are consistent |
101 | 101 | |
102 | 102 | EOT; |
103 | 103 | exit (); |
104 | 104 | } |
105 | 105 | |
106 | | -/* |
| 106 | +/** |
107 | 107 | * set up the article set for the given stream/set |
108 | 108 | */ |
109 | 109 | $mvForceUpdate = ( isset( $options['force'] ) ) ? true:false; |
— | — | @@ -120,7 +120,7 @@ |
121 | 121 | case 'all_sync_past_date': |
122 | 122 | if ( !isset( $options['date'] ) )die( 'date missing' . "\n" ); |
123 | 123 | do_stream_insert( 'all_sync_past_date' ); |
124 | | - break; |
| 124 | + break; |
125 | 125 | case 'people' : |
126 | 126 | $force = ( isset( $options['force'] ) ) ? true:false; |
127 | 127 | $person_name = ( isset( $args[1] ) ) ? $args[1]:''; |
— | — | @@ -156,5 +156,5 @@ |
157 | 157 | break; |
158 | 158 | default : |
159 | 159 | do_stream_insert( 'stream', $args[0] ); |
160 | | - break; |
| 160 | + break; |
161 | 161 | } |
Index: trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * metavid2mvWiki.inc.php Created on Jan 19, 2008 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
— | — | @@ -483,7 +483,7 @@ |
484 | 484 | do_update_wiki_page( 'Ht_en:' . $page_title, $page_body, MV_NS_MVD ); |
485 | 485 | } |
486 | 486 | } |
487 | | -/* |
| 487 | +/** |
488 | 488 | * for each image add it to the image directory |
489 | 489 | */ |
490 | 490 | function do_process_images( $stream, $force = false ) { |
Index: trunk/extensions/MetavidWiki/maintenance/scrape_and_insert.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * scrape_and_insert.php Created on Oct 1, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | EOT; |
40 | 40 | exit(); |
41 | 41 | } |
42 | | -/* |
| 42 | +/** |
43 | 43 | * procc the request |
44 | 44 | */ |
45 | 45 | function proc_args() { |
Index: trunk/extensions/MetavidWiki/maintenance/maintenance_util.inc.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * maintenance_util.inc.php Created on Jan 19, 2008 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | * Maintenance Utility Functions: |
15 | 15 | */ |
16 | 16 | require_once ( '../../../maintenance/commandLine.inc' ); |
17 | | - /* |
| 17 | +/** |
18 | 18 | * set up the bot user: |
19 | 19 | */ |
20 | 20 | $botUserName = 'MvBot'; |
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php |
— | — | @@ -419,7 +419,7 @@ |
420 | 420 | } |
421 | 421 | } |
422 | 422 | |
423 | | -/* |
| 423 | +/** |
424 | 424 | * Utility functions: |
425 | 425 | */ |
426 | 426 | function mvOutputJSON( & $data ) { |
— | — | @@ -513,7 +513,7 @@ |
514 | 514 | return true; |
515 | 515 | return false; |
516 | 516 | } |
517 | | -/* |
| 517 | +/** |
518 | 518 | * simple array increment (supports up two 2 dim deep) |
519 | 519 | * should be a cleaner way to write this... hmm... |
520 | 520 | */ |
— | — | @@ -540,7 +540,7 @@ |
541 | 541 | } |
542 | 542 | } |
543 | 543 | |
544 | | -/* |
| 544 | +/** |
545 | 545 | * takes ntp time of format hh:mm:ss and converts to seconds |
546 | 546 | */ |
547 | 547 | function npt2seconds( $str_time ) { |
— | — | @@ -558,7 +558,7 @@ |
559 | 559 | } |
560 | 560 | return ( $hours * 3600 ) + ( $min * 60 ) + $sec; |
561 | 561 | } |
562 | | -/* |
| 562 | +/** |
563 | 563 | * takes seconds duration and return hh:mm:ss time |
564 | 564 | */ |
565 | 565 | function seconds2npt( $seconds, $short = false ) { |
— | — | @@ -607,7 +607,7 @@ |
608 | 608 | } |
609 | 609 | return $o; |
610 | 610 | } |
611 | | -/* |
| 611 | +/** |
612 | 612 | * converts seconds to time unit array |
613 | 613 | */ |
614 | 614 | function time_duration_2array ( $seconds, $periods = null ) { |
— | — | @@ -644,7 +644,7 @@ |
645 | 645 | } |
646 | 646 | return $values; |
647 | 647 | } |
648 | | -/* |
| 648 | +/** |
649 | 649 | * direct output for quick creation of non editable pages (errors, stream access etc) |
650 | 650 | */ |
651 | 651 | function mvOutputSpecialPage( $title, & $page ) { |
— | — | @@ -719,7 +719,7 @@ |
720 | 720 | } |
721 | 721 | } |
722 | 722 | |
723 | | -/* |
| 723 | +/** |
724 | 724 | * global MV_Stream server |
725 | 725 | * @@todo cache this function |
726 | 726 | */ |
Index: trunk/extensions/MetavidWiki/includes/MV_Stream.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_Stream.php Created on Apr 24, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/MV_StreamFile.php |
— | — | @@ -1,17 +1,17 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_StreamFiles.php Created on Sep 25, 2007 |
5 | | - * |
| 5 | + * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
12 | 12 | */ |
13 | 13 | if ( !defined( 'MEDIAWIKI' ) ) die( 1 ); |
14 | 14 | /* |
15 | | - * MvStreamFile handles the mapping of path types to urls & |
| 15 | + * MvStreamFile handles the mapping of path types to urls & |
16 | 16 | * active record style management of the mv_stream_files table |
17 | 17 | */ |
18 | 18 | class MV_StreamFile { |
— | — | @@ -23,8 +23,8 @@ |
24 | 24 | var $id = ''; |
25 | 25 | var $path = ''; |
26 | 26 | var $_parent_stream = null; |
27 | | - |
28 | | - // @@todo this should not be hard coded... read the header of the file? or extend path_type |
| 27 | + |
| 28 | + // @@todo this should not be hard coded... read the header of the file? or extend path_type |
29 | 29 | function getTypeForQK( $key ) { |
30 | 30 | global $mvMsgContentTypeLookup; |
31 | 31 | if ( isset( $mvMsgContentTypeLookup[$key] ) ) |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | } |
34 | 34 | function __construct( &$parent_stream, $initRow = '' ) { |
35 | 35 | $this->_parent_stream =& $parent_stream; |
36 | | - // no init val.. populate from db |
| 36 | + // no init val.. populate from db |
37 | 37 | if ( $this->_parent_stream && $initRow == '' ) { |
38 | 38 | $this->getStreamFileDB(); |
39 | 39 | } else { |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | if ( isset( $mvMsgContentTypeLookup[$this->file_desc_msg] ) ) { |
54 | 54 | return $mvMsgContentTypeLookup[$this->file_desc_msg]; |
55 | 55 | } |
56 | | - // default content type? |
| 56 | + // default content type? |
57 | 57 | return 'application/octet-stream'; |
58 | 58 | } |
59 | 59 | function updateValues( $initRow ) { |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | 'path' => $this->path |
81 | 81 | ), __METHOD__ ); |
82 | 82 | } else { |
83 | | - // update: |
| 83 | + // update: |
84 | 84 | $dbw->update( 'mv_stream_files', array( |
85 | 85 | 'base_offset' => $this->base_offset, |
86 | 86 | 'duration' => $this->duration, |
— | — | @@ -106,14 +106,14 @@ |
107 | 107 | } |
108 | 108 | } |
109 | 109 | // @@todo as mentioned before we should better integrate with medaiWikis commons file system |
110 | | - // returns the local path (if the video file is local) if not return null |
| 110 | + // returns the local path (if the video file is local) if not return null |
111 | 111 | function getLocalPath( $quality = null ) { |
112 | 112 | global $mvLocalVideoLoc, $mvDefaultVideoQualityKey; |
113 | 113 | if ( $quality == null )$quality = $mvDefaultVideoQualityKey; |
114 | | - |
| 114 | + |
115 | 115 | if ( !is_dir( $mvLocalVideoLoc ) )return null; |
116 | 116 | if ( !is_file( $mvLocalVideoLoc . $this->_parent_stream->getStreamName() ) )return null; |
117 | | - // all looks good return: |
| 117 | + // all looks good return: |
118 | 118 | return $mvLocalVideoLoc . $this->_parent_stream->getStreamName(); |
119 | 119 | } |
120 | 120 | function getDuration(){ |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | return ( $this->path_type == 'url_anx' || $this->path_type=='mp4_stream' ); |
135 | 135 | } |
136 | 136 | function getFullURL() { |
137 | | - // @@todo check on path if local |
| 137 | + // @@todo check on path if local |
138 | 138 | return $this->getPath(); |
139 | 139 | } |
140 | 140 | function get_desc() { |
Index: trunk/extensions/MetavidWiki/includes/MV_EditStreamPage.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_EditStreamPage.php Created on Nov 28, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/MV_StreamImage.php |
— | — | @@ -1,15 +1,15 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_OggImage.php Created on Nov 29, 2007 |
5 | | - * |
| 5 | + * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
12 | | - * |
13 | | - * set up all the default settings (can be overwritten) |
| 12 | + * |
| 13 | + * set up all the default settings (can be overwritten) |
14 | 14 | */ |
15 | 15 | |
16 | 16 | // two modes -stand alone- and -mediaWiki- |
— | — | @@ -19,14 +19,14 @@ |
20 | 20 | // serves up images and does necessary transforms if the file does not exist |
21 | 21 | // @@TODO in the future it would be ideal if it was integrated similar to oggHandler |
22 | 22 | // http://www.mediawiki.org/wiki/Extension:OggHandler |
23 | | -// (ie streams images use normal mediaWiki file handlers and |
24 | | -// are placed in the image directory) |
| 23 | +// (ie streams images use normal mediaWiki file handlers and |
| 24 | +// are placed in the image directory) |
25 | 25 | // * this is not easy to enforce while *Stream* is not tied to a given uploaded file* |
26 | | -// all static functions: |
| 26 | +// all static functions: |
27 | 27 | class MV_StreamImage { |
28 | 28 | /* |
29 | 29 | * getStreamImageURL |
30 | | - * |
| 30 | + * |
31 | 31 | * @parm: |
32 | 32 | * $stream_name: the unique stream name |
33 | 33 | * $req_time: the requested time in seconds or ntp format: hh:mm:ss |
— | — | @@ -36,15 +36,15 @@ |
37 | 37 | */ |
38 | 38 | function getStreamImageURL( $stream_id, $req_time = null, $req_size = null, $directLink = false ) { |
39 | 39 | global $wgScript, $mvWebImgLoc, $mvLocalImgLoc, $mvExternalImages; |
40 | | - // check global external image prefrence: |
| 40 | + // check global external image prefrence: |
41 | 41 | $req_size_out = ( $req_size != null ) ? '&size=' . $req_size :''; |
42 | 42 | if ( $mvExternalImages ) { |
43 | 43 | global $mvExternalImgServerPath; |
44 | | - // try to get the stream_name for external requests: |
| 44 | + // try to get the stream_name for external requests: |
45 | 45 | $sn = MV_Stream::getStreamNameFromId( $stream_id ); |
46 | 46 | return $mvExternalImgServerPath . '?action=ajax&rs=mv_frame_server&stream_name=' . $sn . '&t=' . $req_time . $req_size_out; |
47 | 47 | } |
48 | | - |
| 48 | + |
49 | 49 | // by default return a non-direct link so that javascript can modify the url to get time offsets |
50 | 50 | if ( !$directLink ) { |
51 | 51 | return $wgScript . '?action=ajax&rs=mv_frame_server&stream_id=' . |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | return htmlspecialchars( $mvWebImgLoc ) . '/' . MV_StreamImage::getRelativeImagePath( $stream_id ) . |
70 | 70 | '/' . htmlspecialchars( $req_time ) . htmlspecialchars( $s ) . '.' . htmlspecialchars( $ext ); |
71 | 71 | } else { |
72 | | - // throw 'error finding image'; |
| 72 | + // throw 'error finding image'; |
73 | 73 | return MV_StreamImage::getMissingImageURL( $req_size ); |
74 | 74 | } |
75 | 75 | } |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | list( $im_width, $im_height, $ext ) = MV_StreamImage::getSizeType( $req_size ); |
80 | 80 | $s = ''; |
81 | 81 | if ( $req_size )$s = '_' . $im_width . 'x' . $im_height; |
82 | | - |
| 82 | + |
83 | 83 | if ( MV_StreamImage::getMissingImagePath( $req_size, $s, $ext ) ) { |
84 | 84 | return htmlspecialchars( $mvWebImgLoc ) . '/images_not_available' . $s . '.' . $ext; |
85 | 85 | } |
— | — | @@ -88,12 +88,12 @@ |
89 | 89 | list( $im_width, $im_height, $ext ) = MV_StreamImage::getSizeType( $req_size ); |
90 | 90 | $s = ''; |
91 | 91 | if ( $req_size )$s = '_' . $im_width . 'x' . $im_height; |
92 | | - |
| 92 | + |
93 | 93 | if ( is_file( $mvLocalImgLoc . '/images_not_available' . $s . '.' . $ext ) ) { |
94 | 94 | return htmlspecialchars( $mvLocalImgLoc ) . |
95 | 95 | '/images_not_available' . htmlspecialchars( $s ) . '.' . htmlspecialchars( $ext ); |
96 | 96 | } else { |
97 | | - // try and generate it; |
| 97 | + // try and generate it; |
98 | 98 | if ( !MV_StreamImage::doTransformImage( $mvLocalImgLoc . '/images_not_available.jpg', |
99 | 99 | $mvLocalImgLoc . '/images_not_available' . $s . '.' . $ext, |
100 | 100 | $im_width, $im_height, $ext ) ) { |
— | — | @@ -104,23 +104,23 @@ |
105 | 105 | } |
106 | 106 | } |
107 | 107 | function getStreamImageRaw( $stream_id, $req_time = null, $req_size = null ) { |
108 | | - //set out a long expire: |
109 | | - //keep in the cache for a 90 days: |
| 108 | + //set out a long expire: |
| 109 | + //keep in the cache for a 90 days: |
110 | 110 | header('Expires: ' . gmdate('D, d M Y H:i:s', time()+90*24*60*60) . ' GMT'); |
111 | | - |
| 111 | + |
112 | 112 | // print "get raw img\n"; |
113 | 113 | $req_time = MV_StreamImage::procRequestTime( $stream_id, $req_time ); |
114 | 114 | list( $im_width, $im_height, $ext ) = MV_StreamImage::getSizeType( $req_size ); |
115 | | - |
| 115 | + |
116 | 116 | if ( !$req_time ) { |
117 | 117 | $img_path = $s = '_' . $im_width . 'x' . $im_height; |
118 | 118 | } |
119 | 119 | $img_path = MV_StreamImage::getLocalImagePath( $stream_id, $req_time, $req_size ); |
120 | 120 | list( $im_width, $im_height, $ext ) = MV_StreamImage::getSizeType( $req_size ); |
121 | 121 | if ( $ext == 'jpg' )header( "Content-type: image/jpeg" ); |
122 | | - if ( $ext == 'png' )header( "Content-type: image/png" ); |
| 122 | + if ( $ext == 'png' )header( "Content-type: image/png" ); |
123 | 123 | // print "img path: $img_path"; |
124 | | - // @@todo a redirect to real image (will serv from cache that way) |
| 124 | + // @@todo a redirect to real image (will serv from cache that way) |
125 | 125 | if ( is_file( $img_path ) ) { |
126 | 126 | // print "file present: $img_path"; |
127 | 127 | @readfile( $img_path ); |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | // if($req_time<$mvImageGranularityRate)$req_time = $mvImageGranularityRate; |
148 | 148 | $vars = " `id`, `time`, `time`-'$req_time' as distance "; |
149 | 149 | $conds = " `stream_id`=" . mysql_real_escape_string( $stream_id ) . " |
150 | | - AND (`time`-'$req_time')>=0 |
| 150 | + AND (`time`-'$req_time')>=0 |
151 | 151 | AND (`time`-'$req_time')<= " . mysql_real_escape_string( $mvImageGranularityRate ); |
152 | 152 | $opt['ORDER BY'] = ' `distance` ASC '; |
153 | 153 | $opt['LIMIT'] = 1; |
— | — | @@ -160,7 +160,7 @@ |
161 | 161 | if ( $dbr->numRows( $res ) == 0 ) { |
162 | 162 | // could do a request to generate image for video here: |
163 | 163 | if ( MV_StreamImage::genLocalStreamImage( $stream_id, $req_time, '320x240' ) ) { |
164 | | - // we just generated the current request time return it as valid: |
| 164 | + // we just generated the current request time return it as valid: |
165 | 165 | return $req_time; |
166 | 166 | } else { |
167 | 167 | return false; |
— | — | @@ -186,7 +186,7 @@ |
187 | 187 | } else { |
188 | 188 | // Based on settings we may do an ffmpeg call here: |
189 | 189 | // @@FFMPEG call goes here: |
190 | | - // make the call to generate the image for that time: |
| 190 | + // make the call to generate the image for that time: |
191 | 191 | return MV_StreamImage::genLocalStreamImage( $stream_id, $req_time, $req_size ); |
192 | 192 | } |
193 | 193 | } else { |
— | — | @@ -198,17 +198,17 @@ |
199 | 199 | } else { |
200 | 200 | |
201 | 201 | if ( !is_file( $base_img ) ) { |
202 | | - // print "missing base img $base_img \n"; |
| 202 | + // print "missing base img $base_img \n"; |
203 | 203 | $img_file = MV_StreamImage::genLocalStreamImage( $stream_id, $req_time, $req_size ); |
204 | 204 | if ( is_file( $base_img ) ) { |
205 | | - // got file successful: |
| 205 | + // got file successful: |
206 | 206 | // continue: |
207 | 207 | } else { |
208 | 208 | return false; |
209 | 209 | } |
210 | 210 | } |
211 | 211 | // would be great to use mediaWIki's bitmap transform but not super easy to integrate... |
212 | | - // @@todo eventually we should integrate with oggHanlder... |
| 212 | + // @@todo eventually we should integrate with oggHanlder... |
213 | 213 | // $thumb = Bitmap::doTransform($image) |
214 | 214 | if ( !MV_StreamImage::doTransformImage( $base_img, $img_file, $im_width, $im_height, $ext ) ) { |
215 | 215 | // print 'failed image transform\n'; |
— | — | @@ -223,7 +223,7 @@ |
224 | 224 | $gd_img_base = imagecreatefromjpeg( $base_img ); |
225 | 225 | $gd_img_dest = imagecreatetruecolor( $im_width, $im_height ); |
226 | 226 | imagecopyresampled( $gd_img_dest, $gd_img_base, 0, 0, 0, 0, $im_width, $im_height, $base_width, $base_height ); |
227 | | - |
| 227 | + |
228 | 228 | if ( $ext == 'jpg' ) { |
229 | 229 | // write out the image: |
230 | 230 | if ( !imagejpeg( $gd_img_dest, $img_file, 90 ) ) { |
— | — | @@ -242,7 +242,7 @@ |
243 | 243 | } |
244 | 244 | imagedestroy( $gd_img_base ); |
245 | 245 | imagedestroy( $gd_img_dest ); |
246 | | - // success: |
| 246 | + // success: |
247 | 247 | return true; |
248 | 248 | } |
249 | 249 | function getLocalImageDir( $stream_id ) { |
— | — | @@ -281,11 +281,11 @@ |
282 | 282 | $width = 480; $height = 360; |
283 | 283 | break; |
284 | 284 | case 'full': case '720x540': |
285 | | - // this is somewhat legacy as our capture card is now set to 512x384 but in a HQ setup could be useful. |
| 285 | + // this is somewhat legacy as our capture card is now set to 512x384 but in a HQ setup could be useful. |
286 | 286 | $width = 720; $height = 540; |
287 | 287 | break; |
288 | 288 | default: |
289 | | - // defaults to 320x240 if size does not match above: |
| 289 | + // defaults to 320x240 if size does not match above: |
290 | 290 | $width = 320; $height = 240; |
291 | 291 | break; |
292 | 292 | } |
— | — | @@ -320,7 +320,7 @@ |
321 | 321 | MV_StreamImage::getLocalStreamPath( $stream_id ); |
322 | 322 | |
323 | 323 | if ( is_file( $streampath ) ) { |
324 | | - // check if the ffmpeg extension is installed: |
| 324 | + // check if the ffmpeg extension is installed: |
325 | 325 | $extension = "ffmpeg"; |
326 | 326 | $extension_soname = $extension . "." . PHP_SHLIB_SUFFIX; |
327 | 327 | $extension_fullname = PHP_EXTENSION_DIR . "/" . $extension_soname; |
— | — | @@ -354,7 +354,7 @@ |
355 | 355 | $insAry = array (); |
356 | 356 | $insAry[stream_id] = $stream_id; |
357 | 357 | $insAry[time] = $req_time; |
358 | | - |
| 358 | + |
359 | 359 | $db = & wfGetDB( DB_WRITE ); |
360 | 360 | if ( $db->insert( $mvStreamImageTable, $insAry ) ) { |
361 | 361 | return $img_file; |
— | — | @@ -369,7 +369,7 @@ |
370 | 370 | |
371 | 371 | function getLocalStreamPath ( $stream_id, $quality = '' ) { |
372 | 372 | global $mvStreamTable, $mvLocalVideoLoc; |
373 | | - // grab streamFile |
| 373 | + // grab streamFile |
374 | 374 | $stream =& mvGetMVStream( array( 'id' => $stream_id ) ); |
375 | 375 | $stream->db_load_stream(); |
376 | 376 | $streamFile = new MV_StreamFile( $stream ); |
Index: trunk/extensions/MetavidWiki/includes/MV_MagicWords.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_MagicWords.php Created on May 16, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
— | — | @@ -81,7 +81,7 @@ |
82 | 82 | function getTotalLength(){ |
83 | 83 | $dbr = & wfGetDB( DB_READ ); |
84 | 84 | $result =& $dbr->query('SELECT SUM( `duration` ) as `dur` |
85 | | -FROM `mv_streams` '); |
| 85 | +FROM `mv_streams` '); |
86 | 86 | if ( $dbr->numRows( $result ) == 0 ) { |
87 | 87 | return ''; |
88 | 88 | } else { |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | $ms->filters[] = array ( 'a' => 'and', 't' => 'bill', 'v' => $bill_name ); |
103 | 103 | $ms->doSearch( $log_search = false ); |
104 | 104 | return $ms->getUnifiedResultsHTML( $show_sidebar = false ); |
105 | | - } |
| 105 | + } |
106 | 106 | function getPersonOut( $sp_mode = 'speech_by' ) { |
107 | 107 | if ( $this->params['person'] != '' ) { |
108 | 108 | $person_name = $this->params['person']; |
— | — | @@ -154,11 +154,11 @@ |
155 | 155 | $outItems = Array(); |
156 | 156 | while ( $row = $dbr->fetchObject( $result ) ) { |
157 | 157 | $row->stream_id = $row->id; |
158 | | - //$row->end_time = $row->duration; |
159 | | - //get the first speech in that day: |
160 | | - $o = $this->getItemOutput($row, array('use_mvd_time'=>true, 'remove_no_meta'=>true)); |
| 158 | + //$row->end_time = $row->duration; |
| 159 | + //get the first speech in that day: |
| 160 | + $o = $this->getItemOutput($row, array('use_mvd_time'=>true, 'remove_no_meta'=>true)); |
161 | 161 | if($o) |
162 | | - $outItems[]=$o; |
| 162 | + $outItems[]=$o; |
163 | 163 | } |
164 | 164 | return $this->formatOutputItems($outItems); |
165 | 165 | } |
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | $dbr = & wfGetDB( DB_READ ); |
170 | 170 | $o = ''; |
171 | 171 | $vars = array( 'query_key', 'stream_id', 'start_time', 'end_time', 'COUNT(1) as hit_count' ); |
172 | | - $conds = array( 'view_date >=' . $dbr->addQuotes( $this->getStartTime() ) ); |
| 172 | + $conds = array( 'view_date >=' . $dbr->addQuotes( $this->getStartTime() ) ); |
173 | 173 | $options = array( 'GROUP BY' => 'query_key', 'ORDER BY' => '`hit_count` DESC ', |
174 | 174 | 'LIMIT' => intval( $this->params['num_results'] ) ); |
175 | 175 | $result = $dbr->select( 'mv_clipview_digest', |
— | — | @@ -184,18 +184,18 @@ |
185 | 185 | while ( $row = $dbr->fetchObject( $result ) ) { |
186 | 186 | $o = $this->getItemOutput($row); |
187 | 187 | if($o) |
188 | | - $outItems[]=$o; |
| 188 | + $outItems[]=$o; |
189 | 189 | } |
190 | 190 | return $this->formatOutputItems($outItems); |
191 | 191 | } |
192 | | - |
| 192 | + |
193 | 193 | } |
194 | 194 | function getItemOutput( $row, $opt=array() ){ |
195 | 195 | global $wgUser; |
196 | | - $sk = $wgUser->getSkin(); |
| 196 | + $sk = $wgUser->getSkin(); |
197 | 197 | //set defaults: |
198 | 198 | $person_ht = $bill_ht = $category_ht = $o= ''; |
199 | | - |
| 199 | + |
200 | 200 | if(!isset($row->start_time)){ |
201 | 201 | $row->start_time=0; |
202 | 202 | } |
— | — | @@ -213,7 +213,7 @@ |
214 | 214 | $options = array( 'limit' => 1 ) |
215 | 215 | ); |
216 | 216 | if ( count( $mvd_rows ) != 0 ) { |
217 | | - reset( $mvd_rows ); |
| 217 | + reset( $mvd_rows ); |
218 | 218 | $mvd_row = current( $mvd_rows ); |
219 | 219 | if( isset($opt['use_mvd_time']) && $opt['use_mvd_time'] ){ |
220 | 220 | $row->start_time = $mvd_row->start_time; |
— | — | @@ -239,7 +239,7 @@ |
240 | 240 | } |
241 | 241 | global $wgContLang; |
242 | 242 | $mvdNStxt = $wgContLang->getNsText(MV_NS_MVD); |
243 | | - |
| 243 | + |
244 | 244 | //grab categories if no bill or speech |
245 | 245 | if( $this->params['display_cat'] || $mvd_out_html=='' ){ |
246 | 246 | $dbr = wfGetDB( DB_READ ); |
— | — | @@ -258,29 +258,29 @@ |
259 | 259 | $mvd_out_html.='</span><br />'; |
260 | 260 | } |
261 | 261 | } |
262 | | - }else{ |
| 262 | + }else{ |
263 | 263 | //we have not meta |
264 | 264 | //if( isset($opt['remove_no_meta']) && $opt['remove_no_meta']) |
265 | 265 | //return false; |
266 | 266 | } |
267 | | - |
268 | | - |
269 | | - // first make link and stream title: |
| 267 | + |
| 268 | + |
| 269 | + // first make link and stream title: |
270 | 270 | $mvStream = MV_Stream::newStreamByID( $row->stream_id ); |
271 | 271 | if( ! $mvStream->doesStreamExist() ){ |
272 | 272 | return false; |
273 | 273 | } |
274 | 274 | //limit our output range to < 20 min |
275 | 275 | if( ($row->end_time - $row->start_time) > 20*60) |
276 | | - $row->end_time = $row->start_time + 20*60; |
277 | | - |
| 276 | + $row->end_time = $row->start_time + 20*60; |
| 277 | + |
278 | 278 | $nt = $mvStream->getStreamName() . '/' . seconds2npt( $row->start_time ) |
279 | 279 | . '/' . seconds2npt( $row->end_time ); |
280 | 280 | $mvTitle = new MV_Title( $nt, MV_NS_STREAM ); |
281 | | - |
| 281 | + |
282 | 282 | $mvStreamTitle = Title :: MakeTitle( MV_NS_STREAM, $mvTitle->getNearStreamName( $extra_range = '0' ) ); |
283 | | - |
284 | | - |
| 283 | + |
| 284 | + |
285 | 285 | // output the image: |
286 | 286 | $o .= $sk->makeKnownLinkObj( $mvStreamTitle, |
287 | 287 | '<img alt="image for ' . $mvTitle->getStreamNameText() . ' ' . |
— | — | @@ -304,8 +304,8 @@ |
305 | 305 | $sk->makeKnownLinkObj( $mvStreamTitle, |
306 | 306 | $title_span, |
307 | 307 | 'tl=1' ) . |
308 | | - '</span>'; |
309 | | - //add mvd_annotative output: |
| 308 | + '</span>'; |
| 309 | + //add mvd_annotative output: |
310 | 310 | $o.=$mvd_out_html; |
311 | 311 | return $o; |
312 | 312 | } |
— | — | @@ -366,7 +366,7 @@ |
367 | 367 | $dbr->tableName( 'mv_query_key_lookup' ) . '.query_key ' . |
368 | 368 | ' ) '; |
369 | 369 | $conds = '`time` >= ' . $dbr->addQuotes( $this->getStartTime() ); |
370 | | - |
| 370 | + |
371 | 371 | $options['GROUP BY'] = $dbr->tableName( 'mv_search_digest' ) . '.query_key'; |
372 | 372 | $options['ORDER BY'] = '`hit_count` DESC'; |
373 | 373 | $options['LIMIT'] = $this->params['num_results']; |
Index: trunk/extensions/MetavidWiki/includes/MV_Settings.php |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | //wars people of archive inacuracys (given its a wiki and the source is close caption feed) |
143 | 143 | $mvEnableStreamNotice = false; |
144 | 144 | |
145 | | -/* |
| 145 | +/** |
146 | 146 | * All Available meta data layers |
147 | 147 | * these type keys are used to allow multiple layers of metadata per stream. |
148 | 148 | * These values key into template_names, msg_descriptions, and application logic ) |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | */ |
152 | 152 | $mvMVDTypeAllAvailable = array( 'ht_en', 'anno_en', 'thomas_en' ); |
153 | 153 | |
154 | | -/* |
| 154 | +/** |
155 | 155 | * the default display set of layers (must be a subset of $mvMVDTypeAllAvaliable) |
156 | 156 | * note: this is equivalent to ?mvd_tracks=ht_en,anno_en in the url for the stream page. |
157 | 157 | * this also dictates the default search layers |
Index: trunk/extensions/MetavidWiki/includes/MV_ImageGallery.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_ImageGallery.php Created on Oct 22, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/MV_Index.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_Index.php Created on May 16, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/MV_OggHandler.php |
— | — | @@ -1,9 +1,9 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * class to override oggHandler for compatibility/feature enhancement with metavid |
5 | | - * |
| 5 | + * |
6 | 6 | */ |
7 | 7 | |
8 | 8 | class mvOggHandler extends OggHandler{ |
9 | | - |
| 9 | + |
10 | 10 | } |
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialCRUDStream.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_SepcialAddStream.php Created on Apr 25, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialListStreams.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_SpecialListStreams.php Created on Apr 24, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | public function __construct( $name = 'Mv_List_Streams' ) { |
28 | 28 | parent::__construct( $name ); |
29 | 29 | } |
30 | | - |
| 30 | + |
31 | 31 | function isExpensive() { |
32 | 32 | return false; |
33 | 33 | } |
— | — | @@ -65,11 +65,11 @@ |
66 | 66 | return ' ORDER BY date_start_time DESC '; |
67 | 67 | // ($this->sortDescending() ? 'DESC' : ''); |
68 | 68 | } |
69 | | - |
| 69 | + |
70 | 70 | function getOrderFields() { |
71 | 71 | return array( 'date_start_time' ); |
72 | 72 | } |
73 | | - |
| 73 | + |
74 | 74 | function sortDescending() { |
75 | 75 | return false; |
76 | 76 | } |
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMVAdmin.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | |
4 | 4 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
5 | 5 | |
6 | | -/* |
| 6 | +/** |
7 | 7 | * MV_SpecialMVAdmin.php Created on Apr 24, 2007 |
8 | 8 | * |
9 | 9 | * All Metavid Wiki code is Released Under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_SpecialExport.php Created on Oct 23, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Created on Jul 26, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | } |
43 | 43 | } |
44 | 44 | } |
45 | | -/* |
| 45 | +/** |
46 | 46 | * simple/quick implementation ... |
47 | 47 | * @@todo future version should be better integrated with semantic wiki and or |
48 | 48 | * an external scalable search engine ie sphinx or lucene |
Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_StreamPage.php |
— | — | @@ -1,10 +1,10 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_StreamPage.php Created on Apr 24, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
— | — | @@ -12,26 +12,26 @@ |
13 | 13 | // make sure we have the mvStream class (which extends article): |
14 | 14 | if ( !defined( 'MEDIAWIKI' ) ) die( 1 ); |
15 | 15 | |
16 | | -/* |
| 16 | +/** |
17 | 17 | * process the Metavid page request and creates objects |
18 | | - * |
| 18 | + * |
19 | 19 | * eventually will support users creating their own "views" |
20 | 20 | * for now present the default view |
21 | 21 | * handle request of the following types: |
22 | | - * |
23 | | - * |
| 22 | + * |
| 23 | + * |
24 | 24 | * MvStream:stream_name -> pulls up first 20 min of stream_name |
25 | 25 | * MvStream:stream_name/ss:ss:ss -> pulls up 5 min starting at ss:ss:ss |
26 | 26 | * MvStream:stream_name/ss:ss:ss/ee:ee:ee pulls up requested segment |
27 | 27 | * @@todo we should limit how much metadata for a given query |
28 | | - * |
| 28 | + * |
29 | 29 | * future: |
30 | | - * |
| 30 | + * |
31 | 31 | * MvStream:stream_name/live if the stream is currently being captured |
32 | 32 | * show realtime broadcast |
33 | | - * |
| 33 | + * |
34 | 34 | * sequences stored in the sequence namespace: |
35 | | - * MvSequence:sequence_name |
| 35 | + * MvSequence:sequence_name |
36 | 36 | */ |
37 | 37 | |
38 | 38 | class MV_StreamPage extends Article { |
— | — | @@ -46,10 +46,10 @@ |
47 | 47 | } |
48 | 48 | public function view() { |
49 | 49 | global $wgRequest, $wgUser, $wgOut; |
50 | | - // @@TODO fix stream view() for old versions ... will likely have to replicate Article::view() |
| 50 | + // @@TODO fix stream view() for old versions ... will likely have to replicate Article::view() |
51 | 51 | |
52 | | - // include the metavid headers (for embedding video in the page) |
53 | | - |
| 52 | + // include the metavid headers (for embedding video in the page) |
| 53 | + |
54 | 54 | // copied from CategoryPage ... |
55 | 55 | $diff = $wgRequest->getVal( 'diff' ); |
56 | 56 | $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) ); |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | function outputWikiText( $text, $cache = true ) { |
64 | 64 | wfProfileIn( __METHOD__ ); |
65 | 65 | $MV_MetavidInterface = new MV_MetavidInterface( 'stream', $this ); |
66 | | - // will require the mv_embed script for video playback: |
| 66 | + // will require the mv_embed script for video playback: |
67 | 67 | //mvfAddHTMLHeader( 'stream_interface' ); |
68 | 68 | $MV_MetavidInterface->render_full(); |
69 | 69 | wfProfileOut( __METHOD__ ); |
— | — | @@ -72,8 +72,8 @@ |
73 | 73 | * of type Metavid:streamname |
74 | 74 | */ |
75 | 75 | function isEditable() { |
76 | | - // if full title contains no / and no : |
77 | | - // && its an existing stream than its editable |
| 76 | + // if full title contains no / and no : |
| 77 | + // && its an existing stream than its editable |
78 | 78 | if ( strpos( $this->mvTitle->getWikiTitle(), '/' ) !== false )return false; |
79 | 79 | if ( strpos( $this->mvTitle->getWikiTitle(), ':' ) !== false )return false; |
80 | 80 | // we should have already check if the stream exists |
— | — | @@ -84,21 +84,21 @@ |
85 | 85 | // @@TODO figure out a way to be a special page but not be in the special namepsace. |
86 | 86 | // namely hide the edit/discussion links and rarely cache |
87 | 87 | $wgTitle->mNamespace = NS_SPECIAL; |
88 | | - |
| 88 | + |
89 | 89 | // do some aditional stream proccessing throw an error if we have a type |
90 | 90 | if ( $this->mvTitle->getMvdTypeKey() != null ) { |
91 | 91 | $page = 'Bad format for Metavid request'; |
92 | 92 | return mvOutputSpecialPage( 'bad format for Metavid request', |
93 | 93 | $page ); |
94 | 94 | } |
95 | | - |
| 95 | + |
96 | 96 | $title = 'stream view'; |
97 | | - |
| 97 | + |
98 | 98 | // $wgOut->setPageTitle( $title ); |
99 | 99 | // $wgOut->setHTMLTitle( $title ); |
100 | 100 | $wgOut->setArticleRelated( false ); |
101 | 101 | $wgOut->enableClientCache( true ); |
102 | | - |
| 102 | + |
103 | 103 | $page = 'stream page'; |
104 | 104 | $wgOut->addHTML( $page ); |
105 | 105 | $wgOut->returnToMain( false ); |
Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_CategoryPage.php |
— | — | @@ -1,16 +1,16 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_CategoryPage.php Created on Oct 17, 2007 |
5 | | - * |
| 5 | + * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
12 | 12 | */ |
13 | 13 | // $wgHooks['CategoryPageView'][] = 'fnMyHook'; |
14 | | - // display all MVD category members as thumbnails... |
| 14 | + // display all MVD category members as thumbnails... |
15 | 15 | // display link to rss/playlist |
16 | 16 | |
17 | 17 | if ( !defined( 'MEDIAWIKI' ) ) die( 1 ); |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | class MvCategoryViewer extends CategoryViewer { |
23 | 23 | var $show_mv_links = false; |
24 | 24 | private $already_named_resource = array(); |
25 | | - |
| 25 | + |
26 | 26 | function getHTML() { |
27 | 27 | $s = ''; |
28 | 28 | return $s . parent::getHTML(); |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | $title->getNamespace() == MV_NS_STREAM || |
73 | 73 | $title->getNamespace() == MV_NS_SEQUENCE ) { |
74 | 74 | $this->show_mv_links = true; |
75 | | - |
| 75 | + |
76 | 76 | // make sure we don't do duplicate stream links: |
77 | 77 | $mvTitle = new MV_Title( $title ); |
78 | 78 | if ( !isset( $this->already_named_resource[$mvTitle->getStreamName() . '/' . $mvTitle->getTimeRequest()] ) ) { |
— | — | @@ -113,8 +113,8 @@ |
114 | 114 | if ( $this->showGallery && ! $this->gallery->isEmpty() ) { |
115 | 115 | $title = SpecialPage::getTitleFor( 'MediaSearch' ); |
116 | 116 | $query = 'f[0][t]=' . urlencode( 'category' ) . '&f[0][v]=' . $wgTitle->getDBkey(); |
117 | | - // don't output the cat link for now: |
118 | | - // $search_link = $sk->makeKnownLinkObj($title,wfMsg('mv_search_category').":".$wgTitle->getText(), $query); |
| 117 | + // don't output the cat link for now: |
| 118 | + // $search_link = $sk->makeKnownLinkObj($title,wfMsg('mv_search_category').":".$wgTitle->getText(), $query); |
119 | 119 | // wfMsg('mv_cat_search_note', $search_link) . |
120 | 120 | return "<div id=\"mw-category-media\">\n" . |
121 | 121 | $s . |
Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_SequencePage.php Created on Oct 17, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
— | — | @@ -36,15 +36,15 @@ |
37 | 37 | |
38 | 38 | $parserOptions = ParserOptions::newFromUser( $wgUser ); |
39 | 39 | $parserOptions->addExtraKey( 'mv:seq-xml' ); //differentiate the articles xml from article |
40 | | - |
| 40 | + |
41 | 41 | if( $wgEnableParserCache ) { |
42 | 42 | $mvParserCache = ParserCache::singleton(); |
43 | 43 | $parserOutput = $mvParserCache->get( $this, $parserOptions ); |
44 | | - |
| 44 | + |
45 | 45 | if( $parserOutput != false ) |
46 | 46 | return $parserOutput->getText(); |
47 | 47 | } |
48 | | - |
| 48 | + |
49 | 49 | //get the high level sequence description: |
50 | 50 | $this->getSequenceHLRD(); |
51 | 51 | $this->parseHLRD_DOM(); |
Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_DataPage.php |
— | — | @@ -1,16 +1,16 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_DataPage.php Created on Apr 24, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
12 | 12 | */ |
13 | 13 | if ( !defined( 'MEDIAWIKI' ) ) die( 1 ); |
14 | | - |
| 14 | + |
15 | 15 | class MV_DataPage extends Article { |
16 | 16 | function __construct( $title, & $mvTitle = false ) { |
17 | 17 | if ( $mvTitle )$this->mvTitle = $mvTitle; |
— | — | @@ -18,14 +18,14 @@ |
19 | 19 | } |
20 | 20 | public function view() { |
21 | 21 | global $wgRequest, $wgUser, $wgOut; |
22 | | - |
| 22 | + |
23 | 23 | // copied from CategoryPage ... |
24 | 24 | $diff = $wgRequest->getVal( 'diff' ); |
25 | 25 | $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) ); |
26 | 26 | if ( isset( $diff ) || $diffOnly ) { |
27 | 27 | return Article::view(); |
28 | 28 | } |
29 | | - // include the metavid headers (for embedding video in the page) |
| 29 | + // include the metavid headers (for embedding video in the page) |
30 | 30 | $wgOut->setPageTitle( $this->mvTitle->getTitleDesc() ); |
31 | 31 | $wgOut->addHTML( $this->mvArticleTop() ); |
32 | 32 | Article::view(); |
— | — | @@ -79,28 +79,28 @@ |
80 | 80 | $skin = $wgUser->getSkin(); |
81 | 81 | $wgOut->addHTML( '<strong>' . wfMsg( 'historywarning' ) . ' ' . $skin->historyLink() . '</strong>' ); |
82 | 82 | } |
83 | | - |
| 83 | + |
84 | 84 | return $this->confirmDelete( '', $reason ); |
85 | 85 | } |
86 | 86 | /* |
87 | | - * function article top |
| 87 | + * function article top |
88 | 88 | * @return MV dataPage top html |
89 | 89 | */ |
90 | 90 | function mvArticleTop() { |
91 | 91 | global $mvgIP, $wgUser; |
92 | 92 | $sk = $wgUser->getSkin(); |
93 | | - |
| 93 | + |
94 | 94 | $streamTitle = Title::makeTitle( MV_NS_STREAM, $this->mvTitle->getStreamNameText() ); |
95 | 95 | $streamLink = $sk->makeLinkObj( $streamTitle, htmlspecialchars( $this->mvTitle->getStreamNameText() ) ); |
96 | | - |
| 96 | + |
97 | 97 | $typeTitle = Title::makeTitle( NS_MEDIAWIKI_TALK, $this->mvTitle->getMvdTypeKey() ); |
98 | 98 | $typeLink = $sk->makeLinkObj( $typeTitle, wfMsgHtml( $this->mvTitle->getMvdTypeKey() ) ); |
99 | | - |
100 | | - // print_r($this->mvTitle); |
| 99 | + |
| 100 | + // print_r($this->mvTitle); |
101 | 101 | // do mvIndex query to get near stream count: |
102 | 102 | // $MV_Index = new MvIndex($this->mvTitle); |
103 | 103 | |
104 | | - // get the count of near by metadata (-1 as to not count the current) |
| 104 | + // get the count of near by metadata (-1 as to not count the current) |
105 | 105 | // $nearCount = ($MvIndex->getNearCount() - 1); |
106 | 106 | |
107 | 107 | $nearTitle = Title::makeTitle( MV_NS_STREAM, $this->mvTitle->getStreamName() |
— | — | @@ -108,33 +108,33 @@ |
109 | 109 | $nearLinkTxt = $this->mvTitle->getTimeDesc(); |
110 | 110 | // force a known link for time queries in the metavid namespace: |
111 | 111 | $nearLink = $sk->makeKnownLinkObj( $nearTitle, htmlspecialchars( $nearLinkTxt ) ); |
112 | | - |
| 112 | + |
113 | 113 | $html = wfMsg( 'mv_mvd_linkback', $streamLink, $nearLink, $typeLink ); |
114 | | - |
115 | | - # two table layout for embed video |
116 | | - # (@@todo use div class skin approach) |
117 | | - // out embed code |
| 114 | + |
| 115 | + # two table layout for embed video |
| 116 | + # (@@todo use div class skin approach) |
| 117 | + // out embed code |
118 | 118 | // $html.=$this->mvTitle->getEmbedHTML(); |
119 | 119 | |
120 | | - // load stream files: |
| 120 | + // load stream files: |
121 | 121 | $html .= '<span style="float:left;margin:5px;">'; |
122 | 122 | $html .= $this->mvTitle->getEmbedVideoHtml(); |
123 | 123 | $html .= '</span>'; |
124 | 124 | return $html; |
125 | 125 | } |
126 | | - |
| 126 | + |
127 | 127 | /* |
128 | | - * function article_bottom |
129 | | - * @return MV dataPage lower html |
| 128 | + * function article_bottom |
| 129 | + * @return MV dataPage lower html |
130 | 130 | */ |
131 | 131 | function mvArticleBot() { |
132 | 132 | return '</td></tr></table>'; |
133 | 133 | } |
134 | 134 | } |
135 | | - |
| 135 | + |
136 | 136 | class MV_EditDataPage extends EditPage { |
137 | 137 | function getPreviewText() { |
138 | | - // enable embed video: (disabled) |
| 138 | + // enable embed video: (disabled) |
139 | 139 | //mvfAddHTMLHeader( 'embed' ); |
140 | 140 | $html = ''; |
141 | 141 | $html .= '<span style="float:left;margin:10px;">'; |
Index: trunk/extensions/MetavidWiki/includes/MV_EditSequencePage.php |
— | — | @@ -1,10 +1,10 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_EditSequencePage.php Created on Dec 5, 2008 |
5 | | - * |
| 5 | + * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
— | — | @@ -13,25 +13,25 @@ |
14 | 14 | class MV_EditSequencePage extends EditPage { |
15 | 15 | function edit() { |
16 | 16 | global $wgOut, $wgUser, $wgHooks, $wgTitle; |
17 | | - |
18 | | - //add some user variables |
19 | | - $seqPlayer = new MV_SequencePlayer( $wgTitle ); |
| 17 | + |
| 18 | + //add some user variables |
| 19 | + $seqPlayer = new MV_SequencePlayer( $wgTitle ); |
20 | 20 | mvAddGlobalJSVariables( array( 'mvSeqExportUrl' => $seqPlayer->getExportUrl() ) ); |
21 | | - //add the "switch" link to the top of the page |
| 21 | + //add the "switch" link to the top of the page |
22 | 22 | $wgOut->addHTML('<span id="swich_seq_links"> |
23 | 23 | <a id="swich_seq_text" style="display:none" |
24 | 24 | href="javascript:mv_do_sequence_edit_swap(\'text\')">'. |
25 | | - wfMsg('mv_sequence_edit_text') . |
26 | | - '</a>' . |
27 | | - '<a id="switch_seq_wysiwyg" |
| 25 | + wfMsg('mv_sequence_edit_text') . |
| 26 | + '</a>' . |
| 27 | + '<a id="switch_seq_wysiwyg" |
28 | 28 | href="javascript:mv_do_sequence_edit_swap(\'seq_update\')">' . |
29 | 29 | wfMsg('mv_sequence_edit_visual_editor') . |
30 | | - '</a>' . |
| 30 | + '</a>' . |
31 | 31 | '</span>'. |
32 | 32 | '<div id="seq_edit_container" style="display:none;position:relative;width:100%;height:580px;background:#AAA"></div>' |
33 | 33 | ); |
34 | 34 | $wgOut->addHTML('<div id="mv_text_edit_container"> '); |
35 | | - parent::edit(); |
| 35 | + parent::edit(); |
36 | 36 | $wgOut->addHTML('</div>'); |
37 | 37 | } |
38 | 38 | } |
Index: trunk/extensions/MetavidWiki/includes/MV_Title.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_Title.php Created on May 3, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/MV_Image.php |
— | — | @@ -1,17 +1,17 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_Image.php Created on Oct 22, 2007 |
5 | | - * |
| 5 | + * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
12 | | - * |
| 12 | + * |
13 | 13 | * extends image to deal give pointers to metavid media |
14 | 14 | */ |
15 | 15 | if ( !defined( 'MEDIAWIKI' ) ) die( 1 ); |
16 | 16 | class MV_Image extends Image { |
17 | | - |
| 17 | + |
18 | 18 | } |
Index: trunk/extensions/MetavidWiki/includes/MV_Hooks.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_Hooks.php Created on Apr 24, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | } |
72 | 72 | return true; |
73 | 73 | } |
74 | | -/* |
| 74 | +/** |
75 | 75 | * enables the rewriting of links to the Stream and Sequence namespace to support inline embeding. |
76 | 76 | * see page: sample in-wiki-embed syntax |
77 | 77 | * @@todo should probably be integrated to respective Stream and Sequence class. |
— | — | @@ -345,7 +345,7 @@ |
346 | 346 | $MV_SequenceTools = new MV_SequenceTools(); |
347 | 347 | return $MV_SequenceTools->do_edit_submit(); |
348 | 348 | } |
349 | | -/* |
| 349 | +/** |
350 | 350 | * mv_edit_submit |
351 | 351 | * @@todo this could be cleaned up by using the api .. lots of weridness otherwise |
352 | 352 | */ |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_SequenceTools.php |
— | — | @@ -1,10 +1,10 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_SequenceTools.php Created on Nov 2, 2007 |
5 | | - * |
| 5 | + * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | 'transition', |
21 | 21 | 'clipedit', |
22 | 22 | 'cliplib', |
23 | | - 'options' |
| 23 | + 'options' |
24 | 24 | ); |
25 | 25 | function getHTML() { |
26 | 26 | global $wgOut; |
— | — | @@ -32,9 +32,9 @@ |
33 | 33 | $wgOut->addHTML( '</div>' ); |
34 | 34 | } |
35 | 35 | function get_tool_html( $tool_id, $ns = '', $title_str = '' ) { |
36 | | - global $wgOut, $wgUser; |
| 36 | + global $wgOut, $wgUser; |
37 | 37 | //check if we are proccessing a set: |
38 | | - $tool_set = explode('|', $tool_id); |
| 38 | + $tool_set = explode('|', $tool_id); |
39 | 39 | if(count($tool_set)>1){ |
40 | 40 | $tool_values = array(); |
41 | 41 | foreach($tool_set as $tool_id){ |
— | — | @@ -45,33 +45,33 @@ |
46 | 46 | return mvOutputJSON( $tool_values ); |
47 | 47 | } |
48 | 48 | $wgOut->clearHTML(); |
49 | | - //else process a single tool: |
| 49 | + //else process a single tool: |
50 | 50 | switch( $tool_id ) { |
51 | 51 | case 'sequence_page': |
52 | 52 | global $mvgIP, $wgOut, $wgParser, $wgTitle; |
53 | | - // put in header preview div: |
| 53 | + // put in header preview div: |
54 | 54 | $wgOut->addHTML( '<div id="mv_seq_edit_preview"></div>' ); |
55 | | - |
| 55 | + |
56 | 56 | $article = & $this->mv_interface->article; |
57 | 57 | $wgTitle = & $this->mv_interface->article->mTitle; |
58 | 58 | $sk =& $wgUser->getSkin(); |
59 | | - |
60 | | - // get the ajax edit |
| 59 | + |
| 60 | + // get the ajax edit |
61 | 61 | $editPageAjax = new MV_EditPageAjax( $article ); |
62 | 62 | $editPageAjax->mvd_id = 'seq'; |
63 | | - |
64 | | - // fill wgOUt with edit form: |
| 63 | + |
| 64 | + // fill wgOUt with edit form: |
65 | 65 | $editPageAjax->edit(); |
66 | 66 | break; |
67 | 67 | case 'add_clips_manual': |
68 | 68 | $this->add_clips_manual(); |
69 | | - break; |
| 69 | + break; |
70 | 70 | case 'clipedit': |
71 | 71 | //the default clip view provides a "welcome / help page" |
72 | 72 | $wgOut->addHTML( wfMsg('mv_welcome_to_sequencer') ); |
73 | 73 | break; |
74 | 74 | case 'cliplib': |
75 | | - $this->add_embed_search(); |
| 75 | + $this->add_embed_search(); |
76 | 76 | break; |
77 | 77 | case 'options': |
78 | 78 | $this->add_editor_options(); |
— | — | @@ -79,39 +79,39 @@ |
80 | 80 | case 'transition': |
81 | 81 | $this->add_transitions(); |
82 | 82 | break; |
83 | | - default: |
| 83 | + default: |
84 | 84 | $wgOut->addHTML( wfMsg('mv_tool_missing', htmlspecialchars ($tool_id) ) ); |
85 | 85 | break; |
86 | 86 | } |
87 | 87 | return $wgOut->getHTML(); |
88 | | - } |
| 88 | + } |
89 | 89 | //handles copy / paste clip board data actions |
90 | 90 | function do_clipboard( $action ){ |
91 | 91 | global $wgRequest, $wgUser; |
92 | | - //validate the user-edit token (for both copy and paste) |
| 92 | + //validate the user-edit token (for both copy and paste) |
93 | 93 | $token = $wgRequest->getVal( 'clipboardEditToken'); |
94 | | - |
| 94 | + |
95 | 95 | //store the clipboard |
96 | | - if( $action == 'copy' ){ |
97 | | - return '1'; |
| 96 | + if( $action == 'copy' ){ |
| 97 | + return '1'; |
98 | 98 | } |
99 | 99 | //get the clipboard |
100 | 100 | if( $action == 'paste'){ |
101 | 101 | return ''; |
102 | | - } |
103 | | - //error out: |
| 102 | + } |
| 103 | + //error out: |
104 | 104 | return php2jsObj( array( 'status' => 'error', |
105 | | - 'error_txt' => wfMsg('mv_unknown_clipboard_action') |
106 | | - ) |
| 105 | + 'error_txt' => wfMsg('mv_unknown_clipboard_action') |
| 106 | + ) |
107 | 107 | ); |
108 | 108 | } |
109 | 109 | function add_embed_search() { |
110 | 110 | global $wgOut; |
111 | | - // grab a de-encapsulated search with prefix |
| 111 | + // grab a de-encapsulated search with prefix |
112 | 112 | $wgOut->addHTML( '<h3>'. wfMsg('mv_resource_locator') . '</h3>' ); |
113 | | - //add the input form |
114 | | - /*$wgOut->addHTML( |
115 | | - xml::input('mv_ams_search', 50,'', array( 'id' => 'mv_ams_search' , 'class' => 'searchField' )) . |
| 113 | + //add the input form |
| 114 | + /*$wgOut->addHTML( |
| 115 | + xml::input('mv_ams_search', 50,'', array( 'id' => 'mv_ams_search' , 'class' => 'searchField' )) . |
116 | 116 | xml::submitButton( wfMsg('mv_media_search'), array('id'=>'mv_ams_submit') ) . |
117 | 117 | xml::element('div',array('id'=>'mv_ams_results')) |
118 | 118 | );*/ |
— | — | @@ -120,23 +120,23 @@ |
121 | 121 | global $wgOut; |
122 | 122 | $wgOut->addHTML( '<h3>' . wfMsg('mv_editor_options') . '</h3>'. |
123 | 123 | wfMsg('mv_editor_mode') . '<br /> ' . |
124 | | - '<blockquote><input type="radio" value="simple_editor" name="opt_editor">' . |
| 124 | + '<blockquote><input type="radio" value="simple_editor" name="opt_editor">' . |
125 | 125 | wfMsg('mv_simple_editor_desc') . ' </blockquote>' . |
126 | 126 | '<blockquote><input type="radio" value="advanced_editor" name="opt_editor">' . |
127 | 127 | wfMsg('mv_advanced_editor_desc') . ' </blockquote>'. |
128 | | - wfMsg('mv_other_options') . '<br />' . |
129 | | - '<blockquote><input type="checkbox" value="contextmenu_opt" name="contextmenu_opt">' . |
130 | | - wfMsg('mv_contextmenu_opt') . ' </blockquote>' |
131 | | - ); |
| 128 | + wfMsg('mv_other_options') . '<br />' . |
| 129 | + '<blockquote><input type="checkbox" value="contextmenu_opt" name="contextmenu_opt">' . |
| 130 | + wfMsg('mv_contextmenu_opt') . ' </blockquote>' |
| 131 | + ); |
132 | 132 | } |
133 | 133 | function add_transitions(){ |
134 | 134 | global $wgOut; |
135 | | - $wgOut->addHTML('<h3>'. wfMsg('mv_transitions') .'</h3>'); |
| 135 | + $wgOut->addHTML('<h3>'. wfMsg('mv_transitions') .'</h3>'); |
136 | 136 | } |
137 | 137 | function auto_complete_stream_name( $val ) { |
138 | 138 | global $mvDefaultSearchVideoPlaybackRes; |
139 | 139 | $dbr = wfGetDB( DB_SLAVE ); |
140 | | - // check against stream name list: |
| 140 | + // check against stream name list: |
141 | 141 | $result = $dbr->select( 'mv_streams', array( 'name', 'duration' ), |
142 | 142 | array( '`name` LIKE \'%' . mysql_escape_string( $val ) . '%\'' ), |
143 | 143 | __METHOD__, |
— | — | @@ -146,14 +146,14 @@ |
147 | 147 | // $out='<ul>'."\n"; |
148 | 148 | $out = ''; |
149 | 149 | while ( $row = $dbr->fetchObject( $result ) ) { |
150 | | - // make sure the person page exists: |
| 150 | + // make sure the person page exists: |
151 | 151 | $streamTitle = new MV_Title( 'Stream:' . $row->name . '/0:00:00/0:00:30' ); |
152 | 152 | // print "stream name:" . $streamTitle->getStreamName(); |
153 | | - // @@TODO fix this up.. this is getting ugly new line in embed video for example breaks things |
| 153 | + // @@TODO fix this up.. this is getting ugly new line in embed video for example breaks things |
154 | 154 | $out .= $row->name . '|' . $streamTitle->getStreamNameText() . |
155 | 155 | '|' . $streamTitle->getStreamImageURL( 'icon' ) . |
156 | 156 | '|' . $row->duration . |
157 | | - '|' . $streamTitle->getEmbedVideoHtml( array('id'=>'vid_seq', |
| 157 | + '|' . $streamTitle->getEmbedVideoHtml( array('id'=>'vid_seq', |
158 | 158 | 'size'=>$mvDefaultSearchVideoPlaybackRes)) . "\n"; |
159 | 159 | } |
160 | 160 | // $out.='</ul>'; |
— | — | @@ -173,7 +173,7 @@ |
174 | 174 | 'value="">' ); |
175 | 175 | $wgOut->addHTML( '<div id="mv_add_stream_name_choices" class="autocomplete"></div>' ); |
176 | 176 | $wgOut->addHTML( '<br class="mv_css_form">' ); |
177 | | - // get adjustment disp: |
| 177 | + // get adjustment disp: |
178 | 178 | $wgOut->addHTML( '<div id="mv_add_adj_cnt" style="display:none;">' . |
179 | 179 | $MV_Overlay->get_adjust_disp( 'seq', 'seq' ) . |
180 | 180 | '<input type="button" value="' . wfMsg( 'mv_seq_add_end' ) . '" onClick="mv_add_to_seq();" >' . |
— | — | @@ -186,7 +186,7 @@ |
187 | 187 | // set up the title /article |
188 | 188 | $title = Title::newFromText( $titleKey, MV_NS_SEQUENCE ); |
189 | 189 | $article = new MV_SequencePage( $title ); |
190 | | - |
| 190 | + |
191 | 191 | // print "inline_seq:" . $_POST['inline_seq'] . " wpbox: " . $_REQUEST['wpTextbox1'] . "\n"; |
192 | 192 | $editPageAjax = new MV_EditPageAjax( $article ); |
193 | 193 | $editPageAjax->mvd_id = 'seq'; |
— | — | @@ -198,11 +198,11 @@ |
199 | 199 | if ( isset( $_POST['wpPreview'] ) ) { |
200 | 200 | $sk =& $wgUser->getSkin(); |
201 | 201 | // $wgOut->addWikiText($_REQUEST['wpTextbox1']); |
202 | | - // run via parser so we get categories: |
| 202 | + // run via parser so we get categories: |
203 | 203 | $parserOptions = ParserOptions::newFromUser( $wgUser ); |
204 | 204 | $parserOptions->setEditSection( false ); |
205 | 205 | $parserOptions->setTidy( true ); |
206 | | - // just parse the non-seq portion: |
| 206 | + // just parse the non-seq portion: |
207 | 207 | $parserOutput = $wgParser->parse( $_REQUEST['wpTextbox1'] , $title, $parserOptions ); |
208 | 208 | $wgOut->addCategoryLinks( $parserOutput->getCategories() ); |
209 | 209 | $wgOut->addHTML( $parserOutput->mText ); |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | if ( $editPageAjax->edit( $textbox1 ) == false ) { |
219 | 219 | return php2jsObj( array( 'status' => 'ok' ) ); |
220 | 220 | } else { |
221 | | - // error: retrun error msg and form: |
| 221 | + // error: retrun error msg and form: |
222 | 222 | return $wgOut->getHTML(); |
223 | 223 | } |
224 | 224 | } |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_MetavidInterface.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Created on Jun 28, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Navigator.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Created on Aug 15, 2008 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Tools.php |
— | — | @@ -1,11 +1,11 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Created on Jun 28, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
9 | | - * |
| 8 | + * |
| 9 | + * |
10 | 10 | */ |
11 | 11 | if ( !defined( 'MEDIAWIKI' ) ) die( 1 ); |
12 | 12 | // global $mvgIP; |
— | — | @@ -34,20 +34,20 @@ |
35 | 35 | } |
36 | 36 | function render_full() { |
37 | 37 | global $wgOut; |
38 | | - // "<div >" . |
| 38 | + // "<div >" . |
39 | 39 | /*$wgOut->addHTML("<fieldset ".$this->getStyleOverride()." id=\"".get_class($this)."\" >\n" . |
40 | 40 | "<legend id=\"mv_leg_".get_class($this)."\">".$this->render_menu()."</legend>\n"); |
41 | 41 | */ |
42 | | - // do the implemented html |
| 42 | + // do the implemented html |
43 | 43 | $wgOut->addHTML( '<div id="MV_Tools">' ); |
44 | 44 | $this->getHTML(); |
45 | 45 | $wgOut->addHTML( '</div>' ); |
46 | 46 | /*$wgOut->addHTML("</fieldset>\n");*/ |
47 | 47 | } |
48 | 48 | /*function getStreamPage(){ |
49 | | - return ; |
| 49 | + return ; |
50 | 50 | }*/ |
51 | | - |
| 51 | + |
52 | 52 | /* @@todo cache this */ |
53 | 53 | function get_tool_html( $tool_id, $ns = '', $title_str = '' ) { |
54 | 54 | global $wgUser; |
— | — | @@ -56,11 +56,11 @@ |
57 | 57 | switch( $tool_id ) { |
58 | 58 | case 'stream_page': |
59 | 59 | global $wgOut, $wgParser; |
60 | | - // render the wiki page for this stream |
| 60 | + // render the wiki page for this stream |
61 | 61 | $title = Title::newFromText( $title_str, $ns ); |
62 | 62 | $curRevision = Revision::newFromTitle( $title ); |
63 | | - |
64 | | - // @@todo in the future a deleted Stream means |
| 63 | + |
| 64 | + // @@todo in the future a deleted Stream means |
65 | 65 | // remove stuff from stream table,mvd etc and return "missing Stream" |
66 | 66 | |
67 | 67 | if ( $curRevision == null ) { |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | $sk =& $wgUser->getSkin(); |
72 | 72 | // empty out the categories |
73 | 73 | $wgOut->mCategoryLinks = array(); |
74 | | - // run via parser to add in Category info: |
| 74 | + // run via parser to add in Category info: |
75 | 75 | $parserOptions = ParserOptions::newFromUser( $wgUser ); |
76 | 76 | $parserOptions->setEditSection( false ); |
77 | 77 | $parserOptions->setTidy( true ); |
— | — | @@ -80,7 +80,7 @@ |
81 | 81 | $wgOut->addHTML( $sk->getCategories() ); |
82 | 82 | // empty out the categories |
83 | 83 | $wgOut->mCategoryLinks = array(); |
84 | | - |
| 84 | + |
85 | 85 | // $wgOut->addWikiTextWithTitle( $curRevision->getText(), $tile) ; |
86 | 86 | |
87 | 87 | $this->innerHTML = $wgOut->getHTML(); |
— | — | @@ -136,9 +136,9 @@ |
137 | 137 | ) ); |
138 | 138 | } |
139 | 139 | |
140 | | - /* |
| 140 | + /* |
141 | 141 | * outputs basic stream paging (this could be done client side) |
142 | | - * |
| 142 | + * |
143 | 143 | */ |
144 | 144 | function stream_paging_links( $return_set = 'both' ) { |
145 | 145 | global $wgUser, $mvDefaultStreamViewLength, $mvgScriptPath; |
— | — | @@ -176,7 +176,7 @@ |
177 | 177 | } |
178 | 178 | /* |
179 | 179 | * list all the available "tool" functions |
180 | | - * @@todo better integration with wiki |
| 180 | + * @@todo better integration with wiki |
181 | 181 | * (ie tool listing should be a page like navigationBar or in our case MvStreamTools |
182 | 182 | */ |
183 | 183 | function getToolsListing() { |
— | — | @@ -192,15 +192,15 @@ |
193 | 193 | $out .= '</ul>'; |
194 | 194 | return '<h3>' . $heading . '</h3>' . $out; |
195 | 195 | } |
196 | | - // returns layers overview text |
| 196 | + // returns layers overview text |
197 | 197 | function get_mang_layers_page( $stream_title ) { |
198 | 198 | global $mvMVDTypeAllAvailable; |
199 | 199 | $out = '<h3>' . wfMsg( 'mv_tool_mang_layers' ) . '</h3>'; |
200 | | - // grab the current track set: |
| 200 | + // grab the current track set: |
201 | 201 | $this->procMVDReqSet(); |
202 | 202 | foreach ( $mvMVDTypeAllAvailable as $type_key ) { |
203 | 203 | $type_key = htmlspecialchars( $type_key ); |
204 | | - // @@todo use something better than "title" for type_key description |
| 204 | + // @@todo use something better than "title" for type_key description |
205 | 205 | $checked = ( in_array( $type_key, $this->mvd_tracks ) ) ? ' checked':''; |
206 | 206 | $out .= '<input type="checkbox" name="option_' . $type_key . '" id="option_' . $type_key . '" value="' . $type_key . '" ' . $checked . '/> ' . |
207 | 207 | '<a class="mv_mang_layers" id="a_' . $type_key . '" title="' . wfMsg( $type_key . '_desc' ) . '" href="#">' . wfMsg( $type_key ) . '</a><br />'; |
— | — | @@ -210,22 +210,22 @@ |
211 | 211 | } |
212 | 212 | function get_nav_page( $stream_title ) { |
213 | 213 | global $mvgIP; |
214 | | - // output sliders for stream navigation: |
| 214 | + // output sliders for stream navigation: |
215 | 215 | $out = '<h3>' . wfMsg( 'mv_tool_navigate' ) . ' ' . htmlspecialchars( ucfirst( $stream_title ) ) . '</h3>'; |
216 | | - // normalize stream title: |
| 216 | + // normalize stream title: |
217 | 217 | $stream_title = str_replace( ' ', '_', strtolower( $stream_title ) ); |
218 | | - |
219 | | - // get the total length of the stream: |
| 218 | + |
| 219 | + // get the total length of the stream: |
220 | 220 | $stream = new MV_Stream( array( 'name' => $stream_title ) ); |
221 | 221 | // $out.= "sn: ". $stream->name . '<br />'; |
222 | 222 | $duration = $stream->getDuration(); |
223 | | - // $out.=" duration: $duration"; |
| 223 | + // $out.=" duration: $duration"; |
224 | 224 | $MvOverlay = new MV_Overlay(); |
225 | | - |
| 225 | + |
226 | 226 | $titleKey = 'mvd_type:' . ucfirst( $stream_title ) . '/' . $_REQUEST['time_range']; |
227 | 227 | $out .= $MvOverlay->get_adjust_disp( $titleKey, 'nav' ); |
228 | 228 | $out .= '<input type="button" id="mv_go_nav" value="Go">'; |
229 | | - // set range: |
| 229 | + // set range: |
230 | 230 | $this->js_eval = 'var end_time = \'' . htmlspecialchars( $duration ) . '\';'; |
231 | 231 | return $out; |
232 | 232 | } |
— | — | @@ -237,7 +237,7 @@ |
238 | 238 | $out = '<h3>' . wfMsg( 'mv_tool_export_title' ) . '</h3>'; |
239 | 239 | $tr = $wgRequest->getVal( 'time_range' ); |
240 | 240 | // @@todo pull in metadata layer selector (populated by current selection set) |
241 | | - // makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) |
| 241 | + // makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) |
242 | 242 | $sTitle = SpecialPage::getTitleFor( 'MvExportStream' ); |
243 | 243 | $out .= $sk->makeKnownLinkObj( $sTitle , wfMsg( 'mv_export_cmml' ), 'feed_format=cmml&stream_name=' . $stream_title . '&t=' . $tr ); |
244 | 244 | $out .= ' for ' . $mvTitle->getTitleDesc(); |
— | — | @@ -248,7 +248,7 @@ |
249 | 249 | @list( $width, $height ) = explode( 'x', $this->mv_interface->smwProperties['playback_resolution'] ); |
250 | 250 | if ( isset( $width ) && isset( $height ) ) { |
251 | 251 | if ( is_numeric( $width ) && is_numeric( $height ) ) { |
252 | | - // offset in refrence to mv_custom.css |
| 252 | + // offset in refrence to mv_custom.css |
253 | 253 | $width += 2; |
254 | 254 | $height += 30; |
255 | 255 | $top = $height + 30 + 12; |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Created on Jun 28, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Component.php |
— | — | @@ -1,38 +1,38 @@ |
2 | 2 | <?php |
3 | 3 | if ( !defined( 'MEDIAWIKI' ) ) die( 1 ); |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on Jun 28, 2007 |
6 | 6 | * |
7 | 7 | * All Metavid Wiki code is Released Under the GPL2 |
8 | 8 | * for more info visit http://metavid.org/wiki/Code |
9 | | - * |
| 9 | + * |
10 | 10 | * the base component class |
11 | 11 | */ |
12 | 12 | class MV_Component { |
13 | 13 | var $name = 'MV_Component'; |
14 | 14 | var $mv_interface = null; |
15 | | - // default values: |
| 15 | + // default values: |
16 | 16 | var $status = 'ok'; |
17 | 17 | var $innerHTML = ''; |
18 | 18 | var $js_eval = false; |
19 | 19 | var $req = ''; |
20 | 20 | var $mvd_tracks = array(); |
21 | 21 | var $view_mode = ''; |
22 | | - |
| 22 | + |
23 | 23 | function __construct( $init = array() ) { |
24 | 24 | foreach ( $init as $k => $v ) { |
25 | 25 | $this->$k = $v; |
26 | 26 | } |
27 | 27 | } |
28 | | - // process the request set (load from settings if not set in url |
| 28 | + // process the request set (load from settings if not set in url |
29 | 29 | // @@todo would be good to allow user-set preference in the future) |
30 | 30 | function procMVDReqSet( $only_requested = false ) { |
31 | 31 | global $wgRequest; |
32 | 32 | global $mvMVDTypeDefaultDisp, $mvMVDTypeAllAvailable; |
33 | | - // if already computed return: |
| 33 | + // if already computed return: |
34 | 34 | if ( count( $this->mvd_tracks ) != 0 )return $this->mvd_tracks; |
35 | | - |
36 | | - |
| 35 | + |
| 36 | + |
37 | 37 | $user_tracks = $wgRequest->getVal( 'tracks' ); |
38 | 38 | |
39 | 39 | //set via overview request |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | $this->view_mode = 'overview'; |
42 | 42 | $user_tracks = 'anno_en'; |
43 | 43 | } |
44 | | - |
| 44 | + |
45 | 45 | // print "USER TRACKS: " . $user_tracks; |
46 | 46 | if ( $user_tracks != '' ) { |
47 | 47 | $user_set = explode( ',', $user_tracks ); |
— | — | @@ -51,14 +51,14 @@ |
52 | 52 | } |
53 | 53 | } else { |
54 | 54 | if ( !$only_requested ) { |
55 | | - // set the default tracks (if not restricted to requested tracks) |
| 55 | + // set the default tracks (if not restricted to requested tracks) |
56 | 56 | foreach ( $mvMVDTypeDefaultDisp as $tk ) { |
57 | 57 | if ( !in_array( $tk, $mvMVDTypeAllAvailable ) ) { |
58 | 58 | global $wgOut; |
59 | 59 | $wgOut->errorPage( 'mvd_default_mismatch', 'mvd_default_mismatch_text' ); |
60 | 60 | } |
61 | 61 | } |
62 | | - // just set to global default: |
| 62 | + // just set to global default: |
63 | 63 | $this->mvd_tracks = $mvMVDTypeDefaultDisp; |
64 | 64 | } |
65 | 65 | } |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | $and = '&'; |
77 | 77 | } |
78 | 78 | } |
79 | | - // save tool_disp: |
| 79 | + // save tool_disp: |
80 | 80 | if ( $wgRequest->getVal( 'tool_disp' ) != '' ) { |
81 | 81 | $req .= $and . 'tool_disp=' . $wgRequest->getVal( 'tool_disp' ); |
82 | 82 | } |
— | — | @@ -109,10 +109,10 @@ |
110 | 110 | } |
111 | 111 | function render_full() { |
112 | 112 | global $wgOut; |
113 | | - // "<div >" . |
| 113 | + // "<div >" . |
114 | 114 | $wgOut->addHTML( "<fieldset " . $this->getStyleOverride() . " id=\"" . get_class( $this ) . "\" >\n" . |
115 | 115 | "<legend id=\"mv_leg_" . get_class( $this ) . "\">" . $this->render_menu() . "</legend>\n" ); |
116 | | - // do the implemented html |
| 116 | + // do the implemented html |
117 | 117 | $this->getHTML(); |
118 | 118 | $wgOut->addHTML( "</fieldset>\n" ); |
119 | 119 | } |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_PageHistoryAjax.php |
— | — | @@ -1,10 +1,10 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_PageHistory.php Created on Oct 11, 2007 |
5 | | - * |
| 5 | + * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_StreamMeta.php |
— | — | @@ -1,10 +1,10 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_StreamMeta.php Created on Sep 27, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_VideoPlayer.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Created on Jun 28, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
— | — | @@ -30,30 +30,30 @@ |
31 | 31 | $file_list = $mvTitle->mvStream->getFileList(); |
32 | 32 | $o .= '<div id="videoMeta"> |
33 | 33 | <p class="options">'; |
34 | | - // get file list: |
| 34 | + // get file list: |
35 | 35 | global $mvDefaultVideoQualityKey, $mvDefaultFlashQualityKey; |
36 | 36 | if ( count( $file_list ) != 0 ) { |
37 | 37 | $coma = ''; |
38 | 38 | /*$o.='<span class="download">Download Segment:'; |
39 | 39 | $ogg_stream_url = $mvTitle->getWebStreamURL($mvDefaultVideoQualityKey); |
40 | | - if($ogg_stream_url!=''){ |
| 40 | + if($ogg_stream_url!=''){ |
41 | 41 | $o.=$coma.' <a href="'.htmlspecialchars($ogg_stream_url).'"> |
42 | 42 | Web Ogg |
43 | 43 | </a>'; |
44 | 44 | $coma=', '; |
45 | 45 | } |
46 | 46 | $ogg_hq_url = $mvTitle->getWebStreamURL('mv_ogg_high_quality'); |
47 | | - if($ogg_hq_url!=''){ |
| 47 | + if($ogg_hq_url!=''){ |
48 | 48 | $o.=$coma.' <a href="'.htmlspecialchars($ogg_hq_url).'"> |
49 | 49 | High Quality Ogg |
50 | 50 | </a>'; |
51 | 51 | $coma=', '; |
52 | 52 | } |
53 | 53 | $flash_stream_url = $mvTitle->getWebStreamURL($mvDefaultFlashQualityKey); |
54 | | - if($flash_stream_url!=''){ |
| 54 | + if($flash_stream_url!=''){ |
55 | 55 | $o.=$coma.' <a href="'.htmlspecialchars($flash_stream_url).'"> |
56 | 56 | Flash Video |
57 | | - </a>'; |
| 57 | + </a>'; |
58 | 58 | $coma=', '; |
59 | 59 | } |
60 | 60 | $o.='</span>';*/ |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | } |
63 | 63 | $o .= '<span class="embed"><a href="javascript:$j(\'#' . htmlspecialchars( $this->embed_id ) . '\').get(0).showShare();">Embed Video</a></span>' . |
64 | 64 | '</p>'; |
65 | | - // about file: |
| 65 | + // about file: |
66 | 66 | $talkPage = Title::newFromText( 'Anno_en:' . strtolower( $mvTitle->wiki_title ), MV_NS_MVD_TALK ); |
67 | 67 | $o .= '<p class="about_file"> |
68 | 68 | <span class="views">Views:' . htmlspecialchars( number_format( $mvTitle->getViewCount() ) ) . '</span> |
— | — | @@ -76,12 +76,12 @@ |
77 | 77 | $out = ''; |
78 | 78 | // give the stream the request information: |
79 | 79 | $mvTitle = & $this->mv_interface->article->mvTitle; |
80 | | - |
| 80 | + |
81 | 81 | $mvTitle->dispVideoPlayerTime = true; |
82 | 82 | $vid_size = ( isset( $this->mv_interface->smwProperties['playback_resolution'] ) ) ? |
83 | 83 | $this->mv_interface->smwProperties['playback_resolution']:$mvDefaultVideoPlaybackRes; |
84 | 84 | list( $width, $height ) = explode( 'x', $vid_size ); |
85 | | - // wrap the video container to prevent moving html on the page: |
| 85 | + // wrap the video container to prevent moving html on the page: |
86 | 86 | return '<div style="display:block;width:' . $width . 'px;height:' . $height . 'px">' . |
87 | 87 | $mvTitle->getEmbedVideoHtml( array( 'id'=>$this->embed_id, 'size'=>$vid_size ) ) . |
88 | 88 | '</div>'; |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | @list( $width, $height ) = explode( 'x', $this->mv_interface->smwProperties['playback_resolution'] ); |
96 | 96 | if ( isset( $width ) && isset( $height ) ) { |
97 | 97 | if ( is_numeric( $width ) && is_numeric( $height ) ) { |
98 | | - // offset info should stored somewhere: |
| 98 | + // offset info should stored somewhere: |
99 | 99 | $width += 2; |
100 | 100 | $height += 30; |
101 | 101 | return "style=\"height:{$height}px;width:{$width}\""; |
— | — | @@ -105,11 +105,11 @@ |
106 | 106 | } |
107 | 107 | function render_full() { |
108 | 108 | global $wgOut; |
109 | | - // "<div >" . |
| 109 | + // "<div >" . |
110 | 110 | $wgOut->addHTML( "<div id=\"videoContent\">\n" ); |
111 | | - // do the implemented html |
| 111 | + // do the implemented html |
112 | 112 | $this->getHTML(); |
113 | 113 | $wgOut->addHTML( "</div>\n" ); |
114 | 114 | } |
115 | | - |
| 115 | + |
116 | 116 | } |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_SequencePlayer.php |
— | — | @@ -1,10 +1,10 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_SequencePlayer.php Created on Nov 2, 2007 |
5 | | - * |
| 5 | + * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
— | — | @@ -15,18 +15,18 @@ |
16 | 16 | class MV_SequencePlayer{ |
17 | 17 | private $oldid=''; |
18 | 18 | function __construct( &$seqTitle ){ |
19 | | - $this->seqTitle = $seqTitle; |
| 19 | + $this->seqTitle = $seqTitle; |
20 | 20 | } |
21 | | - function getEmbedSeqHtml( $options=array() ){ |
| 21 | + function getEmbedSeqHtml( $options=array() ){ |
22 | 22 | global $mvDefaultVideoPlaybackRes; |
23 | | - if( isset( $options['oldid'] ) ) |
24 | | - $this->oldid = $options['oldid']; |
25 | | - |
26 | | - if ( isset( $options['size'] ) ){ |
| 23 | + if( isset( $options['oldid'] ) ) |
| 24 | + $this->oldid = $options['oldid']; |
| 25 | + |
| 26 | + if ( isset( $options['size'] ) ){ |
27 | 27 | list($width, $height) = explode( 'x', $options['size'] ); |
28 | | - }else{ |
| 28 | + }else{ |
29 | 29 | list($width, $height) = explode( 'x', $mvDefaultVideoPlaybackRes); |
30 | | - } |
| 30 | + } |
31 | 31 | return '<playlist width="' . htmlspecialchars($width) . '" height="'. htmlspecialchars($height) .'" '. |
32 | 32 | 'src="' . $this->getExportUrl() . '"></playlist>'; |
33 | 33 | } |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Created on Jun 28, 2007 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released Under the GPL2 |
Index: trunk/extensions/MetavidWiki/includes/MV_AutoCompleteCache.php |
— | — | @@ -1,14 +1,14 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_AutoCompleteCache.php Created on Mar 3, 2008 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
7 | 7 | * for more info visit http://metavid.org/wiki/Code |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Michael Dale |
10 | 10 | * @email dale@ucsc.edu |
11 | 11 | * @url http://metavid.org |
12 | 12 | */ |
13 | 13 | class MV_AutoCompleteCache { |
14 | | - |
| 14 | + |
15 | 15 | } |
Index: trunk/extensions/MetavidWiki/languages/MV_Messages.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_Messages.php Created on Jan 8, 2008 |
5 | 5 | * |
6 | 6 | * Internationalization file for MetaVidWiki extension |
— | — | @@ -8592,7 +8592,7 @@ |
8593 | 8593 | 'mvvideofeed' => "Esportassion dl'alimentassion ëd filmà MetaVid", |
8594 | 8594 | 'mvexportask' => "Esportassion d'un fil ëd filmà semàntich", |
8595 | 8595 | 'video_feed_cat' => 'Alimentassion dël filmà për la categorìa:', |
8596 | | - 'mv_cat_search_note' => "Nòta: Le categorìe a elenco mach le categorìe ëd prim livel. |
| 8596 | + 'mv_cat_search_note' => "Nòta: Le categorìe a elenco mach le categorìe ëd prim livel. |
8597 | 8597 | Për tùit ij metadat ant l'ansema dle categorìe, ch'a serca $1", |
8598 | 8598 | 'mv-category-media-count' => '$1 {{PLURAL:$1|segment|segment}} ëd mojen ant la categorìa', |
8599 | 8599 | 'mv_mvd_linkback' => 'Part dël fluss $1 <br /> |
Index: trunk/extensions/MetavidWiki/languages/MV_Language.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * MV_Language.php Created on Jan 8, 2008 |
5 | 5 | * |
6 | 6 | * All Metavid Wiki code is Released under the GPL2 |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/OggChopRequestHanlder.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * OggChopRequestHanlder.php is a simple ogg video server for mediawiki |
5 | 5 | * it uses the general oggChop class (which we should probably make part of |
6 | 6 | * PEAR oggServer or something like that ) |
— | — | @@ -42,4 +42,4 @@ |
43 | 43 | } |
44 | 44 | return ( $hours * 3600 ) + ( $min * 60 ) + $sec; |
45 | 45 | } |
46 | | -?> |
\ No newline at end of file |
| 46 | +?> |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/mvFlvServer.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * mv_flvServer.php |
5 | 5 | * |
6 | 6 | * @date Jul 25, 2008 |