Index: branches/MetavidWiki-exp/skins/mvpcf.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | <?php $this->get_search_html(); ?> |
91 | 91 | </div><!--searchSplash--> |
92 | 92 | </div><!--frontPageTop--> |
93 | | - <div id="frontPageContent"> |
| 93 | + <div id="frontPageContent" class="bodyContent"> |
94 | 94 | <!-- start content --> |
95 | 95 | <?php $this->html('bodytext') ?> |
96 | 96 | <?php if($this->data['catlinks']) { ?><div id="catlinks"><?php $this->html('catlinks') ?></div><?php } ?> |
— | — | @@ -334,7 +334,7 @@ |
335 | 335 | <a name="top" id="top"></a> |
336 | 336 | <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?> |
337 | 337 | <h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1> |
338 | | - <div id="bodyContent"> |
| 338 | + <div id="bodyContent" class="bodyContent"> |
339 | 339 | <?php if($this->data['tagline']){?><h3 id="siteSub"><?php $this->msg('tagline') ?></h3><? } ?> |
340 | 340 | <div id="contentSub"><?php $this->html('subtitle') ?></div> |
341 | 341 | <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?> |
Index: branches/MetavidWiki-exp/skins/mvpcf/style.css |
— | — | @@ -18,15 +18,15 @@ |
19 | 19 | body {
|
20 | 20 | margin: 0;
|
21 | 21 | padding: 0;
|
22 | | - font-family: Helvetica, Arial, sans-serif;
|
23 | | - font-size: .75em;
|
| 22 | + font-family: Helvetica, Arial, sans-serif;
|
24 | 23 | color: #474747;
|
25 | | - background: white;
|
| 24 | + background: white; |
| 25 | + font-size:0.75em;
|
26 | 26 | }
|
27 | 27 | body#frontPage {background: #eef6ff;}
|
| 28 | +.bodyContent{ |
| 29 | +} |
28 | 30 | |
29 | | -#bodyContent{ |
30 | | -} |
31 | 31 |
|
32 | 32 | a:link {color: #2060c1; text-decoration: underline;}
|
33 | 33 | a:visited {color: #2060c1; text-decoration: underline;}
|
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | h3 {font-size: 16px;}
|
42 | 42 | h4 {font-size: 14px;}
|
43 | 43 | h5 {font-size: 13px; text-align: center;}
|
44 | | -h5.search_results_header {margin: 8px 0;}
|
| 44 | +h5.search_results_header {margin: 8px 0; font-weight:normal;}
|
45 | 45 | h6 {font-size: 13px; color: #6c6c6c; padding: 5px 5px 0px 0px; text-transform: uppercase;}
|
46 | 46 |
|
47 | 47 | #metaLogin {background: white; text-align: right; padding: 10px 10px 0px 10px;}
|
— | — | @@ -49,10 +49,11 @@ |
50 | 50 | /* |
51 | 51 | ** the personal toolbar |
52 | 52 | */ |
53 | | -#p-personal {position: absolute;left: 0;top: 0; z-index: 0;} |
54 | | -#p-personal {width: 100%;white-space: nowrap;padding: 0;margin: 0;border: none;background: none; |
| 53 | +#p-personal {position: absolute;left: 0;top: 0; z-index: 0; |
| 54 | + width: 100%;white-space: nowrap;padding: 0;margin: 0;border: none;background: none; |
55 | 55 | overflow: visible; |
56 | 56 | line-height: 1.2em; |
| 57 | + font-size:12px; |
57 | 58 | } |
58 | 59 | #p-personal h5 { display: none;} |
59 | 60 | #p-personal .portlet, |
— | — | @@ -78,6 +79,7 @@ |
79 | 80 | width: 100%;white-space: nowrap;padding: 0;margin: 0;border: none;background: none; |
80 | 81 | overflow: visible; |
81 | 82 | line-height: 1.2em; |
| 83 | + font-size:12px; |
82 | 84 | } |
83 | 85 | |
84 | 86 | #p-cactions h5 { display: none;} |
— | — | @@ -104,6 +106,7 @@ |
105 | 107 | position:static; |
106 | 108 | top: 20px; |
107 | 109 | float:left; |
| 110 | + font-size:13px; |
108 | 111 | } |
109 | 112 | #footer #p-cactions ul, #footer #p-navigation ul, #footer #p-tb ul, #footer #p-footer ul{ |
110 | 113 | text-align: left; |
— | — | @@ -132,8 +135,7 @@ |
133 | 136 | } |
134 | 137 | #p-personal li.active { |
135 | 138 | font-weight: bold; |
136 | | -} |
137 | | -
|
| 139 | +}
|
138 | 140 | #content {
|
139 | 141 | width: 915px;
|
140 | 142 | margin: 0 auto;
|
— | — | @@ -169,37 +171,37 @@ |
170 | 172 | display:none; |
171 | 173 | } |
172 | 174 |
|
173 | | -#frontPageContent ul.popularSearches {
|
| 175 | +ul.popularSearches {
|
174 | 176 | list-style: none;
|
175 | 177 | margin: 10px 0 30px 0;
|
176 | 178 | padding: 0;
|
177 | 179 | text-align: left;
|
178 | 180 | }
|
179 | | -#frontPageContent ul.popularSearches li {
|
| 181 | +ul.popularSearches li {
|
180 | 182 | display: inline;
|
181 | 183 | font-size: 14px;
|
182 | 184 | margin: 0 10px 0 0;
|
183 | 185 | }
|
184 | | -
|
185 | | -#frontPageContent ul.popularClips {
|
| 186 | +ul.popularClips {
|
186 | 187 | list-style: none;
|
187 | 188 | margin: 10px 0;
|
188 | | - padding: 0;
|
| 189 | + padding: 0; |
| 190 | + width:780px;
|
189 | 191 | }
|
190 | | -#frontPageContent ul.popularClips li {
|
| 192 | +ul.popularClips li {
|
191 | 193 | width: 161px;
|
192 | 194 | float: left;
|
193 | 195 | display: inline;
|
194 | 196 | text-align: center;
|
195 | 197 | margin: 0 28px 0 0;
|
196 | 198 | }
|
197 | | -#frontPageContent ul.popularClips li img {display: block;}
|
| 199 | +ul.popularClips li img {display: block;}
|
198 | 200 |
|
199 | | -#frontPageContent ul.popularClips li span.title {display: block; font-weight: bold; margin: 3px 0;}
|
200 | | -#frontPageContent ul.popularClips li span.description {display: block; margin: 3px 0;}
|
201 | | -#frontPageContent ul.popularClips li span.keywords {display: block; margin: 3px 0;}
|
| 201 | +ul.popularClips li span.title {display: block; font-weight: bold; margin: 3px 0;}
|
| 202 | +ul.popularClips li span.description {display: block; margin: 3px 0;}
|
| 203 | +ul.popularClips li span.keywords {display: block; margin: 3px 0;}
|
202 | 204 |
|
203 | | -#frontPageContent ul.popularSearches li.last_li, #frontPageContent ul.popularClips li.last_li {margin: 0;}
|
| 205 | +ul.popularSearches li.last_li, ul.popularClips li.last_li {margin: 0;}
|
204 | 206 |
|
205 | 207 |
|
206 | 208 | /*Ajax search suggestions*/
|
— | — | @@ -467,7 +469,7 @@ |
468 | 470 |
|
469 | 471 | p.see_more {padding: 5px 0; margin: 0;}
|
470 | 472 |
|
471 | | -span.by {display: block; padding-bottom: 10px;}
|
| 473 | +span.by {display: block; padding-bottom: 3px;}
|
472 | 474 | span.cats {padding-right: 20px;}
|
473 | 475 |
|
474 | 476 |
|
Index: branches/MetavidWiki-exp/MetavidWiki/maintenance/mv_update.php |
— | — | @@ -9,6 +9,7 @@ |
10 | 10 | |
11 | 11 | # Attempt to connect to the database as a privileged user |
12 | 12 | # This will vomit up an error if there are permissions problems |
| 13 | + |
13 | 14 | $wgDatabase = new $dbclass( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname, 1 ); |
14 | 15 | |
15 | 16 | |
— | — | @@ -18,27 +19,62 @@ |
19 | 20 | |
20 | 21 | //install the new search index tables: |
21 | 22 | if(!$wgDatabase->tableExists('mv_search_digest')){ |
22 | | - $sql ='CREATE TABLE `mv_search_digest` ( |
23 | | - `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , |
24 | | - `query` VARCHAR( 64 ) NOT NULL , |
25 | | - `time` INT( 11 ) NOT NULL , |
26 | | - INDEX ( `query` , `time` ) |
27 | | - ) ENGINE = MYISAM'; |
28 | | - $wgDatabase->query($sql); |
| 23 | + $wgDatabase->query('CREATE TABLE IF NOT EXISTS `mv_search_digest` ( |
| 24 | + `id` int(11) NOT NULL auto_increment, |
| 25 | + `query_key` varchar(128) character set utf8 collate utf8_unicode_ci NOT NULL, |
| 26 | + `time` int(11) NOT NULL, |
| 27 | + PRIMARY KEY (`id`), |
| 28 | + KEY `query` (`query_key`,`time`) |
| 29 | +) ENGINE=MyISAM'); |
29 | 30 | } |
30 | | -if(!$wgDatabase->tableExists('mv_page_digest')){ |
31 | | - $sql=' CREATE TABLE `mv_mvd_digest` ( |
32 | | - `id` INT( 11 ) NOT NULL , |
33 | | - `mvd_page_id` VARCHAR( 11 ) NOT NULL , |
34 | | - `time` INT( 11 ) NOT NULL , |
35 | | - PRIMARY KEY ( `id` ) , |
36 | | - INDEX ( `mvd_page_id` , `time` ) |
37 | | - ) ENGINE = MYISAM '; |
38 | | - $wgDatabase->query($sql); |
| 31 | +if(!$wgDatabase->tableExists('mv_clipview_digest')){ |
| 32 | + $wgDatabase->query(" CREATE TABLE IF NOT EXISTS `mv_clipview_digest` ( |
| 33 | + `id` int(11) NOT NULL auto_increment, |
| 34 | + `query_key` int(33) NOT NULL, |
| 35 | + `stream_id` int(11) unsigned NOT NULL, |
| 36 | + `start_time` int(10) unsigned NOT NULL default '0', |
| 37 | + `end_time` int(10) unsigned NOT NULL, |
| 38 | + `view_date` int(11) NOT NULL, |
| 39 | + PRIMARY KEY (`id`), |
| 40 | + KEY `stream_id` (`stream_id`,`start_time`,`end_time`,`view_date`), |
| 41 | + KEY `query_key` (`query_key`) |
| 42 | +) ENGINE=MyISAM ;"); |
39 | 43 | } |
| 44 | +if(!$wgDatabase->tableExists('mv_query_key_lookup')){ |
| 45 | + $wgDatabase->query("CREATE TABLE IF NOT EXISTS `mv_query_key_lookup` ( |
| 46 | + `query_key` varchar(128) NOT NULL, |
| 47 | + `filters` text NOT NULL, |
| 48 | + PRIMARY KEY (`query_key`) |
| 49 | +) ENGINE=MyISAM ;"); |
| 50 | +} |
40 | 51 | |
| 52 | +if(!$wgDatabase->fieldExists('mv_mvd_index', 'view_count')){ |
| 53 | + $wgDatabase->query("ALTER TABLE `mv_mvd_index` ADD `view_count` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `end_time`"); |
| 54 | +} |
| 55 | +//add view_count index: |
| 56 | +if(!$wgDatabase->indexExists('view_count')){ |
| 57 | + $wgDatabase->query("ALTER TABLE `mv_mvd_index` ADD INDEX ( `view_count` )"); |
| 58 | +} |
| 59 | +/*modify mvd_table index structure for more "cardinality"/faster queries*/ |
| 60 | +if($wgDatabase->indexExists('mvd_type')){ |
| 61 | + $wgDatabase->query("ALTER TABLE `mv_mvd_index` DROP INDEX `mvd_type`"); |
| 62 | +} |
| 63 | +if($wgDatabase->indexExists('stream_id')){ |
| 64 | + $wgDatabase->query("ALTER TABLE `mv_mvd_index` DROP INDEX `stream_id`"); |
| 65 | +} |
| 66 | +if($wgDatabase->indexExists('stream_time_start')){ |
| 67 | + $wgDatabase->query("ALTER TABLE `mv_mvd_index` DROP INDEX `stream_time_start`"); |
| 68 | +} |
| 69 | +//add missing indexes: |
| 70 | +if(!$wgDatabase->indexExists('mvd_stream_index')){ |
| 71 | + print "rebuilding mvd index ... this may take \"some time\"\n"; |
| 72 | + $wgDatabase->query(" ALTER TABLE `mv_mvd_index` ADD INDEX `mvd_stream_index` ( `stream_id` , `start_time` , `end_time` )"); |
| 73 | +} |
| 74 | +if(!$wgDatabase->indexExists('mvd_type_index')){ |
| 75 | + $wgDatabase->query(" ALTER TABLE `mv_mvd_index` ADD INDEX `mvd_type_index` (`mvd_type`, `stream_id`)"); |
| 76 | +} |
41 | 77 | |
42 | | -if(!$wgDatabase->fieldExists($mvIndexTableName, 'page_id')){ |
| 78 | +if(!$wgDatabase->fieldExists($mvIndexTableName, 'mv_page_id')){ |
43 | 79 | print "$mvIndexTableName missing `page_id`...adding\n "; |
44 | 80 | $page_id_added=true; |
45 | 81 | //add page_id |
— | — | @@ -83,8 +119,9 @@ |
84 | 120 | //now add UNIQUE to mv_mvd_index |
85 | 121 | print "ADD PRIMARY to mv_page_id ..."; |
86 | 122 | $wgDatabase->query("ALTER TABLE `$mvIndexTableName` ADD PRIMARY KEY(`mv_page_id`)"); |
87 | | - print "done\n"; |
88 | | - |
| 123 | + print "done\n"; |
89 | 124 | } |
90 | 125 | |
| 126 | +print "done with db tables update check\n"; |
| 127 | + |
91 | 128 | ?> |
\ No newline at end of file |
Index: branches/MetavidWiki-exp/MetavidWiki/includes/MV_GlobalFunctions.php |
— | — | @@ -53,6 +53,7 @@ |
54 | 54 | $wgAutoloadClasses['MV_StreamFile']=dirname(__FILE__) . '/MV_StreamFile.php'; |
55 | 55 | $wgAutoloadClasses['MV_StreamImage'] = dirname(__FILE__) . '/MV_StreamImage.php'; |
56 | 56 | $wgAutoloadClasses['MV_ParserCache'] = dirname(__FILE__) . '/MV_ParserCache.php'; |
| 57 | +$wgAutoloadClasses['MV_MagicWords'] = dirname(__FILE__) . '/MV_MagicWords.php'; |
57 | 58 | |
58 | 59 | $markerList = array(); |
59 | 60 | |
— | — | @@ -112,6 +113,11 @@ |
113 | 114 | $wgHooks['CustomEditor'][] = 'mvCustomEditor'; |
114 | 115 | $wgParser->setHook( 'sequence', 'mvSeqTag' ); |
115 | 116 | |
| 117 | + /*$wgHooks['LanguageGetMagic'][] = 'mvMagicParserFunction_Magic'; |
| 118 | + $wgParser->setFunctionHook( 'example', 'mvMagicParserFunction_Render' ); |
| 119 | + */ |
| 120 | + $wgParser->setFunctionHook( 'mvData', 'mvMagicParserFunction_Render' ); |
| 121 | + |
116 | 122 | //$wgHooks['BeforePageDisplay'][] = 'mvDoSpecialPage'; |
117 | 123 | //$wgHooks['ArticleViewHeader'][] = 'mvArticleViewOpts'; |
118 | 124 | /**********************************************/ |
— | — | @@ -122,10 +128,41 @@ |
123 | 129 | 'author' => 'Michael Dale', |
124 | 130 | 'version' => 'alpha 0.1', |
125 | 131 | 'url' => 'http://metavid.org', |
126 | | - 'description' => 'Video Metadata Editor, Clip Sequencer and Media Search<br />' . |
| 132 | + 'description' => 'Video Metadata Editor & Media Search<br />' . |
127 | 133 | '[http://metavid.ucsc.edu/wiki/index.php/MetaVidWiki_Software More about MetaVidWiki Software]' |
128 | 134 | ); |
129 | 135 | } |
| 136 | + |
| 137 | +# Define a setup function |
| 138 | +# Add a hook to initialise the magic word |
| 139 | +$wgHooks['LanguageGetMagic'][] = 'mvMagicParserFunction_Magic'; |
| 140 | + |
| 141 | +function mvMagicParserFunction_Magic( &$magicWords, $langCode ) { |
| 142 | + $magicWords['mvData'] = array( 0, 'mvData' ); |
| 143 | + return true; |
| 144 | +} |
| 145 | + |
| 146 | +function mvMagicParserFunction_Render( &$parser ) { |
| 147 | + //gennerate arg_list array without parser param |
| 148 | + $arg_list = array_slice(func_get_args(), 1); |
| 149 | + $mvMagicWords = new MV_MagicWords($arg_list); |
| 150 | + return array($mvMagicWords->renderMagic(), 'noparse'=>true, 'isHTML'=>true); |
| 151 | +} |
| 152 | +/*function mvMagicParserFunction_Magic( &$magicWords, $langCode ) { |
| 153 | + # Add the magic word |
| 154 | + # The first array element is case sensitive, in this case it is not case sensitive |
| 155 | + # All remaining elements are synonyms for our parser function |
| 156 | + $magicWords['example'] = array( 0, 'example' ); |
| 157 | + # unless we return true, other parser functions extensions won't get loaded. |
| 158 | + return true; |
| 159 | +} |
| 160 | + |
| 161 | +function mvMagicParserFunction_Render( &$parser, $param1 = '', $param2 = '' ) { |
| 162 | + $arg_list = func_get_args(); |
| 163 | + $mvMagic = new MV_MagicWords($arg_list); |
| 164 | + return $mvMagic->renderMagic(); |
| 165 | +}*/ |
| 166 | + |
130 | 167 | /**********************************************/ |
131 | 168 | /***** Header modifications *****/ |
132 | 169 | /**********************************************/ |
— | — | @@ -559,6 +596,27 @@ |
560 | 597 | //(@@todo clean up skin.php to enable better tab controls) |
561 | 598 | //$title->mNamespace= NS_SPECIAL; |
562 | 599 | |
| 600 | + //add a hit to the digest if enabled: |
| 601 | + //@@todo (maybe in the future use javascript to confirm they acutally "watched" the clip) |
| 602 | + global $mvEnableClipViewDigest, $wgRequest; |
| 603 | + //don't log views without end times (default stream view) |
| 604 | + if($mvEnableClipViewDigest && $mvTitle->end_time!=null && $wgRequest->getVal('tl')!='1'){ |
| 605 | + $dbw =& wfGetDB(DB_WRITE); |
| 606 | + $dbw->insert('mv_clipview_digest', array( |
| 607 | + 'stream_id' =>$mvTitle->getStreamId(), |
| 608 | + 'start_time'=>$mvTitle->getStartTimeSeconds(), |
| 609 | + 'end_time' =>$mvTitle->getEndTimeSeconds(), |
| 610 | + 'query_key' =>$mvTitle->getStreamId().$mvTitle->getStartTimeSeconds().$mvTitle->getEndTimeSeconds(), |
| 611 | + 'view_date' =>time() |
| 612 | + ) |
| 613 | + ); |
| 614 | + //also increment the mvd_page if we find a match: |
| 615 | + $dbw->update('mv_mvd_index', array('`view_count`=`view_count`+1'), |
| 616 | + array( 'stream_id'=>$mvTitle->getStreamId(), |
| 617 | + 'start_time'=>$mvTitle->getStartTimeSeconds(), |
| 618 | + 'end_time' =>$mvTitle->getEndTimeSeconds() |
| 619 | + )); |
| 620 | + } |
563 | 621 | //@@todo check if the requested title is already just the stream name: |
564 | 622 | $streamTitle = Title::newFromText( $mvTitle->getStreamName(), MV_NS_STREAM); |
565 | 623 | //print " new title: " . $streamTitle . "\n"; |
— | — | @@ -567,6 +625,7 @@ |
568 | 626 | mvMissingStreamPage($mvTitle->stream_name); |
569 | 627 | } |
570 | 628 | } |
| 629 | + |
571 | 630 | /* |
572 | 631 | * global MV_Stream server |
573 | 632 | * @@todo cache this function |
Index: branches/MetavidWiki-exp/MetavidWiki/includes/MV_Stream.php |
— | — | @@ -59,6 +59,7 @@ |
60 | 60 | function setMvTitle(&$mvTitle){ |
61 | 61 | $this->mvTitle=$mvTitle; |
62 | 62 | } |
| 63 | + |
63 | 64 | /*connivance function*/ |
64 | 65 | function doesStreamExist(){ |
65 | 66 | return $this->db_load_stream(); |
Index: branches/MetavidWiki-exp/MetavidWiki/includes/MV_MagicWords.php |
— | — | @@ -0,0 +1,212 @@ |
| 2 | +<?php |
| 3 | +/* |
| 4 | + * MV_MagicWords.php Created on May 16, 2007 |
| 5 | + * |
| 6 | + * All Metavid Wiki code is Released under the GPL2 |
| 7 | + * for more info visit http:/metavid.ucsc.edu/code |
| 8 | + * |
| 9 | + * @author Michael Dale |
| 10 | + * @email dale@ucsc.edu |
| 11 | + * @url http://metavid.ucsc.edu |
| 12 | + * |
| 13 | + * magic words has all parser rewrite keys functions |
| 14 | + * format is {{#mvData:magicTypeKey|format=format|num_results=#}} etc |
| 15 | + */ |
| 16 | +class MV_MagicWords{ |
| 17 | + var $args = array(); |
| 18 | + |
| 19 | + //list of valid arguments and their default value: |
| 20 | + var $params = array ('format'=>'ul_list', 'num_results'=>5, 'time_range'=>'last_week','class'=>''); |
| 21 | + |
| 22 | + function __construct($arg_list){ |
| 23 | + $this->proccessArgs($arg_list); |
| 24 | + } |
| 25 | + function proccessArgs($arg_list){ |
| 26 | + $this->magicTypeKey=$arg_list[0]; |
| 27 | + foreach(array_slice($arg_list, 1) as $inx=>$arg){ |
| 28 | + if(strpos($arg,'=')===false){ |
| 29 | + //get param via index order (not as reliable as param=value mode) |
| 30 | + switch($inx){ |
| 31 | + case '0':$this->params['format']=$arg;break; |
| 32 | + case '1':$this->params['num_results']=$arg;break; |
| 33 | + } |
| 34 | + }else{ |
| 35 | + list($arg_type, $arg_value) = split('=',$arg); |
| 36 | + //make sure the arg_type is a valid argument |
| 37 | + if(isset($this->params[$arg_type])){ |
| 38 | + $this->params[$arg_type] = $arg_value; |
| 39 | + } |
| 40 | + } |
| 41 | + } |
| 42 | + } |
| 43 | + function renderMagic(){ |
| 44 | + switch($this->magicTypeKey){ |
| 45 | + case 'TOPSEARCHES': |
| 46 | + return $this->getTopSearches(); |
| 47 | + break; |
| 48 | + case 'POPULARCLIPS': |
| 49 | + return $this->getTopClips(); |
| 50 | + break; |
| 51 | + default: |
| 52 | + return "error: unknown mvData function: <b>{$this->magicTypeKey}</b> <br>"; |
| 53 | + break; |
| 54 | + } |
| 55 | + } |
| 56 | + function getStartTime(){ |
| 57 | + $start_time=0; |
| 58 | + //be sure to define 'mv_date_last_week' in messeges |
| 59 | + switch($this->params['time_range']){ |
| 60 | + case 'last_week':$start_time=time()-(7*24*60*60);break; |
| 61 | + } |
| 62 | + //round to nearest previus hour: |
| 63 | + $round_sec = 60*60; |
| 64 | + if($start_time!=0){ |
| 65 | + $start_time = floor($start_time/$round_sec)*$round_sec; |
| 66 | + } |
| 67 | + return $start_time; |
| 68 | + } |
| 69 | + //gets the top few clip ranges |
| 70 | + function getTopClips(){ |
| 71 | + $dbr = & wfGetDB(DB_READ); |
| 72 | + $result = $dbr->select('mv_clipview_digest', '`query_key`,`stream_id`,`start_time`, `end_time`, COUNT(1) as `hit_count`', |
| 73 | + 'view_date >=\''.$this->getStartTime().'\'', |
| 74 | + __METHOD__, |
| 75 | + array('GROUP BY' => 'query_key', 'ORDER BY'=>'`hit_count` ASC', |
| 76 | + 'LIMIT'=>($this->params['num_results'])) |
| 77 | + ); |
| 78 | + if($dbr->numRows($result)==0){ |
| 79 | + return ''; |
| 80 | + }else{ |
| 81 | + if($this->params['format']=='ul_list'){ |
| 82 | + $class_attr=($this->params['class']!='')?' class="'.$this->params['class'].'"':''; |
| 83 | + $o.='<ul'.$class_attr.'>'; |
| 84 | + } |
| 85 | + global $wgUser; |
| 86 | + $sk = $wgUser->getSkin(); |
| 87 | + while($row = $dbr->fetchObject( $result )){ |
| 88 | + $o.='<li>'; |
| 89 | + $person_ht=$bill_ht=$category_ht=''; |
| 90 | + //first make link and stream title: |
| 91 | + $mvStream = MV_Stream::newStreamByID($row->stream_id); |
| 92 | + $nt = $mvStream->getStreamName().'/'.seconds2ntp($row->start_time) |
| 93 | + . '/'.seconds2ntp($row->end_time); |
| 94 | + $mvTitle = new MV_Title($nt, MV_NS_STREAM); |
| 95 | + |
| 96 | + $mvStreamTitle = Title :: MakeTitle(MV_NS_STREAM, $mvTitle->getNearStreamName($extra_range='0')); |
| 97 | + |
| 98 | + |
| 99 | + //output the image: |
| 100 | + $o.= $sk->makeKnownLinkObj($mvStreamTitle, |
| 101 | + '<img alt="image for '.$mvTitle->getStreamNameText().' '. |
| 102 | + $mvTitle->getTimeDesc().'" src="'.$mvTitle->getStreamImageURL('small'). |
| 103 | + '"/>', |
| 104 | + 'tl=1' ); |
| 105 | + |
| 106 | + if(isset($mvStream->date_start_time)){ |
| 107 | + $parts = split('_',$mvStream->getStreamName()); |
| 108 | + if(count($parts)>=3){ |
| 109 | + $title_span = ucfirst($parts[0].' '); |
| 110 | + }else{ |
| 111 | + $title_span = $mvStream->getStreamName(); |
| 112 | + } |
| 113 | + $title_span.=date('F jS, Y'); |
| 114 | + }else{ |
| 115 | + $title_span = $mvTitle->getStreamNameText() . $mvTitle->getTimeDesc(); |
| 116 | + } |
| 117 | + $o.='<span class="title">'. |
| 118 | + $sk->makeKnownLinkObj($mvStreamTitle, |
| 119 | + $title_span, |
| 120 | + 'tl=1') . |
| 121 | + '</span>'; |
| 122 | + |
| 123 | + //try to get metadata from anno_en first. |
| 124 | + //@@todo maybe the following metadata grabbing could be abstracted to a single function in mv_index |
| 125 | + $mvd_result = MV_Index::getMVDInRange( |
| 126 | + $row->stream_id, |
| 127 | + $row->start_time, |
| 128 | + $row->end_time, |
| 129 | + $mvd_type='anno_en', |
| 130 | + $getText=true, |
| 131 | + $smw_properties=array('Speech_by', 'Bill'), |
| 132 | + $limit='LIMIT 0,1' |
| 133 | + ); |
| 134 | + if($dbr->numRows($mvd_result)!=0){ |
| 135 | + $mvd_row = $dbr->fetchObject($mvd_result); |
| 136 | + if($mvd_row->Speech_by){ |
| 137 | + $ptitle = Title::MakeTitle(NS_MAIN, $mvd_row->Speech_by); |
| 138 | + $o.='<span class="keywords">Person:'. |
| 139 | + $sk->makeKnownLinkObj($ptitle, $ptitle->getText()). |
| 140 | + '</span>'; |
| 141 | + } |
| 142 | + if($mvd_row->Bill){ |
| 143 | + $btitle = Title::MakeTitle(NS_MAIN, $mvd_row->Bill); |
| 144 | + $o.='<span class="keywords">Bill:'. |
| 145 | + $sk->makeKnownLinkObj($btitle).' |
| 146 | + </span>'; |
| 147 | + } |
| 148 | + global $wgContLang; |
| 149 | + $mvdNStxt = $wgContLang->getNsText(MV_NS_MVD); |
| 150 | + //grab categories: |
| 151 | + $cl_res = $dbr->select('categorylinks', 'cl_to', |
| 152 | + array('cl_sortkey'=>$mvdNStxt.':'.str_replace('_',' ',$mvd_row->wiki_title)), |
| 153 | + 'getTopClips::Categories', |
| 154 | + 'LIMIT 0, 5'); |
| 155 | + if($dbr->numRows($cl_res)!=0){ |
| 156 | + $o.='<span class="keywords">Categories: '; |
| 157 | + while($cl_row= $dbr->fetchObject($cl_res) ){ |
| 158 | + $cTitle = Title::MakeTitle(NS_CATEGORY, $cl_row->cl_to); |
| 159 | + $o.=$sk->makeKnownLinkObj($cTitle, $cTitle->getText()); |
| 160 | + } |
| 161 | + $o.='</span>'; |
| 162 | + } |
| 163 | + |
| 164 | + } |
| 165 | + $o.='</li>'; |
| 166 | + |
| 167 | + } |
| 168 | + $o.='</ul><div style="clear:both"></div>'; |
| 169 | + } |
| 170 | + return $o; |
| 171 | + } |
| 172 | + //get the top few search results this is a ~slow~ query ... |
| 173 | + //@@todo we should only run it every 2 hours or something.. |
| 174 | + function getTopSearches(){ |
| 175 | + $dbr =& wfGetDB(DB_READ); |
| 176 | + $o=''; |
| 177 | + /*$result = $dbr->select('mv_search_digest', '`query_key`, COUNT(1) as `hit_count`', "`time` >= '$start_time' ", |
| 178 | + __METHOD__, |
| 179 | + array('GROUP BY' => 'query_key', 'ORDER BY `hit_count` ASC', |
| 180 | + 'LIMIT 0,'.$this->params['num_results']) );*/ |
| 181 | + $sql="SELECT `mv_search_digest`.`query_key`, COUNT(1) as `hit_count`, `mv_query_key_lookup`.`filters` |
| 182 | + FROM `mv_search_digest` |
| 183 | + LEFT JOIN `mv_query_key_lookup` ON (`mv_search_digest`.`query_key` = `mv_query_key_lookup`.`query_key`) |
| 184 | + WHERE `time` >= '{$this->getStartTime()}' GROUP BY `mv_search_digest`.`query_key` |
| 185 | + LIMIT 0, {$this->params[num_results]}"; |
| 186 | + $result = $dbr->query($sql); |
| 187 | + if($dbr->numRows($result)==0){ |
| 188 | + return ''; |
| 189 | + }else{ |
| 190 | + //@@todo probably should try to abstract out formating.. |
| 191 | + //but will need to wait until we have a few more test cases to do a productive abstraction |
| 192 | + if($this->params['format']=='ul_list'){ |
| 193 | + $class_attr=($this->params['class']!='')?' class="'.$this->params['class'].'"':''; |
| 194 | + $o.='<ul'.$class_attr.'>'; |
| 195 | + } |
| 196 | + $mvms=new MV_SpecialMediaSearch(); |
| 197 | + $sTitle=Title::MakeTitle(NS_SPECIAL, 'MediaSearch'); |
| 198 | + while($row = $dbr->fetchObject( $result )){ |
| 199 | + $title_desc = $row->hit_count.' '.wfMsg('mv_date_'.$this->params['time_range']); |
| 200 | + $mvms->loadFiltersFromSerialized($row->filters); |
| 201 | + $o.='<li><a title="'.$title_desc.'" href="'.$sTitle->escapeLocalURL($mvms->get_httpd_filters_query().'&tl=1' ).'">'. |
| 202 | + $mvms->getFilterDesc($query_key=true) . |
| 203 | + '</li>'; |
| 204 | + } |
| 205 | + if($this->params['format']=='ul_list'){ |
| 206 | + $o.='</ul>'; |
| 207 | + } |
| 208 | + } |
| 209 | + return $o; |
| 210 | + } |
| 211 | +} |
| 212 | + |
| 213 | +?> |
\ No newline at end of file |
Index: branches/MetavidWiki-exp/MetavidWiki/includes/MV_DefaultSettings.php |
— | — | @@ -36,12 +36,12 @@ |
37 | 37 | //@@todo we should clean this up!... into a semantic maping array or object |
38 | 38 | //if you want to include spoken by relation in search results: |
39 | 39 | |
40 | | -//keeps tracks of search queries |
| 40 | +//enable dissable varius digest data collection |
41 | 41 | $mvEnableSearchDigest = true; |
| 42 | +$mvEnableClipViewDigest= true; |
42 | 43 | //keeps track of popular pages in given categories over time |
43 | 44 | $mvDigestCategories = array('Interst_Group', 'Bill', 'Person'); |
44 | 45 | |
45 | | - |
46 | 46 | $mvSpokenByInSearchResult = true; |
47 | 47 | //if you want to include category lookup in search results: |
48 | 48 | $mvCategoryInSearchResult = true; |
— | — | @@ -137,13 +137,15 @@ |
138 | 138 | ###### |
139 | 139 | # the metavid table names: |
140 | 140 | ####### |
| 141 | +//@@todo we should just switch over to mediaWiki db helpers and write in table names |
| 142 | +//(medaiWiki can then handle table name rewriting) |
141 | 143 | $mvStreamTable = 'mv_streams'; |
142 | 144 | $mvStreamFilesTable = 'mv_stream_files'; |
143 | 145 | $mvIndexTableName = 'mv_mvd_index'; |
144 | 146 | $mvStreamImageTable = 'mv_stream_images'; |
145 | 147 | $mvUrlCacheTable = 'mv_url_cache'; |
146 | | -$mvPageDigestTable = 'mv_page_digest'; |
147 | | -$mvSearchDigestTable = 'mv_search_digest'; |
| 148 | +$mvPageDigestTable = 'mv_page_digest'; |
| 149 | +$mvSearchDigestTable= 'mv_search_digest'; |
148 | 150 | |
149 | 151 | //whether to count found results (can take lots of time on big result sets) |
150 | 152 | $mvDo_SQL_CALC_FOUND_ROWS = true; |
Index: branches/MetavidWiki-exp/MetavidWiki/includes/MV_Index.php |
— | — | @@ -115,10 +115,10 @@ |
116 | 116 | $sql_from=" FROM {$dbr->tableName($mvIndexTableName)} "; |
117 | 117 | if($smw_properties!=''){ |
118 | 118 | $smw_properties = (is_string($smw_properties))?array($smw_properties):$smw_properties; |
119 | | - foreach($smw_properties as $prop_name){ |
| 119 | + foreach($smw_properties as $prop_name){ |
120 | 120 | $sql_sel.=", `$prop_name`.`object_title` as `$prop_name`"; |
121 | 121 | $sql_from.="LEFT JOIN `smw_relations` as `$prop_name` ON (`mv_mvd_index`.`mv_page_id`=`$prop_name`.`subject_id` " . |
122 | | - "AND `$prop_name`.`relation_title`='$prop_name') "; |
| 122 | + "AND `$prop_name`.`relation_title`='$prop_name') "; |
123 | 123 | } |
124 | 124 | } |
125 | 125 | $sql = $sql_sel . $sql_from; |
— | — | @@ -278,12 +278,12 @@ |
279 | 279 | $join_streams_with_low_ogg_sql = "JOIN `$mvStreamFilesTable` ON (`$mvIndexTableName`.`stream_id` = `$mvStreamFilesTable`.`stream_id` AND `$mvStreamFilesTable`.`file_desc_msg`='mv_ogg_low_quality') "; |
280 | 280 | //only run the top range query if we have no secondary query |
281 | 281 | if($toplq_cat!='' && $ftq==''){ |
282 | | - //@@todo unify top query with ranged query ... kind of tricky |
| 282 | + //@@todo unify top query with rannged query ... kind of tricky |
283 | 283 | |
284 | 284 | //@@todo we should only look in annotative layer for top level queries? ... |
285 | 285 | //@@todo paging for top level queries? ... 200 hit limit is probably ok |
286 | 286 | |
287 | | - $sql = "SELECT `mv_page_id` as `id`, `$mvIndexTableName`.`stream_id`,`start_time`,`end_time`, `wiki_title`, $searchindexTable.`si_text` as `text` |
| 287 | + $sql = "SELECT `mv_page_id` as `id`, `$mvIndexTableName`.`stream_id`,``start_time`,`end_time`,`view_count`, `wiki_title`, $searchindexTable.`si_text` as `text` |
288 | 288 | FROM `$mvIndexTableName` |
289 | 289 | $date_range_join |
290 | 290 | JOIN $categoryTable ON `$mvIndexTableName`.`mv_page_id` = $categoryTable.`cl_from` |
— | — | @@ -299,7 +299,7 @@ |
300 | 300 | $top_result = $dbr->query($sql, 'MV_Index:doFiltersQuery_topQ'); |
301 | 301 | if($dbr->numRows($top_result)==0)return array(); |
302 | 302 | //set up ranges sql query |
303 | | - $sql="SELECT $selOpt `mv_page_id` as `id`, `$mvIndexTableName`.`stream_id`,`start_time`,`end_time`, `wiki_title`, $searchindexTable.`si_text` as `text` "; |
| 303 | + $sql="SELECT $selOpt `mv_page_id` as `id`, `$mvIndexTableName`.`stream_id`,`start_time`,`end_time`,`view_count`, `wiki_title`, $searchindexTable.`si_text` as `text` "; |
304 | 304 | if($mvSpokenByInSearchResult)$sql.=",`smw_relations`.`object_title` as `spoken_by` "; |
305 | 305 | $sql.="FROM `$mvIndexTableName` " . |
306 | 306 | $join_streams_with_low_ogg_sql . |
— | — | @@ -333,7 +333,7 @@ |
334 | 334 | }else{ |
335 | 335 | //add the top query to the base query: |
336 | 336 | $ftq.=$toplq; |
337 | | - $sql = "SELECT $selOpt `mv_page_id` as `id`,`$mvIndexTableName`.`stream_id`,`start_time`,`end_time`, `wiki_title`, $searchindexTable.`si_text` AS `text` "; |
| 337 | + $sql = "SELECT $selOpt `mv_page_id` as `id`,`$mvIndexTableName`.`stream_id`,`start_time`,`end_time`, `view_count`,`wiki_title`, $searchindexTable.`si_text` AS `text` "; |
338 | 338 | if($mvSpokenByInSearchResult)$sql.=",`smw_relations`.`object_title` as `spoken_by` "; |
339 | 339 | $sql.="FROM `$mvIndexTableName` |
340 | 340 | JOIN $searchindexTable ON `$mvIndexTableName`.`mv_page_id` = $searchindexTable.`si_page` |
— | — | @@ -372,6 +372,7 @@ |
373 | 373 | $sql.="LIMIT {$this->offset}, {$this->limit} "; |
374 | 374 | } |
375 | 375 | //echo "SQL:".$sql." \n"; |
| 376 | + //die; |
376 | 377 | $result = $dbr->query($sql, 'MV_Index:doFiltersQuery_base'); |
377 | 378 | |
378 | 379 | $this->numResults=$dbr->numRows($result); |
— | — | @@ -418,9 +419,7 @@ |
419 | 420 | unset($stream_set[$k]); |
420 | 421 | } |
421 | 422 | } |
422 | | - } |
423 | | - |
424 | | - |
| 423 | + } |
425 | 424 | //do category & bill lookup for search result ranges |
426 | 425 | if($mvCategoryInSearchResult || $mvBillInSearchResult){ |
427 | 426 | $sql="SELECT {$dbr->tableName('categorylinks')}.`cl_to`, `mv_mvd_index`.`stream_id`, |
— | — | @@ -458,8 +457,11 @@ |
459 | 458 | } |
460 | 459 | } |
461 | 460 | } |
462 | | - } |
463 | | - } |
| 461 | + } |
| 462 | + } |
| 463 | + //print "<pre>"; |
| 464 | + //print_r($ret_ary); |
| 465 | + //die; |
464 | 466 | return $ret_ary; |
465 | 467 | } |
466 | 468 | function numResultsFound(){ |
Index: branches/MetavidWiki-exp/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php |
— | — | @@ -136,7 +136,11 @@ |
137 | 137 | </form> |
138 | 138 | </div>"; |
139 | 139 | return $o; |
140 | | - } |
| 140 | + } |
| 141 | + function loadFiltersFromSerialized($sval){ |
| 142 | + $this->filters = unserialize($sval); |
| 143 | + } |
| 144 | + |
141 | 145 | function setupFilters($defaultType='empty', $opt=null){ |
142 | 146 | global $wgRequest; |
143 | 147 | |
— | — | @@ -217,12 +221,22 @@ |
218 | 222 | global $mvEnableSearchDigest,$mvSearchDigestTable; |
219 | 223 | $mvIndex = new MV_Index(); |
220 | 224 | //do search digest |
221 | | - if($mvEnableSearchDigest){ |
| 225 | + global $wgRequest; |
| 226 | + if($mvEnableSearchDigest && $wgRequest->getVal('tl')!='1') { |
222 | 227 | $dbw =& wfGetDB(DB_WRITE); |
223 | | - //@@todo non-blocking insert... is that even supported in mysql/php? |
| 228 | + $dbr =& wfGetDB(DB_READ); |
| 229 | + //@@todo non-blocking insert... is that supported in mysql/php? |
224 | 230 | $dbw->insert($mvSearchDigestTable, |
225 | | - array('query'=>$this->unified_term_search, 'time'=>time()), |
226 | | - 'Database::searchDigestInsert' ); |
| 231 | + array('query_key'=>$this->getFilterDesc($query_key=true),'time'=>time()), |
| 232 | + 'Database::searchDigestInsert' ); |
| 233 | + //make sure the query key exists and is updated |
| 234 | + //@@todo I think we can do a INSERT IF non found here? |
| 235 | + $res = $dbr->select('mv_query_key_lookup', array('filters'), |
| 236 | + array('query_key'=>$this->getFilterDesc($query_key=true))); |
| 237 | + if( $dbr->numRows($res)==0){ |
| 238 | + $dbr->insert('mv_query_key_lookup', array('query_key'=>$this->getFilterDesc($query_key=true), |
| 239 | + 'filters'=>serialize($this->filters))); |
| 240 | + } |
227 | 241 | } |
228 | 242 | $this->results = $mvIndex->doFiltersQuery($this->filters); |
229 | 243 | $this->num = $mvIndex->numResults(); |
— | — | @@ -356,13 +370,13 @@ |
357 | 371 | </span> |
358 | 372 | <div class="result_description"> |
359 | 373 | <h4>'.$head_link.'</h4> |
360 | | - <p>Matching Phrase:' .$this->termHighlight($mvd->text, implode('|', $this->getTerms()), 2, 150).' </p> |
| 374 | + <p>Matching Phrase:' .$this->termHighlight($mvd->text, implode('|', $this->getTerms()), 1, 100).' </p> |
361 | 375 | <span class="by">'.$mvd_cnt_links.'</span> |
362 | 376 | <span class="by">'.$mvd_cat_links.'</span> |
363 | 377 | <span class="by">'.$mvd_bill_links.'</span> |
364 | 378 | </div> |
365 | 379 | <div class="result_meta"> |
366 | | - <span class="views">Views: NYA</span> |
| 380 | + <span class="views">Views: '.$mvd->view_count.'</span> |
367 | 381 | <span class="duration">'.wfMsg('mv_duration_label').':'.$mvTitle->getSegmentDurationNTP($short_time=true).'</span> |
368 | 382 | <span class="comments">Comments: NYA</span> |
369 | 383 | <span class="playinline"><a href="javascript:mv_pl(\'' . $mvd->id . '\')">' |
— | — | @@ -853,21 +867,28 @@ |
854 | 868 | $o.='</div>'; |
855 | 869 | return $o; |
856 | 870 | } |
| 871 | + function getSearchLink(){ |
| 872 | + return SpecialPage::getTitleFor( 'MediaSearch' ) . |
| 873 | + $this->get_httpd_filters_query(); |
| 874 | + } |
857 | 875 | /* |
858 | 876 | * returns human readable description of filters |
859 | 877 | */ |
860 | | - function getFilterDesc(){ |
| 878 | + function getFilterDesc($query_key=false){ |
861 | 879 | $o=$a=''; |
| 880 | + $bo=($query_key)?'':'<b>'; |
| 881 | + $bc=($query_key)?'':'</b>'; |
862 | 882 | foreach($this->filters as $inx=>$f){ |
863 | | - if($inx!=0)$a=wfMsg('mv_search_'.$f['a']).' '; |
864 | | - if($f['t']=='date_range'){ //handle special case of date range: |
865 | | - $o.=' '.$a.wfMsg('mv_'.$f['t']).' '.wfMsg('mv_time_separator', '<b>'.$f['vs'].'</b>','<b>'.$f['ve'].'</b>'); |
866 | | - }else{ |
867 | | - $o.=' '.$a.wfMsg('mv_'.$f['t']).' <b>'. str_replace('_',' ',$f['v']).'</b> '; |
| 883 | + if($inx!=0)$a=' '.wfMsg('mv_search_'.$f['a']).' '; |
| 884 | + $o.=($query_key)?$a:$a.wfMsg('mv_'.$f['t']).' '; |
| 885 | + if($f['t']=='date_range'){ //handle special case of date range: |
| 886 | + $o.=wfMsg('mv_time_separator', $bo.$f['vs'].$bc, $bo.$f['ve'].$bc); |
| 887 | + }else{ |
| 888 | + $o.=$bo. str_replace('_',' ',$f['v']).$bc; |
868 | 889 | } |
869 | 890 | } |
870 | 891 | return $o; |
871 | | - } |
| 892 | + } |
872 | 893 | function get_ref_person($inx = '', $person_name = MV_MISSING_PERSON_IMG, $disp = false) { |
873 | 894 | if($disp) { |
874 | 895 | $tname = 'f[' . $inx . '][v]'; |
Index: branches/MetavidWiki-exp/MetavidWiki/includes/MV_Title.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | function getStreamNameText($sn=''){ |
91 | 91 | if($sn=='')$sn = $this->stream_name; |
92 | 92 | return ucfirst(str_replace('_', ' ',$sn)); |
93 | | - } |
| 93 | + } |
94 | 94 | /* |
95 | 95 | * makes title like db key: |
96 | 96 | */ |
— | — | @@ -198,6 +198,7 @@ |
199 | 199 | } |
200 | 200 | return $this->stream_name . '/'.$start_ntp . $end_ntp; |
201 | 201 | } |
| 202 | + |
202 | 203 | function getTimeDesc(){ |
203 | 204 | if($this->getStartTime() && $this->getEndTime()){ |
204 | 205 | return wfMsg('mv_time_separator', $this->getStartTime(), $this->getEndTime()); |
Index: branches/MetavidWiki-exp/MetavidWiki/includes/MV_Hooks.php |
— | — | @@ -137,7 +137,7 @@ |
138 | 138 | * by processing the given title request/namespace |
139 | 139 | */ |
140 | 140 | function mvDoMvPage (&$title, &$article, $doOutput=true){ |
141 | | - global $wgOut; |
| 141 | + global $wgOut; |
142 | 142 | if($title->getNamespace() == NS_CATEGORY){ |
143 | 143 | $article = new MV_CategoryPage($title); |
144 | 144 | } elseif ($title->getNamespace() == MV_NS_SEQUENCE){ |
Index: branches/MetavidWiki-exp/MetavidWiki/languages/MV_Messages.php |
— | — | @@ -186,6 +186,7 @@ |
187 | 187 | 'mv_search_date_range' => 'Date range', |
188 | 188 | 'mv_stream_name' => 'stream name', |
189 | 189 | 'mv_date_range' => 'date range', |
| 190 | + 'mv_date_last_week' => 'Last Week', |
190 | 191 | |
191 | 192 | 'mv_category_results' => 'Category Results', |
192 | 193 | 'mv_people_results' => 'People Results', |
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_search.js |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | case 'date_range': |
76 | 76 | $j('#mvs_'+inx+'_tc').html(global_loading_txt); |
77 | 77 | var load_js_set = { 'Date.fromString':'jquery/plugins/date.js', |
78 | | - '$j.fn.datePicker':'jquery/plugins/jquery.datePicker.js'}; |
| 78 | + '$j.fn.datePicker':'jquery/plugins/mv_setup_searchjquery.datePicker.js'}; |
79 | 79 | if(embedTypes.msie6){ |
80 | 80 | js_log('using IE v6 need iframe as well'); |
81 | 81 | load_js_set['$j.fn.bgIframe'] = 'jquery/plugins/jquery.bgiframe.js'; |
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_stream.js |
— | — | @@ -719,7 +719,7 @@ |
720 | 720 | if(disp){ |
721 | 721 | //based on the embed type give space for controls: |
722 | 722 | //@@todo pull pix_offset from players code |
723 | | - switch(embedTypes.getPlayerLib()){ |
| 723 | + /*switch(embedTypes.getPlayerLib()){ |
724 | 724 | case 'java': |
725 | 725 | case 'generic': |
726 | 726 | var pix_offset= 30; |
— | — | @@ -729,7 +729,9 @@ |
730 | 730 | case 'oggplay': |
731 | 731 | var pix_offset=55; |
732 | 732 | break; |
733 | | - } |
| 733 | + }*/ |
| 734 | + //give room for all players: |
| 735 | + var pix_offset=55; |
734 | 736 | js_log("set con space: " + org_height_vid_contain+parseInt(pix_offset)); |
735 | 737 | $j('#MV_VideoPlayer').css({'height':(org_height_vid_contain+parseInt(pix_offset))+'px'}); |
736 | 738 | $j('#MV_StreamMeta,#MV_Tools').css({'top':(org_top_tool_contain+parseInt(pix_offset))+'px'}); |
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/sample_page.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | 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 | 26 | src="http://128.114.20.64/media/senate_proceeding_08-01-07.ogg.anx?t=0:27:16/0:27:32" |
27 | 27 | 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" |
28 | | -show_meta_link="false" autoplay="true" style="width:160px;height:120px" controls="true" embed_link="true" />'; |
| 28 | +show_meta_link="false" autoplay="false" style="width:160px;height:120px" controls="true" embed_link="true" />'; |
29 | 29 | $sample_embed[0]['desc']=' auto play test (similar embed syntax to the metavidWiki site)'; |
30 | 30 | |
31 | 31 | /*$sample_embed[0]['tag']='<video id="v0" src="sample.ogg" thumbnail="sample.jpg"></video>'; |
Index: branches/MetavidWiki-exp/MetavidWiki/MV_CongressDynamicData.php |
— | — | @@ -68,12 +68,6 @@ |
69 | 69 | } |
70 | 70 | |
71 | 71 | |
72 | | - |
73 | | - |
74 | | - |
75 | | - |
76 | | - |
77 | | - |
78 | 72 | # Define a setup function |
79 | 73 | $wgExtensionFunctions[] = 'wfCongressVidParserFunction_Setup'; |
80 | 74 | # Add a hook to initialise the magic word |