Index: branches/MetavidWiki-exp/skins/mvpcf/style.css |
— | — | @@ -75,10 +75,12 @@ |
76 | 76 | ** the "action" links located below the searchHeader |
77 | 77 | */ |
78 | 78 | #p-cactions {position:relative;top: 15px;} |
79 | | -#p-cactions {width: 100%;white-space: nowrap;padding: 0;margin: 0;border: none;background: none; |
| 79 | +#p-cactions { |
| 80 | + width: 100%;white-space: nowrap;padding: 0;margin: 0;border: none;background: none; |
80 | 81 | overflow: visible; |
81 | 82 | line-height: 1.2em; |
82 | 83 | } |
| 84 | + |
83 | 85 | #p-cactions h5 { display: none;} |
84 | 86 | #p-cactions .portlet, |
85 | 87 | #p-cactions .pBody {z-index: 0;padding: 0;margin: 0;border: none;overflow: visible;background: none;} |
— | — | @@ -89,13 +91,33 @@ |
90 | 92 | #p-cactions li {z-index: 0;border: none;padding: 0;display: inline; margin-left: 1em; |
91 | 93 | line-height: 1.2em; background: none; |
92 | 94 | } |
93 | | -#p-cactions li a { padding-bottom: .2em;background: none; |
| 95 | +#p-cactions li a {padding-bottom: .2em;background: none; |
94 | 96 | } |
95 | 97 | #p-cactions li a:hover {background-color: white;padding-bottom: .2em; |
96 | 98 | } |
97 | 99 | #p-cactions li.active a:hover { background-color: transparent;} |
98 | 100 | .selected a {color: #474747; text-decoration:none;} |
99 | 101 | |
| 102 | +/*if in footer set things up slightly differently ;) */ |
| 103 | +#footer .portlet h5 { display:inline;} |
| 104 | +#footer #p-cactions, #footer #p-navigation, #footer #p-tb, #footer #p-footer{ |
| 105 | + width:14em; |
| 106 | + position:static; |
| 107 | + top: 20px; |
| 108 | + float:left; |
| 109 | +} |
| 110 | +#footer #p-cactions ul, #footer #p-navigation ul, #footer #p-tb ul, #footer #p-footer ul{ |
| 111 | + text-align: left; |
| 112 | + line-height: 1.4em; |
| 113 | + padding: 0 2em 0 3em; |
| 114 | + margin: 0; |
| 115 | +} |
| 116 | +#footer #p-cactions li, #footer #p-navigation li, #footer #p-tb li, #footer #p-footer li{ |
| 117 | + display: block; |
| 118 | + margin-top:5px; |
| 119 | + line-height: 1.2em; |
| 120 | + padding-bottom: .2em; |
| 121 | +} |
100 | 122 | |
101 | 123 | /* the icon in front of the user name, single quotes |
102 | 124 | in bg url to hide it from iemac */ |
— | — | @@ -142,7 +164,12 @@ |
143 | 165 | width: 730px;
|
144 | 166 | margin: 20px auto;
|
145 | 167 | overflow: hidden;
|
146 | | -}
|
| 168 | +} |
| 169 | +/* don't display edit links for sections on main page */ |
| 170 | +#frontPageContent .editsection{ |
| 171 | + display:none; |
| 172 | +} |
| 173 | +
|
147 | 174 | #frontPageContent ul.popularSearches {
|
148 | 175 | list-style: none;
|
149 | 176 | margin: 10px 0 30px 0;
|
— | — | @@ -258,11 +285,11 @@ |
259 | 286 | margin: 10px 0; |
260 | 287 | display:block; |
261 | 288 | padding:3px 0px; |
262 | | -border-bottom:1px solid #DADADA;
|
| 289 | + border-bottom:1px solid #DADADA;
|
263 | 290 | } |
264 | 291 | .suggestionsBox ul li{ |
265 | 292 | border-top:1px solid #DADADA; |
266 | | -padding:5px 0px 5px 20px; |
| 293 | +padding:3px 0px 3px 20px; |
267 | 294 | }
|
268 | 295 | .suggestionsBox div.block ul a {text-decoration: none;}
|
269 | 296 | .suggestionsBox div.block ul li {margin: 7px 0;}
|
— | — | @@ -307,6 +334,7 @@ |
308 | 335 | width:196px; |
309 | 336 | color:#2060c1; |
310 | 337 | } |
| 338 | + |
311 | 339 | ul .ac_txt{ |
312 | 340 | color:#2060c1; |
313 | 341 | } |
— | — | @@ -317,7 +345,12 @@ |
318 | 346 | background: #0b68c9 url(images/selector.png) 0 0 repeat-x; |
319 | 347 | color: white; |
320 | 348 | } |
| 349 | +.ac_over .ac_img_txt, .ac_over .ac_txt, .ac_over h6{ |
| 350 | + color: white; |
| 351 | + cursor:pointer; |
| 352 | +} |
321 | 353 | |
| 354 | + |
322 | 355 | .ac_results iframe { |
323 | 356 | display:none;/*sorry for IE5*/ |
324 | 357 | display/**/:block;/*sorry for IE5*/ |
— | — | @@ -705,26 +738,41 @@ |
706 | 739 | display:none; |
707 | 740 | } |
708 | 741 |
|
709 | | -#footer, #footer2 {
|
710 | | - width: 885px;
|
711 | | - background: white;
|
| 742 | +.footer, .footer2 {
|
| 743 | + width: 730px;
|
712 | 744 | padding: 15px;
|
713 | 745 | overflow: hidden;
|
714 | | - height: 100%;
|
715 | | - margin: 15px auto 0 auto;
|
| 746 | + height: 100%; |
| 747 | + vertical-align: top; |
| 748 | + margin: 10px auto;
|
| 749 | +} |
| 750 | +.footer{ |
| 751 | + background: white; |
716 | 752 | }
|
717 | | -#footer2 {background: #e9f2ff;}
|
718 | | -#footer ul.footerLinks, #footer2 ul.footerLinks {
|
| 753 | +.footer2 { |
| 754 | + background: #e9f2ff; |
| 755 | +} |
| 756 | +
|
| 757 | +.footer ul.footerLinks{
|
719 | 758 | float: left;
|
720 | 759 | display: inline;
|
721 | 760 | width: 180px;
|
722 | 761 | list-style: none;
|
723 | 762 | margin: 0;
|
724 | | -}
|
725 | | -*:first-child+html #footer ul.footerLinks, *:first-child+html #footer2 ul.footerLinks {width: 220px;}
|
726 | | -#footer ul.footerLinks li, #footer2 ul.footerLinks li {margin: 10px 0;}
|
727 | | -#footer ul.footerLinks li a, #footer2 ul.footerLinks li a {text-decoration: none;}
|
| 763 | +} |
| 764 | +#column-one .portlet{ |
| 765 | + border:medium none; |
| 766 | + float:none; |
| 767 | + margin:0pt 0pt 0.5em; |
| 768 | + overflow:hidden; |
| 769 | + padding:0pt; |
| 770 | + width:11.6em; |
| 771 | +} |
728 | 772 |
|
| 773 | +*:first-child+html .footer ul.footerLinks, *:first-child+html .footer2 ul.footerLinks {width: 220px;}
|
| 774 | +.footer ul.footerLinks li, .footer2 ul.footerLinks li {margin: 10px 0;}
|
| 775 | +.footer ul.footerLinks li a, .footer2 ul.footerLinks li a {text-decoration: none;}
|
| 776 | +
|
729 | 777 | p#copyInfo {text-align: center; padding: 15px 0; margin: 0;}
|
730 | 778 | p#copyInfo a {color: #474747;}
|
731 | 779 | p#copyInfo a:hover {color: #999;}
|
Index: branches/MetavidWiki-exp/skins/mvpcf/images/powered_by_metavid_88x31.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: branches/MetavidWiki-exp/skins/mvpcf/images/powered_by_metavid_88x31.png |
___________________________________________________________________ |
Added: svn:mime-type |
732 | 780 | + application/octet-stream |
Index: branches/MetavidWiki-exp/skins/mvpcf.php |
— | — | @@ -4,9 +4,15 @@ |
5 | 5 | * Version .01 |
6 | 6 | * Made for MediaWiki 1.12 |
7 | 7 | * By Michael Dale, dale@kevcom.com, |
8 | | - * in collaboration with Partipipatory culture foundation |
9 | | - * ( |
| 8 | + * in collaboration with Participatory culture foundation |
10 | 9 | * |
| 10 | + * |
| 11 | + * @@notes: |
| 12 | + * designing the template from stand alone html/css files resulted in a somewhat hackish template system (my apologies) |
| 13 | + * trade offs are pushing a lot more layout decisions to client side and adding complexity to the css/javascript layout. |
| 14 | + * Having the complexity here enables a bit cleaner css and javascript (but again since its a merged style sheet |
| 15 | + * there is not much clarity) |
| 16 | + * |
11 | 17 | * Local settings that affect this skin (in LocalSettings.php): |
12 | 18 | * $wgDefaultSkin change to "mvpcf" to use as your default skin |
13 | 19 | * $wgSitename this is displayed as the site name |
— | — | @@ -47,6 +53,7 @@ |
48 | 54 | * |
49 | 55 | * @access private |
50 | 56 | */ |
| 57 | + var $is_main_page_view = false; |
51 | 58 | function execute() { |
52 | 59 | global $wgUser, $wgTitle, $wgRequest; |
53 | 60 | $this->user_skin = $wgUser->getSkin(); |
— | — | @@ -57,40 +64,24 @@ |
58 | 65 | $this->data['showjumplinks']=false; |
59 | 66 | $this->data['tagline']=false; |
60 | 67 | $this->get_head_html(); |
| 68 | + |
61 | 69 | if($wgTitle->getNamespace()== NS_MAIN && |
62 | | - $wgTitle->getDBkey()=='Main_Page' && |
63 | | - $wgRequest->getText( 'action', 'view' )=='view'){ |
| 70 | + $wgTitle->getDBkey()=='Main_Page' && ( |
| 71 | + $wgRequest->getText( 'action', 'view' )=='view' || |
| 72 | + $wgRequest->getText( 'action', 'view' )=='purge') ){ |
| 73 | + $this->is_main_page_view = true; |
64 | 74 | $this->get_splash_page_html(); |
65 | 75 | }else{ |
66 | 76 | $this->get_base_body_html(); |
67 | | - } |
68 | | - $this->get_footer_html(); |
| 77 | + } |
| 78 | + $this->close_html(); |
69 | 79 | } |
70 | | - function get_personal_portlet(){ |
71 | | - ?> |
72 | | - <div class="portlet" id="p-personal"> |
73 | | - <h5><?php $this->msg('personaltools') ?></h5> |
74 | | - <div class="pBody"> |
75 | | - <ul> |
76 | | - <?php foreach($this->data['personal_urls'] as $key => $item) { ?> |
77 | | - <li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php |
78 | | - if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php |
79 | | - echo htmlspecialchars($item['href']) ?>"<?php echo $this->user_skin->tooltipAndAccesskey('pt-'.$key) ?><?php |
80 | | - if(!empty($item['class'])) { ?> class="<?php |
81 | | - echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php |
82 | | - echo htmlspecialchars($item['text']) ?></a></li> |
83 | | - <?php } ?> |
84 | | - </ul> |
85 | | - </div> |
86 | | - </div> |
87 | | - <?php |
88 | | - } |
89 | 80 | function get_splash_page_html(){ |
90 | 81 | global $wgScript; |
91 | 82 | ?> |
92 | 83 | <body id="frontPage"> |
93 | 84 | <div id="frontPageTop"> |
94 | | - <?php $this->get_personal_portlet()?> |
| 85 | + <?php $this->get_portlet('p-personal')?> |
95 | 86 | <div id="searchSplash"> |
96 | 87 | <div class="logo"><a href="#"><img src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/images/logo.png" alt="Metavid" /></a></div> |
97 | 88 | <p class="tagline">The Open Video archive of the US Congress</p> |
— | — | @@ -98,54 +89,208 @@ |
99 | 90 | </div><!--searchSplash--> |
100 | 91 | </div><!--frontPageTop--> |
101 | 92 | <div id="frontPageContent"> |
102 | | - <h2>Today's Popular Searches</h2> |
103 | | - <ul class="popularSearches"> |
104 | | - <li><a href="#">Barack Obama</a></li> |
105 | | - <li><a href="#">Health Care</a></li> |
106 | | - <li><a href="#">Gas Tax</a></li> |
107 | | - <li><a href="#">Hillary Clinton</a></li> |
108 | | - |
109 | | - <li><a href="#">John McCain</a></li> |
110 | | - <li><a href="#">Iraq War</a></li> |
111 | | - <li class="last_li"><a href="#">Appropriations</a></li> |
| 93 | + <!-- start content --> |
| 94 | + <?php $this->html('bodytext') ?> |
| 95 | + <?php if($this->data['catlinks']) { ?><div id="catlinks"><?php $this->html('catlinks') ?></div><?php } ?> |
| 96 | + <!-- end content --> |
| 97 | + <div class="visualClear"></div> |
| 98 | + <?php echo $this->get_portlets()?> |
| 99 | + </div> |
| 100 | + <?php |
| 101 | + } |
| 102 | + /* |
| 103 | + * gets portlets (put in footer for non-logged in users) |
| 104 | + */ |
| 105 | + function get_portlets(){ |
| 106 | + global $wgUser; |
| 107 | + //if not logged in put everything in the footer |
| 108 | +//<h5>Sitemap</h5> |
| 109 | + ?> |
| 110 | + <div id="footer" class="footer<?php echo ($this->is_main_page_view)?'':'2';?>"> |
| 111 | + <?php |
| 112 | + if($wgUser->isAnon() || $this->is_main_page_view){ |
| 113 | + //grab cactions portlet |
| 114 | + $this->get_portlet('p-cactions'); |
| 115 | + } |
| 116 | + //grab the rest of the portlets |
| 117 | + //$this->get_portlet('p-logo'); |
| 118 | + $this->get_portlet('sidebars'); |
| 119 | + $this->get_portlet('toolbox'); |
| 120 | + $this->get_portlet('p-footer'); |
| 121 | + ?> |
| 122 | + </div> |
| 123 | + <?php |
| 124 | + } |
| 125 | + function get_portlet($pkey){ |
| 126 | + switch($pkey){ |
| 127 | + case 'p-cactions': |
| 128 | + ?> |
| 129 | +<div id="p-cactions" class="portlet"> |
| 130 | + <h5><?php $this->msg('views') ?></h5> |
| 131 | + <div class="pBody"> |
| 132 | + <ul> |
| 133 | +<?php foreach($this->data['content_actions'] as $key => $tab) { ?> |
| 134 | + <li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php |
| 135 | + if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php } |
| 136 | + ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"<?php echo $this->user_skin->tooltipAndAccesskey('ca-'.$key) ?>><?php |
| 137 | + echo htmlspecialchars($tab['text']) ?></a></li> |
| 138 | +<?php } ?> |
112 | 139 | </ul> |
113 | | - |
114 | | - <h2>Today's Popular Clips</h2> |
115 | | - <ul class="popularClips"> |
116 | | - <li> |
117 | | - <img src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/images/img1.jpg" alt="Clip Image" /> |
118 | | - <span class="title"><a href="#">Sen. Barack Obama (D-IL)</a></span> |
119 | | - <span class="description">Senate Floor - June 3, 2008</span> |
120 | | - <span class="keywords">keywords: <a href="#">war</a>, <a href="#">iraq</a>, <a href="#">budget</a></span> |
121 | | - </li> |
122 | | - <li> |
123 | | - <img src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/images/img1.jpg" alt="Clip Image" /> |
124 | | - <span class="title"><a href="#">Sen. Barack Obama (D-IL)</a></span> |
125 | | - <span class="description">Senate Floor - June 3, 2008</span> |
126 | | - <span class="keywords">keywords: <a href="#">war</a>, <a href="#">iraq</a>, <a href="#">budget</a></span> |
| 140 | + </div> |
| 141 | +</div> |
| 142 | + <?php |
| 143 | + break; |
| 144 | + case 'p-personal': |
| 145 | + ?> |
| 146 | +<div class="portlet" id="p-personal"> |
| 147 | + <h5><?php $this->msg('personaltools') ?></h5> |
| 148 | + <div class="pBody"> |
| 149 | + <ul> |
| 150 | + <?php foreach($this->data['personal_urls'] as $key => $item) { ?> |
| 151 | + <li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php |
| 152 | + if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php |
| 153 | + echo htmlspecialchars($item['href']) ?>"<?php echo $this->user_skin->tooltipAndAccesskey('pt-'.$key) ?><?php |
| 154 | + if(!empty($item['class'])) { ?> class="<?php |
| 155 | + echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php |
| 156 | + echo htmlspecialchars($item['text']) ?></a></li> |
| 157 | + <?php } ?> |
| 158 | + </ul> |
| 159 | + </div> |
| 160 | +</div> |
| 161 | + <?php |
| 162 | + break; |
| 163 | + case 'p-logo': |
| 164 | + ?> |
| 165 | +<div class="portlet" id="p-logo"> |
| 166 | + <a style="background-image: url(<?php $this->text('logopath') ?>);" <?php |
| 167 | + ?>href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"<?php |
| 168 | + echo $this->user_skin->tooltipAndAccesskey('n-mainpage') ?>></a> |
| 169 | +</div> |
| 170 | + <?php |
| 171 | + break; |
| 172 | + case 'sidebars': |
| 173 | + ?> |
| 174 | +<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?> |
| 175 | +<div class='portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $this->user_skin->tooltip('p-'.$bar) ?>> |
| 176 | + <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5> |
| 177 | + <div class='pBody'> |
| 178 | + <ul> |
| 179 | +<?php foreach($cont as $key => $val) { ?> |
| 180 | + <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php |
| 181 | + if ( $val['active'] ) { ?> class="active" <?php } |
| 182 | + ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $this->user_skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li> |
| 183 | +<?php } ?> |
| 184 | + </ul> |
| 185 | + </div> |
| 186 | +</div> |
| 187 | +<?php } |
| 188 | + break; |
| 189 | + case 'toolbox': |
| 190 | + ?> |
| 191 | +<div class="portlet" id="p-tb"> |
| 192 | + <h5><?php $this->msg('toolbox') ?></h5> |
| 193 | + <div class="pBody"> |
| 194 | + <ul> |
| 195 | +<?php |
| 196 | + if($this->data['notspecialpage']) { ?> |
| 197 | + <li id="t-whatlinkshere"><a href="<?php |
| 198 | + echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href']) |
| 199 | + ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li> |
| 200 | +<?php |
| 201 | + if( $this->data['nav_urls']['recentchangeslinked'] ) { ?> |
| 202 | + <li id="t-recentchangeslinked"><a href="<?php |
| 203 | + echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href']) |
| 204 | + ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li> |
| 205 | +<?php } |
| 206 | + } |
| 207 | + if(isset($this->data['nav_urls']['trackbacklink'])) { ?> |
| 208 | + <li id="t-trackbacklink"><a href="<?php |
| 209 | + echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href']) |
| 210 | + ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li> |
| 211 | +<?php } |
| 212 | + if($this->data['feeds']) { ?> |
| 213 | + <li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) { |
| 214 | + ?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php |
| 215 | + echo htmlspecialchars($feed['href']) ?>"<?php echo $this->user_skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span> |
| 216 | + <?php } ?></li><?php |
| 217 | + } |
127 | 218 | |
128 | | - </li> |
129 | | - <li> |
130 | | - <img src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/images/img1.jpg" alt="Clip Image" /> |
131 | | - <span class="title"><a href="#">Sen. Barack Obama (D-IL)</a></span> |
132 | | - <span class="description">Senate Floor - June 3, 2008</span> |
133 | | - <span class="keywords">keywords: <a href="#">war</a>, <a href="#">iraq</a>, <a href="#">budget</a></span> |
| 219 | + foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) { |
134 | 220 | |
135 | | - </li> |
136 | | - <li class="last_li"> |
137 | | - <img src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/images/img1.jpg" alt="Clip Image" /> |
138 | | - <span class="title"><a href="#">Sen. Barack Obama (D-IL)</a></span> |
139 | | - <span class="description">Senate Floor - June 3, 2008</span> |
140 | | - <span class="keywords">keywords: <a href="#">war</a>, <a href="#">iraq</a>, <a href="#">budget</a></span> |
| 221 | + if($this->data['nav_urls'][$special]) { |
| 222 | + ?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href']) |
| 223 | + ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li> |
| 224 | +<?php } |
| 225 | + } |
141 | 226 | |
142 | | - </li> |
| 227 | + if(!empty($this->data['nav_urls']['print']['href'])) { ?> |
| 228 | + <li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href']) |
| 229 | + ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php |
| 230 | + } |
| 231 | + |
| 232 | + if(!empty($this->data['nav_urls']['permalink']['href'])) { ?> |
| 233 | + <li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href']) |
| 234 | + ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php |
| 235 | + } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?> |
| 236 | + <li id="t-ispermalink"<?php echo $this->user_skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php |
| 237 | + } |
| 238 | + |
| 239 | + wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) ); |
| 240 | +?> |
143 | 241 | </ul> |
144 | | - </div> |
145 | | - </body> |
146 | | - <?php |
| 242 | + </div> |
| 243 | +</div> |
| 244 | +<?php |
| 245 | + break; |
| 246 | + case 'lang': |
| 247 | + if( $this->data['language_urls'] ) { ?> |
| 248 | + <div id="p-lang" class="portlet"> |
| 249 | + <h5><?php $this->msg('otherlanguages') ?></h5> |
| 250 | + <div class="pBody"> |
| 251 | + <ul> |
| 252 | +<?php foreach($this->data['language_urls'] as $langlink) { ?> |
| 253 | + <li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php |
| 254 | + ?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li> |
| 255 | +<?php } ?> |
| 256 | + </ul> |
| 257 | + </div> |
| 258 | + </div> |
| 259 | +<?php } |
| 260 | + break; |
| 261 | + case 'p-footer': |
| 262 | +?> |
| 263 | +<div id="p-footer" class="portlet"> |
| 264 | + <h5>Site</h5> |
| 265 | + <ul> |
| 266 | +<?php |
| 267 | +// Generate additional footer links |
| 268 | + $footerlinks = array( |
| 269 | + 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', |
| 270 | + 'privacy', 'about', 'disclaimer', 'tagline', |
| 271 | + ); |
| 272 | + foreach( $footerlinks as $aLink ) { |
| 273 | + if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) { |
| 274 | +?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li> |
| 275 | +<?php } |
| 276 | + } |
| 277 | + if($this->data['poweredbyico']) { ?> |
| 278 | + <li id="f-poweredbyico"><?php $this->html('poweredbyico') ?></li> |
| 279 | +<?php } |
| 280 | +?> |
| 281 | + <li id="f-poweredbyico"><a href="http://metavid.org/wiki/index.php/MetaVidWiki"><img alt="Powered by MediaWiki" src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/images/powered_by_metavid_88x31.png"/></a></li> |
| 282 | +<?php |
| 283 | + if($this->data['copyrightico']) { ?> |
| 284 | + <li id="f-copyrightico"><?php $this->html('copyrightico') ?></li> |
| 285 | +<?php } |
| 286 | +?> |
| 287 | + </ul> |
| 288 | + </div> |
| 289 | +<?php |
| 290 | + break; |
| 291 | + } |
147 | 292 | } |
148 | 293 | function get_search_html(){ |
149 | | - global $wgScript, $wgPageName, $wgTitle; |
| 294 | + global $wgScript, $wgPageName, $wgTitle, $wgUser; |
150 | 295 | //set approporiate javascript to flag advanced search |
151 | 296 | ?> |
152 | 297 | <div class="form_search_row"> |
— | — | @@ -155,29 +300,20 @@ |
156 | 301 | <input type="text" class="searchField" name="f[0][v]" id="search_field" /> |
157 | 302 | <button class="grey_button" type="submit"><span> Video Search </span></button> |
158 | 303 | <a href="#" class="advanced_search_tag">advanced search</a> |
159 | | - </form> |
160 | | - <div id="p-cactions" class="portlet"> |
161 | | - <h5><?php $this->msg('views') ?></h5> |
162 | | - <div class="pBody"> |
163 | | - <ul> |
164 | | - <?php foreach($this->data['content_actions'] as $key => $tab) { ?> |
165 | | - <li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php |
166 | | - if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php } |
167 | | - ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"<?php echo $this->user_skin->tooltipAndAccesskey('ca-'.$key) ?>><?php |
168 | | - echo htmlspecialchars($tab['text']) ?></a></li> |
169 | | - <?php } ?> |
170 | | - </ul> |
171 | | - </div> |
172 | | - </div> |
| 304 | + </form> |
| 305 | + <?php |
| 306 | + //display page actions if user is logged in and not on main page. |
| 307 | + if(!$wgUser->isAnon() && !$this->is_main_page_view ){ |
| 308 | + $this->get_portlet('p-cactions'); |
| 309 | + } |
| 310 | + ?> |
173 | 311 | </div> |
174 | | - |
175 | | - <div id="suggestions" style="display:none"> |
| 312 | +<div id="suggestions" style="display:none;z-index:50;"> |
176 | 313 | <div id="suggestionsTop"></div> |
177 | 314 | <div id="suggestionsInner" class="suggestionsBox"> |
178 | 315 | </div><!--suggestionsInner--> |
179 | 316 | <div id="suggestionsBot"></div> |
180 | | - </div><!--suggestions--> |
181 | | - </div> |
| 317 | + </div><!--suggestions--> |
182 | 318 | <?php |
183 | 319 | } |
184 | 320 | function get_base_body_html(){ |
— | — | @@ -215,124 +351,13 @@ |
216 | 352 | </div> |
217 | 353 | </div> |
218 | 354 | </div> |
219 | | - <!-- <div id="column-one">--> |
| 355 | + <!-- <div id="column-one">--> |
| 356 | + <?php $this->get_portlet('p-personal') ?> |
| 357 | + <?php $this->get_portlets() ?> |
| 358 | + |
220 | 359 | |
221 | | - <?php $this->get_personal_portlet() ?> |
222 | | - <div class="portlet" id="p-logo"> |
223 | | - <a style="background-image: url(<?php $this->text('logopath') ?>);" <?php |
224 | | - ?>href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"<?php |
225 | | - echo $this->user_skin->tooltipAndAccesskey('n-mainpage') ?>></a> |
226 | | - </div> |
227 | | - <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script> |
228 | | - <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?> |
229 | | - <div class='portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $this->user_skin->tooltip('p-'.$bar) ?>> |
230 | | - <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5> |
231 | | - <div class='pBody'> |
232 | | - <ul> |
233 | | -<?php foreach($cont as $key => $val) { ?> |
234 | | - <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php |
235 | | - if ( $val['active'] ) { ?> class="active" <?php } |
236 | | - ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $this->user_skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li> |
237 | | -<?php } ?> |
238 | | - </ul> |
239 | | - </div> |
240 | | - </div> |
241 | | - <?php } ?> |
242 | | - |
243 | | - <div class="portlet" id="p-tb"> |
244 | | - <h5><?php $this->msg('toolbox') ?></h5> |
245 | | - <div class="pBody"> |
246 | | - <ul> |
247 | | -<?php |
248 | | - if($this->data['notspecialpage']) { ?> |
249 | | - <li id="t-whatlinkshere"><a href="<?php |
250 | | - echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href']) |
251 | | - ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li> |
252 | | -<?php |
253 | | - if( $this->data['nav_urls']['recentchangeslinked'] ) { ?> |
254 | | - <li id="t-recentchangeslinked"><a href="<?php |
255 | | - echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href']) |
256 | | - ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li> |
257 | | -<?php } |
258 | | - } |
259 | | - if(isset($this->data['nav_urls']['trackbacklink'])) { ?> |
260 | | - <li id="t-trackbacklink"><a href="<?php |
261 | | - echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href']) |
262 | | - ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li> |
263 | | -<?php } |
264 | | - if($this->data['feeds']) { ?> |
265 | | - <li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) { |
266 | | - ?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php |
267 | | - echo htmlspecialchars($feed['href']) ?>"<?php echo $this->user_skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span> |
268 | | - <?php } ?></li><?php |
269 | | - } |
270 | | - |
271 | | - foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) { |
272 | | - |
273 | | - if($this->data['nav_urls'][$special]) { |
274 | | - ?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href']) |
275 | | - ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li> |
276 | | -<?php } |
277 | | - } |
278 | | - |
279 | | - if(!empty($this->data['nav_urls']['print']['href'])) { ?> |
280 | | - <li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href']) |
281 | | - ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php |
282 | | - } |
283 | | - |
284 | | - if(!empty($this->data['nav_urls']['permalink']['href'])) { ?> |
285 | | - <li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href']) |
286 | | - ?>"<?php echo $this->user_skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php |
287 | | - } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?> |
288 | | - <li id="t-ispermalink"<?php echo $this->user_skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php |
289 | | - } |
290 | | - |
291 | | - wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) ); |
292 | | -?> |
293 | | - </ul> |
294 | | - </div> |
295 | 360 | <!-- </div> (close column-one --> |
296 | | -<?php |
297 | | - if( $this->data['language_urls'] ) { ?> |
298 | | - <div id="p-lang" class="portlet"> |
299 | | - <h5><?php $this->msg('otherlanguages') ?></h5> |
300 | | - <div class="pBody"> |
301 | | - <ul> |
302 | | -<?php foreach($this->data['language_urls'] as $langlink) { ?> |
303 | | - <li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php |
304 | | - ?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li> |
305 | | -<?php } ?> |
306 | | - </ul> |
307 | | - </div> |
308 | | - </div> |
309 | | -<?php } ?> |
310 | | - </div><!-- end of the left (by default at least) column --> |
311 | | - <div class="visualClear"></div> |
312 | | - <div id="footer"> |
313 | | -<?php |
314 | | - if($this->data['poweredbyico']) { ?> |
315 | | - <div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div> |
316 | | -<?php } |
317 | | - if($this->data['copyrightico']) { ?> |
318 | | - <div id="f-copyrightico"><?php $this->html('copyrightico') ?></div> |
319 | | -<?php } |
320 | | - |
321 | | - // Generate additional footer links |
322 | | -?> |
323 | | - <ul id="f-list"> |
324 | | -<?php |
325 | | - $footerlinks = array( |
326 | | - 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', |
327 | | - 'privacy', 'about', 'disclaimer', 'tagline', |
328 | | - ); |
329 | | - foreach( $footerlinks as $aLink ) { |
330 | | - if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) { |
331 | | -?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li> |
332 | | -<?php } |
333 | | - } |
334 | | -?> |
335 | | - </ul> |
336 | | - </div> |
| 361 | + <div class="visualClear"></div> |
337 | 362 | |
338 | 363 | <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> |
339 | 364 | </div> |
— | — | @@ -343,11 +368,11 @@ |
344 | 369 | |
345 | 370 | --> |
346 | 371 | <?php endif; ?> |
347 | | -</body><?php |
| 372 | +<?php |
348 | 373 | wfRestoreWarnings(); |
349 | 374 | } // end of execute() method |
350 | 375 | |
351 | | - function get_head_html(){ |
| 376 | + function get_head_html(){ |
352 | 377 | ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
353 | 378 | <html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php |
354 | 379 | foreach($this->data['xhtmlnamespaces'] as $tag => $ns) { |
— | — | @@ -392,11 +417,15 @@ |
393 | 418 | </head> |
394 | 419 | <?php |
395 | 420 | } |
396 | | - function get_footer_html(){ |
| 421 | + function close_html(){ |
| 422 | + global $wgScript; |
397 | 423 | ?> |
| 424 | + <p id="copyInfo">MetaVid is a non-profit project of <a href="http://www.ucsc.edu">UC Santa Cruz</a> and the <a href="http://www.sunlightfoundation.com/">Sunlight Foundation</a>. Learn more <a href="<?php echo $wgScript ?>/about">About MetaVid</a></p> |
| 425 | + </body> |
398 | 426 | </html> |
399 | 427 | <?php |
400 | 428 | } |
401 | 429 | |
402 | 430 | } // end of class |
403 | 431 | ?> |
| 432 | + |