Ejemplo n.º 1
0
function linkattr_ExternalLink(&$url, &$text, &$link, &$attribs, $linktype)
{
    $attribsText = Linker::getExternalLinkAttributes('external ' . $linktype);
    $mergedattribs = array_merge($attribs, Sanitizer::decodeTagAttributes($attribsText));
    linkattr_ModifyLink($text, $mergedattribs, 1);
    if ($mergedattribs) {
        $attribsText = Xml::expandAttributes($mergedattribs);
    }
    $link = sprintf('<a href="%s"%s>%s</a>', $url, $attribsText, $text);
    return false;
}
Ejemplo n.º 2
0
    /**
     * Outputs the entire contents of the (X)HTML page
     */
    public function execute()
    {
        global $wgUser;
        global $wgLiquiFlowWikiTitle;
        // Build additional attributes for navigation urls
        $nav = $this->data['content_navigation'];
        $mode = $this->getSkin()->getUser()->isWatched($this->getSkin()->getRelevantTitle()) ? 'unwatch' : 'watch';
        if (isset($nav['actions'][$mode])) {
            $nav['views'][$mode] = $nav['actions'][$mode];
            $nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
            $nav['views'][$mode]['primary'] = true;
            unset($nav['actions'][$mode]);
        }
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        unset($nav['views']['view']);
        //$nav['actions']['delete']['text'] = '<span class="fa fa-fw fa-trash-o" title="Page"></span> <span="hidden-sm">Delete</span>';
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        // Reverse horizontally rendered navigation elements
        if ($this->data['rtl']) {
            $this->data['view_urls'] = array_reverse($this->data['view_urls']);
            $this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
            $this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
        }
        // Output HTML Page
        //$pos = strpos($this->data['headelement'], '<meta charset="UTF-8" />') + strlen("<meta charset=\"UTF-8\" />\n");
        //$meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n" .
        //		"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n";
        //$this->data['headelement'] = substr_replace($this->data['headelement'], $meta, $pos, 0);
        $this->html('headelement');
        // extract the standard table of contents from the page html in order to add it to the left sidebar
        preg_match("/<div id=\"toctitle\"><h2>Contents<\\/h2><\\/div>(.*?)<ul>(.*?)<\\/ul>(.*?)<\\/div>/si", $this->data['bodycontent'], $match);
        $toc = "";
        if (isset($match[0])) {
            $toc = substr($match[0], 0, -6);
            $toc = str_replace('<ul>', '<ul class="nav">', $toc);
            // Hide standard toc on big screens when the sidebar toc is shown
            $this->data['bodycontent'] = str_replace('<div id="toc" class="toc">', '<div id="toc" class="toc hidden-lg hidden-xl">', $this->data['bodycontent']);
        }
        ?>

<nav class="navbar navbar-default navbar-fixed-top noprint" role="navigation" id="slide-nav">
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12 navbar-main-column">
				<div class="navbar-header">
					<button class="navbar-toggle" id="main-nav-toggler">
            			<span class="sr-only">Toggle navigation</span>
            			<span class="fa fa-bars fa-2x"></span>
          			</button>	
          			
					<a class="navbar-brand" href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" 
					<?php 
        echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
        ?>
> 
					<div style="display: inline-block;">
							<div class="hidden-xs"><img src="<?php 
        $this->text('logopath');
        ?>
" style="margin-top: -8px; height:40px; float:left; "></div>
							<div class="visible-xs" style="white-space: nowrap;">Liquipedia</div>
							</div>
					</a>
					
					<?php 
        if (strlen($toc) > 0) {
            ?>
					<button class="navbar-toggle pull-right" id="toc-toggler">
            			<span class="sr-only">Toggle navigation</span>
            			<span style="padding-top:4px;" class="fa fa-list fa-2x"></span>
          			</button>
          			<?php 
        }
        ?>
					<button id="mobile-search-button" class="navbar-toggle navbar-search-toggle pull-right visible-xs">
						<span class="fa fa-search fa-2x"></span>
					</button>
							 						
				</div><!-- /.navbar-header -->
				<?php 
        if (strlen($toc) > 0) {
            ?>
					<div id="slide-toc" class="visible-xs">
				   		<div id="scroll-wrapper-toc">
				    		<ul class="nav navbar-nav">
				     			<?php 
            echo $toc;
            ?>
				     		</ul>
				    	</div>
					</div>
				<?php 
        }
        ?>
				   
				<div id="slidemenu">
					<div id="scroll-wrapper-menu">
					<ul class="nav navbar-nav">
					<?php 
        $currentWikiTitle = key($this->data['sidebar']);
        $wikiNavigation = array_shift($this->data['sidebar']);
        ?>
						<li class="dropdown dropdown-brand hidden-xs">
							<a class="dropdown-toggle brand-title" data-toggle="dropdown" data-hover="dropdown" href="#"> 
								<span style="font-size: 18px;">liquipedia</span> <span class="caret"></span> <br>
								<span class="hidden-xs brand-subtitle">
									<?php 
        echo $currentWikiTitle;
        ?>
								</span>
							</a>
							<ul class="dropdown-menu">
							<?php 
        foreach ($wikiNavigation as $wikiNavigationEntry) {
            echo '<li><a href="' . $wikiNavigationEntry['href'] . '">' . $wikiNavigationEntry['text'] . '</a></li>';
        }
        ?>
							</ul>
						</li>
					
					<?php 
        foreach ($this->data['sidebar'] as $navHeader => $navEntryArray) {
            if ($navHeader == 'TRENDING') {
                ?>
							<li class="dropdown icon-tablet">
								<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#">
									<div class="visible-xl visible-lg visible-md visible-xs"><span class="fa fa-fw fa-line-chart"></span> Trending <span class="caret"></span></div>
									<div class="visible-sm">
										<span class="fa fa-fw fa-line-chart"></span> <span class="caret"></span>
									</div>
								</a>
								<ul id="trending-pages-menu" class="dropdown-menu"></ul>
							</li>
                                                        <?php 
            } elseif ($navHeader == 'TOURNAMENTS') {
                ?>
							<li class="dropdown hidden-xs icon-tablet">
								<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#">
									<div class="visible-xl visible-lg visible-md visible-xs"><span class="fa fa-fw fa-trophy"></span> Tournaments <span class="caret"></span></div>
									<div class="visible-sm">
										<span class="fa fa-fw fa-trophy"></span> <span class="caret"></span>
									</div>
								</a>
								<div class="dropdown-menu multi-column columns-3">
                                	<div class="row">
								<?php 
                if (is_array($navEntryArray)) {
                    foreach ($navEntryArray as $subNavHeader => $navSubEntryArray) {
                        ?>
										<div class="col-sm-4">
											<ul class="multi-column-dropdown">
											<li class="dropdown-header"><?php 
                        echo $subNavHeader;
                        ?>
</li>
										<?php 
                        if (is_array($navSubEntryArray)) {
                            foreach ($navSubEntryArray as $navEntry) {
                                echo '<li><a href="' . $navEntry['href'] . '">' . $navEntry['text'] . '</a></li>';
                            }
                        }
                        ?>
											</ul>
										</div>
									<?php 
                    }
                }
                global $wgScriptPath;
                global $wgContLang;
                ?>
                                    
							     	</div>
							     	<div class="row">
							     		<div style="float:right; margin-right:23px"><a href="<?php 
                echo $wgScriptPath;
                ?>
/index.php?title=<?php 
                echo $wgContLang->getFormattedNsText(4);
                ?>
:Tournaments">[edit]</a></div>
							     	</div>                               					
								</div>
							</li>
							<li class="visible-xs mobile-divider"></li>
								<?php 
                if (is_array($navEntryArray)) {
                    foreach ($navEntryArray as $subNavHeader => $navSubEntryArray) {
                        ?>
								<li class="dropdown visible-xs">
									<a class="dropdown-toggle"	data-toggle="dropdown" href="#">
										<span class="fa fa-fw fa-trophy"></span> <?php 
                        echo $subNavHeader;
                        ?>
 <span class="caret"></span>
									</a>
									<ul class="dropdown-menu">
									<?php 
                        if (is_array($navSubEntryArray)) {
                            foreach ($navSubEntryArray as $navEntry) {
                                echo '<li><a href="' . $navEntry['href'] . '">' . $navEntry['text'] . '</a></li>';
                            }
                        }
                        ?>
										
										</ul>
									</li>
									<?php 
                    }
                }
            } elseif ($navHeader == 'Contribute') {
                ?>
							<li class="visible-xs mobile-divider"></li>
							<li class="dropdown icon-tablet">
								<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#">
									<div class="visible-xl visible-lg visible-md visible-xs"><span class="fa fa-fw fa-puzzle-piece"></span> <?php 
                echo $navHeader;
                ?>
 <span class="caret"></span></div>
									<div class="visible-sm">
										<span class="fa fa-fw fa-puzzle-piece"></span> <span class="caret"></span>
									</div>
								</a>
								<ul class="dropdown-menu">
								<?php 
                foreach ($navEntryArray as $navEntry) {
                    echo '<li><a href="' . $navEntry['href'] . '">' . $navEntry['text'] . '</a></li>';
                }
                ?>
								</ul>
							</li>
							<?php 
            } else {
                ?>
							<li class="visible-xs mobile-divider"></li>
							<li class="dropdown icon-tablet">
								<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#">
									 '<?php 
                echo $navHeader;
                ?>
' <span class="caret"></span>
								</a>
								<ul class="dropdown-menu">
								<?php 
                foreach ($navEntryArray as $navEntry) {
                    echo '<li><a href="' . $navEntry['href'] . '">' . $navEntry['text'] . '</a></li>';
                }
                ?>
								</ul>
							</li>
							<?php 
            }
        }
        ?>
						<li class="visible-xs mobile-divider"></li>
						<li class="dropdown visible-xs">
							<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#">
								<span class="fa fa-fw fa-gavel"></span> Actions <span class="caret"></span>
							</a>
							<ul class="dropdown-menu">
							<?php 
        $this->renderNavigation(array('NAMESPACES', 'VIEWS', 'ACTIONS'));
        ?>
							</ul>
						</li>
							<?php 
        if (!$wgUser->isLoggedIn()) {
            $personalTools = $this->getPersonalTools();
            $personalTools['createaccount']['links'][0]['href'] = 'http://www.teamliquid.net/mytlnet/register.php';
            $personalTools['createaccount']['class'] = "visible-xs";
            $personalTools['login']['class'] = "visible-xs";
            echo $this->makeListItem('createaccount', $personalTools['createaccount']);
            echo $this->makeListItem('login', $personalTools['login']);
        } else {
            $personalTools = $this->getPersonalTools();
            ?>
									<li class="dropdown visible-xs">
										<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#">
											<span class="fa fa-fw fa-user"></span> <?php 
            echo $personalTools["userpage"]["links"][0]["text"];
            ?>
											<span class="caret"></span> 
										</a>
										<ul class="dropdown-menu">
											<?php 
            $personalTools["userpage"]["links"][0]["text"] = "Userpage";
            foreach ($personalTools as $key => $item) {
                echo $this->makeListItem($key, $item);
            }
            ?>
										</ul>
									</li>
								<?php 
        }
        ?>
								
						<li class="visible-xs mobile-divider"></li>
						<li class="dropdown visible-xs">
							<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#"> 
								<span class="fa fa-fw fa-puzzle-piece"></span> Other Wikis <span class="caret"></span> 
							</a>
							<ul class="dropdown-menu">
							<?php 
        foreach ($wikiNavigation as $wikiNavigationEntry) {
            echo '<li><a href="' . $wikiNavigationEntry['href'] . '">' . $wikiNavigationEntry['text'] . '</a></li>';
        }
        ?>
							</ul>
						</li>
						<li class="dropdown visible-xs">
							<a href="#top"> 
								<span class="fa fa-fw fa-arrow-up"></span> Back to top
							</a>
						</li>
						
					</ul><!-- /.navbar-nav -->
					
					<ul class="nav navbar-nav navbar-right tablet-personal">
						<?php 
        if (!$wgUser->isLoggedIn()) {
            $personalTools = $this->getPersonalTools();
            $personalTools['createaccount']['links'][0]['href'] = 'http://www.teamliquid.net/mytlnet/register';
            $personalTools['createaccount']['links'][0]['text'] = "";
            $personalTools['createaccount']['class'] = "hidden-sm hidden-xs";
            $personalTools['login']['links'][0]['text'] = "";
            $personalTools['login']['class'] = "icon-tablet hidden-xs";
            echo $this->makeListItem('createaccount', $personalTools['createaccount']);
            echo $this->makeListItem('login', $personalTools['login']);
        }
        ?>
					</ul><!-- /.navbar-nav .navbar-right -->
					<ul class="nav navbar-nav navbar-right">
						<?php 
        $this->renderNavigation('SEARCH');
        ?>
					</ul><!-- /.navbar-nav .navbar-right -->
					
					</div>	<!-- /#scroll-wrapper-menu -->
				</div><!-- /#slide-menu -->
			</div><!-- /.col-lg-8 -->
		</div><!-- /.row -->
	</div><!-- /.container-fluid -->
</nav><!-- /.navbar -->

<nav id="mobile-search-bar" class="navbar visible-xs noprint" style="display:none;">
	<form action="<?php 
        $this->text('wgScript');
        ?>
" id="mobile-search-form" class="navbar-form navbar-left" role="search">
		<div class="input-group">  								
        	<input id="searchInput" type="search" accesskey="f"
               title="Search Liquipedia <?php 
        echo $wgLiquiFlowWikiTitle;
        ?>
 Wiki [alt-shift-f]" placeholder="Search Liquipedia"
               name="search" autocomplete="off" class="form-control">
            <div class="input-group-btn">
            	<button class="btn navbar-search-btn searchButton" type="submit" id="searchButton">
                	<i class="fa fa-arrow-right"></i>
                 </button>      
            </div>
    	</div>
	</form>
</nav><!-- /#mobile-search-bar -->

<div id="wiki-nav" class="navbar navbar-inverse hidden-xs noprint">
	<div class="container-fluid">
		<div class="row">
			<div id="wiki-nav-main-column" class="col-md-12">
				<div class="wiki-tool-nav">
					<ul class="nav navbar-nav navbar-nav-2">
						<?php 
        $this->renderNavigation(array('NAMESPACES', 'VIEWS', 'ACTIONS'));
        ?>
					</ul>
					
					<ul class="nav navbar-nav navbar-right navbar-nav-2">
						<li class="dropdown">
							<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#"> 
								<span class="fa fa-fw fa-share-alt"></span> <span class="hidden-sm">Share</span> <span class="caret"></span> 
							</a>
							<ul class="dropdown-menu">
							<?php 
        $externalLink = $this->data['serverurl'] . str_replace('$1', $this->data['title'], $this->data['articlepath']);
        ?>
								<li>
									<a onclick="Share.twitter('<?php 
        echo $externalLink;
        ?>
','<?php 
        echo $this->data['title'];
        ?>
')"> 
										<span class="fa fa-fw fa-twitter"></span> Twitter
									</a>
								</li>
								<li>
									<a onclick="Share.facebook('<?php 
        echo $externalLink;
        ?>
','<?php 
        echo $this->data['title'];
        ?>
')">
										<span class="fa fa-fw fa-facebook"></span> Facebook
									</a>
								</li>
								<li>
									<a onclick="Share.reddit('<?php 
        echo $externalLink;
        ?>
','<?php 
        echo $this->data['title'];
        ?>
')">
										<span class="fa fa-fw fa-reddit"></span> Reddit
									</a>
								</li>
								<li>
									<a onclick="Share.googleplus('<?php 
        echo $externalLink;
        ?>
')">
										<span class="fa fa-fw fa-google-plus"></span> Google+
									</a>
								</li>
								<li>
									<a onclick="Share.qq('<?php 
        echo $externalLink;
        ?>
','<?php 
        echo $this->data['title'];
        ?>
')">
										<span class="fa fa-fw fa-qq"></span> Tencent QQ
									</a>
								</li>
								<li>
									<a onclick="Share.vk('<?php 
        echo $externalLink;
        ?>
','<?php 
        echo $this->data['title'];
        ?>
')">
										<span class="fa fa-fw fa-vk"></span> VKontakte
									</a>
								</li>
								<li>
									<a onclick="Share.weibo('<?php 
        echo $externalLink;
        ?>
','<?php 
        echo $this->data['title'];
        ?>
')">
										<span class="fa fa-fw fa-weibo"></span> Weibo
									</a>
								</li>
							</ul>
						</li>	
						
						<?php 
        $this->renderNavigation('TOOLBOX');
        ?>
						
						
						<?php 
        if (in_array('sysop', $wgUser->getEffectiveGroups())) {
            ?>
						<li class="dropdown">
							<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#"> 
								<span class="fa fa-fw fa-gavel"></span> <span class="caret"></span> 
							</a>
							<ul class="dropdown-menu">
								<?php 
            $adminDropdownLength = sizeof($this->adminDropdown);
            $count = 0;
            foreach ($this->adminDropdown as $header => $items) {
                $count++;
                ?>
									<li class="dropdown-header"><?php 
                echo $header;
                ?>
</li>
									<?php 
                foreach ($items as $key => $item) {
                    ?>
										<li id="<?php 
                    echo $items['id'];
                    ?>
">
											<a href="<?php 
                    echo $this->data['serverurl'] . str_replace('$1', $item['page'], $this->data['articlepath']);
                    ?>
">
												<?php 
                    echo $item['title'];
                    ?>
											</a>
										</li>
									<?php 
                }
                ?>
									<?php 
                if ($count < $adminDropdownLength) {
                    ?>
										<li class="divider"></li>
									<?php 
                }
                ?>
								<?php 
            }
            ?>
							</ul>
						</li>
						<?php 
        }
        ?>
						<?php 
        $this->renderNavigation('PERSONAL');
        ?>
					</ul><!-- /.navbar-right -->
				</div><!--  /.wiki-tool-nav -->
			</div><!-- /.col-lg-8 -->
		</div><!-- /.row -->
	</div><!-- /.container-fluid -->
</div><!-- /.navbar-inverse -->
				
<div id="wrap">

		<!-- @TODO: Sidebar ad box -->
        <div id="sidebar-toc-column" style="display: none;">
                <div id="sidebar-toc"
                     class="sidebar-toc bs-docs-sidebar hidden-print hidden-xs hidden-sm affix-top"
                     style="" role="complementary">
                    <?php 
        if (strlen($toc) > 0) {
            ?>
                    <?php 
            echo $toc;
            ?>
                    <?php 
        }
        ?>
                </div>
            <div id="sidebar-ad" class="affix-top">
                We don't love ads either, but they help pay the bills.
            </div>
        </div><!-- /#sidebar-toc-colum -->


<div class="container-fluid main-content">
	<div class="row">

		<div id="main-content-column" class="col-md-12">
			<div class="main-content">

			    <!-- @TODO: Ad banner -->
                <div style="height:100px; width: 100%; padding-top:10px;" class="visible-xl visible-lg visible-md">
                	<img src="/liquiflow/skins/LiquiFlow/ads/large-leaderboard.png">
                </div>
                <div style="hheight:100px; width: 100%; padding-top:10px;" class="visible-sm">
                	<img src="/liquiflow/skins/LiquiFlow/ads/leaderboard.jpg">
                </div>
                <div style="height:100px; width: 100%; padding-top:10px;" class="visible-xs">
                	<img src="/liquiflow/skins/LiquiFlow/ads/mobile-leaderboard.png">
                </div>
				
				<?php 
        if ($this->data['sitenotice']) {
            ?>
				<div id="siteNotice">
					<?php 
            $this->html('sitenotice');
            ?>
				</div>
				<?php 
        }
        ?>
				
				<h1 id="firstHeading" class="firstHeading">
					<span dir="auto"><?php 
        $this->html('title');
        ?>
 </span>
				</h1>

				<?php 
        $this->html('prebodyhtml');
        ?>
				<div id="bodyContent" class="mw-body-content">
					<?php 
        if ($this->data['isarticle']) {
            ?>
						<div id="siteSub">
							<?php 
            $this->msg('tagline');
            ?>
						</div>
					<?php 
        }
        ?>

					<div id="contentSub">
						<?php 
        $this->html('subtitle');
        ?>
					</div>

					<?php 
        if ($this->data['undelete']) {
            ?>
					<div id="contentSub2">
							<?php 
            $this->html('undelete');
            ?>
						</div>
					<?php 
        }
        ?>

					<?php 
        if ($this->data['newtalk']) {
            ?>
						<div class="usermessage">
							<?php 
            $this->html('newtalk');
            ?>
						</div>
					<?php 
        }
        ?>

					<?php 
        $this->html('bodycontent');
        ?>

					<?php 
        if ($this->data['printfooter']) {
            ?>
						<div class="printfooter">
							<?php 
            $this->html('printfooter');
            ?>
						</div>
					<?php 
        }
        ?>
					<?php 
        if ($this->data['catlinks']) {
            $this->html('catlinks');
        }
        if ($this->data['dataAfterContent']) {
            $this->html('dataAfterContent');
        }
        ?>
					<div class="visualClear"></div>
					<?php 
        $this->html('debughtml');
        ?>
				</div>
			</div>
			<!-- @TODO: Ad banner -->
			<div style="height:110px; width: 100%; padding:10px 0;" class="visible-xl visible-lg visible-md">
                	<img src="/liquiflow/skins/LiquiFlow/ads/large-leaderboard.png">
                </div>
                <div style="hheight:110px; width: 100%; padding: 10px 0;" class="visible-sm">
                	<img src="/liquiflow/skins/LiquiFlow/ads/leaderboard.jpg">
                </div>
                <div style="height:110px; width: 100%; padding:10px 0;" class="visible-xs">
                	<img src="/liquiflow/skins/LiquiFlow/ads/mobile-leaderboard.png">
                </div>
		</div><!-- /#main-content-column -->
	</div><!-- /.row -->
</div><!-- /.container -->
</div><!-- /#wrap -->

<?php 
        $footerLinks = $this->getFooterLinks();
        ?>
<div id="footer" class="footer">
	<div class="container-fluid">
		<div class="col-md-12">
			<div class="row">
        		<div class="footer-links">
        			<div class="col-md-2 hidden-sm hidden-xs">
             			<div class="col">
             				<div id="footer-logo-big"></div>
              			</div>
            		</div>
        		
        			<div class="col-md-2 col-sm-3 col-xs-12">
             			<div class="col">
                    		<h4>Our Wikis</h4>
                    		<ul>
                    			<li><a href="http://wiki.teamliquid.net/starcraft/" target="_blank">Brood War</a></li>
		                    	<li><a href="http://wiki.teamliquid.net/counterstrike/" target="_blank">Counterstrike</a></li>
		                    	<li><a href="http://wiki.teamliquid.net/dota2/" target="_blank">Dota 2</a></li>
		                    	<li><a href="http://wiki.teamliquid.net/hearthstone/" target="_blank">Hearthstone</a></li>
		                    	<li><a href="http://wiki.teamliquid.net/heroes/" target="_blank">Heroes of the Storm</a></li>
		                    	<li><a href="http://wiki.teamliquid.net/overwatch/" target="_blank">Overwatch</a></li>
		                    	<li><a href="http://wiki.teamliquid.net/smash/" target="_blank">Smash</a></li>
		                    	<li><a href="http://wiki.teamliquid.net/starcraft2/" target="_blank">StarCraft II</a></li>
	                    	</ul>
              			</div>
            		</div>
            		
        			<div class="col-md-2 col-sm-3 col-xs-12">
            			<h4>About</h4>
            			<ul>
   							<?php 
        foreach ($footerLinks['places'] as $link) {
            ?>
								<li id="footer-places-<?php 
            echo $link;
            ?>
">
									<?php 
            $this->html($link);
            ?>
								</li>
							<?php 
        }
        ?>
						</ul>
                    </div>
                    <div class="col-md-2 col-sm-3 hidden-xs">
            			<h4>Contact us</h4>
            			<ul>
                    		<li><a href="mailto:liquipedia@teamliquid.net">Send an Email</a></li>
                    		<li><a href="http://www.teamliquid.net/forum/website-feedback/94785-liquipedia-feedback-thread" target="_blank">Post Feedback</a></li>
                    		<li><a href="http://webchat.quakenet.org/?channels=%23liquipedia" target="_blank">Chat with us</a></li>
                    	</ul>						
                	</div>
                	
                	<div class="col-md-2 hidden-sm hidden-xs">
            			<h4>Affiliated Sites</h4>
            			<ul>
                    		<li><a href="http://www.teamliquid.net" target="_blank">TeamLiquid.net</a></li>
                    		<li><a href="http://www.liquidlegends.net" target="_blank">LiquidLegends.net</a></li>
                    		<li><a href="http://www.liquiddota.com" target="_blank">LiquidDota.com</a></li>
                    		<li><a href="http://www.liquidhearth.com" target="_blank">LiquidHearth.net</a></li>
                    	</ul>						
                	</div>
                	
                	<div class="col-md-2 col-sm-3 hidden-xs">
            			<h4>Follow us</h4>
            			<ul id="footer-social-media">
                    		<li>
                                <a target="_blank" href="http://twitter.com/LiquipediaNet" class="social-icon twitter-icon">
                    				<span class="social-link">Twitter</span>
                    			</a>
                    		</li>
                    		<li>
                                <a target="_blank" href="https://www.facebook.com/Liquipedia" class="social-icon facebook-icon">
                                    <span class="social-link">Facebook</span>
                    			</a>
                    		</li>
                    		<li>
                    			<a target="_blank" href="https://www.youtube.com/user/Liquipedia" class="social-icon youtube-icon">
                                    <span class="social-link">Youtube</span>
                    			</a>
                    		</li>
                    		<li>
                    			<a target="_blank" href="http://www.twitch.tv/liquipedia" class="social-icon twitch-icon">
                                    <span class="social-link">Twitch</span>
                    			</a>
                    		</li>
                    	</ul>
                	</div>
             	</div><!-- ./footer-links -->
        	</div><!-- ./row -->
		</div><!-- ./col-lg-8 -->
		
		<div style="text-align:center;" class="col-md-12 hidden-xs">
			<ul id="f-list">
				<?php 
        if (isset($footerLinks['info']) && is_array($footerLinks['info'])) {
            foreach ($footerLinks['info'] as $link) {
                ?>
						<li id="footer-info-<?php 
                echo $link;
                ?>
">
							<?php 
                $this->html($link);
                ?>
						</li>
				<?php 
            }
        }
        ?>
			</ul><!-- #/f-list -->
		</div><!-- ./col-lg-8 -->
       
       <?php 
        /**
         * <div style="margin-bottom:20px; text-align:center;" class="col-lg-offset-2 col-lg-8 col-md-12">
         * <?php
         * $footericons = $this->getFooterIcons( "icononly" );
         * if ( count( $footericons ) > 0 ) :
         * ?>
         * <ul id="footer-icons" class="noprint">
         * <?php foreach ( $footericons as $blockName => $footerIcons ) : ?>
         * <li id="footer-<?php echo htmlspecialchars( $blockName ); ?>ico">
         * <?php
         * foreach ( $footerIcons as $icon ) {
         * echo $this->getSkin()->makeFooterIcon( $icon );
         * }
         * ?>
         * </li>
         * <?php endforeach; ?>
         * </ul>
         * <?php endif; ?>
         * </div>
         */
        ?>
	</div><!-- /.container-fluid -->
</div><!-- /.footer -->

<!-- Bootstrap core JavaScript -->
<?php 
        $this->printTrail();
        ?>

    
</body>
</html>


	<?php 
    }
Ejemplo n.º 3
0
    /**
     * Outputs the entire contents of the (X)HTML page
     */
    public function execute()
    {
        global $wgVectorUseIconWatch;
        // Build additional attributes for navigation urls
        $nav = $this->data['content_navigation'];
        if ($wgVectorUseIconWatch) {
            $mode = $this->getSkin()->getTitle()->userIsWatching() ? 'unwatch' : 'watch';
            if (isset($nav['actions'][$mode])) {
                $nav['views'][$mode] = $nav['actions'][$mode];
                $nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
                $nav['views'][$mode]['primary'] = true;
                unset($nav['actions'][$mode]);
            }
        }
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        // Reverse horizontally rendered navigation elements
        if ($this->data['rtl']) {
            $this->data['view_urls'] = array_reverse($this->data['view_urls']);
            $this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
            $this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
        }
        // Output HTML Page
        $this->html('headelement');
        ?>
		<div id="mw-page-base" class="noprint"></div>
		<div id="mw-head-base" class="noprint"></div>
		<!-- content -->
		<div id="content" class="mw-body">
			<a id="top"></a>
			<div id="mw-js-message" style="display:none;"<?php 
        $this->html('userlangattributes');
        ?>
></div>
			<?php 
        if ($this->data['sitenotice']) {
            ?>
			<!-- sitenotice -->
			<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div>
			<!-- /sitenotice -->
			<?php 
        }
        ?>
			<!-- firstHeading -->
			<h1 id="firstHeading" class="firstHeading">
				<span dir="auto"><?php 
        $this->html('title');
        ?>
</span>
			</h1>
			<!-- /firstHeading -->
			<!-- bodyContent -->
			<div id="bodyContent">
				<?php 
        if ($this->data['isarticle']) {
            ?>
				<!-- tagline -->
				<div id="siteSub"><?php 
            $this->msg('tagline');
            ?>
</div>
				<!-- /tagline -->
				<?php 
        }
        ?>
				<!-- subtitle -->
				<div id="contentSub"<?php 
        $this->html('userlangattributes');
        ?>
><?php 
        $this->html('subtitle');
        ?>
</div>
				<!-- /subtitle -->
				<?php 
        if ($this->data['undelete']) {
            ?>
				<!-- undelete -->
				<div id="contentSub2"><?php 
            $this->html('undelete');
            ?>
</div>
				<!-- /undelete -->
				<?php 
        }
        ?>
				<?php 
        if ($this->data['newtalk']) {
            ?>
				<!-- newtalk -->
				<div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
				<!-- /newtalk -->
				<?php 
        }
        ?>
				<?php 
        if ($this->data['showjumplinks']) {
            ?>
				<!-- jumpto -->
				<div id="jump-to-nav" class="mw-jump">
					<?php 
            $this->msg('jumpto');
            ?>
 <a href="#mw-head"><?php 
            $this->msg('jumptonavigation');
            ?>
</a>,
					<a href="#p-search"><?php 
            $this->msg('jumptosearch');
            ?>
</a>
				</div>
				<!-- /jumpto -->
				<?php 
        }
        ?>
				<!-- bodycontent -->
				<?php 
        $this->html('bodycontent');
        ?>
				<!-- /bodycontent -->
				<?php 
        if ($this->data['printfooter']) {
            ?>
				<!-- printfooter -->
				<div class="printfooter">
				<?php 
            $this->html('printfooter');
            ?>
				</div>
				<!-- /printfooter -->
				<?php 
        }
        ?>
				<?php 
        if ($this->data['catlinks']) {
            ?>
				<!-- catlinks -->
				<?php 
            $this->html('catlinks');
            ?>
				<!-- /catlinks -->
				<?php 
        }
        ?>
				<?php 
        if ($this->data['dataAfterContent']) {
            ?>
				<!-- dataAfterContent -->
				<?php 
            $this->html('dataAfterContent');
            ?>
				<!-- /dataAfterContent -->
				<?php 
        }
        ?>
				<div class="visualClear"></div>
				<!-- debughtml -->
				<?php 
        $this->html('debughtml');
        ?>
				<!-- /debughtml -->
			</div>
			<!-- /bodyContent -->
		</div>
		<!-- /content -->
		<!-- header -->
		<div id="mw-head" class="noprint">
			<?php 
        $this->renderNavigation('PERSONAL');
        ?>
			<div id="left-navigation">
				<?php 
        $this->renderNavigation(array('NAMESPACES', 'VARIANTS'));
        ?>
			</div>
			<div id="right-navigation">
				<?php 
        $this->renderNavigation(array('VIEWS', 'ACTIONS', 'SEARCH'));
        ?>
			</div>
		</div>
		<!-- /header -->
		<!-- panel -->
			<div id="mw-panel" class="noprint">
				<!-- logo -->
					<div id="p-logo"><a style="background-image: url(<?php 
        $this->text('logopath');
        ?>
);" href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" <?php 
        echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
        ?>
></a></div>
				<!-- /logo -->

		<!-- von mir hier eingesetzter toc_halter -->
		<div id="toc_sidebar_holder" class="tocholder"></div> 

			<?php 
        $this->renderPortals($this->data['sidebar']);
        ?>
			</div>
		<!-- /panel -->
		<!-- footer -->
		<div id="footer"<?php 
        $this->html('userlangattributes');
        ?>
>
			<?php 
        foreach ($this->getFooterLinks() as $category => $links) {
            ?>
				<ul id="footer-<?php 
            echo $category;
            ?>
">
					<?php 
            foreach ($links as $link) {
                ?>
						<li id="footer-<?php 
                echo $category;
                ?>
-<?php 
                echo $link;
                ?>
"><?php 
                $this->html($link);
                ?>
</li>
					<?php 
            }
            ?>
				</ul>
			<?php 
        }
        ?>
			<?php 
        $footericons = $this->getFooterIcons("icononly");
        if (count($footericons) > 0) {
            ?>
				<ul id="footer-icons" class="noprint">
<?php 
            foreach ($footericons as $blockName => $footerIcons) {
                ?>
					<li id="footer-<?php 
                echo htmlspecialchars($blockName);
                ?>
ico">
<?php 
                foreach ($footerIcons as $icon) {
                    ?>
						<?php 
                    echo $this->getSkin()->makeFooterIcon($icon);
                    ?>

<?php 
                }
                ?>
					</li>
<?php 
            }
            ?>
				</ul>
			<?php 
        }
        ?>
			<div style="clear:both"></div>
		</div>
		<!-- /footer -->
		<?php 
        $this->printTrail();
        ?>

	</body>
<!-- Das folgende Script muß innerhalb der HTML-Tags stehen, um ausgeführt zu werden -->
<!-- Es liest den div "toc" aus und, wenn der toc_holder vorhanden ist, löscht es den toc und kopiert ihn in toc_holder -->
 <script type="text/javascript">
    var toc = document.getElementById('toc');
    var toc_holder = document.getElementById('toc_sidebar_holder');
      if(toc && toc_holder){
	toc.parentNode.removeChild(toc);
	toc_holder.appendChild(toc);
	}
</script>


</html>
<?php 
    }
Ejemplo n.º 4
0
 /**
  * @covers Xml::expandAttributes
  */
 public function testExpandAttributesException()
 {
     $this->setExpectedException('MWException');
     Xml::expandAttributes('string');
 }
Ejemplo n.º 5
0
 function tooltipAndAccesskey($value)
 {
     return Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($value));
 }
Ejemplo n.º 6
0
    /**
     * Outputs the entire contents of the (X)HTML page
     */
    public function execute()
    {
        global $wgLang, $wgVectorUseIconWatch;
        $this->skin = $this->data['skin'];
        // Build additional attributes for navigation urls
        //$nav = $this->skin->buildNavigationUrls();
        $nav = $this->data['content_navigation'];
        if ($wgVectorUseIconWatch) {
            $mode = $this->skin->getTitle()->userIsWatching() ? 'unwatch' : 'watch';
            if (isset($nav['actions'][$mode])) {
                $nav['views'][$mode] = $nav['actions'][$mode];
                $nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
                $nav['views'][$mode]['primary'] = true;
                unset($nav['actions'][$mode]);
            }
        }
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        // Reverse horizontally rendered navigation elements
        if ($wgLang->isRTL()) {
            $this->data['view_urls'] = array_reverse($this->data['view_urls']);
            $this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
        }
        // Output HTML Page
        $this->html('headelement');
        global $Cppreference2SkinRootLink;
        $root_link = '/';
        if (isset($Cppreference2SkinRootLink)) {
            $root_link = htmlspecialchars($Cppreference2SkinRootLink);
        }
        ?>
        <!-- header -->
        <div id="mw-head" class="noprint">
            <div id="cpp-head-first-base">
                <div id="cpp-head-first">
                    <h5><a href="<?php 
        echo $root_link;
        ?>
">
                        <?php 
        global $wgSitename;
        echo $wgSitename;
        ?>
                    </a></h5>
                    <div id="cpp-head-search">
                        <?php 
        $this->renderNavigation('SEARCH');
        ?>
                    </div>
                    <div id="cpp-head-personal">
                        <?php 
        $this->renderNavigation('PERSONAL');
        ?>
                    </div>

                </div>
            </div>
            <div id="cpp-head-second-base">
                <div id="cpp-head-second">
                    <div id="cpp-head-tools-left">
                        <?php 
        $this->renderNavigation(array('NAMESPACES', 'VARIANTS'));
        ?>
                    </div>
                    <div id="cpp-head-tools-right">
                        <?php 
        $this->renderNavigation(array('VIEWS', 'ACTIONS'));
        ?>
                    </div>
                </div>
            </div>
        </div>
        <!-- /header -->
        <!-- content -->
        <div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"<?php 
        $this->html('userlangattributes');
        ?>
></div>
                <?php 
        if ($this->data['sitenotice']) {
            ?>
                <!-- sitenotice -->
                <div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div>
                <!-- /sitenotice -->
                <?php 
        }
        ?>
                <!-- firstHeading -->
                <h1 id="firstHeading" class="firstHeading"><?php 
        $this->html('title');
        ?>
</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                    <?php 
        if ($this->data['isarticle']) {
            ?>
                    <!-- tagline -->
                    <div id="siteSub"><?php 
            $this->msg('tagline');
            ?>
</div>
                    <!-- /tagline -->
                    <?php 
        }
        ?>
                    <!-- subtitle -->
                    <div id="contentSub"<?php 
        $this->html('userlangattributes');
        ?>
><?php 
        $this->html('subtitle');
        ?>
</div>
                    <!-- /subtitle -->
                    <?php 
        if ($this->data['undelete']) {
            ?>
                    <!-- undelete -->
                    <div id="contentSub2"><?php 
            $this->html('undelete');
            ?>
</div>
                    <!-- /undelete -->
                    <?php 
        }
        ?>
                    <?php 
        if ($this->data['newtalk']) {
            ?>
                    <!-- newtalk -->
                    <div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
                    <!-- /newtalk -->
                    <?php 
        }
        ?>
                    <!-- bodycontent -->
                    <?php 
        $this->html('bodycontent');
        ?>
                    <!-- /bodycontent -->
                    <?php 
        if ($this->data['printfooter']) {
            ?>
                    <!-- printfooter -->
                    <div class="printfooter">
                    <?php 
            $this->html('printfooter');
            ?>
                    </div>
                    <!-- /printfooter -->
                    <?php 
        }
        ?>
                    <?php 
        if ($this->data['catlinks']) {
            ?>
                    <!-- catlinks -->
                    <?php 
            $this->html('catlinks');
            ?>
                    <!-- /catlinks -->
                    <?php 
        }
        ?>
                    <?php 
        if ($this->data['dataAfterContent']) {
            ?>
                    <!-- dataAfterContent -->
                    <?php 
            $this->html('dataAfterContent');
            ?>
                    <!-- /dataAfterContent -->
                    <?php 
        }
        ?>
                    <div class="visualClear"></div>
                    <!-- debughtml -->
                    <?php 
        $this->html('debughtml');
        ?>
                    <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <div id="cpp-footer-base" class="noprint">
            <div id="footer"<?php 
        $this->html('userlangattributes');
        ?>
>
                <?php 
        $this->renderBottomNavigation();
        ?>
                <?php 
        $this->renderToolbox();
        ?>
                <?php 
        $this->renderFooter();
        ?>
            </div>
        </div>
        <!-- /footer -->
        <?php 
        $this->printTrail();
        ?>

	</body>
</html>
<?php 
    }
    /**
     * Outputs the entire contents of the (X)HTML page
     */
    public function execute()
    {
        // Build additional attributes for navigation urls
        $nav = $this->data['content_navigation'];
        if ($this->config->get('VectorUseIconWatch')) {
            $mode = $this->getSkin()->getUser()->isWatched($this->getSkin()->getRelevantTitle()) ? 'unwatch' : 'watch';
            if (isset($nav['actions'][$mode])) {
                $nav['views'][$mode] = $nav['actions'][$mode];
                $nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
                $nav['views'][$mode]['primary'] = true;
                unset($nav['actions'][$mode]);
            }
        }
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        // Reverse horizontally rendered navigation elements
        if ($this->data['rtl']) {
            $this->data['view_urls'] = array_reverse($this->data['view_urls']);
            $this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
            $this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
        }
        // Output HTML Page
        $this->html('headelement');
        ?>
		<div id="mw-page-base" class="noprint"></div>
		<div id="mw-head-base" class="noprint"></div>
		<div id="content" class="mw-body" role="main">
			<a id="top"></a>

			<?php 
        if ($this->data['sitenotice']) {
            ?>
				<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div>
			<?php 
        }
        ?>
			<h1 id="firstHeading" class="firstHeading" lang="<?php 
        $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
        $this->text('pageLanguage');
        ?>
"><span dir="auto"><?php 
        $this->html('title');
        ?>
</span></h1>
			<?php 
        $this->html('prebodyhtml');
        ?>
			<div id="bodyContent" class="mw-body-content">
				<?php 
        if ($this->data['isarticle']) {
            ?>
					<div id="siteSub"><?php 
            $this->msg('tagline');
            ?>
</div>
				<?php 
        }
        ?>
				<div id="contentSub"<?php 
        $this->html('userlangattributes');
        ?>
><?php 
        $this->html('subtitle');
        ?>
</div>
				<?php 
        if ($this->data['undelete']) {
            ?>
					<div id="contentSub2"><?php 
            $this->html('undelete');
            ?>
</div>
				<?php 
        }
        ?>
				<?php 
        if ($this->data['newtalk']) {
            ?>
					<div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
				<?php 
        }
        ?>
				<div id="jump-to-nav" class="mw-jump">
					<?php 
        $this->msg('jumpto');
        ?>
					<a href="#mw-navigation"><?php 
        $this->msg('jumptonavigation');
        ?>
</a><?php 
        $this->msg('comma-separator');
        ?>
					<a href="#p-search"><?php 
        $this->msg('jumptosearch');
        ?>
</a>
				</div>
				<?php 
        $this->html('bodycontent');
        ?>
				<?php 
        if ($this->data['printfooter']) {
            ?>
					<div class="printfooter">
						<?php 
            $this->html('printfooter');
            ?>
					</div>
				<?php 
        }
        ?>
				<?php 
        if ($this->data['catlinks']) {
            ?>
					<?php 
            $this->html('catlinks');
            ?>
				<?php 
        }
        ?>
				<?php 
        if ($this->data['dataAfterContent']) {
            ?>
					<?php 
            $this->html('dataAfterContent');
            ?>
				<?php 
        }
        ?>
				<div class="visualClear"></div>
				<?php 
        $this->html('debughtml');
        ?>
			</div>
		</div>
		<div id="mw-navigation">
			<h2><?php 
        $this->msg('navigation-heading');
        ?>
</h2>

			<div id="mw-head">
				<?php 
        $this->renderNavigation('PERSONAL');
        ?>
				<div id="left-navigation">
					<?php 
        $this->renderNavigation(array('NAMESPACES', 'VARIANTS'));
        ?>
				</div>
				<div id="right-navigation">
					<?php 
        $this->renderNavigation(array('VIEWS', 'ACTIONS', 'SEARCH'));
        ?>
				</div>
			</div>
			<div id="mw-panel">
				<div id="p-logo" role="banner"><a style="background-image: url(<?php 
        $this->text('logopath');
        ?>
);" href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" <?php 
        echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
        ?>
></a></div>
				<?php 
        $this->renderPortals($this->data['sidebar']);
        ?>
			</div>
		</div>
		<div id="footer" role="contentinfo"<?php 
        $this->html('userlangattributes');
        ?>
>
			<?php 
        foreach ($this->getFooterLinks() as $category => $links) {
            ?>
				<ul id="footer-<?php 
            echo $category;
            ?>
">
					<?php 
            foreach ($links as $link) {
                ?>
						<li id="footer-<?php 
                echo $category;
                ?>
-<?php 
                echo $link;
                ?>
"><?php 
                $this->html($link);
                ?>
</li>
					<?php 
            }
            ?>
				</ul>
			<?php 
        }
        ?>
			<?php 
        $footericons = $this->getFooterIcons("icononly");
        if (count($footericons) > 0) {
            ?>
				<ul id="footer-icons" class="noprint">
					<?php 
            foreach ($footericons as $blockName => $footerIcons) {
                ?>
						<li id="footer-<?php 
                echo htmlspecialchars($blockName);
                ?>
ico">
							<?php 
                foreach ($footerIcons as $icon) {
                    ?>
								<?php 
                    echo $this->getSkin()->makeFooterIcon($icon);
                    ?>

							<?php 
                }
                ?>
						</li>
					<?php 
            }
            ?>
				</ul>
			<?php 
        }
        ?>
			<div style="clear:both"></div>
		</div>
		<?php 
        $this->printTrail();
        ?>

	</body>
</html>
	<?php 
    }
Ejemplo n.º 8
0
 public static function getIconAltText($row)
 {
     $type = self::getIconType($row);
     if ($type === false) {
         return '';
     }
     wfProfileIn(__METHOD__);
     switch ($type) {
         case self::FEED_SUN_ICON:
             $msg = 'newpage';
             break;
         case self::FEED_PENCIL_ICON:
             $msg = 'edit';
             break;
         case self::FEED_MOVE_ICON:
             $msg = 'move';
             break;
         case self::FEED_TALK_ICON:
             $msg = 'talkpage';
             break;
         case self::FEED_COMMENT_ICON:
             $msg = 'blogcomment';
             break;
         case self::FEED_DELETE_ICON:
             $msg = 'delete';
             break;
         case self::FEED_PHOTO_ICON:
             $msg = 'image';
             break;
         case self::FEED_FILM_ICON:
             $msg = 'video';
             break;
         case self::FEED_CATEGORY_ICON:
             $msg = 'categorization';
             break;
     }
     $alt = wfMsg("myhome-feed-{$msg}");
     $ret = Xml::expandAttributes(array('alt' => $alt, 'title' => $alt));
     wfProfileOut(__METHOD__);
     return $ret;
 }
    public function showForm($err = null)
    {
        $out = $this->getOutput();
        $form = $this->form;
        // convenience
        $title = $this->form->getPage();
        $oldConfig = $form->getOldConfig();
        $s = '';
        // form HTML string
        # Add any error messages
        if ("" != $err) {
            $out->setSubtitle(wfMsgHtml('formerror'));
            $out->addHTML("<p class='error'>{$err}</p>\n");
        }
        # Add header text
        if (!$form->isAllowed()) {
            $s .= wfMsgExt('stabilization-perm', 'parse', $title->getPrefixedText());
        } else {
            $s .= wfMsgExt('stabilization-text', 'parse', $title->getPrefixedText());
        }
        # Borrow some protection messages for dropdowns
        $reasonDropDown = Xml::listDropDown('wpReasonSelection', wfMsgForContent('protect-dropdown'), wfMsgForContent('protect-otherreason-op'), $form->getReasonSelection(), 'mwStabilize-reason', 4);
        $scExpiryOptions = wfMsgForContent('protect-expiry-options');
        $showProtectOptions = $scExpiryOptions !== '-' && $form->isAllowed();
        $dropdownOptions = array();
        // array of <label,value>
        # Add the current expiry as a dropdown option
        if ($oldConfig['expiry'] && $oldConfig['expiry'] != Block::infinity()) {
            $timestamp = $this->getLang()->timeanddate($oldConfig['expiry']);
            $d = $this->getLang()->date($oldConfig['expiry']);
            $t = $this->getLang()->time($oldConfig['expiry']);
            $dropdownOptions[] = array(wfMsg('protect-existing-expiry', $timestamp, $d, $t), 'existing');
        }
        # Add "other time" expiry dropdown option
        $dropdownOptions[] = array(wfMsg('protect-othertime-op'), 'othertime');
        # Add custom expiry dropdown options (from MediaWiki message)
        foreach (explode(',', $scExpiryOptions) as $option) {
            if (strpos($option, ":") === false) {
                $show = $value = $option;
            } else {
                list($show, $value) = explode(":", $option);
            }
            $dropdownOptions[] = array($show, $value);
        }
        # Actually build the options HTML...
        $expiryFormOptions = '';
        foreach ($dropdownOptions as $option) {
            $show = htmlspecialchars($option[0]);
            $value = htmlspecialchars($option[1]);
            $expiryFormOptions .= Xml::option($show, $value, $form->getExpirySelection() === $value) . "\n";
        }
        # Build up the form...
        $s .= Xml::openElement('form', array('name' => 'stabilization', 'action' => $this->getTitle()->getLocalUrl(), 'method' => 'post'));
        # Add stable version override and selection options
        $s .= Xml::fieldset(wfMsg('stabilization-def'), false) . "\n" . Xml::radioLabel(wfMsg('stabilization-def1'), 'wpStableconfig-override', 1, 'default-stable', 1 == $form->getOverride(), $this->disabledAttr()) . '<br />' . "\n" . Xml::radioLabel(wfMsg('stabilization-def2'), 'wpStableconfig-override', 0, 'default-current', 0 == $form->getOverride(), $this->disabledAttr()) . "\n" . Xml::closeElement('fieldset');
        # Add autoreview restriction select
        $s .= Xml::fieldset(wfMsg('stabilization-restrict'), false) . $this->buildSelector($form->getAutoreview()) . Xml::closeElement('fieldset') . Xml::fieldset(wfMsg('stabilization-leg'), false) . Xml::openElement('table');
        # Add expiry dropdown to form...
        if ($showProtectOptions && $form->isAllowed()) {
            $s .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='mw-label'>" . Xml::label(wfMsg('stabilization-expiry'), 'mwStabilizeExpirySelection') . "</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::tags('select', array('id' => 'mwStabilizeExpirySelection', 'name' => 'wpExpirySelection', 'onchange' => 'onFRChangeExpiryDropdown()') + $this->disabledAttr(), $expiryFormOptions) . "</td>\n\t\t\t\t</tr>";
        }
        # Add custom expiry field to form...
        $attribs = array('id' => "mwStabilizeExpiryOther", 'onkeyup' => 'onFRChangeExpiryField()') + $this->disabledAttr();
        $s .= "\n\t\t\t<tr>\n\t\t\t\t<td class='mw-label'>" . Xml::label(wfMsg('stabilization-othertime'), 'mwStabilizeExpiryOther') . '</td>
				<td class="mw-input">' . Xml::input("mwStabilize-expiry", 50, $form->getExpiryCustom(), $attribs) . '</td>
			</tr>';
        # Add comment input and submit button
        if ($form->isAllowed()) {
            $watchLabel = wfMsgExt('watchthis', 'parseinline');
            $watchAttribs = array('accesskey' => wfMsg('accesskey-watch'), 'id' => 'wpWatchthis');
            $watchChecked = $this->getUser()->getOption('watchdefault') || $title->userIsWatching();
            $reviewLabel = wfMsgExt('stabilization-review', 'parseinline');
            $s .= ' <tr>
					<td class="mw-label">' . xml::label(wfMsg('stabilization-comment'), 'wpReasonSelection') . '</td>
					<td class="mw-input">' . $reasonDropDown . '</td>
				</tr>
				<tr>
					<td class="mw-label">' . Xml::label(wfMsg('stabilization-otherreason'), 'wpReason') . '</td>
					<td class="mw-input">' . Xml::input('wpReason', 70, $form->getReasonExtra(), array('id' => 'wpReason', 'maxlength' => 255)) . '</td>
				</tr>
				<tr>
					<td></td>
					<td class="mw-input">' . Xml::check('wpReviewthis', $form->getReviewThis(), array('id' => 'wpReviewthis')) . "<label for='wpReviewthis'>{$reviewLabel}</label>" . '&#160;&#160;&#160;&#160;&#160;' . Xml::check('wpWatchthis', $watchChecked, $watchAttribs) . "&#160;<label for='wpWatchthis' " . Xml::expandAttributes(array('title' => Linker::titleAttrib('watch', 'withaccess'))) . ">{$watchLabel}</label>" . '</td>
				</tr>
				<tr>
					<td></td>
					<td class="mw-submit">' . Xml::submitButton(wfMsg('stabilization-submit')) . '</td>
				</tr>' . Xml::closeElement('table') . Html::hidden('title', $this->getTitle()->getPrefixedDBKey()) . Html::hidden('page', $title->getPrefixedText()) . Html::hidden('wpEditToken', $this->getUser()->editToken());
        } else {
            $s .= Xml::closeElement('table');
        }
        $s .= Xml::closeElement('fieldset') . Xml::closeElement('form');
        $out->addHTML($s);
        $out->addHTML(Xml::element('h2', null, htmlspecialchars(LogPage::logName('stable'))));
        LogEventsList::showLogExtract($out, 'stable', $title->getPrefixedText(), '', array('lim' => 25));
        # Add some javascript for expiry dropdowns
        $out->addScript("<script type=\"text/javascript\">\n\t\t\t\tfunction onFRChangeExpiryDropdown() {\n\t\t\t\t\tdocument.getElementById('mwStabilizeExpiryOther').value = '';\n\t\t\t\t}\n\t\t\t\tfunction onFRChangeExpiryField() {\n\t\t\t\t\tdocument.getElementById('mwStabilizeExpirySelection').value = 'othertime';\n\t\t\t\t}\n\t\t\t</script>");
    }
Ejemplo n.º 10
0
    /**
     * Outputs the entire contents of the (X)HTML page
     */
    public function execute()
    {
        global $wgPaperUseIconWatch;
        $moniIconList = array('편집' => '/moniwiki/imgs/moni2/edit.png', '역사' => '/moniwiki/imgs/moni2/info.png', '보기' => '/moniwiki/imgs/moni2/show.png', '역링크' => '/moniwiki/imgs/moni2/backlinks.png', '임의 문서로' => '/moniwiki/imgs/moni2/random.png', '검색' => '/moniwiki/imgs/moni2/search.png', '차이' => '/moniwiki/imgs/moni2/diff.png', '도움말' => '/moniwiki/imgs/moni2/help.png', '환경설정' => '/moniwiki/imgs/moni2/pref.png', 'RSS' => '/moniwiki/imgs/moni2/rss.png');
        // Build additional attributes for navigation urls
        $nav = $this->data['content_navigation'];
        $_TITLE = $this->getSkin()->getRelevantTitle();
        $_URITITLE = rawurlencode($_TITLE);
        /*
        		if ( $wgPaperUseIconWatch ) {
        			$mode = $this->getSkin()->getUser()->isWatched( $this->getSkin()->getRelevantTitle() ) ? 'unwatch' : 'watch';
        			if ( isset( $nav['actions'][$mode] ) ) {
        				$nav['views'][$mode] = $nav['actions'][$mode];
        				$nav['views'][$mode]['class'] = rtrim( 'icon ' . $nav['views'][$mode]['class'], ' ' );
        				$nav['views'][$mode]['primary'] = true;
        				unset( $nav['actions'][$mode] );
        			}
        		}*/
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        #		if($_SERVER['REMOTE_ADDR'] == '182.216.191.202')
        #			print_r($nav);
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        // Reverse horizontally rendered navigation elements
        if ($this->data['rtl']) {
            $this->data['view_urls'] = array_reverse($this->data['view_urls']);
            $this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
            $this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
        }
        // Output HTML Page
        $this->html('headelement');
        ?>
		<div><a id="top" name="top" accesskey="t"></a></div>
		<script type="text/javascript">
		function toggle_menu() {
			var menu = document.getElementById('wikiMenu');
			if (!menu) return;

			if (menu.style.height == 0)
				menu.style.height = 0;
			if (parseInt(menu.style.height) == 0) {
				menu.style.height = 'auto';
			} else {
				menu.style.height = '0';
			}
			console.log(menu.style.height);
		}
		</script>

	
		<div id="p-personal" role="navigation" class="<?php 
        if (count($this->data['personal_urls']) == 0) {
            echo ' emptyPortlet';
        }
        ?>
" aria-labelledby="p-personal-label" >
			<div id="p-personal-align-center">

				<!-- <h3 id="p-personal-label">Libre Wiki <?php 
        $this->msg('personaltools');
        ?>
</h3> -->
				<ul<?php 
        $this->html('userlangattributes');
        ?>
>
			<?php 
        $personalTools = $this->getPersonalTools();
        foreach ($personalTools as $key => $item) {
            echo $this->makeListItem($key, $item);
        }
        ?>
				</ul>
			</div>
		</div>

		<div id="mw-js-message" style="display:none;"<?php 
        $this->html('userlangattributes');
        ?>
></div>
		<?php 
        if ($this->data['sitenotice']) {
            ?>
		<?php 
        }
        ?>
		<div id="mainBody">
			<!--
			<div id="wikiIcon">
				<a href="/index.php?title=<?php 
        echo $_URITITLE;
        ?>
&action=edit" accesskey="e" title="편집"><span><img src="../skins/Paper/moniwiki/imgs/moni2/edit.png" alt="E" class="wikiIcon"></span></a>
				<a href="/index.php?title=<?php 
        echo $_URITITLE;
        ?>
&diff=" accesskey="c" title="차이 보기"><span><img src="../skins/Paper/moniwiki/imgs/moni2/diff.png" alt="D" class="wikiIcon"></span></a>
				<a href="/wiki/<?php 
        echo $_URITITLE;
        ?>
" title="읽기"><span><img src="../skins/Paper/moniwiki/imgs/moni2/show.png" alt="R" class="wikiIcon"></span></a>
				<a href="/index.php?title=Special:WhatLinksHere&target=<?php 
        echo $_URITITLE;
        ?>
" rel="nofollow" title="가리키는 문서"><span><img src="../skins/Paper/moniwiki/imgs/moni2/backlinks.png" alt="," class="wikiIcon"></span></a>
				<a href="/wiki/Special:Random" rel="nofollow" title="임의 문서로"><span><img src="../skins/Paper/moniwiki/imgs/moni2/random.png" alt="A" class="wikiIcon"></span></a>
				<a href="/wiki/Special:Search" title="검색"><span><img src="../skins/Paper/moniwiki/imgs/moni2/search.png" alt="S" class="wikiIcon"></span></a>
				<a href="/index.php?title=<?php 
        echo $_URITITLE;
        ?>
&action=history" rel="nofollow" title="역사 보기"><span><img src="../skins/Paper/moniwiki/imgs/moni2/info.png" alt="I" class="wikiIcon"></span></a>
				<a href="/wiki/%EB%8F%84%EC%9B%80%EB%A7%90:%EC%9C%84%ED%82%A4_%EB%AC%B8%EB%B2%95" title="도움말"><span><img src="../skins/Paper/moniwiki/imgs/moni2/help.png" alt="H" class="wikiIcon"></span></a>
				<a href="/wiki/Special:Preferences" title="환경설정"><span><img src="../skins/Paper/moniwiki/imgs/moni2/pref.png" alt="C" class="wikiIcon"></span></a>
				<a href="/index.php?title=Special:RecentChanges&feed=atom" rel="nofollow" title="Atom"><span><img src="../skins/Paper/moniwiki/imgs/moni2/rss.png" alt="RSS" class="wikiIcon"></span></a>
			</div>
			-->
			<div class="navbar-fixed-top navbar">
				<div class="navbar-inner">
					<div class="container">
						<button type="button" class="btn btn-navbar" onclick="toggle_menu()">
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
						<span class="brand hidden-desktop"><a href="/wiki/FrontPage"><span>Libre Wiki</span></a></span>
						<div id="wikiMenu" class="collapse">
							<div id="goForm">
								<form id="go" action="/index.php" method="get">
								<div>
									<input type="text" name="search" size="20" accesskey="s" class="goto">
									<input type="hidden" value="Special:Search" name="title"/>
									<input type="submit" name="go" class="submitBtn" value="Go">
								</div>
								</form>
							</div>
							<ul><?php 
        foreach ($this->data['sidebar']['navigation'] as $val) {
            echo '<li id="' . $val['id'] . '"><a href="' . $val['href'] . '" id rel="nofollow">' . $val['text'] . '</a></li>';
        }
        ?>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<div id="wikiIcon">
				<a href="/index.php?title=<?php 
        echo $_URITITLE;
        ?>
&action=edit" accesskey="e" title="편집"><span><img src="//<?php 
        echo $_SERVER["HTTP_HOST"];
        ?>
/skins/Paper/moniwiki/imgs/moni2/edit.png" alt="E" class="wikiIcon"></span></a>
				<a href="/index.php?title=<?php 
        echo $_URITITLE;
        ?>
&diff=" accesskey="c" title="차이 보기"><span><img src="//<?php 
        echo $_SERVER["HTTP_HOST"];
        ?>
/skins/Paper/moniwiki/imgs/moni2/diff.png" alt="D" class="wikiIcon"></span></a>
				<a href="/wiki/<?php 
        echo $_URITITLE;
        ?>
" title="읽기"><span><img src="//<?php 
        echo $_SERVER["HTTP_HOST"];
        ?>
/skins/Paper/moniwiki/imgs/moni2/show.png" alt="R" class="wikiIcon"></span></a>
				<a href="/index.php?title=Special:WhatLinksHere&target=<?php 
        echo $_URITITLE;
        ?>
" rel="nofollow" title="가리키는 문서"><span><img src="//<?php 
        echo $_SERVER["HTTP_HOST"];
        ?>
/skins/Paper/moniwiki/imgs/moni2/backlinks.png" alt="," class="wikiIcon"></span></a>
				<a href="/wiki/Special:Random" rel="nofollow" title="임의 문서로"><span><img src="//<?php 
        echo $_SERVER["HTTP_HOST"];
        ?>
/skins/Paper/moniwiki/imgs/moni2/random.png" alt="A" class="wikiIcon"></span></a>
				<a href="/wiki/Special:Search" title="검색"><span><img src="//<?php 
        echo $_SERVER["HTTP_HOST"];
        ?>
/skins/Paper/moniwiki/imgs/moni2/search.png" alt="S" class="wikiIcon"></span></a>
				<a href="/index.php?title=<?php 
        echo $_URITITLE;
        ?>
&action=history" rel="nofollow" title="역사 보기"><span><img src="//<?php 
        echo $_SERVER["HTTP_HOST"];
        ?>
/skins/Paper/moniwiki/imgs/moni2/info.png" alt="I" class="wikiIcon"></span></a>
				<a href="/wiki/%EB%8F%84%EC%9B%80%EB%A7%90:%EC%9C%84%ED%82%A4_%EB%AC%B8%EB%B2%95" title="도움말"><span><img src="//<?php 
        echo $_SERVER["HTTP_HOST"];
        ?>
/skins/Paper/moniwiki/imgs/moni2/help.png" alt="H" class="wikiIcon"></span></a>
				<a href="/wiki/Special:Preferences" title="환경설정"><span><img src="//<?php 
        echo $_SERVER["HTTP_HOST"];
        ?>
/skins/Paper/moniwiki/imgs/moni2/pref.png" alt="C" class="wikiIcon"></span></a>
				<a href="/index.php?title=Special:RecentChanges&feed=atom" rel="nofollow" title="Atom"><span><img src="//<?php 
        echo $_SERVER["HTTP_HOST"];
        ?>
/skins/Paper/moniwiki/imgs/moni2/rss.png" alt="RSS" class="wikiIcon"></span></a>
			</div>
			<div id="container">
				<div id="mycontent">
					<div id="siteNotice"><?php 
        $this->html('sitenotice');
        ?>
</div>
					<div class="wikiTitle" id="wikiTitle">
						<span class="wikiTitle"><a href="/index.php?title=Special:WhatLinksHere&target=<?php 
        echo $_URITITLE;
        ?>
" rel="nofollow"><span><?php 
        $this->html('title');
        ?>
</span></a></span>
					</div>
					<?php 
        $this->html('prebodyhtml');
        ?>
					<div id="wikiBody">
						<div id="wikiContent">
							<?php 
        if ($this->data['isarticle']) {
            ?>
							<div id="siteSub"><?php 
            $this->msg('tagline');
            ?>
</div>
							<?php 
        }
        ?>
							<div id="contentSub"<?php 
        $this->html('userlangattributes');
        ?>
><?php 
        $this->html('subtitle');
        ?>
</div>
							<?php 
        if ($this->data['undelete']) {
            ?>
							<div id="contentSub2"><?php 
            $this->html('undelete');
            ?>
</div>
							<?php 
        }
        ?>
							<?php 
        if ($this->data['newtalk']) {
            ?>
							<div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
							<?php 
        }
        ?>
							<div id="jump-to-nav" class="mw-jump">
								<?php 
        $this->msg('jumpto');
        ?>
								<a href="#mw-navigation"><?php 
        $this->msg('jumptonavigation');
        ?>
</a><?php 
        $this->msg('comma-separator');
        ?>
								<a href="#p-search"><?php 
        $this->msg('jumptosearch');
        ?>
</a>
							</div>
							<?php 
        $this->html('bodycontent');
        ?>
							<?php 
        if ($this->data['printfooter']) {
            ?>
							<div class="printfooter">
							<?php 
            $this->html('printfooter');
            ?>
							</div>
							<?php 
        }
        ?>
							<?php 
        if ($this->data['catlinks']) {
            ?>
							<?php 
            $this->html('catlinks');
            ?>
							<?php 
        }
        ?>
							<?php 
        if ($this->data['dataAfterContent']) {
            ?>
							<?php 
            $this->html('dataAfterContent');
            ?>
							<?php 
        }
        ?>
							<div class="visualClear"></div>
							<?php 
        $this->html('debughtml');
        ?>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div id="wikiFooter">

		<?php 
        $_footerLinks = $this->getFooterLinks();
        ?>
			<div id="wikiAction">
				<ul>
				<?php 
        foreach ($this->data['action_urls'] as $link) {
            ?>
					<li><a href="<?php 
            echo htmlspecialchars($link['href']);
            ?>
" <?php 
            echo $link['key'];
            ?>
><span><?php 
            echo htmlspecialchars($link['text']);
            ?>
</span></a></li>
				<?php 
        }
        ?>
			</div>
			<div style="align:center" id="wikiBanner">
				<p><?php 
        $this->html('copyright');
        ?>
</p>
				<p>
				<?php 
        foreach ($_footerLinks['places'] as $link) {
            ?>
					<span id="footer-places-<?php 
            echo $link;
            ?>
"><?php 
            $this->html($link);
            ?>
</span> 
				<?php 
        }
        ?>
				</p>
			</div>
		</div>
		<?php 
        $this->printTrail();
        ?>

	</body>
</html>
<?php 
    }
Ejemplo n.º 11
0
 /**
  * Load revision metadata for the specified articles. If newid is 0, then compare
  * the old article in oldid to the current article; if oldid is 0, then
  * compare the current article to the immediately previous one (ignoring the
  * value of newid).
  *
  * If oldid is false, leave the corresponding revision object set
  * to false. This is impossible via ordinary user input, and is provided for
  * API convenience.
  */
 function loadRevisionData()
 {
     global $wgLang, $wgUser;
     if ($this->mRevisionsLoaded) {
         return true;
     } else {
         // Whether it succeeds or fails, we don't want to try again
         $this->mRevisionsLoaded = true;
     }
     // Load the new revision object
     $this->mNewRev = $this->mNewid ? Revision::newFromId($this->mNewid) : Revision::newFromTitle($this->mTitle);
     if (!$this->mNewRev instanceof Revision) {
         return false;
     }
     // Update the new revision ID in case it was 0 (makes life easier doing UI stuff)
     $this->mNewid = $this->mNewRev->getId();
     // Check if page is editable
     $editable = $this->mNewRev->getTitle()->userCan('edit');
     // Set assorted variables
     $timestamp = $wgLang->timeanddate($this->mNewRev->getTimestamp(), true);
     $dateofrev = $wgLang->date($this->mNewRev->getTimestamp(), true);
     $timeofrev = $wgLang->time($this->mNewRev->getTimestamp(), true);
     $this->mNewPage = $this->mNewRev->getTitle();
     if ($this->mNewRev->isCurrent()) {
         $newLink = $this->mNewPage->escapeLocalUrl(array('oldid' => $this->mNewid));
         $this->mPagetitle = htmlspecialchars(wfMsg('currentrev-asof', $timestamp, $dateofrev, $timeofrev));
         $newEdit = $this->mNewPage->escapeLocalUrl(array('action' => 'edit'));
         $this->mNewtitle = "<a href='{$newLink}'>{$this->mPagetitle}</a>";
         $this->mNewtitle .= " (<a href='{$newEdit}'>" . wfMsgHtml($editable ? 'editold' : 'viewsourceold') . "</a>)";
     } else {
         $newLink = $this->mNewPage->escapeLocalUrl(array('oldid' => $this->mNewid));
         $newEdit = $this->mNewPage->escapeLocalUrl(array('action' => 'edit', 'oldid' => $this->mNewid));
         $this->mPagetitle = htmlspecialchars(wfMsg('revisionasof', $timestamp, $dateofrev, $timeofrev));
         $this->mNewtitle = "<a href='{$newLink}'>{$this->mPagetitle}</a>";
         $this->mNewtitle .= " (<a href='{$newEdit}'>" . wfMsgHtml($editable ? 'editold' : 'viewsourceold') . "</a>)";
     }
     if (!$this->mNewRev->userCan(Revision::DELETED_TEXT)) {
         $this->mNewtitle = "<span class='history-deleted'>{$this->mPagetitle}</span>";
     } else {
         if ($this->mNewRev->isDeleted(Revision::DELETED_TEXT)) {
             $this->mNewtitle = "<span class='history-deleted'>{$this->mNewtitle}</span>";
         }
     }
     // Load the old revision object
     $this->mOldRev = false;
     if ($this->mOldid) {
         $this->mOldRev = Revision::newFromId($this->mOldid);
     } elseif ($this->mOldid === 0) {
         $rev = $this->mNewRev->getPrevious();
         if ($rev) {
             $this->mOldid = $rev->getId();
             $this->mOldRev = $rev;
         } else {
             // No previous revision; mark to show as first-version only.
             $this->mOldid = false;
             $this->mOldRev = false;
         }
     }
     /* elseif ( $this->mOldid === false ) leave mOldRev false; */
     if (is_null($this->mOldRev)) {
         return false;
     }
     if ($this->mOldRev) {
         $this->mOldPage = $this->mOldRev->getTitle();
         $t = $wgLang->timeanddate($this->mOldRev->getTimestamp(), true);
         $dateofrev = $wgLang->date($this->mOldRev->getTimestamp(), true);
         $timeofrev = $wgLang->time($this->mOldRev->getTimestamp(), true);
         $oldLink = $this->mOldPage->escapeLocalUrl(array('oldid' => $this->mOldid));
         $oldEdit = $this->mOldPage->escapeLocalUrl(array('action' => 'edit', 'oldid' => $this->mOldid));
         $this->mOldPagetitle = htmlspecialchars(wfMsg('revisionasof', $t, $dateofrev, $timeofrev));
         $this->mOldtitle = "<a href='{$oldLink}'>{$this->mOldPagetitle}</a>" . " (<a href='{$oldEdit}'>" . wfMsgHtml($editable ? 'editold' : 'viewsourceold') . "</a>)";
         // Add an "undo" link
         $newUndo = $this->mNewPage->escapeLocalUrl(array('action' => 'edit', 'undoafter' => $this->mOldid, 'undo' => $this->mNewid));
         $htmlLink = htmlspecialchars(wfMsg('editundo'));
         $htmlTitle = Xml::expandAttributes(array('title' => $wgUser->getSkin()->titleAttrib('undo')));
         if ($editable && !$this->mOldRev->isDeleted(Revision::DELETED_TEXT) && !$this->mNewRev->isDeleted(Revision::DELETED_TEXT)) {
             $this->mNewtitle .= " (<a href='{$newUndo}' {$htmlTitle}>" . $htmlLink . "</a>)";
         }
         if (!$this->mOldRev->userCan(Revision::DELETED_TEXT)) {
             $this->mOldtitle = '<span class="history-deleted">' . $this->mOldPagetitle . '</span>';
         } else {
             if ($this->mOldRev->isDeleted(Revision::DELETED_TEXT)) {
                 $this->mOldtitle = '<span class="history-deleted">' . $this->mOldtitle . '</span>';
             }
         }
     }
     return true;
 }
Ejemplo n.º 12
0
    /**
     * Render logo
     */
    private function renderLogo()
    {
        $mainPageLink = $this->data['nav_urls']['mainpage']['href'];
        $toolTip = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
        ?>
                  <ul class="nav logo-container pull-right" role="navigation"><li id="p-logo"><a href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" <?php 
        echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
        ?>
><img src="<?php 
        $this->text('logopath');
        ?>
" alt="<?php 
        $this->html('sitename');
        ?>
" style="width:90%"></a><li></ul>
<?php 
    }
Ejemplo n.º 13
0
    function customBox($bar, $cont)
    {
        ?>
		<div class='generated-sidebar portlet' id='<?php 
        echo Sanitizer::escapeId("p-{$bar}");
        ?>
'<?php 
        echo $this->skin->tooltip('p-' . $bar);
        ?>
>
			<h5>
				<?php 
        $out = wfMsg($bar);
        if (wfEmptyMsg($bar, $out)) {
            echo htmlspecialchars($bar);
        } else {
            echo htmlspecialchars($out);
        }
        ?>
			</h5>
			<div class='pBody'>
				<?php 
        if (is_array($cont)) {
            ?>
					<ul>
						<?php 
            foreach ($cont as $key => $val) {
                ?>
							<li id="<?php 
                echo Sanitizer::escapeId($val['id']);
                ?>
"
								<?php 
                if ($val['active']) {
                    ?>
 
									class="active" <?php 
                }
                ?>
>
								<a href="<?php 
                echo htmlspecialchars($val['href']);
                ?>
"
									<?php 
                echo Xml::expandAttributes($this->skin->tooltipAndAccesskeyAttribs($val['id']));
                ?>
>
									<?php 
                echo htmlspecialchars($val['text']);
                ?>
								</a>
							</li>
							<?php 
            }
            ?>
					</ul>
					<?php 
        } else {
            # allow raw HTML block to be defined by extensions
            print $cont;
        }
        ?>
			</div>
		</div>
		<?php 
    }
Ejemplo n.º 14
0
    /**
     * Outputs the entire contents of the (X)HTML page
     */
    public function execute()
    {
        // Build additional attributes for navigation urls
        global $wgUser;
        $nav = $this->data['content_navigation'];
        if ($this->config->get('LibreUseIconWatch')) {
            $mode = $this->getSkin()->getUser()->isWatched($this->getSkin()->getRelevantTitle()) ? 'unwatch' : 'watch';
            if (isset($nav['actions'][$mode])) {
                $nav['views'][$mode] = $nav['actions'][$mode];
                $nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
                $nav['views'][$mode]['primary'] = true;
                unset($nav['actions'][$mode]);
            }
        }
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        // Reverse horizontally rendered navigation elements
        if ($this->data['rtl']) {
            $this->data['view_urls'] = array_reverse($this->data['view_urls']);
            $this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
            $this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
        }
        $userLinks = $this->getPersonalTools();
        $user = $wgUser->isLoggedIn() ? array_shift($userLinks) : array_pop($userLinks);
        $userLink = $user['links'][0];
        // Output HTML Page
        $this->html('headelement');
        ?>
		<div class="container">

			<!-- Static navbar -->
			<nav class="navbar navbar-default navbar-fixed-top libre_navbar">
				<div class="container">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
							<span class="sr-only">Toggle navigation</span>
							<span class="glyphicon glyphicon-th-large" aria-hidden="true"></span>
						</button>
						<div class="dropdown">
							<?php 
        if ($wgUser->isLoggedIn()) {
            $loginfuc = "data-toggle=\"dropdown\"";
            $loginbtn = "user";
        } else {
            $loginbtn = "lock";
            $loginfuc = "onclick=\"location.href='" . $userLink['href'] . "'\"";
        }
        ?>
							<button type="button" class="navbar-toggle collapsed dropdown-toggle" <?php 
        echo $loginfuc;
        ?>
 aria-expanded="false">
 								<span class="sr-only">Toggle navigation</span>
								<span class="glyphicon glyphicon-<?php 
        echo $loginbtn;
        ?>
" aria-hidden="true"></span>
				                        	</button>
							<?php 
        if ($wgUser->isLoggedIn()) {
            ?>
							<ul class="dropdown-menu libre_personal_dropdown" role="menu">
								<?php 
            $this->renderNavigation('PERSONAL');
            ?>
							</ul>
							<?php 
        }
        ?>
						</div>
						<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#nav_search" aria-expanded="false" aria-controls="nav_search">
							<span class="sr-only">Toggle navigation</span>
							<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
			                        </button>
						<a class="navbar-brand" href="/wiki/리브레_위키:현관"><img alt="<?php 
        echo $this->msg('tagline');
        ?>
" src="//librewiki.net/skins/Libre/logo.png" style="width: auto; height: 36px" /></a>
					</div>
					<div id="navbar" class="navbar-collapse collapse">
						<ul class="nav navbar-nav libre_navbar_menu">
							<li><?php 
        echo Linker::linkKnown(SpecialPage::getTitleFor('Recentchanges', null), '최근바뀜', array('title' => '최근 변경 문서를 불러옵니다. [alt+shift+r]', 'accesskey' => 'r'));
        ?>
</li>
							<li><?php 
        echo Linker::linkKnown(SpecialPage::getTitleFor('Randompage', null), '임의문서', array('title' => '임의 문서를 불러옵니다. [alt+shift+x]', 'accesskey' => 'x'));
        ?>
</li>
							<li><a href="https://bbs.librewiki.net/wiki">위키방</a></li>
							<li><a href="https://bbs.librewiki.net/anon">익명게시판</a></li>
							<li class="dropdown">
								<?php 
        echo Linker::linkKnown(SpecialPage::getTitleFor('Specialpages', null), '도구', array('data-toggle' => 'dropdown', ' role' => 'button', 'aria-expanded' => 'false', 'title' => '도구를 보여줍니다.'));
        ?>
								<ul class="dropdown-menu" role="menu">
									<li><?php 
        echo Linker::linkKnown(SpecialPage::getTitleFor('SpecialPages', null), '특수 문서 목록', array('title' => '특수 문서 목록을 불러옵니다. [alt+shift+q]', 'accesskey' => 'q'));
        ?>
</li>
									<li><?php 
        echo Linker::linkKnown(SpecialPage::getTitleFor('upload', null), '업로드', array('title' => '파일을 올립니다. [alt+shift+g]', 'accesskey' => 'g'));
        ?>
</li>
								</ul>
							</li>
							<li class="dropdown">
								<?php 
        echo Linker::linkKnown(Title::makeTitle(NS_HELP, '위키 문법'), '도움말', array('data-toggle' => 'dropdown', ' role' => 'button', 'aria-expanded' => 'false', 'title' => '도움말 항목들을 보여줍니다.'));
        ?>
								<ul class="dropdown-menu" role="menu">
									<li><?php 
        echo Linker::linkKnown(Title::makeTitle(NS_HELP, '위키 문법'), '위키 문법');
        ?>
</li>
									<li><?php 
        echo Linker::linkKnown(Title::makeTitle(NS_HELP, 'Tex 문법'), 'Tex 문법');
        ?>
</li>
									<li><?php 
        echo Linker::linkKnown(Title::makeTitle(NS_HELP, '태그'), '태그');
        ?>
</li>
								</ul>
							</li>
						</ul>
						<ul class="nav navbar-nav navbar-right nav-pills nav-login libre_navbar_menu">
							<?php 
        if ($wgUser->isLoggedIn()) {
            $loginname = $wgUser->getName();
            $loginfuc = "data-toggle=\"dropdown\"";
            $logincheck = "";
        } else {
            $loginfuc = "onclick=\"location.href='" . $userLink['href'] . "'\"";
            $loginname = "로그인";
            $logincheck = "nav-login-btn";
        }
        ?>
							<li class="dropdown"><a href="#" class="dropdown-toggle <?php 
        echo $logincheck;
        ?>
" <?php 
        echo $loginfuc;
        ?>
 role="button" aria-expanded="false"><?php 
        echo $loginname;
        ?>
</a>
								<?php 
        if ($wgUser->isLoggedIn()) {
            ?>
								<ul class="dropdown-menu" role="menu">
									<?php 
            $this->renderNavigation('PERSONAL');
            ?>
								</ul>
								<?php 
        }
        ?>
							</li>
						</ul>
						<button type="button" class="navbar-toggle navbar-search navbar-right collapsed" data-toggle="collapse" data-target="#nav_search" aria-expanded="false" aria-controls="nav_search">
                                                        <span class="sr-only">Toggle navigation</span>
                                                        <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                                                </button>
					</div>
					<div id="nav_search" class="collapse libre_navbar_other">
						<form class="navbar-form navbar-right" action="<?php 
        $this->text('wgScript');
        ?>
">
							<input type='hidden' name="title" value="<?php 
        $this->text('searchtitle');
        ?>
"/>
							<?php 
        echo $this->makeSearchInput(array("id" => "searchInput", "class" => "form-control", "placeholder" => "검색어"));
        ?>
						</form>
					</div>

				</div><!--/.container-fluid -->
    		</nav>

			<!-- Main component for a primary marketing message or call to action -->
			<div class="container-fluid libre_content">
				<div class="row">
					<div class="col-xs-9">
						<div class="libre_left_content" role="main">

							<div id="mw-js-message" style="display:none;"<?php 
        $this->html('userlangattributes');
        ?>
></div>
							<div id="mw-notification-area" class="mw-notification-area mw-notification-area-layout" style="display: none;"></div>
							<?php 
        if ($this->data['sitenotice']) {
            ?>
							<div id="alertmsg" class="alert alert-info siteNotice alert-dismissible" role="alert">
								<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
								<?php 
            $this->html('sitenotice');
            ?>
							</div>
							<?php 
        }
        ?>
							<!-- Footer ad -->
						<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
						<ins class="adsbygoogle"
							 style="display:block; min-width:320px; width:100%; height:90pxmargin-top:15px;margin-bottom:10px;"
							 data-ad-client="ca-pub-2664061841343191"
							 data-ad-slot="6502738263"
							 data-ad-format="auto"></ins>
						<script>
							(adsbygoogle = window.adsbygoogle || []).push({});
						</script>
							<?php 
        if ($this->data['catlinks']) {
            $this->html('catlinks');
        }
        ?>
							<?php 
        $this->renderNavigation('TOOLS');
        ?>
							<h1 id="firstHeading" class="firstHeading" lang="<?php 
        $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
        $this->text('pageLanguage');
        ?>
"><span dir="auto"><?php 
        $this->html('title');
        ?>
</span></h1>
							<?php 
        if ($this->getSkin()->getTitle() == "FrontPage") {
            ?>
                                                        <p><a href="#" class="darklibre_function" style="background-color: #000; color: #fff;">난 어두운 화면이 좋아요.</a></p>
                                                        <?php 
        }
        ?>
							<?php 
        $this->html('prebodyhtml');
        ?>
							<div class="libre_main_content">
								<?php 
        if ($this->data['isarticle']) {
            ?>
								<div id="siteSub"><?php 
            $this->msg('tagline');
            ?>
</div>
								<?php 
        }
        ?>
								<div id="contentSub"<?php 
        $this->html('userlangattributes');
        ?>
><?php 
        $this->html('subtitle');
        ?>
</div>
								<?php 
        if ($this->data['undelete']) {
            ?>
		            	        <div id="contentSub2"><?php 
            $this->html('undelete');
            ?>
</div>
								<?php 
        }
        ?>
								<?php 
        if ($this->data['newtalk']) {
            ?>
								<div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
								<?php 
        }
        ?>
								<div id="jump-to-nav" class="mw-jump">
								<?php 
        $this->msg('jumpto');
        ?>
									<a href="#mw-navigation"><?php 
        $this->msg('jumptonavigation');
        ?>
</a><?php 
        $this->msg('comma-separator');
        ?>
									<a href="#p-search"><?php 
        $this->msg('jumptosearch');
        ?>
</a>
								</div>
								<?php 
        $this->html('bodycontent');
        ?>
								<?php 
        if ($this->data['printfooter']) {
            ?>
								<div class="printfooter">
								<?php 
            $this->html('printfooter');
            ?>
								</div>
								<?php 
        }
        ?>
								<?php 
        if ($this->data['dataAfterContent']) {
            $this->html('dataAfterContent');
        }
        ?>
								<div class="visualClear"></div>
								<?php 
        $this->html('debughtml');
        ?>
							</div>
						</div>
						<div id="footer" class="libre_footer" role="contentinfo"<?php 
        $this->html('userlangattributes');
        ?>
>
							<?php 
        foreach ($this->getFooterLinks() as $category => $links) {
            ?>
							<ul id="footer-<?php 
            echo $category;
            ?>
">
								<?php 
            foreach ($links as $link) {
                ?>
								<li id="footer-<?php 
                echo $category;
                ?>
-<?php 
                echo $link;
                ?>
"><?php 
                $this->html($link);
                ?>
</li>
								<?php 
            }
            ?>
							</ul>
							<?php 
        }
        ?>
							<?php 
        $footericons = $this->getFooterIcons("icononly");
        if (count($footericons) > 0) {
            ?>
							<ul id="footer-icons">
							<?php 
            foreach ($footericons as $blockName => $footerIcons) {
                ?>
								<li id="footer-<?php 
                echo htmlspecialchars($blockName);
                ?>
ico">
								<?php 
                foreach ($footerIcons as $icon) {
                    echo $this->getSkin()->makeFooterIcon($icon);
                }
                ?>
								</li>
							<?php 
            }
            ?>
							</ul>
							<?php 
        }
        ?>
							<div style="clear:both"></div>
						</div>
					</div>
					<div class="col-xs-3 libre_right_content">
						<div class="libre_right_fixed">
							<form class="libre_right_search" action="<?php 
        $this->text('wgScript');
        ?>
">
								<input type='hidden' name="title" value="<?php 
        $this->text('searchtitle');
        ?>
"/>
								<?php 
        echo $this->makeSearchInput(array("id" => "searchInput", "class" => "form-control", "placeholder" => "검색어"));
        ?>
							</form>
							<div id="libre_right_toc">
							</div>
								<div class="libre_recent-title">
									<ul class="nav nav-tabs" id="libre_recent-tabs">
  								<li><a href="#" id="libre_recent-tab1" class="libre_recent-selected">최근 바뀜</a></li>
  								<li><a href="#" id="libre_recent-tab2">최근 토론</a></li>
									</ul>
								</div>
								<div id = "recent-list-div">
								<ul id = "recent-list">
									<li>불러오고 있습니다...</li>
								</ul>
									<span class="recent-more">
										<span class="mw-editsection-bracket">[</span>
										<a href="/wiki/특수:최근바뀜" title="최근바뀜문서">more</a>
										<span class="mw-editsection-bracket">]</span>
									</span>
							</div>
							<!-- sidebar ad -->
							<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
							<!-- 사이드바 -->
							<ins class="adsbygoogle"
							     style="display:block;max-width:230px;margin-top:10px;height:100%;max-height:600px;"
							     data-ad-client="ca-pub-2664061841343191"
							     data-ad-slot="2751059465"
							     data-ad-format="auto"></ins>
							<script>
							(adsbygoogle = window.adsbygoogle || []).push({});
							</script>
						</div>
					</div>
				</div>
			</div>
		</div> <!-- /container -->
		<?php 
        $this->printTrail();
        ?>
		<div class="notice-wrap">
		</div>
		<div class="top_scroll" style="display: none">
			<a href="#" class="top_s_btn">
				<span class="glyphicon glyphicon-open"></span>
			</a>
		</div>
	</body>
</html>
	<?php 
    }
Ejemplo n.º 15
0
 /**
  * Returns an array of html code of the following checkboxes:
  * minor and watch
  *
  * @param int $tabindex Current tabindex
  * @param array $checked Array of checkbox => bool, where bool indicates the checked
  *                 status of the checkbox
  *
  * @return array
  */
 public function getCheckboxes(&$tabindex, $checked)
 {
     global $wgUser, $wgUseMediaWikiUIEverywhere;
     $checkboxes = array();
     // don't show the minor edit checkbox if it's a new page or section
     if (!$this->isNew) {
         $checkboxes['minor'] = '';
         $minorLabel = wfMessage('minoredit')->parse();
         if ($wgUser->isAllowed('minoredit')) {
             $attribs = array('tabindex' => ++$tabindex, 'accesskey' => wfMessage('accesskey-minoredit')->text(), 'id' => 'wpMinoredit');
             $minorEditHtml = Xml::check('wpMinoredit', $checked['minor'], $attribs) . "&#160;<label for='wpMinoredit' id='mw-editpage-minoredit'" . Xml::expandAttributes(array('title' => Linker::titleAttrib('minoredit', 'withaccess'))) . ">{$minorLabel}</label>";
             if ($wgUseMediaWikiUIEverywhere) {
                 $checkboxes['minor'] = Html::openElement('div', array('class' => 'mw-ui-checkbox')) . $minorEditHtml . Html::closeElement('div');
             } else {
                 $checkboxes['minor'] = $minorEditHtml;
             }
         }
     }
     $watchLabel = wfMessage('watchthis')->parse();
     $checkboxes['watch'] = '';
     if ($wgUser->isLoggedIn()) {
         $attribs = array('tabindex' => ++$tabindex, 'accesskey' => wfMessage('accesskey-watch')->text(), 'id' => 'wpWatchthis');
         $watchThisHtml = Xml::check('wpWatchthis', $checked['watch'], $attribs) . "&#160;<label for='wpWatchthis' id='mw-editpage-watch'" . Xml::expandAttributes(array('title' => Linker::titleAttrib('watch', 'withaccess'))) . ">{$watchLabel}</label>";
         if ($wgUseMediaWikiUIEverywhere) {
             $checkboxes['watch'] = Html::openElement('div', array('class' => 'mw-ui-checkbox')) . $watchThisHtml . Html::closeElement('div');
         } else {
             $checkboxes['watch'] = $watchThisHtml;
         }
     }
     wfRunHooks('EditPageBeforeEditChecks', array(&$this, &$checkboxes, &$tabindex));
     return $checkboxes;
 }
Ejemplo n.º 16
0
    /**
     * Outputs the entire contents of the XHTML page
     */
    public function execute()
    {
        global $wgRequest, $wgLang;
        $this->skin = $this->data['skin'];
        // Build additional attributes for navigation urls
        $nav = $this->data['content_navigation'];
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $class = '';
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $class .= $xmlID;
                /* $nav[$section][$key]['attributes'] =
                   ' id="' . Sanitizer::escapeId($xmlID) . '"'; */
                if ($link['class']) {
                    $class .= ' ' . htmlspecialchars($link['class']);
                    /* $nav[$section][$key]['attributes'] .=
                       ' class="' . htmlspecialchars($link['class']) . '"'; */
                    unset($nav[$section][$key]['class']);
                }
                $nav[$section][$key]['attributes'] = ' class="' . $class . '"';
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        // Output HTML Page
        $this->html('headelement');
        ?>
        <div id="mw-js-message" style="display:none;"<?php 
        $this->html('userlangattributes');
        ?>
></div>
        <!-- tagline -->
        <div id="siteSub"><?php 
        $this->msg('tagline');
        ?>
<img id="logo" height="200" width="200" alt="Seizam's Logo" src="<?php 
        echo wfExpandUrl($this->data['logopath']);
        ?>
"></div>
        <!-- /tagline -->
        <?php 
        if ($this->data['sitenotice']) {
            ?>
            <!-- sitenotice -->
            <div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div>
            <!-- /sitenotice -->
        <?php 
        }
        ?>
        <?php 
        if ($this->data['showjumplinks']) {
            ?>
            <!-- jumpto -->
            <div id="jump-to-nav">
                <?php 
            $this->msg('jumpto');
            ?>
 <a href="#mw-head"><?php 
            $this->msg('jumptonavigation');
            ?>
</a>,
                <a href="#p-search"><?php 
            $this->msg('jumptosearch');
            ?>
</a>
            </div>
            <!-- /jumpto -->
        <?php 
        }
        ?>
        <?php 
        if ($this->data['newtalk']) {
            ?>
            <!-- newtalk -->
            <div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
            <!-- /newtalk -->
        <?php 
        }
        ?>
        <!-- content -->
        <div id="heightwrapper">
            <?php 
        $this->renderContent();
        ?>
        </div>
        <!-- contentFooter -->
        <!-- footer -->
        <?php 
        $this->renderFooter();
        ?>
        <!-- /footer -->
        <!-- bottomScripts -->
        <?php 
        if ($this->data['dataAfterContent']) {
            ?>
            <!-- dataAfterContent -->
            <?php 
            $this->html('dataAfterContent');
            ?>
            <!-- /dataAfterContent -->
        <?php 
        }
        ?>
        <!-- fixalpha -->
        <script type="<?php 
        $this->text('jsmimetype');
        ?>
"> if ( window.isMSIE55 ) fixalpha(); </script>
        <!-- /fixalpha -->
        <!-- background -->
        <?php 
        if ($this->data['wp_background']['url']) {
            ?>
            <script>$.backstretch("<?php 
            echo $this->data['wp_background']['url'];
            ?>
");</script>
        <?php 
        }
        ?>
        <!-- /background -->
        <!-- Trail -->
        <?php 
        $this->printTrail();
        ?>
        <!-- /Trail -->
        <!-- /bottomScripts -->
        </body>
        </html>
        <?php 
        // End of Output HTML Page
    }
    /**
     * Render logo
     */
    private function renderLogo()
    {
        $mainPageLink = $this->data['nav_urls']['mainpage']['href'];
        $toolTip = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
        ?>
        <div id="p-logo" class="text-center">
            <a href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" <?php 
        echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
        ?>
><img class="logo_image" src="<?php 
        $this->text('logopath');
        ?>
" alt="<?php 
        $this->html('sitename');
        ?>
" /></a>
        </div>
        <?php 
    }
Ejemplo n.º 18
0
    /**
     * Template filter callback for MonoBook skin.
     * Takes an associative array of data set from a SkinTemplate-based
     * class, and a wrapper for MediaWiki's localization database, and
     * outputs a formatted page.
     *
     * @access private
     */
    function execute()
    {
        //uncomment for a quick data dump, since there's no documentation I can find that covers this...
        //echo '<pre>'; print_r($this->data); exit;
        global $wgLang;
        $this->skin = $this->data['skin'];
        // Suppress warnings to prevent notices about missing indexes in $this->data
        wfSuppressWarnings();
        // Build additional attributes for navigation urls
        //$nav = $this->skin->buildNavigationUrls();
        $nav = $this->data['content_navigation'];
        if ($wgVectorUseIconWatch) {
            $mode = $this->skin->getTitle()->userIsWatching() ? 'unwatch' : 'watch';
            if (isset($nav['actions'][$mode])) {
                $nav['views'][$mode] = $nav['actions'][$mode];
                $nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
                $nav['views'][$mode]['primary'] = true;
                unset($nav['actions'][$mode]);
            }
        }
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        foreach ($this->data['content_navigation']['namespaces'] as $ns) {
            if ($ns['class'] == 'selected') {
                $current_context = $ns['context'];
            }
        }
        //print_r($this->data['content_navigation']); exit;
        // Reverse horizontally rendered navigation elements
        /*if ( $wgLang->isRTL() ) {
        			$this->data['view_urls'] =
        				array_reverse( $this->data['view_urls'] );
        			$this->data['namespace_urls'] =
        				array_reverse( $this->data['namespace_urls'] );
        			$this->data['personal_urls'] =
        				array_reverse( $this->data['personal_urls'] );
        		}*/
        require_once realpath(__DIR__ . '/../../../library') . '/Masthead.php';
        $masthead = new PracticalPlants_Masthead(array('active_tab' => 'wiki'));
        ?>

<!DOCTYPE html>
<!--
<?php 
        /*print_r($this->content);
        print_r($_GET);
              	/*print_r($this->data);*/
        ?>
 -->
<html lang="en" dir="ltr" class="client-nojs">
  <head>
    <title><?php 
        echo $this->data['pagetitle'];
        ?>
</title>
    <meta charset="UTF-8" />
    <?php 
        echo $this->data['headlinks'];
        ?>
    <?php 
        echo $this->data['csslinks'];
        ?>
    <?php 
        echo $this->data['pagecss'];
        ?>
    <?php 
        echo $this->data['usercss'];
        ?>
    <?php 
        echo $this->data['jsvarurl'];
        ?>
    <?php 
        echo $this->data['headscripts'];
        ?>
  </head>
<body class="<?php 
        echo $this->data['pageclass'];
        ?>
">


<div id="page-wrapper">
	<?php 
        $masthead->output();
        ?>
	
	<?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>
		
	<article id="main-entry" class="wiki-entry">
	  <?php 
        if (isset($this->content['article state'])) {
            ?>
	    <?php 
            echo $this->content['article state'][0];
            ?>
	  <?php 
        }
        ?>
		<?php 
        $header_class = '';
        if (isset($this->content['article image'])) {
            $header_class .= 'with-image';
        }
        if (isset($this->content['icon bar'])) {
            $header_class .= ' with-iconbar';
        }
        ?>
		<header id="page-header" class="<?php 
        echo $header_class;
        ?>
">
		  <div class="width-constraint">
		    <div id="header-content">
    			<h1 id="article-title"><?php 
        $this->html('title');
        if (isset($this->content['common name'])) {
            echo '<div id="common-name">' . $this->content['common name'][0] . '</div>';
        }
        ?>
</h1>
    			<?php 
        if (isset($this->content['article summary'])) {
            ?>
<div id="article-summary"><?php 
            echo '<p>' . implode('</p><p>', $this->content['article summary']) . '</p>';
            ?>
</div><?php 
        }
        ?>
    			<div id="article-image-container"><?php 
        if (isset($this->content['article image'])) {
            ?>
<div id="article-image"><?php 
            echo implode('', $this->content['article image']);
            ?>
</div><?php 
        }
        ?>
</div>
    		</div>
  		</div>
  		<?php 
        if (isset($this->content['header'])) {
            echo implode('', $this->content['header']);
        }
        ?>
  		<?php 
        if (isset($this->content['icon bar'])) {
            echo implode('', $this->content['icon bar']);
        }
        ?>
  		<?php 
        if (isset($this->content['use flags'])) {
            echo implode('', $this->content['use flags']);
        }
        ?>
  		<a id="beta-banner" href="/wiki/PracticalPlants:Beta"></a>
		</header>
		<div class="width-constraint">
  		<aside id="sidebar">
  		  <div id="page-buttons">
  	
  	  <?php 
        /*foreach($this->data['view_urls'] as $type => $link):
          if(strpos($link['attributes'],'selected'))
            continue;
          switch($type):
            case 'view': ?>
            <a href="#" class="btn btn-large btn-success btn-block" id="sidebar-save-page-button"><i class="icon-ok icon-white"></i> Save Changes</a> 
            <a href="<?php echo htmlspecialchars( $link['href'] ) ?>" class="btn btn-large btn-block"<?php echo $link['attributes'] ?> <?php echo $link['key'] ?>><i class="icon-arrow-left"></i> Return without Saving</a>  
             <?php break;
            case 'form_edit':  ?>
            <a href="<?php echo htmlspecialchars( $link['href'] ) ?>" class="btn btn-large btn-success btn-block"<?php echo $link['attributes'] ?>> <?php echo $link['key'] ?><i class="icon-pencil icon-white"></i> Edit This Page</a>
            <?php break;
            case 'edit': ?>
            <a href="<?php echo htmlspecialchars( $link['href'] ) ?>" class="btn btn-large btn-block"<?php echo $link['attributes'] ?> <?php echo $link['key'] ?>><i class="icon-edit"></i> Edit Source</a>
            <?php break;
            case 'history': ?>
            <a href="<?php echo htmlspecialchars( $link['href'] ) ?>" class="btn btn-small"<?php echo $link['attributes'] ?> <?php echo $link['key'] ?>><i class="icon-time"></i>  History</a>
            <?php break;
            endswitch;
          endforeach; */
        ?>
      	
      	
      	<?php 
        $action = isset($_GET['action']) ? $_GET['action'] : '';
        //echo substr( $this->data->thispage, 0, 16);
        if ($action === '' && isset($_GET['title'])) {
            if (substr($_GET['title'], 0, 16) == 'Special:FormEdit') {
                $action = 'formedit';
            }
        }
        //View button (displayed on edit/history screens)
        if ($action === 'edit' || $action === 'formedit' || $action === 'submit') {
            $label = 'Save Changes';
            //if we're currently on a talk page, and we're currently adding as DiscussionThreading item
            if ($current_context === self::NS_CONTEXT_TALK && isset($this->data['content_navigation']['views']['addsection']) && $this->data['content_navigation']['views']['addsection']['class'] == 'selected') {
                $label = 'Save Note';
            }
            ?>
      	  <a href="#" class="btn btn-large btn-success btn-block" id="sidebar-save-button"><i class="icon-ok icon-white"></i> <?php 
            echo $label;
            ?>
</a> 
      	<?php 
        }
        ?>
      	<?php 
        //View button (displayed on edit/history screens)
        if (isset($this->data['view_urls']['view']) && !strpos($this->data['view_urls']['view']['attributes'], 'selected')) {
            $link = $this->data['view_urls']['view'];
            ?>
      	  <?php 
            if ($action === 'submit') {
                ?>
      	  <a href="<?php 
                echo htmlspecialchars($link['href']);
                ?>
" class="btn btn-large btn-danger btn-block"<?php 
                echo $link['attributes'];
                ?>
 <?php 
                echo $link['key'];
                ?>
><i class="icon-arrow-left icon-white"></i> Discard Changes &amp; Return</a>
      	  <?php 
            } elseif ($current_context === self::NS_CONTEXT_TALK) {
                ?>
          <a href="<?php 
                echo htmlspecialchars($link['href']);
                ?>
" class="btn btn-large btn-block"<?php 
                echo $link['attributes'];
                ?>
 <?php 
                echo $link['key'];
                ?>
><i class="icon-arrow-left"></i> View Notes</a>
          <?php 
            } else {
                ?>
      	  <a href="<?php 
                echo htmlspecialchars($link['href']);
                ?>
" class="btn btn-large btn-block"<?php 
                echo $link['attributes'];
                ?>
 <?php 
                echo $link['key'];
                ?>
><i class="icon-arrow-left"></i> View Page</a>
      	  <?php 
            }
            ?>
  
      	<?php 
        }
        ?>
      	<?php 
        //form edit button
        if (isset($this->data['view_urls']['form_edit']) && !strpos($this->data['view_urls']['form_edit']['attributes'], 'selected')) {
            $link = $this->data['view_urls']['form_edit'];
            ?>
      	  <?php 
            if ($action === 'submit') {
                ?>
      	  <a href="<?php 
                echo htmlspecialchars($link['href']);
                ?>
" class="btn btn-large btn-danger btn-block"<?php 
                echo $link['attributes'];
                ?>
> <?php 
                echo $link['key'];
                ?>
<i class="icon-pencil icon-white"></i> Discard Changes &amp; Edit</a>
      	  <?php 
            } else {
                ?>
      	  <a href="<?php 
                echo htmlspecialchars($link['href']);
                ?>
" class="btn btn-large btn-success btn-block"<?php 
                echo $link['attributes'];
                ?>
> <?php 
                echo $link['key'];
                ?>
<i class="icon-pencil icon-white"></i> Edit This Page</a>
      	  <?php 
            }
            ?>
  
      	  
      	<?php 
        }
        ?>
      	<?php 
        //edit source button
        if (isset($this->data['view_urls']['edit']) && !strpos($this->data['view_urls']['edit']['attributes'], 'selected')) {
            //if we're on a talk page and DiscussionThreading is on, and the addsection nav is not currently selected, show an "Add Note" button as the primary button
            if ($current_context === self::NS_CONTEXT_TALK && isset($this->data['content_navigation']['views']['addsection'])) {
                $is_primary = false;
                if ($this->data['content_navigation']['views']['addsection']['class'] !== 'selected') {
                    ?>
            <a href="<?php 
                    echo htmlspecialchars($this->data['content_navigation']['views']['addsection']['href']);
                    ?>
" class="btn btn-large btn-success btn-block"<?php 
                    echo $link['attributes'];
                    ?>
> <?php 
                    echo $link['key'];
                    ?>
<i class="icon-plus-sign icon-white"></i> Add A Note</a>
          <?php 
                }
                //otherwise if this view has a form edit button, this button should be white, else green
            } else {
                $is_primary = isset($this->data['view_urls']['form_edit']) ? false : true;
                ?>
      	  <?php 
            }
            $link = $this->data['view_urls']['edit'];
            ?>
          <a href="<?php 
            echo htmlspecialchars($link['href']);
            ?>
" class="btn btn-large <?php 
            if ($is_primary) {
                ?>
btn-success <?php 
            }
            ?>
btn-block"<?php 
            echo $link['attributes'];
            ?>
 <?php 
            echo $link['key'];
            ?>
><i class="icon-edit<?php 
            if ($is_primary) {
                ?>
 icon-white<?php 
            }
            ?>
"></i> Edit Source</a>

        <?php 
        }
        ?>
 
        <?php 
        //view notes / view content button to switch between Content and Talk namespaces
        if (isset($this->data['namespace_urls']) && !empty($this->data['namespace_urls']) && count($this->data['namespace_urls']) > 1) {
            $content_ns = array_shift($this->data['namespace_urls']);
            $talk_ns = array_shift($this->data['namespace_urls']);
            if (strpos($content_ns['attributes'], 'selected')) {
                ?>
          <a href="<?php 
                echo htmlspecialchars($talk_ns['href']);
                ?>
" class="btn btn-block"<?php 
                echo $link['attributes'];
                ?>
 <?php 
                echo $link['key'];
                ?>
><i class="icon-book"></i> View Page Notes</a>
          <?php 
            } else {
                ?>
          <a href="<?php 
                echo htmlspecialchars($content_ns['href']);
                ?>
" class="btn btn-block"<?php 
                echo $link['attributes'];
                ?>
 <?php 
                echo $link['key'];
                ?>
><i class="icon-arrow-left"></i> View Page Content</a>
          <?php 
            }
            ?>
        <?php 
        }
        ?>
 


      	<?php 
        //history button
        if (isset($this->data['view_urls']['history']) && !strpos($this->data['view_urls']['history']['attributes'], 'selected')) {
            $link = $this->data['view_urls']['history'];
            ?>
      	  <a href="<?php 
            echo htmlspecialchars($link['href']);
            ?>
" class="btn btn-small"<?php 
            echo $link['attributes'];
            ?>
 <?php 
            echo $link['key'];
            ?>
><i class="icon-time"></i>  History</a>
      	<?php 
        }
        ?>
 
  
  		  <?php 
        if (!empty($this->data['action_urls'])) {
            ?>
  		    <div class="dropdown" id="article-actions-dropdown">
  		      <a id="article-actions-menu" class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-file"></i> <?php 
            $this->msg('actions');
            ?>
 <b class="caret"></b></a>
  	    		<ul<?php 
            $this->html('userlangattributes');
            ?>
 class="dropdown-menu pull-right">
  	    			<?php 
            foreach ($this->data['action_urls'] as $link) {
                ?>
  	    				<li<?php 
                echo $link['attributes'];
                ?>
><a href="<?php 
                echo htmlspecialchars($link['href']);
                ?>
" <?php 
                echo $link['key'];
                ?>
><?php 
                echo htmlspecialchars($link['text']);
                ?>
</a></li>
  	    			<?php 
            }
            ?>
  	    		</ul>
  		    </div>
  		  <?php 
        }
        ?>


  		  <div class="dropdown" id="article-toolbox-dropdown" <?php 
        echo Linker::tooltip('p-tb');
        ?>
>
  		  	<a class="btn btn-small dropdown-toggle" data-toggle="dropdown" <?php 
        $this->html('userlangattributes');
        ?>
>
  		  	  <i class="icon-wrench"></i> <b class="caret"></b> <?php 
        /*$msgObj = wfMessage( 'toolbox' ); echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : 'toolbox' );*/
        ?>
</a>
  		  		<ul class="dropdown-menu pull-right">
  		  <?php 
        foreach ($this->getToolbox() as $key => $val) {
            ?>
  		  			<?php 
            echo $this->makeListItem($key, $val);
            ?>
  		  
  		  <?php 
        }
        if (isset($hook)) {
            wfRunHooks('SkinTemplateToolboxEnd', array(&$this, true));
        }
        ?>
  		  		</ul>
  		  </div>
  		    
  		    
  		  </div>
  		  <div id="toc-container">
  		    <?php 
        if (isset($this->content['toc'])) {
            echo $this->content['toc'][0];
        }
        ?>
  		  </div>

  		</aside>
  		
  		<div id="after-header"></div>
  		<div class="article-content">
  		<?php 
        if ($this->data['undelete']) {
            ?>
  				<div id="contentSub2"><?php 
            $this->html('undelete');
            ?>
</div>
  		<?php 
        }
        if ($this->data['newtalk']) {
            ?>
  				<div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
  		<?php 
        }
        /*if($this->data['showjumplinks']) { ?>
        				<div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div>
        		<?php } */
        ?>
  		<a id="top"></a>	
  		<!-- start content -->	
  		<?php 
        $this->html('bodytext');
        ?>
  		<?php 
        if ($this->data['catlinks']) {
            $this->html('catlinks');
        }
        ?>
  		<!-- end content -->
  		<?php 
        if ($this->data['dataAfterContent']) {
            $this->html('dataAfterContent');
        }
        ?>
  		<div class="visualClear"></div>
  		</div>
		</div><!--/width-constraint-->
		
	</article>

  

	<nav id="menubar"<?php 
        $this->html('userlangattributes');
        ?>
 class="masthead-submenu navbar">
	  <ul class="nav">
	    <li><a href="/wiki/"><i class="icon-home icon-white"></i> Home</a></li>
	    <li><a href="/wiki/Search"><i class="icon-search icon-white"></i> Advanced Search</a></li>
	    <li class="dropdown">
    	    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user icon-white"></i> Your Pages <b class="caret"></b></a>
      		<ul class="dropdown-menu"<?php 
        $this->html('userlangattributes');
        ?>
>
      		<?php 
        $usertools = $this->getPersonalTools();
        //print_r($usertools);exit;
        //remove signup and login links
        if (isset($usertools['anonlogin'])) {
            unset($usertools['anonlogin']);
        }
        if (isset($usertools['logout'])) {
            unset($usertools['logout']);
        }
        foreach ($usertools as $key => $item) {
            ?>
      			<?php 
            echo $this->makeListItem($key, $item);
            ?>
      	
      	<?php 
        }
        ?>
      		</ul>
    	</li>
      <li><a href="/wiki/Help:Contents"><i class="icon-question-sign icon-white"></i> Help</a></li>
    </ul>
    <ul class="nav pull-right">
    	<li id="search-nav">
    	  <i class="icon-search icon-white"></i>
    	  <form action="/w/index.php" id="searchform">
    	  	<input type="hidden" name="title" value="Special:Search">
    	  	<input name="search" title="Search All Plants" accesskey="f" id="plant-search" placeholder="Enter a plant name or search term..." class="search-field">
    	  	<input type="submit" name="go" value="Go" title="Go to a page with this exact name if exists" id="searchGoButton" class="searchButton">			<input type="submit" name="fulltext" value="Search" title="Search the pages for this text" id="mw-searchButton" class="searchButton">
    	  </form>
    	</li>
    </ul>
		
	</nav><!-- end of the left (by default at least) column -->
	
	</div><!--/width-constraint-->
	<div class="clear"></div>
	
  <?php 
        $links = $this->getFooterLinks();
        $info = '<ul>';
        foreach ($links['info'] as $link) {
            $info .= '<li>' . $this->data[$link] . '</li>';
        }
        $info .= '</ul>';
        $masthead->footer(array(array('id' => 'mw-footer-info', 'title' => "Page Info", 'content' => $info)));
        ?>

</div>

<?php 
        $this->printTrail();
        include realpath(__DIR__ . '/../../../library') . '/google-analytics.html';
        echo Html::closeElement('body');
        echo Html::closeElement('html');
        wfRestoreWarnings();
    }
 /**
  * Renders the advanced edit box if needed, or else some hidden form fields.
  * @return string HTML
  */
 private function renderAdvancedBox()
 {
     global $wgUser, $wgInlineEditorAdvancedGlobal;
     if ($wgUser->getOption('inline-editor-advanced') || $wgInlineEditorAdvancedGlobal) {
         $box = '';
         $minorLabel = wfMsgExt('minoredit', array('parseinline'));
         if ($wgUser->isAllowed('minoredit')) {
             $attribs = array('accesskey' => wfMsg('accesskey-minoredit'), 'id' => 'wpMinoredit');
             $minorCheckbox = Xml::check('wpMinoredit', $this->extendedEditPage->getMinorEdit(), $attribs) . "&#160;<label for='wpMinoredit' id='mw-editpage-minoredit'" . Xml::expandAttributes(array('title' => $wgUser->getSkin()->titleAttrib('minoredit', 'withaccess'))) . ">{$minorLabel}</label>";
             $box .= Html::rawElement('div', array('class' => 'boxelement'), $minorCheckbox);
         }
         $watchLabel = wfMsgExt('watchthis', array('parseinline'));
         if ($wgUser->isLoggedIn()) {
             $attribs = array('accesskey' => wfMsg('accesskey-watch'), 'id' => 'wpWatchthis');
             $watchCheckbox = Xml::check('wpWatchthis', $this->extendedEditPage->getWatchThis(), $attribs) . "&#160;<label for='wpWatchthis' id='mw-editpage-watch'" . Xml::expandAttributes(array('title' => $wgUser->getSkin()->titleAttrib('watch', 'withaccess'))) . ">{$watchLabel}</label>";
             $box .= Html::rawElement('div', array('class' => 'boxelement'), $watchCheckbox);
         }
         $box .= Html::rawElement('div', array('class' => 'boxelement'), '<span id="editCounter">#0</span>');
         $box .= Html::rawElement('div', array('class' => 'boxelement'), Html::rawElement('a', array('id' => 'undo', 'href' => '#', 'accesskey' => wfMsg('accesskey-inline-editor-undo'), 'title' => $wgUser->getSkin()->titleAttrib('inline-editor-undo', 'withaccess')), wfMsgExt('inline-editor-undo', array('parseinline'))));
         $box .= Html::rawElement('div', array('class' => 'boxelement'), Html::rawElement('a', array('id' => 'redo', 'href' => '#', 'accesskey' => wfMsg('accesskey-inline-editor-redo'), 'title' => $wgUser->getSkin()->titleAttrib('inline-editor-redo', 'withaccess')), wfMsgExt('inline-editor-redo', array('parseinline'))));
         // have other extensions add elements
         wfRunHooks('InlineEditorRenderAdvancedBox', array(&$this, &$box));
         return Html::rawElement('div', array('id' => 'advancedbox'), $box);
     } else {
         $hidden = '';
         $hidden .= Html::input('wpMinoredit', $this->extendedEditPage->getMinorEdit(), 'hidden');
         $hidden .= Html::input('wpWatchthis', $this->extendedEditPage->getWatchThis(), 'hidden');
         return $hidden;
     }
 }
Ejemplo n.º 20
0
 /** @deprecated Returns raw bits of HTML, use titleAttrib() */
 public function tooltip($name, $options = null)
 {
     # FIXME: If Sanitizer::expandAttributes() treated "false" as "output
     # no attribute" instead of "output '' as value for attribute", this
     # would be two lines.
     $tooltip = $this->titleAttrib($name, $options);
     if ($tooltip === false) {
         return '';
     }
     return Xml::expandAttributes(array('title' => $this->titleAttrib($name, $options)));
 }
Ejemplo n.º 21
0
    /**
     * Outputs the entire contents of the (X)HTML page
     */
    public function execute()
    {
        global $wgSitename, $wgApexLogo, $wgStylePath;
        // Build additional attributes for navigation urls
        $nav = $this->data['content_navigation'];
        $mode = $this->getSkin()->getUser()->isWatched($this->getSkin()->getRelevantTitle()) ? 'unwatch' : 'watch';
        if (isset($nav['actions'][$mode])) {
            $nav['views'][$mode] = $nav['actions'][$mode];
            $nav['views'][$mode]['primary'] = true;
            unset($nav['actions'][$mode]);
        }
        // TODO: Move defining the logo path to a resource loader module with media queries to add
        // support for high DPI displays - this will also improve caching situation
        $this->data['logopath-1x'] = $wgApexLogo['1x'] ? $wgApexLogo['1x'] : "{$wgStylePath}/apex/images/logos/mediawiki-1x.png";
        $this->data['logopath-2x'] = $wgApexLogo['2x'] ? $wgApexLogo['2x'] : "{$wgStylePath}/apex/images/logos/mediawiki-2x.png";
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('apex-nav-stashable ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        // Reverse horizontally rendered navigation elements
        if ($this->data['rtl']) {
            $this->data['view_urls'] = array_reverse($this->data['view_urls']);
            $this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
            $this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
        }
        // Output HTML Page
        $this->html('headelement');
        ?>
		<div class="apex-content-wrapper">
			<div id="content" class="mw-body">
				<a id="top"></a>
				<div id="mw-js-message" style="display:none;"<?php 
        $this->html('userlangattributes');
        ?>
></div>
				<?php 
        if ($this->data['sitenotice']) {
            ?>
				<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div>
				<?php 
        }
        ?>
				<h1 id="firstHeading" class="firstHeading"><?php 
        $this->html('title');
        ?>
</h1>
				<div id="bodyContent">
					<?php 
        if ($this->data['isarticle']) {
            ?>
					<div id="siteSub"><?php 
            $this->msg('tagline');
            ?>
</div>
					<?php 
        }
        ?>
					<div id="contentSub"<?php 
        $this->html('userlangattributes');
        ?>
><?php 
        $this->html('subtitle');
        ?>
</div>
					<?php 
        if ($this->data['undelete']) {
            ?>
					<div id="contentSub2"><?php 
            $this->html('undelete');
            ?>
</div>
					<?php 
        }
        ?>
					<?php 
        if ($this->data['newtalk']) {
            ?>
					<div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
					<?php 
        }
        ?>
					<?php 
        if ($this->data['showjumplinks']) {
            ?>
					<div id="jump-to-nav" class="mw-jump">
						<?php 
            $this->msg('jumpto');
            ?>
						<a href="#mw-head"><?php 
            $this->msg('jumptonavigation');
            ?>
</a><?php 
            $this->msg('comma-separator');
            ?>
						<a href="#p-search"><?php 
            $this->msg('jumptosearch');
            ?>
</a>
					</div>
					<?php 
        }
        ?>
					<?php 
        $this->html('bodycontent');
        ?>
					<?php 
        if ($this->data['printfooter']) {
            ?>
					<div class="printfooter">
					<?php 
            $this->html('printfooter');
            ?>
					</div>
					<?php 
        }
        ?>
					<?php 
        if ($this->data['catlinks']) {
            ?>
					<?php 
            $this->html('catlinks');
            ?>
					<?php 
        }
        ?>
					<?php 
        if ($this->data['dataAfterContent']) {
            ?>
					<?php 
            $this->html('dataAfterContent');
            ?>
					<?php 
        }
        ?>
					<div class="visualClear"></div>
					<?php 
        $this->html('debughtml');
        ?>
				</div>
			</div>
		</div>
		<div id="mw-head" class="noprint">
			<div id="p-logo"><a style="background-image: url(<?php 
        $this->text('logopath-1x');
        ?>
);" href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" <?php 
        echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
        ?>
><span><?php 
        echo $wgSitename;
        ?>
</span></a></div>
			<?php 
        $this->renderNavigation(array('SEARCH', 'PERSONAL'));
        ?>
			<div class="apex-nav">
				<div class="apex-nav-primary">
					<?php 
        $this->renderNavigation(array('NAMESPACES', 'VARIANTS'));
        ?>
				</div>
				<div class="apex-nav-secondary">
					<?php 
        $this->renderNavigation(array('VIEWS', 'ACTIONS'));
        ?>
				</div>
			</div>
		</div>
		<div id="mw-panel" class="noprint">
			<div class="apex-flyout-pull"></div>
			<?php 
        $this->renderPortals($this->data['sidebar']);
        ?>
		</div>
		<div id="footer"<?php 
        $this->html('userlangattributes');
        ?>
>
			<?php 
        foreach ($this->getFooterLinks() as $category => $links) {
            ?>
				<ul id="footer-<?php 
            echo $category;
            ?>
">
					<?php 
            foreach ($links as $link) {
                ?>
						<li id="footer-<?php 
                echo $category;
                ?>
-<?php 
                echo $link;
                ?>
">
							<?php 
                $this->html($link);
                ?>
						</li>
					<?php 
            }
            ?>
				</ul>
			<?php 
        }
        ?>
			<?php 
        $footericons = $this->getFooterIcons("icononly");
        if (count($footericons) > 0) {
            ?>
				<ul id="footer-icons" class="noprint">
					<?php 
            foreach ($footericons as $blockName => $footerIcons) {
                ?>
					<li id="footer-<?php 
                echo htmlspecialchars($blockName);
                ?>
ico">
						<?php 
                foreach ($footerIcons as $icon) {
                    ?>
						<?php 
                    echo $this->getSkin()->makeFooterIcon($icon);
                    ?>
						<?php 
                }
                ?>
					</li>
					<?php 
            }
            ?>
				</ul>
			<?php 
        }
        ?>
			<div style="clear:both"></div>
		</div>
		<?php 
        $this->printTrail();
        ?>
	</body>
</html>
<?php 
    }
Ejemplo n.º 22
0
    /**
     * Render logo
     */
    function renderLogo($skin, $context)
    {
        $mainPageLink = $skin->data['nav_urls']['mainpage']['href'];
        $toolTip = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
        echo '
				<a id="p-logo" href="' . htmlspecialchars($skin->data['nav_urls']['mainpage']['href']) . '" ' . Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo')) . '>
					<img src="';
        $skin->text('logopath');
        echo '" alt="';
        $skin->html('sitename');
        echo '"></a>';
    }
Ejemplo n.º 23
0
 /**
  * Returns an array of html code of the following checkboxes:
  * minor and watch
  *
  * @param $tabindex Current tabindex
  * @param $checked Array of checkbox => bool, where bool indicates the checked
  *                 status of the checkbox
  *
  * @return array
  */
 public function getCheckboxes(&$tabindex, $checked)
 {
     global $wgUser;
     $checkboxes = array();
     // don't show the minor edit checkbox if it's a new page or section
     if (!$this->isNew) {
         $checkboxes['minor'] = '';
         $minorLabel = wfMsgExt('minoredit', array('parseinline'));
         if ($wgUser->isAllowed('minoredit')) {
             $attribs = array('tabindex' => ++$tabindex, 'accesskey' => wfMsg('accesskey-minoredit'), 'id' => 'wpMinoredit');
             $checkboxes['minor'] = Xml::check('wpMinoredit', $checked['minor'], $attribs) . "&#160;<label for='wpMinoredit' id='mw-editpage-minoredit'" . Xml::expandAttributes(array('title' => Linker::titleAttrib('minoredit', 'withaccess'))) . ">{$minorLabel}</label>";
         }
     }
     $watchLabel = wfMsgExt('watchthis', array('parseinline'));
     $checkboxes['watch'] = '';
     if ($wgUser->isLoggedIn()) {
         $attribs = array('tabindex' => ++$tabindex, 'accesskey' => wfMsg('accesskey-watch'), 'id' => 'wpWatchthis');
         $checkboxes['watch'] = Xml::check('wpWatchthis', $checked['watch'], $attribs) . "&#160;<label for='wpWatchthis' id='mw-editpage-watch'" . Xml::expandAttributes(array('title' => Linker::titleAttrib('watch', 'withaccess'))) . ">{$watchLabel}</label>";
     }
     wfRunHooks('EditPageBeforeEditChecks', array(&$this, &$checkboxes, &$tabindex));
     return $checkboxes;
 }
    /**
     * Outputs the entire contents of the (X)HTML page
     */
    public function execute()
    {
        $skin = $this->getSkin();
        // Build additional attributes for navigation urls
        $nav = $this->data['content_navigation'];
        if ($this->config->get('MetrolookUseIconWatch')) {
            $mode = $skin->getUser()->isWatched($skin->getRelevantTitle()) ? 'unwatch' : 'watch';
            if (isset($nav['actions'][$mode])) {
                $nav['views'][$mode] = $nav['actions'][$mode];
                $nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
                $nav['views'][$mode]['primary'] = true;
                unset($nav['actions'][$mode]);
            }
        }
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        // Reverse horizontally rendered navigation elements
        if ($this->data['rtl']) {
            $this->data['view_urls'] = array_reverse($this->data['view_urls']);
            $this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
            $this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
        }
        $personalTools = $this->getPersonalTools();
        foreach ($personalTools as $key => $item) {
            if ($key !== 'notifications-alert') {
                $this->mPersonalTools .= $this->makeListItem($key, $item);
            } else {
                $this->mPersonalToolsEcho .= $this->makeListItem($key, $item);
            }
        }
        $this->data['pageLanguage'] = $skin->getTitle()->getPageViewLanguage()->getHtmlCode();
        // User name (or "Guest") to be displayed at the top right (on LTR
        // interfaces) portion of the skin
        $user = $skin->getUser();
        if (!$user->isLoggedIn()) {
            $userNameTop = $skin->msg('metrolook-guest')->text();
        } else {
            $userNameTop = htmlspecialchars($user->getName(), ENT_QUOTES);
        }
        // Output HTML Page
        $this->html('headelement');
        ?>

		<div id="mw-page-base" class="noprint"></div>
		<div id="mw-head-base" class="noprint"></div>
		<div id="content" class="mw-body overthrow" role="main">
			<a id="top"></a>

			<?php 
        if ($this->data['sitenotice']) {
            ?>
				<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div>
			<?php 
        }
        ?>
			<?php 
        if (is_callable(array($this, 'getIndicators'))) {
            echo $this->getIndicators();
        }
        // Loose comparison with '!=' is intentional, to catch null and false too, but not '0'
        if ($this->data['title'] != '') {
            ?>
			<h1 id="firstHeading" class="firstHeading" lang="<?php 
            $this->text('pageLanguage');
            ?>
"><?php 
            $this->html('title');
            ?>
</h1>
			<?php 
        }
        ?>
			<?php 
        $this->html('prebodyhtml');
        ?>
			<div id="bodyContent" class="mw-body-content">
				<?php 
        if ($this->data['isarticle']) {
            ?>
					<div id="siteSub"><?php 
            $this->msg('tagline');
            ?>
</div>
				<?php 
        }
        ?>
				<div id="contentSub"<?php 
        $this->html('userlangattributes');
        ?>
><?php 
        $this->html('subtitle');
        ?>
</div>
				<?php 
        if ($this->data['undelete']) {
            ?>
					<div id="contentSub2"><?php 
            $this->html('undelete');
            ?>
</div>
				<?php 
        }
        ?>
				<?php 
        if ($this->data['newtalk']) {
            ?>
					<div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
				<?php 
        }
        ?>
				<div id="jump-to-nav" class="mw-jump">
					<?php 
        $this->msg('jumpto');
        ?>
					<a href="#mw-head"><?php 
        $this->msg('jumptonavigation');
        ?>
</a><?php 
        $this->msg('comma-separator');
        ?>
					<?php 
        if ($this->config->get('MetrolookSearchBar')) {
            ?>
						<a href="#p-search"><?php 
            $this->msg('jumptosearch');
            ?>
</a>
					<?php 
        } else {
            ?>
						<a href="#p-searchSearch"><?php 
            $this->msg('jumptosearch');
            ?>
</a>
					<?php 
        }
        ?>
				</div>
				<?php 
        $this->html('bodycontent');
        if ($this->data['printfooter']) {
            ?>
					<div class="printfooter">
						<?php 
            $this->html('printfooter');
            ?>
					</div>
				<?php 
        }
        if ($this->data['catlinks']) {
            $this->html('catlinks');
        }
        ?>
				<div class="visualClear"></div>
					<div id="footer" role="contentinfo"<?php 
        $this->html('userlangattributes');
        ?>
>
				<hr />
			<?php 
        foreach ($this->getFooterLinks() as $category => $links) {
            ?>
				<ul id="footer-<?php 
            echo $category;
            ?>
">
					<?php 
            foreach ($links as $link) {
                ?>
						<li id="footer-<?php 
                echo $category;
                ?>
-<?php 
                echo $link;
                ?>
"><?php 
                $this->html($link);
                ?>
</li>
					<?php 
            }
            ?>
				</ul>
			<?php 
        }
        ?>
			<?php 
        $footericons = $this->getFooterIcons("icononly");
        if (count($footericons) > 0) {
            ?>
				<ul id="footer-icons" class="noprint">
					<?php 
            foreach ($footericons as $blockName => $footerIcons) {
                ?>
						<li id="footer-<?php 
                echo htmlspecialchars($blockName);
                ?>
ico">
							<?php 
                foreach ($footerIcons as $icon) {
                    echo $skin->makeFooterIcon($icon);
                }
                ?>
						</li>
					<?php 
            }
            ?>
				</ul>
			<?php 
        }
        ?>
			<div style="clear:both"></div>
		</div>
				<?php 
        if ($this->data['dataAfterContent']) {
            $this->html('dataAfterContent');
        }
        ?>
				<div class="visualClear"></div>
				<?php 
        $this->html('debughtml');
        ?>
			</div>
		</div>
		<div id="mw-navigation">
			<h2><?php 
        $this->msg('navigation-heading');
        ?>
</h2>

		<div id="mw-head">
			<div id="hamburgerIcon">
				<img
				class="hamburger"
				alt=""
				src="<?php 
        echo htmlspecialchars($skin->getSkinStylePath('images/Transparent.gif'));
        ?>
" />
			</div>

			<?php 
        if ($this->config->get('MetrolookSiteName')) {
            ?>
				<div style="padding-left:10px;">
					<div class="lighthover siteLogoBar">
						<div class="onhoverbg">
							<h4 class="title-name">
								<a href="<?php 
            echo $this->data['nav_urls']['mainpage']['href'];
            ?>
">
									<span class="title-name">
										<?php 
            if ($this->config->get('MetrolookSiteNameText')) {
                echo $GLOBALS['wgSitename'];
            } else {
                echo $GLOBALS['wgMetrolookSiteText'];
            }
            ?>
									</span>
								</a>
							</h4>
						</div>
					</div>
				</div>
			<?php 
        }
        ?>
			<?php 
        if ($this->config->get('MetrolookLine')) {
            ?>
				<?php 
            if ($this->config->get('MetrolookSiteName')) {
                ?>
					<div class="lighthover siteLogoBar">
				<?php 
            }
            ?>
				<img
				class="line"
				alt=""
				src="<?php 
            echo htmlspecialchars($skin->getSkinStylePath('images/Transparent.gif'));
            ?>
"
				/>
				<?php 
            if ($this->config->get('MetrolookSiteName')) {
                ?>
					</div>
				<?php 
            }
            ?>
			<?php 
        }
        ?>
			<?php 
        if ($this->config->get('MetrolookDownArrow')) {
            ?>
				<?php 
            if ($this->config->get('MetrolookSiteName')) {
                ?>
					<div class="lighthover siteLogoBar">
				<?php 
            }
            ?>
				<img
				class="downarrow"
				alt=""
				src="<?php 
            echo htmlspecialchars($skin->getSkinStylePath('images/Transparent.gif'));
            ?>
"
				/>
				<?php 
            if ($this->config->get('MetrolookSiteName')) {
                ?>
					</div>
				<?php 
            }
            ?>
			<?php 
        }
        ?>

			<div class="vectorMenu" id="usermenu">
				<div class="no-js">
					<a href="#" class="user-icon-container">
						<span id="username-top">
							<span id="username-text"><?php 
        echo $userNameTop;
        ?>
</span>
							<span class="username-space spacer"> </span>
							<span id="userIcon20"><?php 
        echo $this->getAvatar(20);
        ?>
</span>
							<span class="spacer"> </span>
							<span id="userIcon40"><?php 
        echo $this->getAvatar(40);
        ?>
</span>
						</span>
					</a>
					<div class="menu personal-menu">
						<?php 
        $this->renderNavigation('PERSONAL');
        ?>
					</div>
				</div>
			</div>
			<div id="echoNotifications">
				<ul>
					<?php 
        echo $this->mPersonalToolsEcho;
        ?>
				</ul>
			</div>

			<div id="left-navigation">
				<?php 
        if ($this->config->get('MetrolookUploadButton') && $user->isAllowed('upload')) {
            if (isset($this->data['nav_urls']['upload']['href']) && $this->data['nav_urls']['upload']['href']) {
                $uploadURL = $this->data['nav_urls']['upload']['href'];
            } else {
                $upURL = SpecialPage::getTitleFor('Upload')->getFullURL();
                $uploadURL = htmlspecialchars($upURL, ENT_QUOTES);
            }
            ?>
					<a href="<?php 
            echo $uploadURL;
            ?>
">
						<div class="onhoverbg" id="uploadbutton">
							<img
							class="uploadbutton"
							alt=""
							src="<?php 
            echo htmlspecialchars($skin->getSkinStylePath('images/Transparent.gif'));
            ?>
" />
								<span class="uploadbutton">
									<?php 
            $this->msg('uploadbtn');
            ?>
								</span>
						</div>
					</a>
				<?php 
        }
        ?>
				<?php 
        $this->renderNavigation(array('NAMESPACES', 'VARIANTS', 'VIEWS', 'ACTIONS'));
        ?>
			</div>

				<?php 
        if ($this->config->get('MetrolookSearchBar')) {
            ?>
					<img
					class="searchbar"
					alt=""
					src="<?php 
            echo htmlspecialchars($skin->getSkinStylePath('images/Transparent.gif'));
            ?>
" />
				<?php 
        }
        ?>
				<img
				class="editbutton"
				alt=""
				src="<?php 
        echo htmlspecialchars($skin->getSkinStylePath('images/Transparent.gif'));
        ?>
" />


			<div id="right-navigation">
				<?php 
        if ($this->config->get('MetrolookSearchBar')) {
            $this->renderNavigation(array('SEARCH'));
        }
        ?>
			</div>
		</div>

			<?php 
        if ($this->config->get('MetrolookSearchBar')) {
            ?>
				<div id="mw-panel">
					<?php 
            if ($this->config->get('MetrolookLogo')) {
                ?>
						<div id="p-logo" role="banner"><a class="mw-wiki-logo" href="<?php 
                echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
                ?>
" <?php 
                echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
                ?>
></a></div>
					<?php 
            }
            ?>
					<?php 
            $this->renderPortals($this->data['sidebar']);
            ?>
				</div>
			<?php 
        } else {
            ?>
				<div id="mw-panel-custom">
					<?php 
            if ($this->config->get('MetrolookLogo')) {
                ?>
						<div id="p-logo-custom" role="banner"><a class="mw-wiki-logo" href="<?php 
                echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
                ?>
" <?php 
                echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo-custom'));
                ?>
></a></div>
					<?php 
            }
            ?>
					<?php 
            $this->renderNavigation(array('SEARCH'));
            ?>
					<?php 
            $this->renderPortals($this->data['sidebar']);
            ?>
				</div>
			<?php 
        }
        ?>

			<?php 
        if ($this->config->get('MetrolookDownArrow')) {
            ?>
				<div class="top-tile-bar-inner-container">
					<div class="topleft">
						<div class="tilebar" id="bartile">
							<div id="tilegrouptable">
								<div id="tilegroup">
									<?php 
            if ($this->config->get('MetrolookBartile')) {
                echo $this->getTiles();
            } else {
                echo $this->getTiles('metrolook-tiles-second');
            }
            ?>
								</div>
							</div>
						</div>
					</div>
				</div>
			<?php 
        }
        ?>
		</div>

		<div id="mw-panel-right" class="noprint">
			<?php 
        // Hook point for the ShoutWiki Ads extension
        Hooks::run('MetrolookRightPanel', array($this));
        ?>
		</div>

		<?php 
        $this->printTrail();
        ?>
	</body>
</html>
<?php 
    }
Ejemplo n.º 25
0
    /**
     * Outputs the entire contents of the (X)HTML page
     */
    public function execute()
    {
        global $wgLang, $wgVectorUseIconWatch;
        $this->skin = $this->data['skin'];
        // Build additional attributes for navigation urls
        //$nav = $this->skin->buildNavigationUrls();
        $nav = $this->data['content_navigation'];
        if ($wgVectorUseIconWatch) {
            $mode = $this->skin->getTitle()->userIsWatching() ? 'unwatch' : 'watch';
            if (isset($nav['actions'][$mode])) {
                $nav['views'][$mode] = $nav['actions'][$mode];
                $nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
                $nav['views'][$mode]['primary'] = true;
                unset($nav['actions'][$mode]);
            }
        }
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        // Reverse horizontally rendered navigation elements
        if ($wgLang->isRTL()) {
            $this->data['view_urls'] = array_reverse($this->data['view_urls']);
            $this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
            $this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
        }
        // Output HTML Page
        $this->html('headelement');
        ?>
		<div id="mw-page-base" class="noprint"></div>
		<div id="mw-head-base" class="noprint"></div>
		<!-- content -->
		<div id="content">
			<a id="top"></a>
			<div id="mw-js-message" style="display:none;"<?php 
        $this->html('userlangattributes');
        ?>
></div>
			<?php 
        if ($this->data['sitenotice']) {
            ?>
			<!-- sitenotice -->
			<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div>
			<!-- /sitenotice -->
			<?php 
        }
        ?>
			<!-- firstHeading -->
			<h1 id="firstHeading" class="firstHeading"><?php 
        $this->html('title');
        ?>
</h1>
			<!-- /firstHeading -->
			<!-- bodyContent -->
			<div id="bodyContent">
				<?php 
        if ($this->data['isarticle']) {
            ?>
				<!-- tagline -->
				<div id="siteSub"><?php 
            $this->msg('tagline');
            ?>
</div>
				<!-- /tagline -->
				<?php 
        }
        ?>
				<!-- subtitle -->
				<div id="contentSub"<?php 
        $this->html('userlangattributes');
        ?>
><?php 
        $this->html('subtitle');
        ?>
</div>
				<!-- /subtitle -->
				<?php 
        if ($this->data['undelete']) {
            ?>
				<!-- undelete -->
				<div id="contentSub2"><?php 
            $this->html('undelete');
            ?>
</div>
				<!-- /undelete -->
				<?php 
        }
        ?>
				<?php 
        if ($this->data['newtalk']) {
            ?>
				<!-- newtalk -->
				<div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
				<!-- /newtalk -->
				<?php 
        }
        ?>
				<?php 
        if ($this->data['showjumplinks']) {
            ?>
				<!-- jumpto -->
				<div id="jump-to-nav">
					<?php 
            $this->msg('jumpto');
            ?>
 <a href="#mw-head"><?php 
            $this->msg('jumptonavigation');
            ?>
</a>,
					<a href="#p-search"><?php 
            $this->msg('jumptosearch');
            ?>
</a>
				</div>
				<!-- /jumpto -->
				<?php 
        }
        ?>
				<!-- bodycontent -->
				<?php 
        $this->html('bodycontent');
        ?>
				<!-- /bodycontent -->
				<?php 
        if ($this->data['printfooter']) {
            ?>
				<!-- printfooter -->
				<div class="printfooter">
				<?php 
            $this->html('printfooter');
            ?>
				</div>
				<!-- /printfooter -->
				<?php 
        }
        ?>
				<?php 
        if ($this->data['catlinks']) {
            ?>
				<!-- catlinks -->
				<?php 
            $this->html('catlinks');
            ?>
				<!-- /catlinks -->
				<?php 
        }
        ?>
				<?php 
        if ($this->data['dataAfterContent']) {
            ?>
				<!-- dataAfterContent -->
				<?php 
            $this->html('dataAfterContent');
            ?>
				<!-- /dataAfterContent -->
				<?php 
        }
        ?>
				<div class="visualClear"></div>
				<!-- debughtml -->
				<?php 
        $this->html('debughtml');
        ?>
				<!-- /debughtml -->
			</div>
			<!-- /bodyContent -->
		</div>
		<!-- /content -->
		<!-- header -->
		<div id="mw-head" class="noprint">
			<?php 
        $this->renderNavigation('PERSONAL');
        ?>
			<div id="left-navigation">
				<?php 
        $this->renderNavigation(array('NAMESPACES', 'VARIANTS'));
        ?>
			</div>
			<div id="right-navigation">
				<?php 
        $this->renderNavigation(array('VIEWS', 'ACTIONS', 'SEARCH'));
        ?>
			</div>
		</div>
		<!-- /header -->
		<!-- panel -->
			<div id="mw-panel" class="noprint">
				<!-- logo -->
					<div id="p-logo"><a style="background-image: url(<?php 
        $this->text('logopath');
        ?>
);" href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" <?php 
        echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
        ?>
></a></div>
				<!-- /logo -->
				<?php 
        $this->renderPortals($this->data['sidebar']);
        ?>
			</div>
		<!-- /panel -->
		<!-- footer -->
		<div id="footer"<?php 
        $this->html('userlangattributes');
        ?>
>
			<?php 
        foreach ($this->getFooterLinks() as $category => $links) {
            ?>
				<ul id="footer-<?php 
            echo $category;
            ?>
">
					<?php 
            foreach ($links as $link) {
                ?>
						<li id="footer-<?php 
                echo $category;
                ?>
-<?php 
                echo $link;
                ?>
"><?php 
                $this->html($link);
                ?>
</li>
					<?php 
            }
            ?>
				</ul>
			<?php 
        }
        ?>
			<?php 
        $footericons = $this->getFooterIcons("icononly");
        if (count($footericons) > 0) {
            ?>
				<ul id="footer-icons" class="noprint">
<?php 
            foreach ($footericons as $blockName => $footerIcons) {
                ?>
					<li id="footer-<?php 
                echo htmlspecialchars($blockName);
                ?>
ico">
<?php 
                foreach ($footerIcons as $icon) {
                    ?>
						<?php 
                    echo $this->skin->makeFooterIcon($icon);
                    ?>

<?php 
                }
                ?>
					</li>
<?php 
            }
            ?>
				</ul>
			<?php 
        }
        ?>
			<div style="clear:both"></div>
		</div>
		<!-- /footer -->
		<!-- fixalpha -->
		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        global $wgScriptPath;
        echo $wgScriptPath . "/fix_alpha.js";
        ?>
"></script>
		<!-- /fixalpha -->
		<?php 
        $this->printTrail();
        ?>

	</body>
</html>
<?php 
    }
Ejemplo n.º 26
0
    /**
     * Outputs the entire contents of the (X)HTML page
     */
    public function execute()
    {
        global $wgVectorUseIconWatch, $wgUser;
        // Build additional attributes for navigation urls
        $nav = $this->data['content_navigation'];
        if ($this->config->get('NewiWikiUseIconWatch')) {
            $mode = $this->getSkin()->getUser()->isWatched($this->getSkin()->getRelevantTitle()) ? 'unwatch' : 'watch';
            if (isset($nav['actions'][$mode])) {
                $nav['views'][$mode] = $nav['actions'][$mode];
                $nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
                $nav['views'][$mode]['primary'] = true;
                unset($nav['actions'][$mode]);
            }
        }
        $xmlID = '';
        foreach ($nav as $section => $links) {
            foreach ($links as $key => $link) {
                if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
                    $link['class'] = rtrim('collapsible ' . $link['class'], ' ');
                }
                $xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
                $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
                if ($link['class']) {
                    $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
                    unset($nav[$section][$key]['class']);
                }
                if (isset($link['tooltiponly']) && $link['tooltiponly']) {
                    $nav[$section][$key]['key'] = Linker::tooltip($xmlID);
                } else {
                    $nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
                }
            }
        }
        $this->data['namespace_urls'] = $nav['namespaces'];
        $this->data['view_urls'] = $nav['views'];
        $this->data['action_urls'] = $nav['actions'];
        $this->data['variant_urls'] = $nav['variants'];
        // Reverse horizontally rendered navigation elements
        if ($this->data['rtl']) {
            $this->data['view_urls'] = array_reverse($this->data['view_urls']);
            $this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
            $this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
        }
        $userLinks = $this->getPersonalTools();
        $user = $wgUser->isLoggedIn() ? array_shift($userLinks) : array_pop($userLinks);
        $userLink = $user['links'][0];
        // Output HTML Page
        $this->html('headelement');
        ?>
		<div id="mw-page-base" class="noprint"></div>
		<div id="mw-head-base" class="noprint"></div>
		<div id="body_wrap" class="container-fluid">
		<div class="top_navi">
		<div class="navbar navbar-iWiki navbar-fixed-top">
			<div class="container-fluid">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle navbar-left collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
						<span class="sr-only">Toggle navigation</span>
						<span class="glyphicon glyphicon-th-large" aria-hidden="true"></span>
					</button>
					<form class="navbar-form navbar-right navbar-small-form" action="<?php 
        $this->text('wgScript');
        ?>
">
						<input type='hidden' name="title" value="<?php 
        $this->text('searchtitle');
        ?>
"/>
						<?php 
        echo $this->makeSearchInput(array("id" => "searchInput", "class" => "form-control", "placeholder" => "검색어"));
        ?>
					</form>
					<button type="button" class="navbar-toggle navbar-toogle-right collapsed" data-toggle="collapse" <?php 
        if ($wgUser->isLoggedIn()) {
            ?>
data-target="#personalbar" <?php 
        } else {
            ?>
onclick="location.href='<?php 
            echo $userLink['href'];
            ?>
'"<?php 
        }
        ?>
aria-expanded="false" aria-controls="personalbar">
						<span class="sr-only">Toggle navigation</span>
						<span class="glyphicon glyphicon-user" aria-hidden="true"></span>
					</button>
					<a class="navbar-brand" href="/wiki/FrontPage"><?php 
        $this->msg('tagline');
        ?>
</a>
				</div>
				<div id="navbar" class="navbar-collapse collapse">
					<ul class="nav navbar-nav navbar-left">
						<?php 
        $this->customBox('navigaion', $this->data['sidebar']['navigation']);
        ?>
					</ul>
					<?php 
        if ($wgUser->isLoggedIn()) {
            $notificationCount = MWEchoNotifUser::newFromUser($this->getSkin()->getUser())->getNotificationCount();
            ?>
					<button type="button" class="btn <?php 
            if ($notificationCount) {
                echo "btn-danger";
            } else {
                echo "btn-success";
            }
            ?>
 loginbtn navbar-right" data-toggle="collapse" href="#personalbar" aria-expanded="false" aria-controls="personalbar">
					<?php 
            echo $wgUser->getName();
            ?>
					<?php 
            ?>
					</button>
					<?php 
        } else {
            echo Linker::linkKnown(SpecialPage::getTitleFor('Userlogin'), wfMsg('login'), array('class' => 'navbar-right btn btn-warning loginbtn '));
        }
        ?>
				</div>
				<div id="personalbar" class="navbar-personal collapse">
					<ul class="nav nav-stacked navbar-personalbar">
						<?php 
        $this->renderNavigation('PERSONAL');
        ?>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<div class="row main_content">
		<div class="col-xs-9">
			<div id="content" class="mw-body" role="main">
				<a id="top"></a>
				<div class="top_menu">
					<ul>
					<?php 
        $title = $this->getSkin()->getTitle();
        if ($title->getNamespace() != NS_SPECIAL) {
            $companionTitle = $title->isTalkPage() ? $title->getSubjectPage() : $title->getTalkPage();
            //echo $title->getArticleID();
            //echo $this->getSkin()->getOldID();
            //echo $this->getSkin()->getActionName();
            ?>
						<li><?php 
            echo Linker::linkKnown($title, '<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> 편집', array(), array('action' => 'edit', 'oldid' => $this->getSkin()->getRevisionId()));
            ?>
</li>
						<li><?php 
            echo Linker::linkKnown($title, '<span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span> 새문단', array(), array('action' => 'edit', 'section' => 'new'));
            ?>
</li>
						<li><?php 
            echo Linker::linkKnown($title, '<span class="glyphicon glyphicon-time" aria-hidden="true"></span> 기록', array(), array('action' => 'history'));
            ?>
</li>
					<?php 
            if ($companionTitle) {
                if ($title->getNamespace() == NS_TALK || $title->getNamespace() == NS_PROJECT_TALK || $title->getNamespace() == NS_FILE_TALK || $title->getNamespace() == NS_TEMPLATE_TALK) {
                    ?>
                    <li><?php 
                    echo Linker::linkKnown($companionTitle, '<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> 본문');
                    ?>
</li>
                    <?php 
                } else {
                    ?>
                    <li><?php 
                    echo Linker::linkKnown($companionTitle, '<span class="glyphicon glyphicon-fire" aria-hidden="true"></span> 토론');
                    ?>
</li>
                    <?php 
                }
            }
            ?>
			<li><?php 
            echo Linker::linkKnown(SpecialPage::getTitleFor('WhatLinksHere', $title), '<span class="glyphicon glyphicon-pushpin" aria-hidden="true"></span> 역링크');
            ?>
</li>
            <?php 
            $mode = $this->getSkin()->getUser()->isWatched($this->getSkin()->getRelevantTitle()) ? 'unwatch' : 'watch';
            if ($mode != 'watch') {
                $watchname = '주시해제';
                $emptystar = '';
            } else {
                $watchname = '주시';
                $emptystar = '-empty';
            }
            if ($title->getNamespace() != NS_SPECIAL) {
                ?>
            <li><?php 
                echo Linker::linkKnown($title, '<span class="glyphicon glyphicon-star' . $emptystar . '" aria-hidden="true"></span> ' . $watchname, array(), array('action' => $mode));
                ?>
</li>
            <?php 
            }
            ?>
            <li><?php 
            echo Linker::linkKnown(SpecialPage::getTitleFor('Movepage', $title), '<span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span> 옮기기');
            ?>
</li>
            <?php 
            if ($title->quickUserCan('protect', $user)) {
                ?>
            <li><?php 
                echo Linker::linkKnown($title, '<span class="glyphicon glyphicon-lock" aria-hidden="true"></span> 보호', array(), array('action' => 'protect'));
                ?>
</li>
            <?php 
            }
            ?>
            <?php 
            if ($title->quickUserCan('delete', $user)) {
                ?>
            <li><?php 
                echo Linker::linkKnown($title, '<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> 삭제', array(), array('action' => 'delete'));
                ?>
</li>
            <?php 
            }
        }
        ?>
					</ul>
				</div>

				<div id="mw-js-message" style="display:none;"<?php 
        $this->html('userlangattributes');
        ?>
></div>
				<?php 
        if ($this->data['sitenotice']) {
            ?>
					<div id="alertmsg" class="alert alert-info siteNotice alert-dismissible" role="alert">
						<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<?php 
            $this->html('sitenotice');
            ?>
					</div>
				<?php 
        }
        ?>

									<!-- Footer ad -->
								<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
								<ins class="adsbygoogle"
									 style="display:block; min-width:320px; width:100%; height:90px;margin-top:15px;"
									 data-ad-client="ca-pub-2664061841343191"
									 data-ad-slot="6502738263"
									 data-ad-format="auto"></ins>
								<script>
									(adsbygoogle = window.adsbygoogle || []).push({});
								</script>
				<h1 id="firstHeading" class="firstHeading" lang="<?php 
        $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
        $this->text('pageLanguage');
        ?>
"><span dir="auto"><?php 
        $this->html('title');
        ?>
</span></h1>
				<?php 
        $this->html('prebodyhtml');
        ?>
				<div id="bodyContent">
				<?php 
        if ($this->data['isarticle']) {
            ?>
					<div id="siteSub"><?php 
            $this->msg('tagline');
            ?>
</div>
				<?php 
        }
        ?>
					<div id="contentSub"<?php 
        $this->html('userlangattributes');
        ?>
><?php 
        $this->html('subtitle');
        ?>
</div>
				<?php 
        if ($this->data['undelete']) {
            ?>
					<div id="contentSub2"><?php 
            $this->html('undelete');
            ?>
</div>
				<?php 
        }
        ?>
				<?php 
        if ($this->data['newtalk']) {
            ?>
					<div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>
				<?php 
        }
        ?>
				<div id="jump-to-nav" class="mw-jump">
					<?php 
        $this->msg('jumpto');
        ?>
					<a href="#mw-navigation"><?php 
        $this->msg('jumptonavigation');
        ?>
</a><?php 
        $this->msg('comma-separator');
        ?>
					<a href="#p-search"><?php 
        $this->msg('jumptosearch');
        ?>
</a>
				</div>
				<?php 
        $this->html('bodycontent');
        ?>
				<?php 
        if ($this->data['printfooter']) {
            ?>
					<div class="printfooter">
						<?php 
            $this->html('printfooter');
            ?>
					</div>
				<?php 
        }
        ?>
				<?php 
        if ($this->data['catlinks']) {
            ?>
				<?php 
            $this->html('catlinks');
            ?>
				<?php 
        }
        ?>
				<?php 
        if ($this->data['dataAfterContent']) {
            ?>
				<?php 
            $this->html('dataAfterContent');
            ?>
				<?php 
        }
        ?>
				<div class="visualClear"></div>
				<?php 
        $this->html('debughtml');
        ?>
			</div>
		</div>
		<div id="footer" role="contentinfo"<?php 
        $this->html('userlangattributes');
        ?>
>
                        <?php 
        foreach ($this->getFooterLinks() as $category => $links) {
            ?>
                                <ul id="footer-<?php 
            echo $category;
            ?>
">
                                        <?php 
            foreach ($links as $link) {
                ?>
                                                <li id="footer-<?php 
                echo $category;
                ?>
-<?php 
                echo $link;
                ?>
"><?php 
                $this->html($link);
                ?>
</li>
                                        <?php 
            }
            ?>
                                </ul>
                        <?php 
        }
        ?>
                        <?php 
        $footericons = $this->getFooterIcons("icononly");
        if (count($footericons) > 0) {
            ?>
                                <ul id="footer-icons">
<?php 
            foreach ($footericons as $blockName => $footerIcons) {
                ?>
                                        <li id="footer-<?php 
                echo htmlspecialchars($blockName);
                ?>
ico">
<?php 
                foreach ($footerIcons as $icon) {
                    ?>
                                                <?php 
                    echo $this->getSkin()->makeFooterIcon($icon);
                    ?>

<?php 
                }
                ?>
                                        </li>
<?php 
            }
            ?>
                                </ul>
                        <?php 
        }
        ?>
                        <div style="clear:both"></div>
                                </div>
                                </div>
                                <div class="col-xs-3">
                                        <div class="right_col">
                                                <form class="right_search" action="<?php 
        $this->text('wgScript');
        ?>
">
                                    <input type='hidden' name="title" value="<?php 
        $this->text('searchtitle');
        ?>
"/>
                            <?php 
        echo $this->makeSearchInput(array("id" => "searchInput", "class" => "form-control", "placeholder" => "검색어"));
        ?>
                            </form>
                                                <div id="right_toc">
                                                </div>
                                                <div id = "recent-list-div">
                                                        <div id="recent-title">
                                                                <h2>최근 바뀜
                                                                        <span class="recent-more">
                                                                                <span class="mw-editsection-bracket">[</span>
                                                                                <a href="/wiki/특수:최근바뀜" title="최근바뀜문서">more</a>
                                                                                <span class="mw-editsection-bracket">]</span>
                                                                        </span>
                                                                </h2>
                                                        </div>
                                                        <ul id = "recent-list">
                                                        </ul>
                                                </div>

																								<!-- sidebar ad -->
																								<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
																								<!-- 사이드바 -->
																								<ins class="adsbygoogle"
																								     style="display:block;max-width:230px;margin-top:10px;margin-left:10px;height:100%;max-height:600px;"
																								     data-ad-client="ca-pub-2664061841343191"
																								     data-ad-slot="2751059465"
																								     data-ad-format="auto"></ins>
																								<script>
																								(adsbygoogle = window.adsbygoogle || []).push({});
																								</script>
                                        </div>
                </div>
                        </div>
                </div>
                <div class="top_scroll">
                        <a href="#" class="top_s_btn">
                                <span class="glyphicon glyphicon-open"></span>
                        </a>
                </div>

		<?php 
        $this->printTrail();
        ?>
	</body>
</html>
	<?php 
    }
Ejemplo n.º 27
0
 /**
  * @deprecated since 1.14
  * Returns raw bits of HTML, use titleAttrib()
  */
 public static function tooltip($name, $options = null)
 {
     global $wgEnableTooltipsAndAccesskeys;
     if (!$wgEnableTooltipsAndAccesskeys) {
         return '';
     }
     # @todo FIXME: If Sanitizer::expandAttributes() treated "false" as "output
     # no attribute" instead of "output '' as value for attribute", this
     # would be two lines.
     $tooltip = self::titleAttrib($name, $options);
     if ($tooltip === false) {
         return '';
     }
     return Xml::expandAttributes(array('title' => $tooltip));
 }
Ejemplo n.º 28
0
    /**
     * Template filter callback for Clean skin.
     * Takes an associative array of data set from a SkinTemplate-based
     * class, and a wrapper for MediaWiki's localization database, and
     * outputs a formatted page.
     *
     * @access private
     */
    function execute()
    {
        global $wgRequest, $wgSitename, $wgCleanHeader, $wgStylePath;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        $this->set('sitename', $wgSitename);
        // Suppress warnings to prevent notices about missing indexes in $this->data
        wfSuppressWarnings();
        $this->html('headelement');
        ?>
<div id="wrapper" class="hfeed">
	<div id="header" class="noprint">
				<div id="site-title">
					<a href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" rel="home">
						<?php 
        echo $this->text('sitename');
        ?>
					</a>
				</div>
	</div><!-- #header -->
      
      <div id="sidebar" class="widget-area noprint" role="complementary">
			<ul class="xoxo">
						
			<?php 
        $sidebar = $this->data['sidebar'];
        foreach ($sidebar as $boxName => $cont) {
            if ($boxName == 'SEARCH') {
                $this->searchBox();
            } elseif ($boxName == 'LOGO') {
                $this->logo();
            } elseif ($boxName == 'LANGUAGES') {
                $this->languageBox();
            } elseif ($boxName == 'PAGETOC') {
                $this->pageTocBox();
            } elseif ($boxName != 'MENUBAR' && $boxName != 'TOOLBOX') {
                $this->customBox($boxName, $cont);
            }
        }
        ?>
			
			</ul>
		</div><!-- #primary .widget-area -->

	<div id="main" <?php 
        $this->html("specialpageattributes");
        ?>
>
			<div id="content" role="main">			
				<div>
					<h2 class="entry-title"><?php 
        $this->html('title');
        ?>
</h2>
					<div class="entry-meta">
						<?php 
        $this->html('subtitle');
        ?>
					</div><!-- .entry-meta -->
					
					<div class="entry-content">
						<?php 
        $this->html('bodytext');
        ?>
						<?php 
        if ($this->data['catlinks']) {
            $this->html('catlinks');
        }
        ?>
						<?php 
        if ($this->data['dataAfterContent']) {
            $this->html('dataAfterContent');
        }
        ?>
					</div>
				</div>
			
			</div><!-- #content -->
	</div><!-- #main -->

	<div id="footer" role="contentinfo" <?php 
        $this->html('userlangattributes');
        ?>
>
		<div id="colophon">
		    <div id="site-generator">Powered by
				<a href="http://mediawiki.org/" rel="generator">MediaWiki</a>
			</div>
		</div><!-- #colophon -->
        <ul id="content-actions">
            <?php 
        foreach ($this->data['content_actions'] as $key => $tab) {
            echo '
                 <li id="' . Sanitizer::escapeId("ca-{$key}") . '"';
            if ($tab['class']) {
                echo ' class="' . htmlspecialchars($tab['class']) . '"';
            }
            echo '><a href="' . htmlspecialchars($tab['href']) . '"';
            # We don't want to give the watch tab an accesskey if the
            # page is being edited, because that conflicts with the
            # accesskey on the watch checkbox.  We also don't want to
            # give the edit tab an accesskey, because that's fairly su-
            # perfluous and conflicts with an accesskey (Ctrl-E) often
            # used for editing in Safari.
            if (in_array($action, array('edit', 'submit')) && in_array($key, array('edit', 'watch', 'unwatch'))) {
                echo Linker::tooltip("ca-{$key}");
            } else {
                echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs("ca-{$key}"));
            }
            echo '>' . htmlspecialchars($tab['text']) . '</a></li>';
        }
        ?>
        </ul>
	</div><!-- #footer -->

</div><!-- #wrapper -->

<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        ?>
</body>
</html>

	<?php 
        wfRestoreWarnings();
    }
Ejemplo n.º 29
0
    /**
     * Outputs the entire contents of the page
     */
    public function execute()
    {
        global $wgBSWfblink, $wgBSWgooglelink, $wgBSWtwitterlink, $wgBSWyoutubelink, $wgBSWemaillink;
        $this->html('headelement');
        ?>
	<nav id="myNavbar" class="navbar navbar-default navbar-fixed-top" role="nevigation">
	    <div class="container-fluid">
		<div class="navbar-header">
		    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbarCollapse">
			<span class="sr-only">Toggle navigation</span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
		    </button>
		    <a class="navbar-brand" href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" <?php 
        echo Xml::expandAttributes(Linker::tooltipAndAccessKeyAttribs('p-logo'));
        ?>
 >
			<img class="img-responsive" src="<?php 
        $this->text('logopath');
        ?>
" alt="<?php 
        $this->text('sitename');
        ?>
" />
		    </a>
		</div>
		<div class="collapse navbar-collapse" id="navbarCollapse">
		    <ul class="nav navbar-nav">
			<?php 
        $count = 0;
        $actionMenuStart = <<<AMS
\t\t\t\t\t<li class="dropdown">
\t\t\t\t\t\t<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-cog"></span><span class="caret"></span></a>
\t\t\t\t\t\t<ul class="dropdown-menu" role="menu">
AMS;
        $actionMenuEnd = <<<AME
\t\t\t\t\t\t</ul>
\t\t\t\t\t</li>
AME;
        $actionMenuBody = "";
        foreach ($this->data['content_navigation'] as $category => $tabs) {
            foreach ($tabs as $key => $tab) {
                if ($count > 4) {
                    $actionMenuBody .= $this->makeListItem($key, $tab);
                } else {
                    echo $this->makeListItem($key, $tab);
                }
                ++$count;
            }
        }
        echo $actionMenuStart . $actionMenuBody . $actionMenuEnd;
        ?>
		    </ul>
		    <ul class="nav navbar-nav navbar-right">
			<?php 
        if (isset($wgBSWfblink) && trim($wgBSWfblink) != "") {
            ?>
	    		<li><a href="<?php 
            echo $wgBSWfblink;
            ?>
" target="_blank" class="socicon facebook" title="like on facebook">b</a></li>
			<?php 
        }
        ?>
			<?php 
        if (isset($wgBSWtwitterlink) && trim($wgBSWtwitterlink) != "") {
            ?>
	    		<li><a href="<?php 
            echo $wgBSWfblink;
            ?>
" target="_blank" class="socicon twitter" title="Follow on twitter">a</a></li>
			<?php 
        }
        ?>
	
			<?php 
        if (isset($wgBSWyoutubelink) && trim($wgBSWyoutubelink) != "") {
            ?>
	    		<li><a href="<?php 
            echo $wgBSWfblink;
            ?>
" target="_blank" class="socicon youtube" title="subscribe on youtube">r</a></li>
			<?php 
        }
        ?>
			<?php 
        if (isset($wgBSWgooglelink) && trim($wgBSWgooglelink) != "") {
            ?>
	    		<li><a href="<?php 
            echo $wgBSWgooglelink;
            ?>
" target="_blank" class="socicon google" title="follow on google plus">c</a></li>
			<?php 
        }
        ?>
			<?php 
        if (isset($wgBSWemaillink) && trim($wgBSWemaillink) != "") {
            ?>
	    		<li><a href="mailto:<?php 
            echo $wgBSWemaillink;
            ?>
" class="socicon email" title="Email us">@</a></li>
			<?php 
        }
        ?>
			<li class="dropdown">
			    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span><span class="caret"></span></a>
			    <ul class="dropdown-menu" role="menu">
				<?php 
        foreach ($this->getPersonalTools() as $key => $item) {
            echo $this->makeListItem($key, $item);
        }
        ?>
			    </ul>
			</li>
		    </ul>
		</div>
	    </div>
	</nav>
	<div class="container">
	    <?php 
        if ($this->data['newtalk']) {
            ?>
	        <div class="row">
	    	<div class="col-sm-12">
	    	    <div class="bg-info usermessage"><?php 
            $this->html('newtalk');
            ?>
</div>					
	    	</div>
	        </div>
		<?php 
        }
        ?>
	    <?php 
        if ($this->data['sitenotice']) {
            ?>
	        <div class="row">
	    	<div class="col-sm-12">
	    	    <div class="" id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div>					
	    	</div>
	        </div>
		<?php 
        }
        ?>

	    <div class="row">

		<div class="col-xs-12 col-sm-4 col-md-4 col-lg-3" id="sidebar">
		    <div id="search-div">
			<form class="form-inline" role="form" action="<?php 
        $this->text('wgScript');
        ?>
">
			    <div class="form-group">
				<div class="input-group">
				    <input type="hidden" name="title" value="<?php 
        $this->text('searchtitle');
        ?>
" />
				    <?php 
        echo $this->makeSearchInput(array('class' => 'form-control'));
        ?>
				    <div class="input-group-addon"><span class="glyphicon glyphicon-search"></span></div>
				</div>
			    </div>
			</form>
		    </div>

		    <?php 
        foreach ($this->getSidebar() as $boxName => $box) {
            ?>
	    	    <div id="<?php 
            echo Sanitizer::escapeId($box['id']);
            ?>
"<?php 
            echo Linker::tooltip($box['id']);
            ?>
>
	    		<ul class="nav nav-pills nav-stacked left-margin-zero">
	    		    <li class="dropdown">
	    			<a class="side-menu-toggle" data-toggle="" onclick="" href="#"><?php 
            echo htmlspecialchars($box['header']);
            ?>
</a>

				    <?php 
            if (is_array($box['content'])) {
                ?>
					<ul class="nav-pills list-unstyled sub-side-menu" role="menu">
					    <?php 
                foreach ($box['content'] as $key => $item) {
                    echo $this->makeListItem($key, $item);
                }
                ?>
					</ul>
					<?php 
            } else {
                echo $box['content'];
            }
            ?>
	    		    </li>
	    		</ul>
	    	    </div>
	    <?php 
        }
        ?>
		    <?php 
        if ($this->data['language_urls']) {
            ?>
	    	    <ul class="nav nav-pills nav-stacked left-margin-zero">
	    		<li class="dropdown">
	    		    <a class="side-menu-toggle" data-toggle="" onclick="" href="#">Language</a>
	    		    <ul class="nav-pills list-unstyled sub-side-menu" role="menu">
	    <?php 
            foreach ($this->data['language_urls'] as $key => $langLink) {
                echo $this->makeListItem($key, $langLink);
            }
            ?>
	
	    		    </ul>
	    		</li>
	    	    </ul>
	    <?php 
        }
        ?>
		</div>

		<div class="col-xs-12 col-sm-8 col-md-8 col-lg-9" id="maincontent">
		    <h1 id="firstHeading" class="firstHeading"><?php 
        $this->html('title');
        ?>
</h1>
		    <hr/>
	<?php 
        if ($this->data['subtitle']) {
            ?>
<h4 class="small" ><?php 
            $this->html('subtitle');
            ?>
</h4><?php 
        }
        ?>
		    <?php 
        if ($this->data['undelete']) {
            ?>
<h4 class="small" ><?php 
            $this->html('undelete');
            ?>
</h4><?php 
        }
        ?>
		    <div id="bodyContent"><?php 
        $this->html('bodytext');
        ?>
</div>
		    <?php 
        $this->html('catlinks');
        ?>
		    <?php 
        $this->html('dataAfterContent');
        ?>
		</div>
	    </div>

	    <hr/>
	    <div class="row">
		<div class="col-sm-12 text-center">
		    <footer>
	<?php 
        foreach ($this->getFooterIcons('icononly') as $blockName => $footerIcons) {
            foreach ($footerIcons as $icon) {
                echo $this->getSkin()->makeFooterIcon($icon);
            }
        }
        ?>
			<a href="https://www.examsmyantra.com" title="Designed By ExamsMyantra" id="em-logo"></a>
		    </footer>
		</div>
	    </div>
	</div>	
	<a href="javascript:void(0);" id="top"><span class="glyphicon glyphicon-arrow-up"></span></a>
	<?php 
        $this->printTrail();
        ?>
	</body>
	</html>
	<?php 
    }
Ejemplo n.º 30
0
    /**
     * Outputs the logo and (optionally) site title
     */
    private function outputLogo($id = 'p-logo', $part = 'both')
    {
        ?>
		<div id="<?php 
        echo $id;
        ?>
" class="mw-portlet" role="banner">
			<?php 
        if ($part !== 'text') {
            ?>
				<a
					class="mw-wiki-logo"
					href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
            ?>
" <?php 
            echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
            ?>
></a>
				<?php 
        }
        if ($part !== 'image') {
            $titleClass = '';
            $siteTitle = $this->getMsg('timeless-sitetitle')->escaped();
            // width is 11em; 13 characters will probably fit?
            if (mb_strlen($siteTitle) > 13) {
                $titleClass = 'long';
            }
            ?>
				<a id="p-banner" class="mw-wiki-title <?php 
            echo $titleClass;
            ?>
" href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
            ?>
">
					<?php 
            echo $siteTitle;
            ?>
				</a>
				<?php 
        }
        ?>
		</div>
		<?php 
    }