コード例 #1
0
    public function execute()
    {
        global $wgUser;
        global $wgForegroundFeatures;
        wfSuppressWarnings();
        $this->html('headelement');
        switch ($wgForegroundFeatures['NavWrapperType']) {
            case '0':
                break;
            case 'divonly':
                echo "<div id='navwrapper'>";
                break;
            default:
                echo "<div id='navwrapper' class='" . $wgForegroundFeatures['NavWrapperType'] . "'>";
                break;
        }
        // Set default variables for footer and switch them if 'showFooterIcons' => true
        $footerLeftClass = 'small-8 large-centered columns text-center';
        $footerRightClass = 'large-12 small-12 columns';
        $poweredbyType = "nocopyright";
        $poweredbyMakeType = 'withoutImage';
        switch ($wgForegroundFeatures['showFooterIcons']) {
            case true:
                $footerLeftClass = 'large-8 small-12 columns';
                $footerRightClass = 'large-4 small-12 columns';
                $poweredbyType = "icononly";
                $poweredbyMakeType = 'withImage';
                break;
            default:
                break;
        }
        ?>
<!-- START FOREGROUNDTEMPLATE -->
<!-- Mozilla hispano customization -->
<link rel="stylesheet" type="text/css" href="//mozorg.cdn.mozilla.net/media/css/tabzilla-min.css"/>
<div id="tullido">
<?php 
        echo pintaCabecera();
        ?>

<!-- /Mozilla hispano customization -->
		<nav class="top-bar">
			<ul class="title-area">
				<li class="name">
					<h1 class="title-name">
					<a href="<?php 
        echo $this->data['nav_urls']['mainpage']['href'];
        ?>
">
					<?php 
        if ($wgForegroundFeatures['navbarIcon'] != '0') {
            ?>
						<img alt="<?php 
            echo $this->text('sitename');
            ?>
" src="<?php 
            echo $this->text('logopath');
            ?>
" style="max-width: 64px;height:auto; max-height:36px; display: inline-block; vertical-align:middle;">
					<?php 
        }
        ?>
					
					<div class="title-name" style="display: inline-block;"><?php 
        echo $wgForegroundFeatures['wikiName'];
        ?>
</div>
					</a>
					</h1>
				</li>
				<li class="toggle-topbar menu-icon">
					<a href="#"><span><?php 
        echo wfMessage('foreground-menutitle')->text();
        ?>
</span></a>
				</li>
			</ul>

		<section class="top-bar-section">

			<ul id="top-bar-left" class="left">
				<li class="divider"></li>
					<?php 
        foreach ($this->getSidebar() as $boxName => $box) {
            if ($box['header'] != wfMessage('toolbox')->text()) {
                ?>
				<li class="has-dropdown active"  id='<?php 
                echo Sanitizer::escapeId($box['id']);
                ?>
'<?php 
                echo Linker::tooltip($box['id']);
                ?>
>
					<a href="#"><?php 
                echo htmlspecialchars($box['header']);
                ?>
</a>
						<?php 
                if (is_array($box['content'])) {
                    ?>
							<ul class="dropdown">
								<?php 
                    foreach ($box['content'] as $key => $item) {
                        echo $this->makeListItem($key, $item);
                    }
                    ?>
							</ul>
								<?php 
                }
            }
            ?>
						<?php 
        }
        ?>
			</ul>

			<ul id="top-bar-right" class="right">
				<li class="has-form">
					<form action="<?php 
        $this->text('wgScript');
        ?>
" id="searchform" class="mw-search">
						<div class="row">
						<div class="small-12 columns">
							<?php 
        echo $this->makeSearchInput(array('placeholder' => wfMessage('searchsuggest-search')->text(), 'id' => 'searchInput'));
        ?>
							<button type="submit" class="button search"><?php 
        echo wfMessage('search')->text();
        ?>
</button>
						</div>
						</div>
					</form>
				</li>
				<li class="divider show-for-small"></li>
				<li class="has-form">

				<li class="has-dropdown active"><a href="#"><i class="fa fa-cogs"></i></a>
					<ul id="toolbox-dropdown" class="dropdown">
						<?php 
        foreach ($this->getToolbox() as $key => $item) {
            echo $this->makeListItem($key, $item);
        }
        ?>
						<?php 
        if ($wgForegroundFeatures['showRecentChangesUnderTools']) {
            ?>
<li id="n-recentchanges"><?php 
            echo Linker::specialLink('Recentchanges');
            ?>
</li><?php 
        }
        ?>
						<?php 
        if ($wgForegroundFeatures['showHelpUnderTools']) {
            ?>
<li id="n-help" <?php 
            echo Linker::tooltip('help');
            ?>
><a href="/wiki/Help:Contents"><?php 
            echo wfMessage('help')->text();
            ?>
</a></li><?php 
        }
        ?>
					</ul>
				</li>

				<?php 
        if ($wgUser->isLoggedIn()) {
            ?>
				<li id="personal-tools-dropdown" class="has-dropdown active"><a href="#"><i class="fa fa-user"></i></a>
					<ul class="dropdown">
						<?php 
            foreach ($this->getPersonalTools() as $key => $item) {
                echo $this->makeListItem($key, $item);
            }
            ?>
					</ul>
				</li>

						<?php 
        } else {
            ?>
							<li>
								<?php 
            if (isset($this->data['personal_urls']['anonlogin'])) {
                ?>
								<a href="<?php 
                echo $this->data['personal_urls']['anonlogin']['href'];
                ?>
"><?php 
                echo wfMessage('login')->text();
                ?>
</a>
								<?php 
            } elseif (isset($this->data['personal_urls']['login'])) {
                ?>
									<a href="<?php 
                echo htmlspecialchars($this->data['personal_urls']['login']['href']);
                ?>
"><?php 
                echo wfMessage('login')->text();
                ?>
</a>
									<?php 
            } else {
                ?>
										<?php 
                echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage('login')->text());
                ?>
									<?php 
            }
            ?>
							</li>

				<?php 
        }
        ?>

			</ul>
		</section>
		</nav>
		<?php 
        if ($wgForegroundFeatures['NavWrapperType'] != '0') {
            echo "</div>";
        }
        ?>
		
		<div id="page-content">
		<div class="row">
				<div class="large-12 columns">
				<!--[if lt IE 9]>
				<div id="siteNotice" class="sitenotice panel radius"><?php 
        echo $this->text('sitename') . ' ' . wfMessage('foreground-browsermsg')->text();
        ?>
</div>
				<![endif]-->

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

		<div id="mw-js-message" style="display:none;"></div>

		<div class="row">
				<div id="p-cactions" class="large-12 columns">
					<?php 
        if ($wgUser->isLoggedIn() || $wgForegroundFeatures['showActionsForAnon']) {
            ?>
						<a href="#" data-dropdown="drop1" class="button dropdown small secondary radius"><i class="fa fa-cog"><span class="show-for-medium-up">&nbsp;<?php 
            echo wfMessage('actions')->text();
            ?>
</span></i></a>
						<ul id="drop1" class="views large-12 columns f-dropdown">
							<?php 
            foreach ($this->data['content_actions'] as $key => $item) {
                echo preg_replace(array('/\\sprimary="1"/', '/\\scontext="[a-z]+"/', '/\\srel="archives"/'), '', $this->makeListItem($key, $item));
            }
            ?>
							<?php 
            wfRunHooks(SkinTemplateToolboxEnd, array(&$this, true));
            ?>
						</ul>
						<?php 
            if ($wgUser->isLoggedIn()) {
                ?>
							<div id="echo-notifications"></div>
						<?php 
            }
            ?>
					<?php 
        }
        $namespace = str_replace('_', ' ', $this->getSkin()->getTitle()->getNsText());
        $displaytitle = $this->data['title'];
        if (!empty($namespace)) {
            $pagetitle = $this->getSkin()->getTitle();
            $newtitle = str_replace($namespace . ':', '', $pagetitle);
            $displaytitle = str_replace($pagetitle, $newtitle, $displaytitle);
            ?>
<h4 class="namespace label"><?php 
            print $namespace;
            ?>
</h4><?php 
        }
        ?>
					<h2 class="title"><?php 
        print $displaytitle;
        ?>
</h2>
					<?php 
        if ($this->data['isarticle']) {
            ?>
<h3 id="tagline"><?php 
            $this->msg('tagline');
            ?>
</h3><?php 
        }
        ?>
					<h5 class="subtitle"><?php 
        $this->html('subtitle');
        ?>
</h5>
					<div class="clear_both"></div>
					<div class="mw-bodytext">
						<?php 
        $this->html('bodytext');
        ?>
						<div class="clear_both"></div>
					</div>
		    	<div class="group"><?php 
        $this->html('catlinks');
        ?>
</div>
		    	<?php 
        $this->html('dataAfterContent');
        ?>
		    </div>
		</div>

			<footer class="row">
				<div id="footer">
					<?php 
        if ($wgForegroundFeatures['addThisFollowPUBID'] != '') {
            ?>
						<div class="social-footer large-12 small-12 columns">
							<div class="social-links">
							<!-- Go to www.addthis.com/dashboard to customize your tools -->
							<div class="addthis_horizontal_follow_toolbox"></div>
							<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php 
            echo $wgForegroundFeatures['addThisFollowPUBID'];
            ?>
"></script>
							</div>
						</div>
					<?php 
        }
        ?>
					<div id="footer-left" class="<?php 
        echo $footerLeftClass;
        ?>
">
					<ul id="footer-left">
						<?php 
        foreach ($this->getFooterLinks("flat") as $key) {
            ?>
							<li id="footer-<?php 
            echo $key;
            ?>
"><?php 
            $this->html($key);
            ?>
</li>
						<?php 
        }
        ?>
									
					</ul>
					</div>	
					<div id="footer-right-icons" class="<?php 
        echo $footerRightClass;
        ?>
">
					<ul id="poweredby">
						<?php 
        foreach ($this->getFooterIcons($poweredbyType) as $blockName => $footerIcons) {
            ?>
							<li class="<?php 
            echo $blockName;
            ?>
"><?php 
            foreach ($footerIcons as $icon) {
                ?>
								<?php 
                echo $this->getSkin()->makeFooterIcon($icon, $poweredbyMakeType);
                ?>
								<?php 
            }
            ?>
							</li>
						<?php 
        }
        ?>
					</ul>
					</div>								
				</div>
			</footer>

		</div>
</div><!-- tullido -->
		<?php 
        $this->printTrail();
        ?>
		<?php 
        echo pintaPie();
        ?>

		</body>
		</html>

<?php 
        wfRestoreWarnings();
    }
コード例 #2
0
<?php

echo pintaPie();
コード例 #3
0
    /**
     * Template filter callback for bookjive 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 $wgUser;
        $skin = $wgUser->getSkin();
        // Suppress warnings to prevent notices about missing indexes in $this->data
        wfSuppressWarnings();
        ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
        $this->text('lang');
        ?>
" lang="<?php 
        $this->text('lang');
        ?>
" dir="<?php 
        $this->text('dir');
        ?>
">
  <head>
    <meta http-equiv="Content-Type" content="<?php 
        $this->text('mimetype');
        ?>
; charset=<?php 
        $this->text('charset');
        ?>
" />
    <?php 
        $this->html('headlinks');
        ?>
    <title><?php 
        $this->text('pagetitle');
        ?>
</title>
    <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/main.css?20111201"; /*]]>*/</style>



	<?php 
        echo pintaCss();
        ?>

    <link rel="stylesheet" type="text/css" <?php 
        if (empty($this->data['printable'])) {
            ?>
media="print"<?php 
        }
        ?>
 href="<?php 
        $this->text('stylepath');
        ?>
/common/commonPrint.css" />
    <!--[if lt IE 5.5000]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE50Fixes.css";</style><![endif]-->
    <!--[if IE 5.5000]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE55Fixes.css";</style><![endif]-->
    <!--[if gte IE 6]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE60Fixes.css";</style><![endif]-->
    <!--[if IE]><script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/IEFixes.js"></script>
    <meta http-equiv="imagetoolbar" content="no" /><![endif]-->
	<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>
	<!-- Css links -->
	<?php 
        $this->html('csslinks');
        ?>

<?php 
        if ($this->data['jsvarurl']) {
            ?>
		<script type="<?php 
            $this->text('jsmimetype');
            ?>
" src="<?php 
            $this->text('jsvarurl');
            ?>
"><!-- site js --></script>
<?php 
        }
        if ($this->data['pagecss']) {
            ?>
		<style type="text/css"><?php 
            $this->html('pagecss');
            ?>
</style>
<?php 
        }
        if ($this->data['usercss']) {
            ?>
		<style type="text/css"><?php 
            $this->html('usercss');
            ?>
</style>
<?php 
        }
        if ($this->data['userjs']) {
            ?>
		<script type="<?php 
            $this->text('jsmimetype');
            ?>
" src="<?php 
            $this->text('userjs');
            ?>
"></script>
<?php 
        }
        if ($this->data['userjsprev']) {
            ?>
		<script type="<?php 
            $this->text('jsmimetype');
            ?>
"><?php 
            $this->html('userjsprev');
            ?>
</script>
<?php 
        }
        if ($this->data['trackbackhtml']) {
            print $this->data['trackbackhtml'];
        }
        ?>

		<!-- Semantic mediawiki -->
		<link rel="stylesheet" type="text/css" href="/documentacion/extensions/SemanticMediaWiki/skins/SMW_custom.css" />
<!-- TODO: 2012-11-18 en cuarentena, si pasado un tiempo prudencial no ha ocurrido nada eliminar este SMW_sorttable.js
        <script type="text/javascript" src="/documentacion/extensions/SemanticMediaWiki/skins/SMW_sorttable.js"></script>
-->

		<!-- Head Scripts -->
		<?php 
        $this->html('headscripts');
        ?>

		<?php 
        echo pintaJs();
        ?>

		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
  </head>
  <body <?php 
        if ($this->data['body_ondblclick']) {
            ?>
ondblclick="<?php 
            $this->text('body_ondblclick');
            ?>
"<?php 
        }
        if ($this->data['body_onload']) {
            ?>
onload="<?php 
            $this->text('body_onload');
            ?>
"<?php 
        }
        ?>
 class="mediawiki <?php 
        $this->text('nsclass');
        ?>
 <?php 
        $this->text('dir');
        ?>
 <?php 
        $this->text('pageclass');
        ?>
">

<div id="lienzo">
	<div id="tullido">
		<?php 
        echo pintaCabecera();
        ?>
		<div id="cuerpo" class="clearfix">
			<div id="contenido">
							<div id="cont_wiki">
								<div id="column-content">
									<div id="content">
										<a id="contentTop"></a>

										<div id="p-cactions">
										<ul>
											<?php 
        foreach ($this->data['content_actions'] as $key => $tab) {
            ?>
											<li id="ca-<?php 
            echo Sanitizer::escapeId($key);
            ?>
"<?php 
            if ($tab['class']) {
                ?>
 class="<?php 
                echo htmlspecialchars($tab['class']);
                ?>
"<?php 
            }
            ?>
><a href="<?php 
            echo htmlspecialchars($tab['href']);
            ?>
"<?php 
            echo $skin->tooltipAndAccesskeyAttribs('ca-' . $key);
            ?>
><?php 
            echo htmlspecialchars($tab['text']);
            ?>
</a> </li>
											<?php 
        }
        ?>
										</ul>
									</div>

									<?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>
									<h2 class="firstHeading"><?php 
        $this->text('title');
        ?>
</h2>

									<div id="bodyContent">

										<h3 id="siteSub"><?php 
        $this->msg('tagline');
        ?>
</h3>
										<div id="contentSub"><?php 
        $this->html('subtitle');
        ?>
</div>
										<?php 
        if ($this->data['undelete']) {
            ?>
<div id="contentSub"><?php 
            $this->html('undelete');
            ?>
</div><?php 
        }
        ?>
										<?php 
        if ($this->data['newtalk']) {
            ?>
<div class="usermessage"><?php 
            $this->html('newtalk');
            ?>
</div><?php 
        }
        ?>

										<?php 
        $this->html('bodytext');
        ?>
										
										<?php 
        if ($this->data['catlinks']) {
            ?>
<div id="catlinks"><?php 
            $this->html('catlinks');
            ?>
</div><?php 
        }
        ?>
										<!-- end content -->
										<div class="visualClear"></div>
		  						</div> <!-- bodycontent -->
								</div> <!-- content -->

	      				<div id="footer">

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

		  						<?php 
        if ($this->data['lastmod']) {
            $this->html('lastmod');
            ?>
 - <?php 
        }
        ?>
		  						<?php 
        if ($this->data['viewcount']) {
            $this->html('viewcount');
            ?>
 - <?php 
        }
        ?>
		  						<?php 
        if ($this->data['numberofwatchingusers']) {
            $this->html('numberofwatchingusers');
            ?>
 - <?php 
        }
        ?>
									<!--
										  <?php 
        if ($this->data['credits']) {
            $this->html('credits');
            ?>
 - <?php 
        }
        ?>
										  <?php 
        if ($this->data['about']) {
            $this->html('about');
            ?>
 - <?php 
        }
        ?>
										  <?php 
        if ($this->data['disclaimer']) {
            $this->html('disclaimer');
            ?>
 - <?php 
        }
        ?>
										  <?php 
        if ($this->data['tagline']) {
            echo $this->data['tagline'];
            ?>
 - <?php 
        }
        ?>
									-->
					      </div>
	      			</div> <!-- column content -->
	      			</div>
	      			<div id="barra-small">
								  <!--
								  <div class="portlet" id="p-logo">
								  <a style="background-image: url(<?php 
        $this->text('logopath');
        ?>
);"
									href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
"
									title="<?php 
        $this->msg('mainpage');
        ?>
"></a>
									</div>
									-->
									<script type="<?php 
        $this->text('jsmimetype');
        ?>
"> if (window.isMSIE55) fixalpha(); </script>

									<div id="buscador" class="portlet">
										<div id="searchBody" class="pBody">
											<!-- <form action="<?php 
        $this->text('searchaction');
        ?>
"> y el name del input era search -->
											<form action="/buscar.php">
											<div>
												<input name="donde" type="hidden" value="docu" />
												<input name="desde" type="hidden" value="docu" />
												<input class="text" id="q" name="q" type="text" <?php 
        if ($this->haveMsg('accesskey-search')) {
            ?>
accesskey="<?php 
            $this->msg('accesskey-search');
            ?>
"<?php 
        }
        if (isset($this->data['search'])) {
            ?>
 value="<?php 
            $this->text('search');
            ?>
"<?php 
        }
        ?>
 />
												<!--<input type='submit' name="go" class="searchButton" id="searchGoButton"	value="<?php 
        $this->msg('go');
        ?>
" />&nbsp;-->
												<input type='submit' name="fulltext" class="submit" value="<?php 
        $this->msg('search');
        ?>
" />
											</div>
											</form>
										</div>
									</div>
                                <?php 
        foreach ($this->data['sidebar'] as $bar => $cont) {
            ?>
                                
                                <div class='portlet caja' id='p-<?php 
            echo htmlspecialchars($bar);
            ?>
'>
								  <h3><span><?php 
            $out = wfMsg($bar);
            if (wfEmptyMsg($bar, $out)) {
                echo $bar;
            } else {
                echo $out;
            }
            ?>
</span></h3>
								  <div class='pBody'>
									<ul class="cajacontenido">
							<?php 
            foreach ($cont as $key => $val) {
                ?>
											<li id="<?php 
                echo htmlspecialchars($val['id']);
                ?>
"<?php 
                if ($val['active']) {
                    ?>
 class="active" <?php 
                }
                ?>
><a href="<?php 
                echo htmlspecialchars($val['href']);
                ?>
"><?php 
                echo htmlspecialchars($val['text']);
                ?>
</a></li>
							<?php 
            }
            ?>
									</ul>
								  </div>
							    </div>
				<?php 
        }
        ?>

				<!--div id="p-cactions" class="portlet">
				  <h5><?php 
        $this->msg('views');
        ?>
</h5>
				  <ul>
					<?php 
        foreach ($this->data['content_actions'] as $key => $action) {
            ?>
<li id="ca-<?php 
            echo htmlspecialchars($key);
            ?>
"
					   <?php 
            if ($action['class']) {
                ?>
class="<?php 
                echo htmlspecialchars($action['class']);
                ?>
"<?php 
            }
            ?>
					   ><a href="<?php 
            echo htmlspecialchars($action['href']);
            ?>
"><?php 
            echo htmlspecialchars($action['text']);
            ?>
</a></li><?php 
        }
        ?>
				  </ul>
				</div-->
				<div class="portlet caja" id="p-personal">


				 <!-- p-personal -->
				  <h3><span><?php 
        $this->msg('personaltools');
        ?>
</span></h3>
				  <div class="pBody">
					<ul class="cajacontenido">
					<?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
<li id="pt-<?php 
            echo htmlspecialchars($key);
            ?>
"><a href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
"<?php 
            if (!empty($item['class'])) {
                ?>
 class="<?php 
                echo htmlspecialchars($item['class']);
                ?>
"<?php 
            }
            ?>
><?php 
            echo htmlspecialchars($item['text']);
            ?>
</a></li><?php 
        }
        ?>
					</ul>
				</div>
				</div>

				<div class="portlet caja" id="p-tb">
				  <h3><span><?php 
        $this->msg('toolbox');
        ?>
</span></h3>
				  <div class="pBody">
					<ul class="cajacontenido">
					  <?php 
        if ($this->data['notspecialpage']) {
            foreach (array('whatlinkshere', 'recentchangeslinked') as $special) {
                ?>
					  <li id="t-<?php 
                echo $special;
                ?>
"><a href="<?php 
                echo htmlspecialchars($this->data['nav_urls'][$special]['href']);
                ?>
"><?php 
                echo $this->msg($special);
                ?>
</a></li>
					  <?php 
            }
        }
        ?>
					  <?php 
        if (isset($this->data['nav_urls']['trackbacklink'])) {
            ?>
					  <li id="t-trackbacklink"><a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href']);
            ?>
"><?php 
            echo $this->msg('trackbacklink');
            ?>
</a></li>
					  <?php 
        }
        ?>
					  <?php 
        if ($this->data['feeds']) {
            ?>
<li id="feedlinks"><?php 
            foreach ($this->data['feeds'] as $key => $feed) {
                ?>
<span id="feed-<?php 
                echo htmlspecialchars($key);
                ?>
"><a href="<?php 
                echo htmlspecialchars($feed['href']);
                ?>
"><?php 
                echo htmlspecialchars($feed['text']);
                ?>
</a> </span>
					<?php 
            }
            ?>
</li><?php 
        }
        ?>
					  <?php 
        foreach (array('contributions', 'emailuser', 'upload', 'specialpages') as $special) {
            ?>
					  <?php 
            if ($this->data['nav_urls'][$special]) {
                ?>
<li id="t-<?php 
                echo $special;
                ?>
"><a href="<?php 
                echo htmlspecialchars($this->data['nav_urls'][$special]['href']);
                ?>
"><?php 
                $this->msg($special);
                ?>
</a></li><?php 
            }
            ?>
					  <?php 
        }
        ?>
					  <?php 
        if (!empty($this->data['nav_urls']['print']['href'])) {
            ?>
					  <li id="t-print"><a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['print']['href']);
            ?>
"><?php 
            echo $this->msg('printableversion');
            ?>
</a></li>
					  <?php 
        }
        ?>
					</ul>
				  </div>
				</div>
				<?php 
        if ($this->data['language_urls']) {
            ?>
<div id="p-lang" class="portlet">
				  <h5><?php 
            $this->msg('otherlanguages');
            ?>
</h5>
				  <div class="pBody">
					<ul>
					  <?php 
            foreach ($this->data['language_urls'] as $langlink) {
                ?>
					  <li class="<?php 
                echo htmlspecialchars($langlink['class']);
                ?>
">
					  <a href="<?php 
                echo htmlspecialchars($langlink['href']);
                ?>
"><?php 
                echo $langlink['text'];
                ?>
</a>
					  </li>
					  <?php 
            }
            ?>
					</ul>
				  </div>
				</div>
				<?php 
        }
        ?>

				<h3>Comprueba tus plugins</h3>
				<p><a href="http://www.mozilla.com/plugincheck/"><img src="https://support.mozilla.org/media/img/promo.plugins.png" alt="Plugins" /></a></p>
				<p>¿Qué es un plugin? ¿Por qué debo mantenerlos actualizados? Responde a estas preguntas e inicia una verificación instantánea para comprobar su actualización.</p>
				<p><a href="http://www.mozilla.com/plugincheck/">Más información »</a></p>

				</div>
	      		</div><!-- contenido -->
		</div><!-- Cuerpo -->
	</div><!-- tullido -->
	</div><!-- lienzo -->
	<?php 
        echo pintaPie();
        ?>

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

	<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        ?>
	<!--<script type="text/javascript" src="/wp-content/themes/mozillahispano/js/jquery.js"></script>-->
	<!--<script type="text/javascript" src="/documentacion/extensions/SemanticForms/libs/jquery-1.4.2.min.js"></script>-->
	<script type="text/javascript" src="/wp-content/themes/mozillahispano2/js/jquery.cookie.js"></script>
	<script type="text/javascript" src="/wp-content/themes/mozillahispano2/js/barraHerramientas.js"></script>
	<!-- CMO Scripts-->
	<script type="text/javascript" src="/wp-content/themes/mozillahispano2/js/documentacionTopicbox.js"></script>
	<script type="text/javascript" src="/wp-content/themes/mozillahispano2/js/documentacion.js"></script>
  </body>
</html>
<?php 
        wfRestoreWarnings();
    }
コード例 #4
0
/**
* Generate page header
*/
function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum')
{
    global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path;
    if (defined('HEADER_INC')) {
        return;
    }
    define('HEADER_INC', true);
    // gzip_compression
    if ($config['gzip_compress']) {
        // to avoid partially compressed output resulting in blank pages in
        // the browser or error messages, compression is disabled in a few cases:
        //
        // 1) if headers have already been sent, this indicates plaintext output
        //    has been started so further content must not be compressed
        // 2) the length of the current output buffer is non-zero. This means
        //    there is already some uncompressed content in this output buffer
        //    so further output must not be compressed
        // 3) if more than one level of output buffering is used because we
        //    cannot test all output buffer level content lengths. One level
        //    could be caused by php.ini output_buffering. Anything
        //    beyond that is manual, so the code wrapping phpBB in output buffering
        //    can easily compress the output itself.
        //
        if (@extension_loaded('zlib') && !headers_sent() && ob_get_level() <= 1 && ob_get_length() == 0) {
            ob_start('ob_gzhandler');
        }
    }
    // Generate logged in/logged out status
    if ($user->data['user_id'] != ANONYMOUS) {
        $u_login_logout = append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=logout', true, $user->session_id);
        $l_login_logout = sprintf($user->lang['LOGOUT_USER'], $user->data['username']);
    } else {
        $u_login_logout = append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=login');
        $l_login_logout = $user->lang['LOGIN'];
    }
    // Last visit date/time
    $s_last_visit = $user->data['user_id'] != ANONYMOUS ? $user->format_date($user->data['session_last_visit']) : '';
    // Get users online list ... if required
    $l_online_users = $online_userlist = $l_online_record = $l_online_time = '';
    if ($config['load_online'] && $config['load_online_time'] && $display_online_list) {
        /**
         * Load online data:
         * For obtaining another session column use $item and $item_id in the function-parameter, whereby the column is session_{$item}_id.
         */
        $item_id = max($item_id, 0);
        $online_users = obtain_users_online($item_id, $item);
        $user_online_strings = obtain_users_online_string($online_users, $item_id, $item);
        $l_online_users = $user_online_strings['l_online_users'];
        $online_userlist = $user_online_strings['online_userlist'];
        $total_online_users = $online_users['total_online'];
        if ($total_online_users > $config['record_online_users']) {
            set_config('record_online_users', $total_online_users, true);
            set_config('record_online_date', time(), true);
        }
        $l_online_record = sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date'], false, true));
        $l_online_time = $config['load_online_time'] == 1 ? 'VIEW_ONLINE_TIME' : 'VIEW_ONLINE_TIMES';
        $l_online_time = sprintf($user->lang[$l_online_time], $config['load_online_time']);
    }
    $l_privmsgs_text = $l_privmsgs_text_unread = '';
    $s_privmsg_new = false;
    // Obtain number of new private messages if user is logged in
    if (!empty($user->data['is_registered'])) {
        if ($user->data['user_new_privmsg']) {
            $l_message_new = $user->data['user_new_privmsg'] == 1 ? $user->lang['NEW_PM'] : $user->lang['NEW_PMS'];
            $l_privmsgs_text = sprintf($l_message_new, $user->data['user_new_privmsg']);
            if (!$user->data['user_last_privmsg'] || $user->data['user_last_privmsg'] > $user->data['session_last_visit']) {
                $sql = 'UPDATE ' . USERS_TABLE . '
					SET user_last_privmsg = ' . $user->data['session_last_visit'] . '
					WHERE user_id = ' . $user->data['user_id'];
                $db->sql_query($sql);
                $s_privmsg_new = true;
            } else {
                $s_privmsg_new = false;
            }
        } else {
            $l_privmsgs_text = $user->lang['NO_NEW_PM'];
            $s_privmsg_new = false;
        }
        $l_privmsgs_text_unread = '';
        if ($user->data['user_unread_privmsg'] && $user->data['user_unread_privmsg'] != $user->data['user_new_privmsg']) {
            $l_message_unread = $user->data['user_unread_privmsg'] == 1 ? $user->lang['UNREAD_PM'] : $user->lang['UNREAD_PMS'];
            $l_privmsgs_text_unread = sprintf($l_message_unread, $user->data['user_unread_privmsg']);
        }
    }
    $forum_id = request_var('f', 0);
    $topic_id = request_var('t', 0);
    $s_feed_news = false;
    // Get option for news
    if ($config['feed_enable']) {
        $sql = 'SELECT forum_id
			FROM ' . FORUMS_TABLE . '
			WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_NEWS, '<> 0');
        $result = $db->sql_query_limit($sql, 1, 0, 600);
        $s_feed_news = (int) $db->sql_fetchfield('forum_id');
        $db->sql_freeresult($result);
    }
    // Determine board url - we may need it later
    $board_url = generate_board_url() . '/';
    $web_path = defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH ? $board_url : $phpbb_root_path;
    // Which timezone?
    $tz = $user->data['user_id'] != ANONYMOUS ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
    // Send a proper content-language to the output
    $user_lang = $user->lang['USER_LANG'];
    if (strpos($user_lang, '-x-') !== false) {
        $user_lang = substr($user_lang, 0, strpos($user_lang, '-x-'));
    }
    $s_search_hidden_fields = array();
    if ($_SID) {
        $s_search_hidden_fields['sid'] = $_SID;
    }
    if (!empty($_EXTRA_URL)) {
        foreach ($_EXTRA_URL as $url_param) {
            $url_param = explode('=', $url_param, 2);
            $s_hidden_fields[$url_param[0]] = $url_param[1];
        }
    }
    if (!empty($_EXTRA_URL)) {
        foreach ($_EXTRA_URL as $url_param) {
            $url_param = explode('=', $url_param, 2);
            $s_hidden_fields[$url_param[0]] = $url_param[1];
        }
    }
    // Varibles para generar {CABECERA} y {PIE}
    // Archivo con la cabecera y pie común
    include_once 'cabecera-pie.php';
    $cabecera = pintaCabecera();
    $pie = pintaPie();
    $pintacss = pintaCss();
    $pintajs = pintaJs();
    // The following assigns all _common_ variables that may be used at any point in a template.
    $template->assign_vars(array('U_SEARCH_UNSOLVED_TOPICS' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=unsolved_topics'), 'U_SEARCH_YOUR_UNSOLVED_TOPICS' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=your_unsolved_topics'), 'SITENAME' => $config['sitename'], 'SITE_DESCRIPTION' => $config['site_desc'], 'PAGE_TITLE' => $page_title, 'SCRIPT_NAME' => str_replace('.' . $phpEx, '', $user->page['page_name']), 'LAST_VISIT_DATE' => sprintf($user->lang['YOU_LAST_VISIT'], $s_last_visit), 'LAST_VISIT_YOU' => $s_last_visit, 'CURRENT_TIME' => sprintf($user->lang['CURRENT_TIME'], $user->format_date(time(), false, true)), 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, 'RECORD_USERS' => $l_online_record, 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, 'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'], 'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'], 'S_USER_NEW' => $user->data['user_new'], 'SID' => $SID, '_SID' => $_SID, 'SESSION_ID' => $user->session_id, 'ROOT_PATH' => $phpbb_root_path, 'BOARD_URL' => $board_url, 'L_LOGIN_LOGOUT' => $l_login_logout, 'L_INDEX' => $user->lang['FORUM_INDEX'], 'L_ONLINE_EXPLAIN' => $l_online_time, 'U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=pm&amp;folder=inbox'), 'U_RETURN_INBOX' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=pm&amp;folder=inbox'), 'U_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=pm&amp;mode=popup'), 'UA_POPUP_PM' => addslashes(append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=pm&amp;mode=popup')), 'U_MEMBERLIST' => append_sid("{$phpbb_root_path}memberlist.{$phpEx}"), 'U_VIEWONLINE' => $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel') ? append_sid("{$phpbb_root_path}viewonline.{$phpEx}") : '', 'U_LOGIN_LOGOUT' => $u_login_logout, 'U_INDEX' => append_sid("{$phpbb_root_path}index.{$phpEx}"), 'U_SEARCH' => append_sid("{$phpbb_root_path}search.{$phpEx}"), 'U_REGISTER' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=register'), 'U_PROFILE' => append_sid("{$phpbb_root_path}ucp.{$phpEx}"), 'U_MODCP' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", false, true, $user->session_id), 'U_FAQ' => append_sid("{$phpbb_root_path}faq.{$phpEx}"), 'U_SEARCH_SELF' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=egosearch'), 'U_SEARCH_NEW' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=newposts'), 'U_SEARCH_UNANSWERED' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=unanswered'), 'U_SEARCH_UNREAD' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=unreadposts'), 'U_SEARCH_ACTIVE_TOPICS' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=active_topics'), 'U_DELETE_COOKIES' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=delete_cookies'), 'U_TEAM' => $user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile') ? '' : append_sid("{$phpbb_root_path}memberlist.{$phpEx}", 'mode=leaders'), 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=terms'), 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=privacy'), 'U_RESTORE_PERMISSIONS' => $user->data['user_perm_from'] && $auth->acl_get('a_switchperm') ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=restore_perm') : '', 'U_FEED' => generate_board_url() . "/feed.{$phpEx}", 'S_USER_LOGGED_IN' => $user->data['user_id'] != ANONYMOUS ? true : false, 'S_AUTOLOGIN_ENABLED' => $config['allow_autologin'] ? true : false, 'S_BOARD_DISABLED' => $config['board_disable'] ? true : false, 'S_REGISTERED_USER' => !empty($user->data['is_registered']) ? true : false, 'S_IS_BOT' => !empty($user->data['is_bot']) ? true : false, 'S_USER_PM_POPUP' => $user->optionget('popuppm'), 'S_USER_LANG' => $user_lang, 'S_USER_BROWSER' => isset($user->data['session_browser']) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'], 'S_USERNAME' => $user->data['username'], 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], 'S_CONTENT_FLOW_BEGIN' => $user->lang['DIRECTION'] == 'ltr' ? 'left' : 'right', 'S_CONTENT_FLOW_END' => $user->lang['DIRECTION'] == 'ltr' ? 'right' : 'left', 'S_CONTENT_ENCODING' => 'UTF-8', 'S_TIMEZONE' => $user->data['user_dst'] || $user->data['user_id'] == ANONYMOUS && $config['board_dst'] ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''), 'S_DISPLAY_ONLINE_LIST' => $l_online_time ? 1 : 0, 'S_DISPLAY_SEARCH' => !$config['load_search'] ? 0 : (isset($auth) ? $auth->acl_get('u_search') && $auth->acl_getf_global('f_search') : 1), 'S_DISPLAY_PM' => $config['allow_privmsg'] && !empty($user->data['is_registered']) && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm')) ? true : false, 'S_DISPLAY_MEMBERLIST' => isset($auth) ? $auth->acl_get('u_viewprofile') : 0, 'S_NEW_PM' => $s_privmsg_new ? 1 : 0, 'S_REGISTER_ENABLED' => $config['require_activation'] != USER_ACTIVATION_DISABLE ? true : false, 'S_FORUM_ID' => $forum_id, 'S_TOPIC_ID' => $topic_id, 'S_LOGIN_ACTION' => !defined('ADMIN_START') ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=login') : append_sid("index.{$phpEx}", false, true, $user->session_id), 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => build_url())), 'S_ENABLE_FEEDS' => $config['feed_enable'] ? true : false, 'S_ENABLE_FEEDS_OVERALL' => $config['feed_overall'] ? true : false, 'S_ENABLE_FEEDS_FORUMS' => $config['feed_overall_forums'] ? true : false, 'S_ENABLE_FEEDS_TOPICS' => $config['feed_topics_new'] ? true : false, 'S_ENABLE_FEEDS_TOPICS_ACTIVE' => $config['feed_topics_active'] ? true : false, 'S_ENABLE_FEEDS_NEWS' => $s_feed_news ? true : false, 'S_LOAD_UNREADS' => $config['load_unreads_search'] && ($config['load_anon_lastread'] || $user->data['is_registered']) ? true : false, 'S_SEARCH_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields), 'T_THEME_PATH' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme', 'T_TEMPLATE_PATH' => "{$web_path}styles/" . $user->theme['template_path'] . '/template', 'T_SUPER_TEMPLATE_PATH' => isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path'] ? "{$web_path}styles/" . $user->theme['template_inherit_path'] . '/template' : "{$web_path}styles/" . $user->theme['template_path'] . '/template', 'T_IMAGESET_PATH' => "{$web_path}styles/" . $user->theme['imageset_path'] . '/imageset', 'T_IMAGESET_LANG_PATH' => "{$web_path}styles/" . $user->theme['imageset_path'] . '/imageset/' . $user->lang_name, 'T_IMAGES_PATH' => "{$web_path}images/", 'T_SMILIES_PATH' => "{$web_path}{$config['smilies_path']}/", 'T_AVATAR_PATH' => "{$web_path}{$config['avatar_path']}/", 'T_AVATAR_GALLERY_PATH' => "{$web_path}{$config['avatar_gallery_path']}/", 'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/", 'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/", 'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/", 'T_STYLESHEET_LINK' => !$user->theme['theme_storedb'] ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.{$phpEx}", 'id=' . $user->theme['style_id'] . '&amp;lang=' . $user->lang_name), 'T_STYLESHEET_NAME' => $user->theme['theme_name'], 'T_THEME_NAME' => $user->theme['theme_path'], 'T_TEMPLATE_NAME' => $user->theme['template_path'], 'T_SUPER_TEMPLATE_NAME' => isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path'] ? $user->theme['template_inherit_path'] : $user->theme['template_path'], 'T_IMAGESET_NAME' => $user->theme['imageset_path'], 'T_IMAGESET_LANG_NAME' => $user->data['user_lang'], 'T_IMAGES' => 'images', 'T_SMILIES' => $config['smilies_path'], 'T_AVATAR' => $config['avatar_path'], 'T_AVATAR_GALLERY' => $config['avatar_gallery_path'], 'T_ICONS' => $config['icons_path'], 'T_RANKS' => $config['ranks_path'], 'T_UPLOAD' => $config['upload_path'], 'SITE_LOGO_IMG' => $user->img('site_logo'), 'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . (!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1' ? '' : '; domain=' . $config['cookie_domain']) . (!$config['cookie_secure'] ? '' : '; secure')), 'CABECERA' => $cabecera, 'PIE' => $pie, 'PINTACSS' => $pintacss, 'PINTAJS' => $pintajs));
    // application/xhtml+xml not used because of IE
    header('Content-type: text/html; charset=UTF-8');
    header('Cache-Control: private, no-cache="set-cookie"');
    header('Expires: 0');
    header('Pragma: no-cache');
    if (!empty($user->data['is_bot'])) {
        // Let reverse proxies know we detected a bot.
        header('X-PHPBB-IS-BOT: yes');
    }
    return;
}