Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialCRUDStream.php |
— | — | @@ -29,11 +29,14 @@ |
30 | 30 | SpecialPage::addPage( new SpecialPage('Mv_Add_Stream','',true,'doSpecialAddStream',false) ); |
31 | 31 | SpecialPage::addPage( new SpecialPage('Mv_Edit_Stream','',true,'doSpecialEditStream',false) ); |
32 | 32 | */ |
| 33 | + |
33 | 34 | /* @@TODO depreciate in favor of oggFile -> stream setup */ |
34 | 35 | class MV_SpecialCRUDStream extends SpecialPage{ |
35 | | - function __construct($mode='add'){ |
| 36 | + function __construct($mode='add'){ |
36 | 37 | parent::__construct('Mv_Add_Stream'); |
37 | | - $this->mode='add'; |
| 38 | + $this->mode='add'; |
| 39 | + //print_r(debug_backtrace()); |
| 40 | + |
38 | 41 | } |
39 | 42 | function execute() { |
40 | 43 | global $wgRequest, $wgOut, $wgUser, $mvStream_name, $mvgIP; |
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php |
— | — | @@ -21,9 +21,13 @@ |
22 | 22 | global $IP, $smwgIP; |
23 | 23 | //all the special pages handled by this master Special Export (could reactor into individual classes if we want to) |
24 | 24 | class MvVideoFeed extends SpecialPage{ |
25 | | - function __construct(){ |
| 25 | + function __construct(){ |
26 | 26 | parent::__construct('MvVideoFeed'); |
27 | 27 | $MvSpecialExport = new MV_SpecialExport('category'); |
| 28 | + |
| 29 | + if (method_exists('SpecialPage', 'setGroup')) { |
| 30 | + parent::setGroup('MvVideoFeed', 'mv_group'); |
| 31 | + } |
28 | 32 | } |
29 | 33 | } |
30 | 34 | class MvExportStream extends SpecialPage{ |
— | — | @@ -32,12 +36,28 @@ |
33 | 37 | $MvSpecialExport = new MV_SpecialExport('stream'); |
34 | 38 | } |
35 | 39 | } |
36 | | -class MvExportSequence extends SpecialPage{ |
| 40 | +class MvExportSequence extends SpecialPage{ |
37 | 41 | function __construct(){ |
38 | 42 | parent::__construct('MvExportSequence'); |
39 | | - $MvSpecialExport = new MV_SpecialExport('sequence'); |
| 43 | + global $wgRequest; |
| 44 | + //@@todo replace this ugly hack .. don't know how to get around the missing param atm: |
| 45 | + $tl = $wgRequest->getVal('title'); |
| 46 | + $par=''; |
| 47 | + if(strpos($tl,'/')!==false){ |
| 48 | + $par = substr($tl, strpos($tl,'/')+1 ); |
| 49 | + } |
| 50 | + //print "par: ". $par ; |
| 51 | + //die; |
| 52 | + $MvSpecialExport = new MV_SpecialExport('sequence', $par); |
| 53 | + |
| 54 | + if (method_exists('SpecialPage', 'setGroup')) { |
| 55 | + parent::setGroup('MvExportSequence', 'mv_group'); |
| 56 | + } |
40 | 57 | } |
41 | 58 | } |
| 59 | +function wfSpecialMvExportSequence(){ |
| 60 | + return true; |
| 61 | +} |
42 | 62 | class MvExportSearch extends SpecialPage{ |
43 | 63 | function __construct(){ |
44 | 64 | parent::__construct('MvExportSearch'); |
— | — | @@ -54,6 +74,7 @@ |
55 | 75 | return true; |
56 | 76 | } |
57 | 77 | |
| 78 | + |
58 | 79 | //extend supported feed types: |
59 | 80 | $wgFeedClasses['cmml']='CmmlFeed'; |
60 | 81 | $wgFeedClasses['podcast']='PodcastFeed'; |
— | — | @@ -63,7 +84,7 @@ |
64 | 85 | function __construct($export_type, $par=''){ |
65 | 86 | $this->export_type=$export_type; |
66 | 87 | $this->par = $par; |
67 | | - $this->execute(); |
| 88 | + $this->execute(); |
68 | 89 | } |
69 | 90 | //@@todo think about integration into api.php |
70 | 91 | function execute() { |
— | — | @@ -72,6 +93,7 @@ |
73 | 94 | //set universal variables: |
74 | 95 | $this->feed_format = $wgRequest->getVal('feed_format'); |
75 | 96 | $error_page = ''; |
| 97 | + //print "RAN execute with export type: " .$this->export_type; |
76 | 98 | switch($this->export_type){ |
77 | 99 | case 'stream': |
78 | 100 | $this->stream_name = $wgRequest->getVal('stream_name'); |
— | — | @@ -105,9 +127,11 @@ |
106 | 128 | case 'search': |
107 | 129 | $this->get_search_feed(); |
108 | 130 | break; |
109 | | - case 'sequence': |
110 | | - $this->seq_title = $this->par; |
111 | | - $this->get_sequence_xspf(); |
| 131 | + case 'sequence': |
| 132 | + if($this->par!=''){ |
| 133 | + $this->seq_title = $this->par; |
| 134 | + $this->get_sequence_xspf(); |
| 135 | + } |
112 | 136 | break; |
113 | 137 | case 'ask': |
114 | 138 | $this->get_ask_feed(); |
— | — | @@ -119,7 +143,7 @@ |
120 | 144 | $wgOut->addHTML($error_page); |
121 | 145 | } |
122 | 146 | } |
123 | | - function get_sequence_xspf(){ |
| 147 | + function get_sequence_xspf(){ |
124 | 148 | //get the sequence article and export in xspf format: |
125 | 149 | $seqTitle = Title::newFromText($this->seq_title, MV_NS_SEQUENCE); |
126 | 150 | $seqArticle = new MV_SequencePage($seqTitle); |
Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php |
— | — | @@ -22,7 +22,9 @@ |
23 | 23 | function __construct($title){ |
24 | 24 | global $wgRequest; |
25 | 25 | mvfAddHTMLHeader('sequence'); |
26 | | - parent::__construct($title); |
| 26 | + if($title!=null){ |
| 27 | + parent::__construct($title); |
| 28 | + } |
27 | 29 | return $this; |
28 | 30 | } |
29 | 31 | /*function doSeqReplace(&$input, &$argv, &$parser){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php |
— | — | @@ -22,10 +22,10 @@ |
23 | 23 | $sample_embed = array(); |
24 | 24 | |
25 | 25 | $sample_embed[0]['tag'] = '<video id="vid_4184" |
26 | | -thumbnail="http://metavid.ucsc.edu/wiki/index.php?action=ajax&rs=mv_frame_server&stream_name=senate_proceeding_08-01-07&t=0:27:16&size=small" |
| 26 | +thumbnail="http://metavid.ucsc.edu/wiki/index.php?action=ajax&rs=mv_frame_server&stream_name=senate_proceeding_08-01-07&t=0:27:16&size=large" |
27 | 27 | src="http://128.114.20.64/media/senate_proceeding_08-01-07.ogg.anx?t=0:27:16/0:27:32" |
28 | 28 | roe="http://localhost/mvw-exp/index.php?title=Special:MvExportStream&feed_format=roe&stream_name=senate_proceeding_08-01-07&t=0:27:16/0:27:32" |
29 | | -show_meta_link="false" autoplay="false" style="width:160px;height:120px" controls="true" embed_link="true" ></video>'; |
| 29 | +show_meta_link="false" autoplay="false" style="width:400px;height:300px" controls="true" embed_link="true" ></video>'; |
30 | 30 | $sample_embed[0]['desc']=' auto play test (similar embed syntax to the metavidWiki site)'; |
31 | 31 | |
32 | 32 | /*$sample_embed[0]['tag']='<video id="v0" src="sample.ogg" thumbnail="sample.jpg"></video>'; |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | <table border="1" cellpadding="6" width="600"> |
127 | 127 | <? foreach($sample_embed as $key=>$aval){ |
128 | 128 | //$key!=8 |
129 | | - if($key!=2)continue; |
| 129 | + if($key!=0)continue; |
130 | 130 | ?> |
131 | 131 | <tr> |
132 | 132 | <td valign="top"><?=$aval['tag']?></td> |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_nativeEmbed.js |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | this.currentTime = this.vid.currentTime; |
48 | 48 | |
49 | 49 | if( this.currentTime > 0 ){ |
50 | | - if(! this.userSlide){ |
| 50 | + if(!this.userSlide){ |
51 | 51 | this.setSliderValue(this.currentTime/this.duration ); |
52 | 52 | this.setStatus( seconds2ntp(this.currentTime) + '/'+ seconds2ntp(this.duration)); |
53 | 53 | }else{ |