Exemplo n.º 1
0
 protected function getDefaultHeaderVars()
 {
     global $wgRequest, $wgLanguageCode, $wgSSLsite, $wgUser;
     $t = $this->t;
     $articleName = $t->getText();
     $action = $wgRequest->getVal('action', 'view');
     $deviceOpts = $this->getDevice();
     $pageExists = $t->exists();
     $randomUrl = '/' . wfMsg('special-randomizer');
     $isMainPage = $articleName == wfMsg('mainpage');
     $titleBar = $isMainPage ? wfMsg('mobile-mainpage-title') : wfMsg('pagetitle', $articleName);
     $canonicalUrl = 'http://' . MobileWikihow::getNonMobileSite() . '/' . $t->getPartialURL();
     if ($wgUser->getID() > 0) {
         $login_link = '/Special:Mypage';
         $login_text = wfMsg('me');
     } else {
         $login_link = '/Special:Userlogin';
         $login_text = wfMsg('log_in');
     }
     if (SSL_LOGIN_DOMAIN && !$wgSSLsite) {
         $login_link = 'https://' . SSL_LOGIN_DOMAIN . $login_link;
     }
     $headerVars = array('isMainPage' => $isMainPage, 'title' => $titleBar, 'css' => $this->cssScriptsCombine, 'randomUrl' => $randomUrl, 'deviceOpts' => $deviceOpts, 'canonicalUrl' => $canonicalUrl, 'pageExists' => $pageExists, 'jsglobals' => Skin::makeGlobalVariablesScript(array('skinname' => 'mobile')), 'lang' => $wgLanguageCode, 'loginlink' => $login_link, 'logintext' => $login_text);
     return $headerVars;
 }
Exemplo n.º 2
0
    /**
     * Template filter callback for OSBridge 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;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        // 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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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>
    <?php 
        $this->html('csslinks');
        ?>

    <!--[if lt IE 7]><script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/IEFixes.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
    <meta http-equiv="imagetoolbar" content="no" /><![endif]-->

    <?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>

    <script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
    <!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        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'];
        }
        ?>
    <script src="<?php 
        echo $this->text('stylepath');
        ?>
/osbridge/jquery.min.js" type="text/javascript" charset="utf-8"></script>

    <style type="text/css" media="screen">

    </style>

  </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('dir');
        ?>
 <?php 
        $this->text('pageclass');
        ?>
 <?php 
        $this->text('skinnameclass');
        ?>
">
  <div id="wrapper">
    <!-- #header_fragment BEGIN -->
    <?php 
        require_once 'shared_fragments.php';
        ?>
    <?php 
        global $OSBRIDGE_EVENT_SLUG;
        if ($OSBRIDGE_EVENT_SLUG) {
            require_shared_fragment("header_{$OSBRIDGE_EVENT_SLUG}");
        } else {
            require_shared_fragment('header_current');
        }
        ?>
    <!-- #header_fragment END -->

    <div id="container">
      <div class='section_title'>
        <h2>Attendee Wiki</h2>
      </div>
      <div id="content">
        <a name="top" id="top"></a>
        <?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>

        <!-- page controls -->
        <?php 
        global $admin_sidebar_actions;
        ?>
        <div id="content-actions">
          <ul>
            <?php 
        # OSBRIDGE: Only show these actions
        $include_content_actions = array('edit', 'history', 'watch');
        foreach (array_diff_key($this->data['content_actions'], array_flip($admin_sidebar_actions)) as $key => $tab) {
            # echo "KEY($key)"; # Uncomment to show action names
            # OSBRIDGE: Skip unwanted actions
            if (!in_array($key, $include_content_actions)) {
                continue;
            }
            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 $skin->tooltip("ca-{$key}");
            } else {
                echo $skin->tooltipAndAccesskey("ca-{$key}");
            }
            echo '>' . htmlspecialchars($tab['text']) . '</a></li>';
        }
        ?>
          </ul>
        </div>

        <!-- page content -->
        <h2 class="page_title"><?php 
        $this->data['displaytitle'] != "" ? $this->html('title') : $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="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"><?php 
            $this->msg('jumpto');
            ?>
 <a href="#column-one"><?php 
            $this->msg('jumptonavigation');
            ?>
</a>, <a href="#searchInput"><?php 
            $this->msg('jumptosearch');
            ?>
</a></div><?php 
        }
        ?>
          <!-- 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>
      <div class='sidebar'>
        <ul class="xoxo">

          <!-- User profile and actions -->

<?php 
        # OSBRIDGE: Display navigation here
        $sidebar = $this->data['sidebar'];
        foreach ($sidebar as $boxName => $cont) {
            if ($boxName == 'navigation') {
                $this->customBox($boxName, $cont);
            } else {
                continue;
            }
        }
        ?>


      <li class="portlet" id='personal-tools'>
        <div id='account-box'>
          <h3><?php 
        $this->msg('personaltools');
        ?>
</h3>
          <div class='user_actions'>
            <ul>
<?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
                <li id="<?php 
            echo Sanitizer::escapeId("pt-{$key}");
            ?>
"<?php 
            if ($item['active']) {
                ?>
 class="active"<?php 
            }
            ?>
><a href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
"<?php 
            echo $skin->tooltipAndAccesskey('pt-' . $key);
            if (!empty($item['class'])) {
                ?>
 class="<?php 
                echo htmlspecialchars($item['class']);
                ?>
"<?php 
            }
            ?>
><?php 
            echo htmlspecialchars($item['text']);
            ?>
</a></li>
<?php 
        }
        ?>
            </ul>
          </div>
        </div>
      </li>


          <?php 
        $admin_sidebar_menu = array_intersect_key($this->data['content_actions'], array_flip($admin_sidebar_actions));
        if (count($admin_sidebar_menu) > 0) {
            ?>
          <li class='portlet'>
            <h3>Management</h3>
            <ul>
              <?php 
            foreach ($admin_sidebar_menu 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 $skin->tooltip("ca-{$key}");
                } else {
                    echo $skin->tooltipAndAccesskey("ca-{$key}");
                }
                echo '>' . htmlspecialchars($tab['text']) . '</a></li>';
            }
            ?>

              <?php 
            # OSBRIDGE: Add an upload link here rather than in the silly Toolbox
            ?>
              <?php 
            $special = 'upload';
            ?>
              <li id="t-<?php 
            echo $special;
            ?>
"><a href="<?php 
            echo htmlspecialchars($this->data['nav_urls'][$special]['href']);
            ?>
"<?php 
            echo $this->skin->tooltipAndAccesskey('t-' . $special);
            ?>
><?php 
            $this->msg($special);
            ?>
</a></li>
              <?php 
            $special = Nil;
            ?>
            </ul>
          </li>
          <?php 
        }
        ?>

<?php 
        $sidebar = $this->data['sidebar'];
        if (!isset($sidebar['SEARCH'])) {
            $sidebar['SEARCH'] = true;
        }
        if (!isset($sidebar['TOOLBOX'])) {
            $sidebar['TOOLBOX'] = true;
        }
        if (!isset($sidebar['LANGUAGES'])) {
            $sidebar['LANGUAGES'] = true;
        }
        foreach ($sidebar as $boxName => $cont) {
            if ($boxName == 'SEARCH') {
                continue;
                $this->searchBox();
            } elseif ($boxName == 'TOOLBOX') {
                continue;
                $this->toolbox();
            } elseif ($boxName == 'LANGUAGES') {
                continue;
                # OSBRIDGE: Never display languages.
                $this->languageBox();
            } elseif ($boxName == 'navigation') {
                continue;
                # OSBRIDGE: We'll display the navigation elsewhere
            } else {
                $this->customBox($boxName, $cont);
            }
        }
        # OSBRIDGE: Always show these, ignoring the settings above
        $this->toolbox();
        $this->searchBox();
        ?>
          <li>
            <ul>
              <?php 
        if ($this->data['copyrightico']) {
            ?>
              <li><div id="f-copyrightico"><?php 
            $this->html('copyrightico');
            ?>
</div></li>
              <?php 
        }
        ?>

              <?php 
        // Generate additional footer links
        # ORIGINAL: $footerlinks = array('lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', 'privacy', 'about', 'disclaimer', 'tagline');
        # OSBRIDGE: Don't display footer links
        $footerlinks = array();
        $validFooterLinks = array();
        foreach ($footerlinks as $aLink) {
            if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                $validFooterLinks[] = $aLink;
            }
        }
        if (count($validFooterLinks) > 0) {
            foreach ($validFooterLinks as $aLink) {
                if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                    ?>
              <li id="<?php 
                    echo $aLink;
                    ?>
"><?php 
                    $this->html($aLink);
                    ?>
</li>
                  <?php 
                }
            }
        }
        ?>
            </ul>
          </li>
        </ul>
      </div>
    </div>

    <div id="footer"></div>
</div>
<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        ?>
<script type="<?php 
        $this->text('jsmimetype');
        ?>
"> if (window.isMSIE55) fixalpha(); </script>
<?php 
        $this->html('reporttime');
        if ($this->data['debug']) {
            ?>
<!-- Debug output:
<?php 
            $this->text('debug');
            ?>
-->
<?php 
        }
        ?>

<script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
  var pageTracker = _gat._getTracker("UA-168427-8");
  pageTracker._initData();
  pageTracker._trackPageview();
</script>

<script type="text/javascript">
    // Defer loading "getclicky" till after the page has loaded, because it's external and slow.
    $(document).ready(function () {
        var element = document.createElement("script");
        element.src = "http://static.getclicky.com/79611.js";
        element.type = "text/javascript";
        document.getElementsByTagName("head")[0].appendChild(element);
    });
</script>

</body></html>
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 3
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()
    {
        global $wgRequest;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        // 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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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>
		<?php 
        $this->html('csslinks');
        ?>

		<!--[if lt IE 7]><script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/IEFixes.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->

		<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>

		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
		<!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        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'];
        }
        ?>
	</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('dir');
        ?>
 <?php 
        $this->text('pageclass');
        ?>
 <?php 
        $this->text('skinnameclass');
        ?>
">
	<div id="globalWrapper" class="container">
      <div class='span-5 append-1 menu'>
      <div class="header"><a href="http://opensprints.org"><img src="http://opensprints.org/images/logo_with_text.png" /></a></div>
        <ul>
          <li>
            <a href='http://opensprints.org/about.html'>ABOUT</a>
          </li>
          <li>
            <a href='http://opensprints.org/news'>NEWS</a>
          </li>
          <li>
            <span>DOCUMENTATION</span>
          </li>
          <li>
            <a href='http://opensprints.org/forum'>SUPPORT &amp; DISCUSSION</a>
          </li>
          <li>
            <a href='http://opensprints.org/downloads.html'>DOWNLOADS</a>
          </li>
          <li>
            <a href='http://store.opensprints.org'>PRODUCTS</a>
          </li>
          <li class='louder'>
            <a href='http://opensprints.org/contact.html'>CONTACT</a>
          </li>
        </ul>
      </div>
		<div id="column-content" class="intro span-14">
    <div class="header_clear"></div>
	<div id="content">
		<a name="top" id="top"></a>
		<?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>
		<h1 id="firstHeading" class="firstHeading"><?php 
        $this->data['displaytitle'] != "" ? $this->html('title') : $this->text('title');
        ?>
</h1>
		<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="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"><?php 
            $this->msg('jumpto');
            ?>
 <a href="#column-one"><?php 
            $this->msg('jumptonavigation');
            ?>
</a>, <a href="#searchInput"><?php 
            $this->msg('jumptosearch');
            ?>
</a></div><?php 
        }
        ?>
			<!-- 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>
		</div>
		<div id="column-one" class="span-3">
    <div class="header_clear"></div>
	<div id="p-cactions" class="portlet">
		<h5><?php 
        $this->msg('views');
        ?>
</h5>
		<div class="pBody">
			<ul>
	<?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 $skin->tooltip("ca-{$key}");
            } else {
                echo $skin->tooltipAndAccesskey("ca-{$key}");
            }
            echo '>' . htmlspecialchars($tab['text']) . '</a></li>';
        }
        ?>
			</ul>
		</div>
	</div>
	<div class="portlet" id="p-personal">
		<h5><?php 
        $this->msg('personaltools');
        ?>
</h5>
		<div class="pBody">
			<ul>
<?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
				<li id="<?php 
            echo Sanitizer::escapeId("pt-{$key}");
            ?>
"<?php 
            if ($item['active']) {
                ?>
 class="active"<?php 
            }
            ?>
><a href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
"<?php 
            echo $skin->tooltipAndAccesskey('pt-' . $key);
            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" id="p-logo">
		<a style="background-image: url(<?php 
        $this->text('logopath');
        ?>
);" <?php 
        ?>
href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
"<?php 
        echo $skin->tooltipAndAccesskey('n-mainpage');
        ?>
></a>
	</div>
	<script type="<?php 
        $this->text('jsmimetype');
        ?>
"> if (window.isMSIE55) fixalpha(); </script>
<?php 
        $sidebar = $this->data['sidebar'];
        if (!isset($sidebar['SEARCH'])) {
            $sidebar['SEARCH'] = true;
        }
        if (!isset($sidebar['TOOLBOX'])) {
            $sidebar['TOOLBOX'] = true;
        }
        if (!isset($sidebar['LANGUAGES'])) {
            $sidebar['LANGUAGES'] = true;
        }
        foreach ($sidebar as $boxName => $cont) {
            if ($boxName == 'SEARCH') {
                $this->searchBox();
            } elseif ($boxName == 'TOOLBOX') {
                $this->toolbox();
            } elseif ($boxName == 'LANGUAGES') {
                $this->languageBox();
            } else {
                $this->customBox($boxName, $cont);
            }
        }
        ?>
		</div><!-- end of the left (by default at least) column -->
			<div class="visualClear"></div>
			<div id="footer">
        &copy; 2009 OpenSprints L.L.C. Some rights reserved.
        <a href='http://creativecommons.org/licenses/by/3.0/us/' rel='license'>
          <img alt='Creative Commons License' src='http://i.creativecommons.org/l/by/3.0/us/80x15.png' style='border-width:0' />
        </a>
<?php 
        if ($this->data['poweredbyico']) {
            ?>
				<div id="f-poweredbyico"><?php 
            $this->html('poweredbyico');
            ?>
</div>
<?php 
        }
        if ($this->data['copyrightico']) {
            ?>
				<div id="f-copyrightico"><?php 
            $this->html('copyrightico');
            ?>
</div>
<?php 
        }
        // Generate additional footer links
        $footerlinks = array('lastmod', 'viewcount');
        $validFooterLinks = array();
        foreach ($footerlinks as $aLink) {
            if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                $validFooterLinks[] = $aLink;
            }
        }
        if (count($validFooterLinks) > 0) {
            ?>
			<ul id="f-list">
<?php 
            foreach ($validFooterLinks as $aLink) {
                if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                    ?>
					<li id="<?php 
                    echo $aLink;
                    ?>
"><?php 
                    $this->html($aLink);
                    ?>
</li>
<?php 
                }
            }
            ?>
			</ul>
<?php 
        }
        ?>
		</div>
</div>
<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        $this->html('reporttime');
        if ($this->data['debug']) {
            ?>
<!-- Debug output:
<?php 
            $this->text('debug');
            ?>

-->
<?php 
        }
        ?>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10952031-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body></html>
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 4
0
    /**
     * Template filter callback for KiwixOnline 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;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        // 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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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 
        echo strip_tags($this->data['title']);
        ?>
</title>
		<?php 
        $this->html('csslinks');
        ?>

		<!--[if lt IE 7]><script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/IEFixes.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->

		<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>

		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
		<!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        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'];
        }
        ?>
	</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('dir');
        ?>
 <?php 
        $this->text('pageclass');
        ?>
 <?php 
        $this->text('skinnameclass');
        ?>
">
	<div id="globalWrapper">
		<div id="column-content">
	<div id="content">
		<a name="top" id="top"></a>
		<?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>
		<h1 class="firstHeading"><?php 
        $this->html('title');
        ?>
</h1>
		<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="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"><?php 
            $this->msg('jumpto');
            ?>
 <a href="#column-one"><?php 
            $this->msg('jumptonavigation');
            ?>
</a>, <a href="#searchInput"><?php 
            $this->msg('jumptosearch');
            ?>
</a></div><?php 
        }
        ?>
			<!-- start content -->
			<?php 
        $this->html('bodytext');
        ?>
			<?php 
        /* With categories */
        if ($this->data['catlinks']) {
            $this->html('catlinks');
        }
        ?>
			
			<!-- end content -->
			<?php 
        if ($this->data['dataAfterContent']) {
            $this->html('dataAfterContent');
        }
        ?>
			<div class="visualClear"></div>
		</div>
	</div>
		</div>
		<div id="column-one">
	<div id="p-cactions" class="portlet">
		<h5><?php 
        $this->msg('views');
        ?>
</h5>
		<div class="pBody">
			<ul>
	<?php 
        foreach ($this->data['content_actions'] as $key => $tab) {
            echo '
				 <li id="ca-' . Sanitizer::escapeId($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 $skin->tooltip("ca-{$key}");
            } else {
                echo $skin->tooltipAndAccesskey("ca-{$key}");
            }
            echo '>' . htmlspecialchars($tab['text']) . '</a></li>';
        }
        ?>
			</ul>
		</div>
	</div>
	<div class="portlet" id="p-personal">
		<h5><?php 
        $this->msg('personaltools');
        ?>
</h5>
		<div class="pBody">
			<ul>
<?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
				<li id="pt-<?php 
            echo Sanitizer::escapeId($key);
            ?>
"<?php 
            if ($item['active']) {
                ?>
 class="active"<?php 
            }
            ?>
><a href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
"<?php 
            echo $skin->tooltipAndAccesskey('pt-' . $key);
            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" id="p-logo">
		<a style="background-image: url(<?php 
        $this->text('logopath');
        ?>
);" <?php 
        ?>
href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
"<?php 
        echo $skin->tooltipAndAccesskey('n-mainpage');
        ?>
></a>
	</div>
	<script type="<?php 
        $this->text('jsmimetype');
        ?>
"> if (window.isMSIE55) fixalpha(); </script>
<?php 
        $sidebar = $this->data['sidebar'];
        if (!isset($sidebar['SEARCH'])) {
            $sidebar['SEARCH'] = true;
        }
        if (!isset($sidebar['TOOLBOX'])) {
            $sidebar['TOOLBOX'] = true;
        }
        if (!isset($sidebar['LANGUAGES'])) {
            $sidebar['LANGUAGES'] = true;
        }
        foreach ($sidebar as $boxName => $cont) {
            if ($boxName == 'SEARCH') {
                $this->searchBox();
            } elseif ($boxName == 'TOOLBOX') {
                $this->toolbox();
            } elseif ($boxName == 'LANGUAGES') {
                $this->languageBox();
            } else {
                $this->customBox($boxName, $cont);
            }
        }
        ?>
		</div><!-- end of the left (by default at least) column -->
			<div class="visualClear"></div>
			<div id="footer">
<?php 
        if ($this->data['poweredbyico']) {
            ?>
				<div id="f-poweredbyico"><?php 
            $this->html('poweredbyico');
            ?>
</div>
<?php 
        }
        if ($this->data['copyrightico']) {
            ?>
				<div id="f-copyrightico"><?php 
            $this->html('copyrightico');
            ?>
</div>
<?php 
        }
        // Generate additional footer links
        $footerlinks = array('lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', 'privacy', 'about', 'disclaimer', 'tagline');
        $validFooterLinks = array();
        foreach ($footerlinks as $aLink) {
            if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                $validFooterLinks[] = $aLink;
            }
        }
        if (count($validFooterLinks) > 0) {
            ?>
			<ul id="f-list">
<?php 
            foreach ($validFooterLinks as $aLink) {
                if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                    ?>
					<li id="<?php 
                    echo $aLink;
                    ?>
"><?php 
                    $this->html($aLink);
                    ?>
</li>
<?php 
                }
            }
            ?>
			</ul>
<?php 
        }
        ?>
		</div>
</div>
<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        $this->html('reporttime');
        if ($this->data['debug']) {
            ?>
<!-- Debug output:
<?php 
            $this->text('debug');
            ?>

-->
<?php 
        }
        ?>
</body></html>
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 5
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()
    {
        global $wgRequest;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        // Suppress warnings to prevent notices about missing indexes in $this->data
        wfSuppressWarnings();
        ?>
<!DOCTYPE html>
<html lang="ja"
  xmlns="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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>
  <?php 
        $this->html('csslinks');
        ?>

  <!--[if lt IE 7]><script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/IEFixes.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
  <meta http-equiv="imagetoolbar" content="no" /><![endif]-->

  <?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>

  <script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
  <!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        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'];
        }
        ?>
  <script src="<?php 
        $this->text('stylepath');
        ?>
/wikijpmoz/menubar.js" type="text/javascript"></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('dir');
        ?>
 <?php 
        $this->text('pageclass');
        ?>
 <?php 
        $this->text('skinnameclass');
        ?>
">

<div id="globalWrapper">

<!--  TOP MENU BAR  -->

<div class="menuBar">
<!--
  <a class="menuButton"
    href=""
    onclick="return buttonClick(event, 'fileMenu');"
    onmouseover="buttonMouseover(event, 'fileMenu');" >File</a>
-->
  <a class="menuButton"
    href=""
    onclick="return buttonClick(event, 'editMenu');"
    onmouseover="buttonMouseover(event, 'editMenu');">編集</a>
<!--
  <a class="menuButton"
    href=""
    onclick="return buttonClick(event, 'viewMenu');"
    onmouseover="buttonMouseover(event, 'viewMenu');">View</a>
-->
  <a class="menuButton"
    href=""
    onclick="return buttonClick(event, 'toolsMenu');"
    onmouseover="buttonMouseover(event, 'toolsMenu');">ツール</a>
  <a class="menuButton"
    href=""
    onclick="return buttonClick(event, 'optionsMenu');"
    onmouseover="buttonMouseover(event, 'optionsMenu');">アカウント</a>
  <a class="menuButton"
    href=""
    onclick="return buttonClick(event, 'helpMenu');"
    onmouseover="buttonMouseover(event, 'helpMenu');">ヘルプ</a>


  <form action="<?php 
        $this->text('wgScript');
        ?>
" id="menuSearchform">
    <input type='hidden' name="title" value="<?php 
        $this->text('searchtitle');
        ?>
"/>
    <input id="searchInput" name="search" type="text"<?php 
        echo $this->skin->tooltipAndAccesskey('search');
        if (isset($this->data['search'])) {
            ?>
 value="<?php 
            $this->text('search');
            ?>
"<?php 
        }
        ?>
 />
    <input type='submit' name="go" class="searchButton" id="searchGoButton"  value="<?php 
        $this->msg('searcharticle');
        ?>
"<?php 
        echo $this->skin->tooltipAndAccesskey('search-go');
        ?>
 />
    <?php 
        if ($wgUseTwoButtonsSearchForm) {
            ?>
      <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php 
            $this->msg('searchbutton');
            ?>
"<?php 
            echo $this->skin->tooltipAndAccesskey('search-fulltext');
            ?>
 /><?php 
        } else {
            ?>
      <a href="<?php 
            $this->text('searchaction');
            ?>
" rel="search"><?php 
            $this->msg('powersearch-legend');
            ?>
</a><?php 
        }
        ?>
  </form>

  <span class="menuRight">
    <a href="http://twitter.com/home?status=http%3A%2F%2Fwiki.jpmoz.net/%20%23mozjpwiki%20wiki@jpmoz%20-%20<?php 
        echo htmlspecialchars($this->text('title'));
        ?>
" target="_blank" style="border: medium none;">
      <img id="menuTweet" title="このwikiページについてTwitterでつぶやく" 
        src="<?php 
        $this->text('stylepath');
        ?>
/wikijpmoz/tweet.png" style="border: medium none; vertical-align: top;">
    </a>
    <a href="/Special:%E3%83%AD%E3%82%B0%E3%82%A4%E3%83%B3?type=signup" title="新規アカウント作成" class="menuButton" rel="nofollow">新規アカウント作成</a>
    <a href="/Special:%E3%83%AD%E3%82%B0%E3%82%A4%E3%83%B3" title="ログイン" class="menuButton" rel="nofollow">ログイン</a>
  </span>
</div>


<div id="editMenu" class="menu" onmouseover="menuMouseover(event)"><?php 
        foreach ($this->data['content_actions'] as $key => $tab) {
            if (strcmp($key, "watch") == 0 || strcmp($key, "unwatch") == 0 || strcmp($key, "varlang-0") == 0 || strcmp($key, "print") == 0) {
                echo '<div class="menuItemSep"></div>';
            }
            ?>
    <a id="<?php 
            echo Sanitizer::escapeId("ca-{$key}");
            ?>
"
      class="menuItem"
      <?php 
            if ($tab['class']) {
                echo 'class="' . htmlspecialchars($tab['class']) . '"';
            }
            ?>
      href="<?php 
            echo htmlspecialchars($tab['href']);
            ?>
"
      <?php 
            if (in_array($action, array('edit', 'submit')) && in_array($key, array('edit', 'watch', 'unwatch'))) {
                echo $skin->tooltip("ca-{$key}");
            } else {
                echo $skin->tooltipAndAccesskey("ca-{$key}");
            }
            echo '>' . htmlspecialchars($tab['text']);
            ?>
</a>
  <?php 
            if (strcmp($key, "talk") == 0) {
                echo '<div class="menuItemSep"></div>';
            }
        }
        ?>
</div>

<div id="optionsMenu" class="menu" onmouseover="menuMouseover(event)"><?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
    <a id="<?php 
            echo Sanitizer::escapeId("pt-{$key}");
            ?>
"
      class="menuItem"
      <?php 
            if ($item['active']) {
                echo 'class="active"';
            }
            ?>
      href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
"
      <?php 
            echo $skin->tooltipAndAccesskey('pt-' . $key);
            if (!empty($item['class'])) {
                echo 'class="' . htmlspecialchars($item['class']) . '"';
            }
            ?>
><?php 
            echo htmlspecialchars($item['text']);
            ?>
</a><?php 
        }
        ?>
</div>

<div id="toolsMenu" class="menu" onmouseover="menuMouseover(event)"><?php 
        if ($this->data['notspecialpage']) {
            ?>
    <a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href']);
            ?>
"
      <?php 
            echo $this->skin->tooltipAndAccesskey('t-whatlinkshere');
            ?>
      class="menuItem"
      ><?php 
            $this->msg('whatlinkshere');
            ?>
</a><?php 
            if ($this->data['nav_urls']['recentchangeslinked']) {
                ?>
      <a href="<?php 
                echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href']);
                ?>
"
        <?php 
                echo $this->skin->tooltipAndAccesskey('t-recentchangeslinked');
                ?>
        class="menuItem"
        ><?php 
                $this->msg('recentchangeslinked');
                ?>
</a><?php 
            }
        }
        if (isset($this->data['nav_urls']['trackbacklink'])) {
            ?>
    <a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href']);
            ?>
"
      <?php 
            echo $this->skin->tooltipAndAccesskey('t-trackbacklink');
            ?>
      class="menuItem"
      ><?php 
            $this->msg('trackbacklink');
            ?>
</a><?php 
        }
        if ($this->data['feeds']) {
            foreach ($this->data['feeds'] as $key => $feed) {
                ?>
<a id="<?php 
                echo Sanitizer::escapeId("feed-{$key}");
                ?>
" 
          href="<?php 
                echo htmlspecialchars($feed['href']);
                ?>
" rel="alternate" 
          type="application/<?php 
                echo $key;
                ?>
+xml" class="feedlink"
          <?php 
                echo $this->skin->tooltipAndAccesskey('feed-' . $key);
                ?>
          class="menuItem"
          ><?php 
                echo htmlspecialchars($feed['text']);
                ?>
</a><?php 
            }
        }
        if (!empty($this->data['nav_urls']['print']['href'])) {
            ?>
    <a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['print']['href']);
            ?>
"
      rel="alternate" 
      class="menuItem"
      <?php 
            echo $this->skin->tooltipAndAccesskey('t-print');
            ?>
    ><?php 
            $this->msg('printableversion');
            ?>
</a><?php 
        }
        if (!empty($this->data['nav_urls']['permalink']['href'])) {
            ?>
    <a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['permalink']['href']);
            ?>
"
      <?php 
            echo $this->skin->tooltipAndAccesskey('t-permalink');
            ?>
      class="menuItem"
      ><?php 
            $this->msg('permalink');
            ?>
</a><?php 
        }
        wfRunHooks('MonoBookTemplateToolboxEnd', array(&$this));
        wfRunHooks('SkinTemplateToolboxEnd', array(&$this));
        ?>
</div>

<div id="helpMenu" class="menu" onmouseover="menuMouseover(event)">
  <a href="/Help:About" class="menuItem">このサイトについて</a>
</div>

<!--

    <div id="wrapper" class="box">
      <div id="contents">
        <div id="contents_inner">
           <div id="wikibody" class="box"> BODY </div>
           <div class="attach"> ATTACH </div>
         </div>
       </div>
       <div id="menubar_wrapper">
         <div id="menubar" class="menu">
           <div id="menubar_inner" class="box">
             <h3>メニュー</h3>
             <ul>
               <li>A</li>
             </ul>
             <hr />
             <h3>リンク</h3>
             <ul>
               <li>B</li>
             </ul>
             <div>
               <a href="http://www16.atwiki.jp/jpmozwiki/editx/2.html">ここを編集</a>
             </div>
           </div>
         </div>
       </div>
     </div>
     <div id="menubar2" class="menu">
       <div id="menubar_inner2" class="box">
         <h3>更新履歴</h3>
         <div class="plugin_recent">
           <p class="plugin_recent_day">2010-12-30</p>
           <div class="plugin_recent_day_div">
             <ul class="plugin_recent_ul">
               <li><a href="http://www16.atwiki.jp/jpmozwiki/pages/13.html" title="トラブルシューティング (48d)" >トラブルシューティング</a></li>
             </ul>
           </div>
         </div>
       </div>
     </div>
     <div id="footer">
       <div id="footer_inner">
         <hr>
         FOOTER
         <div id="recommend">RECOMMEND</div>
       </div>
     </div>
  </div>
</div>

-->


<div id="main-panel">
  <div id="content-header">
    <a name="top" id="top"></a>
    <a style="background-image: url(<?php 
        $this->text('stylepath');
        ?>
/wikijpmoz/foxkeh.png); "
       href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
"
       <?php 
        echo $skin->tooltipAndAccesskey('p-logo');
        ?>
       id="toplogo"></a>
    <h1>    <?php 
        $this->data['displaytitle'] != "" ? $this->html('title') : $this->text('title');
        ?>
</h1>
    <?php 
        if ($this->data['sitenotice']) {
            ?>
      <h2 id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</h2>
    <?php 
        }
        ?>
  </div>
  <div id="column-content">
    <div id="bodyContent">
      <div id="bodyContent-inner">
        <h3 id="siteSub"><?php 
        $this->msg('tagline');
        ?>
</h3>
        <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 
        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 
        }
        ?>
        <!-- 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>
    <div id="column-one">
      <div id="column-one-inner">
        <script type="<?php 
        $this->text('jsmimetype');
        ?>
"> if (window.isMSIE55) fixalpha(); </script>
        <?php 
        $sidebar = $this->data['sidebar'];
        foreach ($sidebar as $boxName => $cont) {
            if ($boxName == 'SEARCH') {
            } elseif ($boxName == 'TOOLBOX') {
            } elseif ($boxName == 'LANGUAGES') {
            } else {
                $this->customBox($boxName, $cont);
            }
        }
        ?>
      </div>
    </div>
    <div class="visualClear"></div>
    <div id="footer"><?php 
        if ($this->data['poweredbyico']) {
            ?>
        <div id="f-poweredbyico"><?php 
            $this->html('poweredbyico');
            ?>
</div><?php 
        }
        if ($this->data['copyrightico']) {
            ?>
        <div id="f-copyrightico"><?php 
            $this->html('copyrightico');
            ?>
</div><?php 
        }
        ?>
<ul id="f-list"><?php 
        if (isset($this->data['lastmod']) && $this->data['lastmod'] || isset($this->data['viewcount']) && $this->data['viewcount']) {
            ?>
<li id="viewcount"><?php 
            if (isset($this->data['lastmod']) && $this->data['lastmod']) {
                $this->html('lastmod');
            }
            if (isset($this->data['viewcount']) && $this->data['viewcount']) {
                $this->html('viewcount');
            }
            ?>
</li><?php 
        }
        if (isset($this->data['copyright']) && $this->data['copyright']) {
            ?>
            <li id="copyright"><?php 
            $this->html('copyright');
            ?>
</li><?php 
        }
        if (isset($this->data['about']) && $this->data['about']) {
            ?>
            <li id="about"><?php 
            $this->html('about');
            ?>
</li><?php 
        }
        ?>
</ul>
    </div>
  </div>
  </div>

<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        $this->html('reporttime');
        ?>
<!-- Debug output:
<?php 
        if ($this->data['debug']) {
            $this->text('debug');
        }
        ?>
-->
</body></html>


<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 6
0
function meaneditor_showBox(&$edit_context, $html_text, $rows, $cols, $ew)
{
    global $wgOut, $wgArticlePath, $wgStylePath, $wgUploadPath, $wgLang;
    wfLoadExtensionMessages('MeanEditor');
    $sk = new Skin();
    $wiki_path = str_replace('$1', '', $wgArticlePath);
    $wgOut->addScriptFile('../../extensions/MeanEditor/wymeditor/jquery/jquery.js');
    $wgOut->addScriptFile('../../extensions/MeanEditor/wymeditor/wymeditor/jquery.wymeditor.pack.js');
    $wgOut->addScriptFile('../../extensions/MeanEditor/wymeditor/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js');
    $wgOut->addExtensionStyle('../extensions/MeanEditor/fix_meaneditor.css');
    # For now, it looks better in IE8 standards mode, even though IE support is very messy
    #$wgOut->addMeta('X-UA-Compatible', 'IE=7');
    $wgOut->addInlineScript('
			Array.prototype.wym_remove = function(from, to) {
				// From a suggestion at forum.wymeditor.org
				this.splice(from, !to || 1 + to - from + (!(to < 0 ^ from >= 0) && (to < 0 || -1) * this.length));
				    return this.length;
			};
	                jQuery(function() {
	                    jQuery(\'.wymeditor\').wymeditor({
					html: "' . addcslashes($html_text, "\"\n") . '",
					lang: "' . $wgLang->getCode() . '",
					iframeBasePath: "extensions/MeanEditor/iframe/",
					dialogLinkHtml: "<body class=\'wym_dialog wym_dialog_link\'"
						+ " onload=\'WYMeditor.INIT_DIALOG(" + WYMeditor.INDEX + ")\'"
						+ ">"
						+ "<form>"
						+ "<fieldset>"
						+ "<input type=\'hidden\' class=\'wym_dialog_type\' value=\'"
						+ WYMeditor.DIALOG_LINK
						+ "\' />"
						+ "<legend>{Link}</legend>"
						+ "<div class=\'row\'>"
						+ "<label>{URL}</label>"
						+ "<input type=\'text\' class=\'wym_href\' value=\'\' size=\'40\' />"
						+ "</div>"
						+ "<div class=\'row row-indent\'>"
						+ "<input class=\'wym_submit\' type=\'button\'"
						+ " value=\'{Submit}\' />"
						+ "<input class=\'wym_cancel\' type=\'button\'"
						+ "value=\'{Cancel}\' />"
						+ "</div>"
						+ "</fieldset>"
						+ "</form>"
						+ "</body>",
					dialogImageHtml:  "<body class=\'wym_dialog wym_dialog_image\'"
						+ " onload=\'WYMeditor.INIT_DIALOG(" + WYMeditor.INDEX + ")\'"
						+ ">' . preg_replace('/[\\r\\n]+/', "", str_replace('</script>', '</scr"+"ipt>', str_replace('"', '\\"', str_replace('\'', '\\\'', $sk->makeGlobalVariablesScript(false))))) . '"
						+ "<script type=\'text/javascript\' src=\'' . $wgStylePath . '/common/ajax.js\'></scr"+"ipt>"
						+ "<script type=\'text/javascript\'>function meaneditor_responder(e) {"
						+ "	div=document.getElementById(\'meaneditor_ajax_table\');"
						+ "	div.innerHTML=e.responseText;"
						+ "}</scr"+"ipt>"
						+ "<form>"
						+ "<fieldset>"
						+ "<input type=\'hidden\' class=\'wym_dialog_type\' value=\'"
						+ WYMeditor.DIALOG_IMAGE
						+ "\' />"
						+ "<legend>{Image}</legend>"
						+ "<div class=\'row\'>"
						+ "<label>{Title}</label>"
						+ "<input id=\'image_name\' type=\'text\' class=\'wym_src\' value=\'\' size=\'40\' />"
						+ "</div>"
						+ "<div class=\'row\'>"
						+ "<p onclick=\'sajax_do_call(\\"recent_images\\",[0],meaneditor_responder,0);\'>' . wfMsg('recent_images_text', $wgArticlePath . 'Special:Upload') . '</p>"
						+ "<table id=\'meaneditor_ajax_table\'></table>"
						+ "</div>"
						+ "<div class=\'row row-indent\'>"
						+ "<input class=\'wym_submit_meaneditor_image\' type=\'button\'"
						+ " value=\'{Submit}\' />"
						+ "<input class=\'wym_cancel\' type=\'button\'"
						+ "value=\'{Cancel}\' />"
						+ "</div>"
						+ "</fieldset>"
						+ "</form>"
						+ "</body>",

					preInit: function(wym) {
						// Remove unwanted buttons, code from a suggestion at forum.wymeditor.org
						wym._options.toolsItems.wym_remove(6);
						wym._options.toolsItems.wym_remove(6);
						wym._options.toolsItems.wym_remove(11);
						wym._options.toolsItems.wym_remove(12);
						wym._options.toolsItems.wym_remove(12);
					},
					postInit: function(wym) {
						var wikilink_button_html = "<li class=\'wym_tools_wikilink\'>"
							+ "<a name=\'Wikilink\' href=\'#\' "
							+ "style=\'background-image: url(extensions/MeanEditor/wikilink-icon.png)\'>"
							+ "Create Wikilink</a></li>";
						var wikilink_dialog_html = "<body class=\'wym_dialog wym_dialog_wikilink\'"
							+ " onload=\'WYMeditor.INIT_DIALOG(" + WYMeditor.INDEX + ")\'"
							+ ">"
							+ "<form>"
							+ "<fieldset>"
							+ "<input type=\'hidden\' class=\'wym_dialog_type\' value=\'"
							+ "MeanEditor_dialog_wikilink"
							+ "\' />"
							+ "<legend>Wikilink</legend>"
							+ "<div class=\'row\'>"
							+ "<label>Page</label>"
							+ "<input type=\'text\' class=\'wym_wikititle\' value=\'\' size=\'40\' />"
							+ "</div>"
							+ "<div class=\'row row-indent\'>"
							+ "Tip: to link \\"dog\\" from \\"dogs\\", just select the first letters."
							+ "</div>"
							+ "<div class=\'row row-indent\'>"
							+ "<input class=\'wym_submit wym_submit_wikilink\' type=\'button\'"
							+ " value=\'{Submit}\' />"
							+ "<input class=\'wym_cancel\' type=\'button\'"
							+ "value=\'{Cancel}\' />"
							+ "</div></fieldset></form></body>";

						jQuery(wym._box).find(wym._options.toolsSelector + wym._options.toolsListSelector)
							.append(wikilink_button_html);
						jQuery(wym._box).find(\'li.wym_tools_wikilink a\').click(function() {
							wym.dialog(\'Wikilink\', wikilink_dialog_html);
							return (false);
						});

						wym.resizable();
					},
					preInitDialog: function(wym, wdm) {
						if (wdm.jQuery(wym._options.dialogTypeSelector).val() != \'MeanEditor_dialog_wikilink\')
							return;

						var selected = wym.selected();

						// Copied from Link dialog handling
						if(selected && selected.tagName && selected.tagName.toLowerCase != WYMeditor.A)
							selected = jQuery(selected).parentsOrSelf(WYMeditor.A);
						if(!selected && wym._selected_image)
							selected = jQuery(wym._selected_image).parentsOrSelf(WYMeditor.A);

						var wikipage;
						wikipage = jQuery(selected).attr(WYMeditor.HREF);
						if (wikipage) {
							if (wikipage.indexOf(\'' . $wiki_path . '\') == -1) {
								alert(\'This is an external link. If you want to convert it to a wikilink, remove the existing link first.\');
								wikipage = \'[External link, do not edit here]\';
								wdm.close();
							}
							else wikipage = wikipage.slice(' . strlen($wiki_path) . ');
						} else if (wym._iframe.contentWindow.getSelection) {
							wikipage = wym._iframe.contentWindow.getSelection().toString();
						} else if (wym._iframe.contentWindow.document.selection && wym._iframe.contentWindow.document.selection.createRange) {
							var range = wym._iframe.contentWindow.document.selection.createRange();
							wikipage = range.text;
						}
						wdm.jQuery(\'.wym_wikititle\').val(wikipage);
					},
					postInitDialog: function(wym, wdw) {
						var dbody = wdw.document.body;
						wdw.jQuery(dbody).find(\'input.wym_submit_wikilink\').click(function() {
							var wikipage = jQuery(dbody).find(\'.wym_wikititle\').val();
							var sUrl = \'' . $wiki_path . '\' + wikipage;

							// Copied from Link dialog handling
							var sStamp = wym.uniqueStamp();
							if(sUrl.length > 0) {
								wym._exec(WYMeditor.CREATE_LINK, sStamp);
								jQuery("a[@href=" + sStamp + "]", wym._doc.body)
									.attr(WYMeditor.HREF, sUrl);
							}
							wdw.close();
						});
						wdw.jQuery(dbody).find(\'input.wym_submit_meaneditor_image\').click(function() {
							var image_name = jQuery(dbody).find(wym._options.srcSelector).val();
							var sUrl = \'' . $wgUploadPath . '/' . '\' + image_name;

							// Copied from original dialog handling
							var sStamp = wym.uniqueStamp();
							if(sUrl.length > 0) {
								wym._exec(WYMeditor.INSERT_IMAGE, sStamp);
								jQuery("img[@src=" + sStamp + "]", wym._doc.body)
									.attr(WYMeditor.SRC, sUrl)
									.attr(WYMeditor.ALT, image_name);
							}
							wdw.close();
						});
					}

	                    });
	                });
	');
    $wgOut->addHTML(<<<END
<textarea tabindex='1' accesskey="," name="wpTextbox1" id="wpTextbox1" class="wymeditor" rows='{$rows}'
cols='{$cols}'{$ew}></textarea>
END
);
    return false;
}
    /**
     * Template filter callback for Modern 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;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        // Suppress warnings to prevent notices about missing indexes in $this->data
        wfSuppressWarnings();
        // This is needed to use Firebug Lite in IE 9
        if ($_SERVER['SERVER_NAME'] == 'cbp-transcription-desk.local') {
            $head = $this->data['headelement'];
            $searchString = '</title>' . "\n" . '<meta';
            $replaceString = '</title>' . "\n" . '<meta http-equiv="X-UA-Compatible" content="IE=8;FF=3;OtherUA=4" >' . "\n" . '<meta';
            $this->data['headelement'] = str_replace($searchString, $replaceString, $head);
        }
        $this->html('headelement');
        ?>

		<?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
xml:lang="<?php 
        $this->text('lang');
        ?>
" lang="<?php 
        $this->text('lang');
        ?>
" dir="<?php 
        $this->text('dir');
        ?>
">

		<?php 
        $this->html('csslinks');
        ?>
		<!--[if lt IE 7]><meta http-equiv="imagetoolbar" content="no" /><![endif]-->

		<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>

		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
		<!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        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'];
        }
        ?>
<!-- No [view source] tab for users who can not edit -->
<?php 
        global $wgUser;
        if (!$wgUser->isAllowed('edit')) {
            ?>
      <style type="text/css">
        #ca-nstab-main { display: none !important; }
        #ca-history { display: none !important; }
        #ca-viewsource { display: none !important; }
        #ca-talk { display: none !important; }
      </style>
    <?php 
        }
        ?>



<!-- heading -->
	<div id="mw_header">
<!-- removed h1 from here -->
<h1>
<a href="<?php 
        $this->text('stylepath');
        ?>
/../">
<img src="<?php 
        $this->text('stylepath');
        ?>
/bentham-modern/TB-logo.gif" alt="Transcribe Bentham: A Collaborative Initiative" style="border: 0;"/>
</a></h1>
   </div>

	<div id="mw_main">
	<div id="mw_contentwrapper">
	<!-- navigation portlet -->
	<div id="p-cactions" class="portlet">
		<h5><?php 
        $this->msg('views');
        ?>
</h5>
		<div class="pBody">
			<ul>
	<?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 $skin->tooltip("ca-{$key}");
            } else {
                echo $skin->tooltip("ca-{$key}");
            }
            echo '>' . htmlspecialchars($tab['text']) . '</a></li>';
        }
        ?>
			</ul>
		</div>
	</div>

	<!-- content -->
	<div id="mw_content">
	<!-- contentholder does nothing by default, but it allows users to style the text inside
	     the content area without affecting the meaning of 'em' in #mw_content, which is used
	     for the margins -->
	<div id="mw_contentholder">
		<div class='mw-topboxes'>
			<div id="mw-js-message" style="display:none;"></div>
			<div class="mw-topbox" id="siteSub"><?php 
        $this->msg('tagline');
        ?>
</div>
			<?php 
        if ($this->data['newtalk']) {
            ?>
<div class="usermessage mw-topbox"><?php 
            $this->html('newtalk');
            ?>
</div>
			<?php 
        }
        ?>
			<?php 
        if ($this->data['sitenotice']) {
            ?>
<div class="mw-topbox" id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div>
			<?php 
        }
        ?>
		</div>
<div id="contentTitle">
<h1 class="firstHeading" id="firstHeading"><?php 
        $this->data['displaytitle'] != "" ? $this->html('title') : $this->text('title');
        ?>
</h1>
</div>
      	<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['showjumplinks']) {
            ?>
<div id="jump-to-nav"><?php 
            $this->msg('jumpto');
            ?>
 <a href="#mw_portlets"><?php 
            $this->msg('jumptonavigation');
            ?>
</a>, <a href="#searchInput"><?php 
            $this->msg('jumptosearch');
            ?>
</a></div><?php 
        }
        ?>

		<?php 
        $this->html('bodytext');
        ?>
		<div class=''></div>
		<?php 
        if ($this->data['catlinks']) {
            $this->html('catlinks');
        }
        ?>
		<?php 
        $this->html('dataAfterContent');
        ?>
	</div><!-- mw_contentholder -->
	</div><!-- mw_content -->
	</div><!-- mw_contentwrapper -->

	<div id="mw_portlets">

	<!-- portlets -->
	<?php 
        $sidebar = $this->data['sidebar'];
        if (!isset($sidebar['SEARCH'])) {
            $sidebar['SEARCH'] = true;
        }
        if (!isset($sidebar['TOOLBOX'])) {
            $sidebar['TOOLBOX'] = true;
        }
        if (!isset($sidebar['LANGUAGES'])) {
            $sidebar['LANGUAGES'] = true;
        }
        foreach ($sidebar as $boxName => $cont) {
            if ($boxName == 'SEARCH') {
                $this->searchBox();
            } elseif ($boxName == 'TOOLBOX') {
                $this->toolbox();
            } elseif ($boxName == 'LANGUAGES') {
                $this->languageBox();
            } else {
                $this->customBox($boxName, $cont);
            }
        }
        ?>

	</div><!-- mw_portlets -->


	</div><!-- main -->

	<div class="mw_clear"></div>

	<!-- personal portlet -->
	<div class="portlet" id="p-personal">
<span id="p-personal-1">
  <a href="http://www.ucl.ac.uk/">UCL Home</a> » <a href="http://www.ucl.ac.uk/transcribe-bentham/">Transcribe Bentham</a> » <a href="../td/Transcribe_Bentham">Transcription Desk</a>
</span>

		<!-- <h5><?php 
        $this->msg('personaltools');
        ?>
</h5> -->
		<div class="pBody">
			<ul>
<?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
				<li id="<?php 
            echo Sanitizer::escapeId("pt-{$key}");
            ?>
"<?php 
            if ($item['active']) {
                ?>
 class="active"<?php 
            }
            ?>
><a href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
"<?php 
            echo $skin->tooltip('pt-' . $key);
            if (!empty($item['class'])) {
                ?>
 class="<?php 
                echo htmlspecialchars($item['class']);
                ?>
"<?php 
            }
            ?>
><?php 
            $sctitle = preg_replace('/\\b(\\w)/e', 'strtoupper("$1")', htmlspecialchars($item['text']));
            echo $sctitle;
            ?>
</a></li>
<?php 
        }
        ?>
			</ul>

</div>
	</div>


	<!-- footer -->
	<div id="footer">
			<ul id="f-list">
<?php 
        $footerlinks = array('lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', 'privacy', 'about', 'disclaimer', 'tagline');
        foreach ($footerlinks as $aLink) {
            if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                ?>
				<li id="<?php 
                echo $aLink;
                ?>
"><?php 
                $this->html($aLink);
                ?>
</li>
<?php 
            }
        }
        ?>
			</ul>
		<?php 
        echo $this->html("poweredbyico");
        ?>
	</div>

	<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        $this->html('reporttime');
        if ($this->data['debug']) {
            ?>
<!-- Debug output:
<?php 
            $this->text('debug');
            ?>
-->
<?php 
        }
        ?>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18161323-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</body>
</html>
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 8
0
 public function displayHtml()
 {
     global $IP, $wgTitle, $wgOut, $wgUser, $wgRequest, $wgContLanguageCode;
     global $wgLang, $wgContLang, $wgXhtmlDefaultNamespace;
     $sk = new SkinWikihowskin();
     $articleName = $wgTitle->getText();
     $partialUrl = $wgTitle->getPartialURL();
     $isMainPage = $articleName == wfMsg('mainpage');
     $action = $wgRequest->getVal('action', 'view');
     //$lang = $this->getSiteLanguage();
     //$deviceOpts = $this->getDevice();
     $pageExists = $wgTitle->exists();
     $randomUrl = '/' . wfMsg('special-randomizer');
     $titleBar = wfMsg('pagetitle', $articleName);
     $canonicalUrl = 'http://' . $IP . '/' . $wgTitle->getPartialURL();
     $rtl = $wgContLang->isRTL() ? " dir='RTL'" : '';
     $head_element = "<html xmlns:fb=\"https://www.facebook.com/2008/fbml\" xmlns=\"{$wgXhtmlDefaultNamespace}\" xml:lang=\"{$wgContLanguageCode}\" lang=\"{$wgContLanguageCode}\" {$rtl}>\n";
     $css = '/extensions/min/f/skins/WikiHow/new.css,extensions/wikihow/common/jquery-ui-themes/jquery-ui.css,extensions/wikihow/gallery/prettyPhoto-3.12/src/prettyPhoto.css,extensions/wikihow/NewLayout/Layout_03.css';
     if ($wgUser->getID() > 0) {
         $css .= ',/skins/WikiHow/loggedin.css';
     }
     $css .= '?' . WH_SITEREV;
     $css = wfGetPad($css);
     if ($wgIsDomainTest) {
         $base_href = '<base href="http://www.wikihow.com/" />';
     } else {
         $base_href = '';
     }
     $out = new OutputPage();
     $headlinks = $out->getHeadLinks();
     if (!$wgIsDomainTest) {
         $canonicalUrl = '<link rel="canonical" href="' . $wgTitle->getFullURL() . '" />';
     }
     //get login/sign up stuff
     $login = "";
     $li = $wgLang->specialPage("Userlogin");
     $lo = $wgLang->specialPage("Userlogout");
     $rt = $wgTitle->getPrefixedURL();
     if (0 == strcasecmp(urlencode($lo), $rt)) {
         $q = "";
     } else {
         $q = "returnto={$rt}";
     }
     if ($wgUser->getID()) {
         $uname = $wgUser->getName();
         if (strlen($uname) > 16) {
             $uname = substr($uname, 0, 16) . "...";
         }
         $login = wfMsg('welcome_back', $wgUser->getUserPage()->getFullURL(), $uname);
         if ($wgLanguageCode == 'en' && $wgUser->isFacebookUser()) {
             $login = wfMsg('welcome_back_fb', $wgUser->getUserPage()->getFullURL(), $wgUser->getName());
         }
     } else {
         $login = wfMsg('signup_or_login', $q) . " " . wfMsg('facebook_connect_header', wfGetPad("/skins/WikiHow/images/facebook_share_icon.gif"));
     }
     if ($wgUser->getID() > 0) {
         $helplink = $sk->makeLinkObj(Title::makeTitle(NS_CATEGORY, wfMsg('help')), wfMsg('help'));
         $logoutlink = $sk->makeLinkObj(Title::makeTitle(NS_SPECIAL, 'Userlogout'), wfMsg('logout'));
         $login .= " | " . $helplink . " | " . $logoutlink;
     }
     $headerVars = array('title' => $titleBar, 'head_element' => $head_element, 'base_href' => $base_href, 'globalvar_script' => Skin::makeGlobalVariablesScript($this->data), 'css' => $css, 'headlinks' => $headlinks, 'canon' => $canonicalUrl, 'headitems' => $wgOut->getHeadItems(), 'login' => $login);
     if ($wgUser->getID() > 0) {
         $footer_links = wfMsgExt('site_footer_new', 'parse');
     } else {
         $footer_links = wfMsgExt('site_footer_new_anon', 'parse');
     }
     if ($wgUser->getID() > 0 || $isMainPage) {
         $sub_foot = wfMsg('sub_footer_new', wfGetPad(), wfGetPad());
     } else {
         $sub_foot = wfMsg('sub_footer_new_anon', wfGetPad(), wfGetPad());
     }
     $footerVars = array('footer_links' => $footer_links, 'search' => GoogSearch::getSearchBox("cse-search-box-footer") . '<br />', 'cat_list' => $sk->getCategoryList(), 'sub_foot' => $sub_foot, 'footertail' => $this->getFooterTail());
     $article = $wgOut->getHTML();
     $wgOut->clearHTML();
     //parse that article text
     $article = call_user_func('self::parseArticle_' . self::ARTICLE_LAYOUT, $article);
     $wgOut->addHTML(EasyTemplate::html('header_' . self::ARTICLE_LAYOUT . '.tmpl.php', $headerVars));
     $wgOut->addHTML($article);
     $wgOut->addHTML(EasyTemplate::html('footer_' . self::ARTICLE_LAYOUT . '.tmpl.php', $footerVars));
     print $wgOut->getHTML();
 }
Exemplo n.º 9
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();
    }
Exemplo n.º 10
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()
    {
        global $wgRequest, $wgVersion, $wgUser, $wgTitle, $wgParser;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        // 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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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?7"; /*]]>*/</style>
		<!--[if lt IE 7]><script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/IEFixes.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
		<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>
		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
		<!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        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'];
        }
        ?>
	</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('dir');
        ?>
 <?php 
        $this->text('pageclass');
        ?>
 <?php 
        $this->text('skinnameclass');
        ?>
 <?php 
        echo $wgUser->isAnon() ? 'anonymous' : 'loggedin';
        ?>
 ">

<table id="globalWrapper" cellpadding="0" cellspacing="0"><tr><td colspan="3" id="banner">
	<script type="<?php 
        $this->text('jsmimetype');
        ?>
"> if (window.isMSIE55) fixalpha(); </script>
</td></tr>

<tr><td id="header" colspan="3">
	<div class="portlet" id="p-personal">
		<h5><?php 
        $this->msg('personaltools');
        ?>
</h5>
		<div class="pBody">
			<ul>
<?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
				<li id="pt-<?php 
            echo Sanitizer::escapeId($key);
            ?>
"<?php 
            if ($item['active']) {
                ?>
 class="active"<?php 
            }
            ?>
><a href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
"<?php 
            echo $skin->tooltipAndAccesskey('pt-' . $key);
            if (!empty($item['class'])) {
                ?>
 class="<?php 
                echo htmlspecialchars($item['class']);
                ?>
"<?php 
            }
            ?>
><?php 
            echo htmlspecialchars($item['text']);
            ?>
</a></li>
<?php 
        }
        ?>
			</ul>
		</div>
	</div>
	<div id="slogan"><?php 
        $title = 'header';
        $article = new Article(Title::newFromText($title, NS_MEDIAWIKI));
        $text = $article->fetchContent();
        if (empty($text)) {
            $text = wfMsg($title);
        }
        if (is_object($wgParser)) {
            $psr = $wgParser;
            $opt = $wgParser->mOptions;
        } else {
            $psr = new Parser();
            $opt = NULL;
        }
        if (!is_object($opt)) {
            $opt = ParserOptions::newFromUser($wgUser);
        }
        echo $psr->parse($text, $wgTitle, $opt, true, true)->getText();
        ?>
</div>
</td></tr>

<tr><td id="menubar" colspan="3">
	<?php 
        $title = 'menubar';
        $article = new Article(Title::newFromText($title, NS_MEDIAWIKI));
        $text = $article->fetchContent();
        if (empty($text)) {
            $text = wfMsg($title);
        }
        echo $psr->parse($text, $wgTitle, $opt, true, true)->getText();
        ?>
</td></tr>

<tr><td id="sidebar" valign="top">
	<?php 
        $title = 'sidebar';
        $article = new Article(Title::newFromText($title, NS_MEDIAWIKI));
        $text = $article->fetchContent();
        if (empty($text)) {
            $text = wfMsg($title);
        }
        echo $psr->parse($text, $wgTitle, $opt, true, true)->getText();
        ?>
	<div id="p-search" class="portlet">
		<h5><label for="searchInput"><?php 
        $this->msg('search');
        ?>
</label></h5>
		<div id="searchBody" class="pBody">
			<form action="<?php 
        $this->text('searchaction');
        ?>
" id="searchform"><div>
				<input id="searchInput" name="search" type="text"<?php 
        echo $skin->tooltipAndAccesskey('search');
        if (isset($this->data['search'])) {
            ?>
 value="<?php 
            $this->text('search');
            ?>
"<?php 
        }
        ?>
 />
				<input type='submit' name="go" class="searchButton" id="searchGoButton"	value="<?php 
        $this->msg('searcharticle');
        ?>
" />&nbsp;
				<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php 
        $this->msg('searchbutton');
        ?>
" />
			</div></form>
		</div>
	</div>
</td>

<td id="contentWrapper" valign="top">
	<div id="p-cactions" class="portlet">
		<h5><?php 
        $this->msg('views');
        ?>
</h5>
		<div class="pBody">
			<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->tooltipAndAccesskey('ca-' . $key);
            ?>
><?php 
            echo htmlspecialchars($tab['text']);
            ?>
</a></li>
	<?php 
        }
        ?>
			</ul>
		</div>
	</div>
	<a name="top" id="top"></a>
	<?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>
	<h1 class="firstHeading"><?php 
        $this->data['displaytitle'] != "" ? $this->html('title') : $this->text('title');
        ?>
</h1>
	<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="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"><?php 
            $this->msg('jumpto');
            ?>
 <a href="#column-one"><?php 
            $this->msg('jumptonavigation');
            ?>
</a>, <a href="#searchInput"><?php 
            $this->msg('jumptosearch');
            ?>
</a></div><?php 
        }
        ?>
		<!-- start content -->
		<?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>
</td>

<td id="rightnav" valign="top">
	<?php 
        $title = 'rightnav';
        $article = new Article(Title::newFromText($title, NS_MEDIAWIKI));
        $text = $article->fetchContent();
        if (empty($text)) {
            $text = wfMsg($title);
        }
        echo $psr->parse($text, $wgTitle, $opt, true, true)->getText();
        ?>
</td></tr>

<tr><td colspan="3" id="footer">
	<?php 
        $title = 'footer';
        $article = new Article(Title::newFromText($title, NS_MEDIAWIKI));
        $text = $article->fetchContent();
        if (empty($text)) {
            $text = wfMsg($title);
        }
        echo $psr->parse($text, $wgTitle, $opt, true, true)->getText();
        ?>
</td></tr>
</table>

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

</body></html>
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 11
0
    /**
     * Template filter callback for KG 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;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        // 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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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>
		<?php 
        $this->html('csslinks');
        ?>
		<style type="text/css" media="screen, projection">/*<![CDATA[*/
			@import "<?php 
        $this->text('stylepath');
        ?>
/common/shared.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";
			@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/main.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";
		/*]]>*/</style>
		<link rel="stylesheet" type="text/css" <?php 
        if (empty($this->data['printable'])) {
            ?>
media="print"<?php 
        }
        ?>
 href="<?php 
        $this->text('printcss');
        ?>
?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
" />
		<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>
                <script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
		<!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        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'];
        }
        ?>
	</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="globalWrapper">
	<div align="center">
	<br />
	<table width="95%" cellspacing="0" cellpadding="0">
		<tr>
			<td id="border-l" valign="top">
				<img src="<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/border_tl.jpg" />
			</td>
			<td id="bkg" align="left">
				<table width="100%" cellspacing="0" cellpadding="0">
					<tr>
					<td colspan="3" id="kgpersonal">
						<div class="portlet" id="p-personal">
							<div id="verytoph" align="left">
								<ul>
					<?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
									<li id="pt-<?php 
            echo Sanitizer::escapeId($key);
            ?>
"<?php 
            if ($item['active']) {
                ?>
 class="active"<?php 
            }
            ?>
><a href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
"<?php 
            echo $skin->tooltipAndAccesskey('pt-' . $key);
            if (!empty($item['class'])) {
                ?>
 class="<?php 
                echo htmlspecialchars($item['class']);
                ?>
"<?php 
            }
            ?>
><?php 
            echo htmlspecialchars($item['text']);
            ?>
</a></li>
					<?php 
        }
        ?>
								</ul>
							</div>
							</div>
					</td>
					</tr>
					<tr>
						<td id="kgthec">
							<div id="kgthel">
							&nbsp;
							</div>
							<div id="kgther">
							&nbsp;
							</div>
						</td>
					</tr>
				</table>
				<table width="100%" cellspacing="0" cellpadding="0">
					 <tr>
						<td id="menubar-l">&nbsp;</td>
						<td id="menubar-c">&nbsp;</td>
						<td id="menubar-r" valign="top" align="right">
							<div id="p-cactions" class="portlet">
							<h5><?php 
        $this->msg('views');
        ?>
</h5>
								<div class="pBody">
									<ul id="kgactul">
							<?php 
        foreach ($this->data['content_actions'] as $key => $tab) {
            echo '
										 <li id="ca-' . Sanitizer::escapeId($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 $skin->tooltip("ca-{$key}");
            } else {
                echo $skin->tooltipAndAccesskey("ca-{$key}");
            }
            echo '>' . htmlspecialchars($tab['text']) . '</a></li>';
        }
        ?>
									</ul>
								</div>

							</div>
						</td>
					</tr>
				</table>
				<table width="100%" cellspacing="0" cellpadding="0">
					<tr>
						<td>
							<table width="100%" cellspacing="0" cellpadding="0">
								<tr>
									<td id="sub-top"></td>
								</tr>
								<tr>
									<td id="lsub" valign="top">
										<div id="column-one">						
<?php 
        global $wgUser, $wgTitle, $wgParser;
        $title = 'sidebar';
        $article = new Article(Title::newFromText($title, NS_MEDIAWIKI));
        $text = $article->fetchContent();
        if (empty($text)) {
            $text = wfMsg($title);
        }
        if (is_object($wgParser)) {
            $psr = $wgParser;
            $opt = $wgParser->mOptions;
        } else {
            $psr = new Parser();
            $opt = NULL;
        }
        if (!is_object($opt)) {
            $opt = ParserOptions::newFromUser($wgUser);
        }
        echo $psr->parse($text, $wgTitle, $opt, true, true)->getText();
        ?>
										</div>
									</td>
									<td id="tdmain" valign="top">
											<div id="leaf">&nbsp;</div>
											<div id="margindiv">
												<div id="bodyContent">

													<a name="top" id="top"></a>
													<?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>
													<h1 class="firstHeading"><?php 
        $this->data['displaytitle'] != "" ? $this->html('title') : $this->text('title');
        ?>
</h1>
													<div><h3 id="siteSub"><?php 
        $this->msg('tagline');
        ?>
</h3>
													<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 
        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 
        }
        ?>
<!-- start content -->
<?php 
        $this->html('bodytext');
        if ($this->data['catlinks']) {
            $this->html('catlinks');
        }
        ?>
<!-- end content -->

												</div>
											</div>
											<div class="visualClear"></div>
										</div>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td>
							<table width="100%" cellspacing="0" cellpadding="0">
								<tr>
									<td id="logob-l">&nbsp;</td>
									<td id="logob-c" colspan="2">&nbsp;</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
			<td>
			<td id="border-r" valign="top">
				<img src="<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/border_tr.jpg" />
			</td>
		</tr>
		<tr>
		<td id="kgbl">&nbsp;</td>
		<td id="kgb" colspan="2">&nbsp;</td>
		<td id="kgbr">&nbsp;</td>
		</tr>
	</table>
</div>
	
	<!-- end of the left (by default at least) column -->
			<div class="visualClear"></div>
			
<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        $this->html('reporttime');
        if ($this->data['debug']) {
            ?>
<!-- Debug output:
<?php 
            $this->text('debug');
            ?>

-->
<?php 
        }
        ?>
</body></html>
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 12
0
 /**
  * Gets the global variables and mScripts; also adds userjs to the end if
  * enabled. Despite the name, these scripts are no longer put in the
  * <head> but at the bottom of the <body>
  *
  * @param $sk Skin object to use
  * @return String: HTML fragment
  */
 function getHeadScripts(Skin $sk)
 {
     global $wgUser, $wgRequest, $wgUseSiteJs;
     // Startup - this will immediately load jquery and mediawiki modules
     $scripts = $this->makeResourceLoaderLink($sk, 'startup', 'scripts', true);
     // Configuration -- This could be merged together with the load and go, but
     // makeGlobalVariablesScript returns a whole script tag -- grumble grumble...
     $scripts .= Skin::makeGlobalVariablesScript($sk->getSkinName()) . "\n";
     // Script and Messages "only" requests
     $scripts .= $this->makeResourceLoaderLink($sk, $this->getModuleScripts(), 'scripts');
     $scripts .= $this->makeResourceLoaderLink($sk, $this->getModuleMessages(), 'messages');
     // Modules requests - let the client calculate dependencies and batch requests as it likes
     if ($this->getModules()) {
         $scripts .= Html::inlineScript(ResourceLoader::makeLoaderConditionalScript(Xml::encodeJsCall('mediaWiki.loader.load', array($this->getModules())) . Xml::encodeJsCall('mediaWiki.loader.go', array()))) . "\n";
     }
     // Legacy Scripts
     $scripts .= "\n" . $this->mScripts;
     // Add site JS if enabled
     if ($wgUseSiteJs) {
         $scripts .= $this->makeResourceLoaderLink($sk, 'site', 'scripts');
     }
     // Add user JS if enabled - trying to load user.options as a bundle if possible
     $userOptionsAdded = false;
     if ($this->isUserJsAllowed() && $wgUser->isLoggedIn()) {
         $action = $wgRequest->getVal('action', 'view');
         if ($this->mTitle && $this->mTitle->isJsSubpage() && $sk->userCanPreview($action)) {
             # XXX: additional security check/prompt?
             $scripts .= Html::inlineScript("\n" . $wgRequest->getText('wpTextbox1') . "\n") . "\n";
         } else {
             $scripts .= $this->makeResourceLoaderLink($sk, array('user', 'user.options'), 'scripts');
             $userOptionsAdded = true;
         }
     }
     if (!$userOptionsAdded) {
         $scripts .= $this->makeResourceLoaderLink($sk, 'user.options', 'scripts');
     }
     return $scripts;
 }
Exemplo n.º 13
0
	public function executeIndex($params) {
		global $wgOut, $wgUser, $wgTitle, $wgRequest, $wgCityId, $wgAllInOne, $wgContLang, $wgJsMimeType;

		$allInOne = $wgAllInOne;

		// macbre: let extensions modify content of the page (e.g. EditPageLayout)
		$this->body = !empty($params['body']) ? $params['body'] : F::app()->renderView('CampfireBody', 'Index');

		// generate list of CSS classes for <body> tag
		$this->bodyClasses = array('mediawiki', $this->dir, $this->pageclass);
		$this->bodyClasses = array_merge($this->bodyClasses, self::$extraBodyClasses);
		$this->bodyClasses[] = $this->skinnameclass;

		if(Wikia::isMainPage()) {
			$this->bodyClasses[] = 'mainpage';
		}

		// add skin theme name
		$skin = $wgUser->getSkin();
		if(!empty($skin->themename)) {
			$this->bodyClasses[] = "oasis-{$skin->themename}";
		}

		$this->setupJavaScript();

		$this->printStyles = array();

		// render CSS <link> tags

		$this->headlinks = $wgOut->getHeadLinks();

		$this->pagetitle = htmlspecialchars( $this->pagetitle );
		$this->displaytitle =  htmlspecialchars( $this->displaytitle );
		$this->mimetype = htmlspecialchars( $this->mimetype );
		$this->charset = htmlspecialchars( $this->charset );

		$this->globalVariablesScript = Skin::makeGlobalVariablesScript($this->app->getSkinTemplateObj()->data);

		// printable CSS (to be added at the bottom of the page)
		// If this is an anon article view, use the combined version of the print files.
		if($allInOne){
			// Create the combined URL.
			global $parserMemc, $wgStyleVersion;
			$cb = $parserMemc->get(wfMemcKey('wgMWrevId'));

			global $wgDevelEnvironment;
			if(empty($wgDevelEnvironment)){
				$prefix = "__wikia_combined/";
			} else {
				global $wgWikiaCombinedPrefix;
				$prefix = $wgWikiaCombinedPrefix;
			}

			// no print styles
			$this->printStyles = array();
		}

		$this->printableCss = $this->renderPrintCSS(); // The HTML for the CSS links (whether async or not).

		// setup loading of JS/CSS using WSL (WikiaScriptLoader)
		$this->loadJs();

		// FIXME: create separate module for stats stuff?
		// load Google Analytics code
		$this->googleAnalytics = AnalyticsEngine::track('GA_Urchin', AnalyticsEngine::EVENT_PAGEVIEW);

		// onewiki GA
		$this->googleAnalytics .= AnalyticsEngine::track('GA_Urchin', 'onewiki', array($wgCityId));

		// track page load time
		$this->googleAnalytics .= AnalyticsEngine::track('GA_Urchin', 'pagetime', array('oasis'));

		// track browser height
		$this->googleAnalytics .= AnalyticsEngine::track('GA_Urchin', 'browser-height');

		// record which varnish this page was served by
		$this->googleAnalytics .= AnalyticsEngine::track('GA_Urchin', 'varnish-stat');

		$this->googleAnalytics .= AnalyticsEngine::track('GA_Urchin', 'noads');

		$this->googleAnalytics .= AnalyticsEngine::track('GA_Urchin', 'abtest');

		// Add important Gracenote analytics for reporting needed for licensing on LyricWiki.
		if (43339 == $wgCityId){
			$this->googleAnalytics .= AnalyticsEngine::track('GA_Urchin', 'lyrics');
		}

		// macbre: RT #25697 - hide Comscore & QuantServe tags on edit pages

		if(!in_array($wgRequest->getVal('action'), array('edit', 'submit'))) {
			$this->comScore = AnalyticsEngine::track('Comscore', AnalyticsEngine::EVENT_PAGEVIEW);
			$this->quantServe = AnalyticsEngine::track('QuantServe', AnalyticsEngine::EVENT_PAGEVIEW);
		}

		$this->mainsassfile = 'skins/campfire/css/campfire.scss';

	} // end executeIndex()
Exemplo n.º 14
0
    /**
     * Template filter callback for Modern 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;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        // 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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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>
<?php 
        if (empty($this->data['printable'])) {
            ?>
		<style type="text/css" media="screen, projection">/*<![CDATA[*/
			@import "<?php 
            $this->text('stylepath');
            ?>
/common/shared.css?<?php 
            echo $GLOBALS['wgStyleVersion'];
            ?>
";
			@import "<?php 
            $this->text('stylepath');
            ?>
/<?php 
            $this->text('stylename');
            ?>
/main.css?<?php 
            echo $GLOBALS['wgStyleVersion'];
            ?>
";
		/*]]>*/</style>
		<?php 
        }
        ?>
		<link rel="stylesheet" type="text/css" <?php 
        if (empty($this->data['printable'])) {
            ?>
media="print"<?php 
        }
        ?>
 href="<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/print.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
" />
		<!--[if lt IE 7]><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
		
		<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>
                
		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
		<!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        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'];
        }
        ?>
	</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');
        ?>
">

	<!-- heading -->
	<div id="mw_header">
		<h1 id="firstHeading"><?php 
        $this->data['displaytitle'] != "" ? $this->html('title') : $this->text('title');
        ?>
</h1>
	</div>

	<div id="mw_main">
	<div id="mw_contentwrapper">
	<!-- navigation portlet -->
	<div id="p-cactions" class="portlet">
		<h5><?php 
        $this->msg('views');
        ?>
</h5>
		<div class="pBody">
			<ul>
	<?php 
        foreach ($this->data['content_actions'] as $key => $tab) {
            echo '
				 <li id="ca-' . Sanitizer::escapeId($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 $skin->tooltip("ca-{$key}");
            } else {
                echo $skin->tooltipAndAccesskey("ca-{$key}");
            }
            echo '>' . htmlspecialchars($tab['text']) . '</a></li>';
        }
        ?>
			</ul>
		</div>
	</div>

	<!-- content -->
	<div id="mw_content">
	<!-- contentholder does nothing by default, but it allows users to style the text inside
	     the content area without affecting the meaning of 'em' in #mw_content, which is used
	     for the margins -->
	<div id="mw_contentholder">
		<div class='mw-topboxes'>
			<div class="mw-topbox" id="siteSub"><?php 
        $this->msg('tagline');
        ?>
</div>
			<?php 
        if ($this->data['newtalk']) {
            ?>
<div class="usermessage mw-topbox"><?php 
            $this->html('newtalk');
            ?>
</div>
			<?php 
        }
        ?>
			<?php 
        if ($this->data['sitenotice']) {
            ?>
<div class="mw-topbox" id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div>
			<?php 
        }
        ?>
		</div>

		<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['showjumplinks']) {
            ?>
<div id="jump-to-nav"><?php 
            $this->msg('jumpto');
            ?>
 <a href="#mw_portlets"><?php 
            $this->msg('jumptonavigation');
            ?>
</a>, <a href="#searchInput"><?php 
            $this->msg('jumptosearch');
            ?>
</a></div><?php 
        }
        ?>

		<?php 
        $this->html('bodytext');
        ?>
		<div class='mw_clear'></div>
		<?php 
        if ($this->data['catlinks']) {
            $this->html('catlinks');
        }
        ?>
	</div><!-- mw_contentholder -->
	</div><!-- mw_content -->
	</div><!-- mw_contentwrapper -->

	<div id="mw_portlets">

	<!-- portlets -->
	<?php 
        $sidebar = $this->data['sidebar'];
        if (!isset($sidebar['SEARCH'])) {
            $sidebar['SEARCH'] = true;
        }
        if (!isset($sidebar['TOOLBOX'])) {
            $sidebar['TOOLBOX'] = true;
        }
        if (!isset($sidebar['LANGUAGES'])) {
            $sidebar['LANGUAGES'] = true;
        }
        foreach ($sidebar as $boxName => $cont) {
            if ($boxName == 'SEARCH') {
                $this->searchBox();
            } elseif ($boxName == 'TOOLBOX') {
                $this->toolbox();
            } elseif ($boxName == 'LANGUAGES') {
                $this->languageBox();
            } else {
                $this->customBox($boxName, $cont);
            }
        }
        ?>

	</div><!-- mw_portlets -->


	</div><!-- main -->

	<div class="mw_clear"></div>

	<!-- personal portlet -->
	<div class="portlet" id="p-personal">
		<h5><?php 
        $this->msg('personaltools');
        ?>
</h5>
		<div class="pBody">
			<ul>
<?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
				<li id="pt-<?php 
            echo Sanitizer::escapeId($key);
            ?>
"<?php 
            if ($item['active']) {
                ?>
 class="active"<?php 
            }
            ?>
><a href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
"<?php 
            echo $skin->tooltipAndAccesskey('pt-' . $key);
            if (!empty($item['class'])) {
                ?>
 class="<?php 
                echo htmlspecialchars($item['class']);
                ?>
"<?php 
            }
            ?>
><?php 
            echo htmlspecialchars($item['text']);
            ?>
</a></li>
<?php 
        }
        ?>
			</ul>
		</div>
	</div>


	<!-- footer --> 
	<div id="footer">
			<ul id="f-list">
<?php 
        $footerlinks = array('lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', 'privacy', 'about', 'disclaimer', 'tagline');
        foreach ($footerlinks as $aLink) {
            if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                ?>
				<li id="<?php 
                echo $aLink;
                ?>
"><?php 
                $this->html($aLink);
                ?>
</li>
<?php 
            }
        }
        ?>
			</ul>
		<?php 
        echo $this->html("poweredbyico");
        ?>
	</div>

	<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        $this->html('reporttime');
        if ($this->data['debug']) {
            ?>
<!-- Debug output:
<?php 
            $this->text('debug');
            ?>
-->
<?php 
        }
        ?>
</body></html>
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 15
0
<!DOCTYPE html>
<html>
<head>
<title>Rate our Works-in-Progress!</title>
<meta name="viewport" content="width=device-width" /> 
<meta name="apple-mobile-web-app-capable" content="yes" />
<?php 
echo $GLOBALS['wgOut']->getHeadScripts();
echo Skin::makeGlobalVariablesScript(array('skinname' => 'mobile'));
?>
<script src="<?php 
echo wfGetPad('/extensions/min/g/mjq,mwh,mga,stb&rev=') . WH_SITEREV;
?>
"></script>
<link type="text/css" rel="stylesheet" href="<?php 
echo wfGetPad('/extensions/min/g/mwhc,mwhf,mwhh&rev=') . WH_SITEREV;
?>
" />
<style>
.overlay {
	position: fixed;
	z-index: 1;
	background-color: #F4F4F4;
}
.inner {
	z-index: 2;
	background-color: #F4F4F4;
	height: 300px;
	width: 250px;
	margin: 25px auto;
	text-align: center;
Exemplo n.º 16
0
    /**
     * Template filter callback for GuMax 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()
    {
        // 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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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');
        ?>
/gumax_main.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"; /*]]>*/</style>
    <link rel="search" type="application/opensearchdescription+xml" title="Glosar" href="http://www.i18n.ro/glosar/glosar-search.xml">
    <link rel="stylesheet" type="text/css" <?php 
        if (empty($this->data['printable'])) {
            ?>
media="print"<?php 
        }
        ?>
 href="<?php 
        $this->text('stylepath');
        ?>
/common/commonPrint.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
" />
    <link rel="stylesheet" type="text/css" media="handheld" href="<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/handheld.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
" />
    <!--[if lt IE 5.5000]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE50Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
    <!--[if IE 5.5000]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE55Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
    <!--[if IE 6]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE60Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
    <!--[if IE 7]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE70Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
    <!--[if lt IE 7]><script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/IEFixes.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
    <meta http-equiv="imagetoolbar" content="no" /><![endif]-->

    <?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>

    <script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
    <?php 
        if ($this->data['jsvarurl']) {
            ?>
        <script type="<?php 
            $this->text('jsmimetype');
            ?>
" src="<?php 
            $this->text('jsvarurl');
            ?>
"><!-- site js --></script>
    <?php 
        }
        ?>
    <?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'];
        }
        ?>
    <!-- Head Scripts -->
    <?php 
        $this->html('headscripts');
        ?>
</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 class="gumax-center" align="center">
<div id="gumax-rbox" align="left">
<div class="gumax-rbroundbox"><div class="gumax-rbtop"><div><div></div></div></div>
<div class="gumax-rbcontentwrap"><div class="gumax-rbcontent">

    <div class="gumax">
    <!-- =================== gumax-page =================== -->
    <div id="gumax-page">
    <?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>

    <!-- ===== Header ===== -->
    <div id="gumax-header">
        <a name="top" id="contentTop"></a>

        <!-- Site Logo -->
        <div id="gumax-p-logo">
            <div id="p-logo">
            <a style="background-image: url(<?php 
        $this->text('logopath');
        ?>
);" <?php 
        ?>
href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" <?php 
        ?>
title="<?php 
        $this->msg('mainpage');
        ?>
"></a>
            </div>
        </div>
        <!-- end of Site Logo -->

        <!-- date time -->
        <!--
        <div id="gumax-p-date">
            <?php 
        echo date("F j, Y, l, z");
        ?>
        </div>
        -->
        <!-- end of date time -->

        <!-- Login -->
        <div id="gumax-p-login">
            <ul>
              <?php 
        $lastkey = end(array_keys($this->data['personal_urls']));
        ?>
              <?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            if ($this->data['loggedin'] == 1) {
                ?>
<li id="gumax-pt-<?php 
                echo Sanitizer::escapeId($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>
               <?php 
                // if($key != $lastkey) echo "|"
                ?>
</li>
             <?php 
            }
        }
        ?>
            </ul>
        </div>
        <!-- end of Login -->

        <!-- Special and Login menu -->
        <div id="gumax-p-special">
            <ul>
              <?php 
        $lastkey = end(array_keys($this->data['personal_urls']));
        ?>
              <?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            if ($this->data['loggedin'] == 0) {
                ?>
<li id="gumax-pt-<?php 
                echo Sanitizer::escapeId($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>
               <?php 
                // if($key != $lastkey) echo "|"
                ?>
</li>
             <?php 
            }
        }
        ?>
            </ul>
        </div>
        <!-- end of Special and Login menu -->

        <!-- Search -->
        <div id="gumax-p-search" class="gumax-portlet">
            <div id="gumax-searchBody" class="gumax-pBody">
                <form action="<?php 
        $this->text('searchaction');
        ?>
" id="searchform"><div>
                    <input id="searchInput" name="search" 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('searcharticle');
        ?>
" />
                    <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php 
        $this->msg('searchbutton');
        ?>
" />
                </div></form>
            </div>
        </div> <!-- end of gumax-p-search DIV -->
        <!-- end of Search -->
    </div> <!-- end of header DIV -->
    <script type="<?php 
        $this->text('jsmimetype');
        ?>
"> if (window.isMSIE55) fixalpha(); </script>
    <!-- ===== end of Header ===== -->

    <!-- Navigation Menu -->
    <div id="gumax-p-navigation-wrapper">
        <?php 
        foreach ($this->data['sidebar'] as $bar => $cont) {
            ?>
            <div class='gumax-portlet' id='gumax-p-<?php 
            echo Sanitizer::escapeId($bar);
            ?>
'>
                <h5><?php 
            $out = wfMsg($bar);
            if (wfEmptyMsg($bar, $out)) {
                echo $bar;
            } else {
                echo $out;
            }
            ?>
</h5>
                <div id="gumax-p-navigation">
                    <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 htmlspecialchars($val['text']);
                ?>
</a></li>
                        <?php 
            }
            ?>
                    </ul>
                </div>
            </div>
        <?php 
        }
        ?>
    </div>
    <!-- end of Navigation Menu -->

    <div id="main_menu_spacer"></div>

    <!-- ===== dynamic site logo ===== -->
    <?php 
        $str1 = $this->data['pageclass'];
        $str2 = str_replace("page-", "", $str1);
        $pagename = strtolower($str2);
        ?>
 <!-- Get page name -->
    <?php 
        $file_ext_collection = array('.gif', '.png', '.jpg');
        $found = false;
        foreach ($file_ext_collection as $file_ext) {
            $filename = $_SERVER['DOCUMENT_ROOT'] . '/' . $this->data['stylepath'] . '/' . $this->data['stylename'] . '/images/header/' . $pagename . $file_ext;
            if (file_exists($filename)) {
                $sitelogo = $this->data['stylepath'] . '/' . $this->data['stylename'] . '/images/header/' . $pagename . $file_ext;
                $found = true;
                break;
            }
        }
        if ($found) {
            // $sitelogo = $this->data['stylepath'] . '/' . $this->data['stylename'] . '/images/header/' . 'default.jpg';
            ?>
        <div id="gumax-site-logo">
            <a style="background-image: url(<?php 
            echo $sitelogo;
            ?>
);" <?php 
            ?>
href="<?php 
            echo htmlspecialchars($GLOBALS['wgTitle']->getLocalURL());
            ?>
" <?php 
            ?>
title="<?php 
            $this->data['displaytitle'] != "" ? $this->html('title') : $this->text('title');
            ?>
"></a>
        </div>
    <?php 
        }
        ?>
    <!-- ===== end of dynamic site picture ===== -->

    <!-- ===== Content body ===== -->
    <div id="gumax-content-body">
    <!-- Main Content -->
    <div id="content">
        <a name="top" id="top"></a>
        <?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>
        <h1 class="firstHeading"><?php 
        $this->data['displaytitle'] != "" ? $this->html('title') : $this->text('title');
        ?>
</h1>
        <div id= "bodyContent" class="gumax-bodyContent">
            <h3 id="siteSub"><?php 
        $this->msg('tagline');
        ?>
</h3>
            <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 
        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 
        }
        ?>
            <!-- start content -->
            <?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>
    </div>
    <!-- end of Main Content -->
    </div>
    <!-- ===== end of Content body ===== -->

    <!-- ===== gumax-content-actions ===== -->
    <div id="gumax-content-actions">
        <ul>
            <?php 
        $lastkey = end(array_keys($this->data['content_actions']));
        ?>
            <?php 
        foreach ($this->data['content_actions'] as $key => $action) {
            if ($this->data['loggedin'] == 1) {
                ?>
               <li id="ca-<?php 
                echo Sanitizer::escapeId($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> <?php 
                // if($key != $lastkey) echo "&#8226;"
                ?>
</li>
            <?php 
            }
        }
        ?>
        </ul>
    </div>
    <!-- ===== end of gumax-content-actions ===== -->

    </div> <!-- end of gumax-page DIV -->
    <!-- =================== end of gumax-page =================== -->

    <div id="footer_spacer"></div>

    <!-- =================== gumax-page-footer =================== -->
    <div id="gumax-page-footer">
        <!-- personal tools  -->
        <div id="gumax-personal-tools">
            <ul>
            <?php 
        if ($this->data['loggedin'] == 1) {
            ?>
              <?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 
                }
            }
            if ($this->data['feeds']) {
                ?>
                  <li id="feedlinks"><?php 
                foreach ($this->data['feeds'] as $key => $feed) {
                    ?>
<span id="feed-<?php 
                    echo Sanitizer::escapeId($key);
                    ?>
"><a href="<?php 
                    echo htmlspecialchars($feed['href']);
                    ?>
"><?php 
                    echo htmlspecialchars($feed['text']);
                    ?>
</a>&nbsp;</span><?php 
                }
                ?>
</li> <?php 
            }
            ?>
              <?php 
            foreach (array('contributions', 'blockip', '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> <?php 
                    // if($special != 'specialpages') echo "|"
                    ?>
 </li>
                <?php 
                }
                ?>
              <?php 
            }
            if (!empty($this->data['nav_urls']['permalink']['href'])) {
                ?>
                        <li id="t-permalink"><a href="<?php 
                echo htmlspecialchars($this->data['nav_urls']['permalink']['href']);
                ?>
"><?php 
                $this->msg('permalink');
                ?>
</a></li><?php 
            } elseif ($this->data['nav_urls']['permalink']['href'] === '') {
                ?>
                        <li id="t-ispermalink"><?php 
                $this->msg('permalink');
                ?>
</li><?php 
            }
            wfRunHooks('MonoBookTemplateToolboxEnd', array(&$this));
            ?>

            <?php 
        }
        ?>
            </ul>
        </div>
        <!-- end of personal tools  -->

        <!-- gumax-footer -->
        <div id="gumax-footer">
            <div id="gumax-f-message">
                <?php 
        if ($this->data['lastmod']) {
            ?>
<span id="f-lastmod"><?php 
            $this->html('lastmod');
            ?>
</span>
                <?php 
        }
        if ($this->data['viewcount']) {
            ?>
<span id="f-viewcount"><?php 
            $this->html('viewcount');
            ?>
 </span>
                <?php 
        }
        ?>
            </div>
	<?php 
        if ($this->data['copyrightico']) {
            ?>
                                <div id="f-copyrightico"><?php 
            $this->html('copyrightico');
            ?>
</div>
            <?php 
        }
        ?>
                    
            <ul id="gumax-f-list">
                <?php 
        $footerlinks = array('numberofwatchingusers', 'credits', 'copyright', 'privacy', 'about', 'tagline');
        foreach ($footerlinks as $aLink) {
            if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                ?>
        <li id="<?php 
                echo $aLink;
                ?>
"><?php 
                $this->html($aLink);
                ?>
</li>
                <?php 
            }
        }
        ?>
                
                
            </ul>
        </div>  <!-- end of gumax-footer -->
        <?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        ?>
    </div>  <!-- end of gumax-page-footer -->
    <!-- =================== end of gumax-page-footer =================== -->
    </div>  <!-- class: gumax -->

</div></div>
<div class="gumax-rbbot"><div><div></div></div></div></div>
</div>
</div> <!--  end of gumax-center -->

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

</body></html>
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 17
0
 /**
  * Gets the global variables and mScripts; also adds userjs to the end if
  * enabled
  *
  * @param $sk Skin object to use
  * @return String: HTML fragment
  */
 function getHeadScripts(Skin $sk)
 {
     global $wgUser, $wgRequest, $wgJsMimeType, $wgUseSiteJs;
     global $wgStylePath, $wgStyleVersion;
     $scripts = Skin::makeGlobalVariablesScript($sk->getSkinName());
     $scripts .= Html::linkedScript("{$wgStylePath}/common/wikibits.js?{$wgStyleVersion}");
     //add site JS if enabled:
     if ($wgUseSiteJs) {
         $jsCache = $wgUser->isLoggedIn() ? '&smaxage=0' : '';
         $this->addScriptFile(Skin::makeUrl('-', "action=raw{$jsCache}&gen=js&useskin=" . urlencode($sk->getSkinName())));
     }
     //add user js if enabled:
     if ($this->isUserJsAllowed() && $wgUser->isLoggedIn()) {
         $action = $wgRequest->getVal('action', 'view');
         if ($this->mTitle && $this->mTitle->isJsSubpage() and $sk->userCanPreview($action)) {
             # XXX: additional security check/prompt?
             $this->addInlineScript($wgRequest->getText('wpTextbox1'));
         } else {
             $userpage = $wgUser->getUserPage();
             $scriptpage = Title::makeTitleSafe(NS_USER, $userpage->getDBkey() . '/' . $sk->getSkinName() . '.js');
             if ($scriptpage && $scriptpage->exists()) {
                 $userjs = Skin::makeUrl($scriptpage->getPrefixedText(), 'action=raw&ctype=' . $wgJsMimeType);
                 $this->addScriptFile($userjs);
             }
         }
     }
     $scripts .= "\n" . $this->mScripts;
     return $scripts;
 }
Exemplo n.º 18
0
    /**
     * Template filter callback for GuMaxDD 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;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        // 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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
xml:lang="<?php 
        $this->text('lang');
        ?>
" lang="<?php 
        $this->text('lang');
        ?>
" dir="<?php 
        $this->text('dir');
        ?>
">
   	<meta name="Description" content="ViciHooni is a knowledge repository of wiki pages from Hoonio.com, consisting of various research projects done in prominent academies as well as personal learning material accumulated over years." /> 
	<meta name="Keywords" content="Power deregulation, openGL, CFA, LSAT, python, Latin, Japanese, 日本語, 일본어, recruitment, job searching, trade logs, trading, website management, IB math" /> 
	<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>
		<?php 
        $this->html('csslinks');
        ?>

		<!--[if lt IE 7]><script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/IEFixes.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->

		<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>

		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
		<!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        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'];
        }
        ?>



	<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/scripts/jquery-1.3.2.min.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
	<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/scripts/jquery.droppy.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
	<script type="<?php 
        $this->text('jsmimetype');
        ?>
"> jQuery(function() { jQuery('#gumax-nav').droppy({speed: 200}); });</script>

<!--HOONIO global menu START-->

	<link rel="stylesheet" href="http://www.hoonio.com/blog/wp-content/themes/hoonio2011/base.css" type="text/css" /> 
</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('dir');
        ?>
 <?php 
        $this->text('pageclass');
        ?>
 <?php 
        $this->text('skinnameclass');
        ?>
">

<!-- ===== gumax-page ===== -->
<div id="gumax-page">

<div id="globalheader" class="wiki"> 
	<!--googleoff: all--> 
	<ul id="globalnav" class="menu"> 
		<li id="gn-hoonio"><a href="http://www.hoonio.com" title="Hoonio.com Home">Hoonio</a></li> 
		<li id="gn-info"><a href="http://www.hoonio.com/info" title="About Me & the Site">INFO</a></li> 
		<li id="gn-blog"><a href="http://www.hoonio.com/blog" title="Chronicles & Reflections">BLOG</a></li> 
		<li id="gn-foto"><a href="http://www.hoonio.com/foto" title="Photography">FOTO</a></li> 
		<li id="gn-wiki"><a href="http://www.hoonio.com/wiki/Main_Page" title="Knowledge & Repository">VICI</a></li> 
		<li id="gn-work"><a href="http://www.hoonio.com/work" title="Portfolio & Repertoire">WORK</a></li> 
		<li id="gn-wall"><a href="http://www.hoonio.com/wall" title="Social Network">WALL</a></li> 
	</ul> 
	<!--googleon: all--> 
	<div id="globalsearch"> 
		<form action="http://www.hoonio.com/search" id="cse-search-box">
			<div> 
				<!-- input type="hidden" name="cx" value="000024434167054242448:4mot2xdzgd8" /-->
				<input type="hidden" name="cx" value="partner-pub-5182625953902291:mp31b8-yoo0" />
				<input type="hidden" name="cof" value="FORID:9" />
				<input type="hidden" name="ie" value="UTF-8" />

				<input type="hidden" value="utf-8" name="oe" id="search-oe"> 
				<input type="hidden" value="p" name="access" id="search-access"> 
				<label for="sp-searchtext"><span class="prettyplaceholder">Search</span><input type="search" name="q" id="sp-searchtext" class="g-prettysearch applesearch" accesskey="s"></label> 
			</div> 
		</form> 
		<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
		<div id="sp-results"><div class="inside"></div></div> 
	</div> 
</div>

<!--HOONIO global menu END-->

	<!-- ///// gumax-header ///// -->
	<div id="gumax-header">


		<!-- Login Tools -->
		<div id="gumax-p-login">
			<?php 
        $this->personalLoginBox();
        ?>
		</div>
		<!-- end of Login Tools -->

		<!-- Search -->
		<?php 
        $this->searchBox();
        ?>
		<!-- end of Search -->

	</div>
	<!-- ///// end of gumax-header ///// -->



	<!-- Navigation Menu >
	<div id="gumax-p-navigation">
		<?php 
        $this->mainNavigationBox();
        ?>
	</div>
	< end of Navigation Menu -->
	<div style="clear:both"></div>

	<div class="gumax-p-navigation-spacer"></div>

	<!-- gumax-article-picture -->
	<?php 
        $this->articlePictureBox();
        ?>
	<!-- end of gumax-article-picture -->


    <!-- gumax-content-body -->
	<?php 
        $this->mainContentTopBottomBorderBox();
        ?>
    <!-- end of gumax-content-body -->


	<!-- gumax-content-actions -->
	<div id="gumax-content-actions">
		<?php 
        $this->contentActionBox();
        ?>
	</div>
	<!-- end of gumax-content-actions -->


	<div class="gumax-footer-spacer"></div>
	<!-- ///// gumax-footer ///// -->
	<div id="gumax-footer">


		<!-- personal specia tools  -->
		<?php 
        $this->wikiSpecialToolBox();
        ?>
		<!-- end of personal specia tools  -->


		<!-- gumax-f-message -->
		<?php 
        $this->articleMessageBox();
        ?>
		<!-- end of gumax-f-message -->


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


	</div>
	<!-- ///// end of gumax-footer ///// -->


		<!-- gumax-f-list -->
		<?php 
        $this->siteCreditBox();
        ?>
		<!-- end of gumax-f-list -->


</div>
<!-- ===== end of gumax-page ===== -->
<div class="visualClear"></div><div id="gumax_page_spacer"></div>



<?php 
        $this->html('reporttime');
        if ($this->data['debug']) {
            ?>
<!-- Debug output:
<?php 
            $this->text('debug');
            ?>

-->
<?php 
        }
        ?>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-3890189-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body></html>






	<!-- ======================================== FUNCTIONS ======================================= -->
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 19
0
    /**
     * Template filter callback for Fedora 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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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>
		<?php 
        $this->html('csslinks');
        ?>

  <link rel="stylesheet" type="text/css" media="all" href="/static/css/fedora.css" />
  <link rel="stylesheet" type="text/css" media="print" href="/static/css/print.css" />

		<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/main.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"; /*]]>*/</style>
		<link rel="stylesheet" type="text/css" <?php 
        if (empty($this->data['printable'])) {
            ?>
media="print"<?php 
        }
        ?>
 href="<?php 
        $this->text('stylepath');
        ?>
/common/commonPrint.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
" />
		<link rel="stylesheet" type="text/css" media="handheld" href="<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/handheld.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
" />
		<!--[if lt IE 5.5000]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE50Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
		<!--[if IE 5.5000]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE55Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
		<!--[if IE 6]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE60Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
		<!--[if IE 7]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE70Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
		<!--[if lt IE 7]><script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/IEFixes.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
		
		<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>
                
		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
<?php 
        if ($this->data['jsvarurl']) {
            ?>
		<script type="<?php 
            $this->text('jsmimetype');
            ?>
" src="<?php 
            $this->text('jsvarurl');
            ?>
"><!-- site js --></script>
<?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'];
        }
        ?>
		<!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        ?>
	</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="wrapper">
        <div id="head">
        <h1><a href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
" <?php 
        foreach ($skin->tooltipAndAccesskeyAttribs('n-mainpage') as $key => $value) {
            echo $key . '="' . $value . '" ';
        }
        ?>
>Fedora</a></h1>
	<div id="p-personal">
		<h5><?php 
        $this->msg('personaltools');
        ?>
</h5>
			<ul>
<?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
				<li id="pt-<?php 
            echo Sanitizer::escapeId($key);
            ?>
"<?php 
            if ($item['active']) {
                ?>
 class="active"<?php 
            }
            ?>
><a href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
" <?php 
            foreach ($skin->tooltipAndAccesskeyAttribs('pt-' . $key) as $attr_key => $attr_value) {
                echo $attr_key . '="' . $attr_value . '" ';
            }
            if (!empty($item['class'])) {
                ?>
 class="<?php 
                echo htmlspecialchars($item['class']);
                ?>
"<?php 
            }
            ?>
><?php 
            echo htmlspecialchars($item['text']);
            ?>
</a></li>
<?php 
        }
        ?>
			</ul>
	</div>

<!-- Top actions bar -->
	<div id="p-cactions">
		<h5><?php 
        $this->msg('views');
        ?>
</h5>
			<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 
            foreach ($skin->tooltipAndAccesskeyAttribs('ca-' . $key) as $attr_key => $attr_value) {
                echo $attr_key . '="' . $attr_value . '" ';
            }
            ?>
><?php 
            echo htmlspecialchars($tab['text']);
            ?>
</a></li>
	<?php 
        }
        ?>
			</ul>
	</div>

        </div>
<div id="sidebar">
<div id="nav">
<!-- Sidebar -->
	<?php 
        foreach ($this->data['sidebar'] as $bar => $cont) {
            ?>
	<div id='p-<?php 
            echo Sanitizer::escapeId($bar);
            ?>
'<?php 
            echo $skin->tooltip('p-' . $bar);
            ?>
>
		<h2><?php 
            $out = wfMsg($bar);
            if (wfEmptyMsg($bar, $out)) {
                echo $bar;
            } else {
                echo $out;
            }
            ?>
</h2>
			<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 
                foreach ($skin->tooltipAndAccesskeyAttribs($val['id']) as $attr_key => $attr_value) {
                    echo $attr_key . '="' . $attr_value . '" ';
                }
                ?>
><?php 
                echo htmlspecialchars($val['text']);
                ?>
</a></li>
<?php 
            }
            ?>
			</ul>
	</div>
	<?php 
        }
        ?>
	<div id="p-search">
		<h2><label for="searchInput"><?php 
        $this->msg('search');
        ?>
</label></h2>
			<form action="<?php 
        $this->text('searchaction');
        ?>
" id="searchform"><div>
				<input id="searchInput" name="search" type="text" <?php 
        foreach ($skin->tooltipAndAccesskeyAttribs('search') as $attr_key => $attr_value) {
            echo $attr_key . '="' . $attr_value . '" ';
        }
        if (isset($this->data['search'])) {
            ?>
 value="<?php 
            $this->text('search');
            ?>
"<?php 
        }
        ?>
 /><br />
				<input type='submit' name="go" class="searchButton" id="searchGoButton"	value="<?php 
        $this->msg('searcharticle');
        ?>
" />&nbsp;
				<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php 
        $this->msg('searchbutton');
        ?>
" />
			</div></form>
	</div>
	<div id="p-tb">
		<h2><?php 
        $this->msg('toolbox');
        ?>
</h2>
			<ul>
<?php 
        if ($this->data['notspecialpage']) {
            ?>
				<li id="t-whatlinkshere"><a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href']);
            ?>
" <?php 
            foreach ($skin->tooltipAndAccesskeyAttribs('t-whatlinkshere') as $attr_key => $attr_value) {
                echo $attr_key . '="' . $attr_value . '" ';
            }
            ?>
><?php 
            $this->msg('whatlinkshere');
            ?>
</a></li>
<?php 
            if ($this->data['nav_urls']['recentchangeslinked']) {
                ?>
				<li id="t-recentchangeslinked"><a href="<?php 
                echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href']);
                ?>
" <?php 
                foreach ($skin->tooltipAndAccesskeyAttribs('t-recentchangeslinked') as $attr_key => $attr_value) {
                    echo $attr_key . '="' . $attr_value . '" ';
                }
                ?>
><?php 
                $this->msg('recentchangeslinked');
                ?>
</a></li>
<?php 
            }
        }
        if (isset($this->data['nav_urls']['trackbacklink'])) {
            ?>
			<li id="t-trackbacklink"><a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href']);
            ?>
" <?php 
            foreach ($skin->tooltipAndAccesskeyAttribs('t-trackbacklink') as $attr_key => $attr_value) {
                echo $attr_key . '="' . $attr_value . '" ';
            }
            ?>
><?php 
            $this->msg('trackbacklink');
            ?>
</a></li>
<?php 
        }
        if ($this->data['feeds']) {
            ?>
			<li id="feedlinks"><?php 
            foreach ($this->data['feeds'] as $key => $feed) {
                ?>
<span id="feed-<?php 
                echo Sanitizer::escapeId($key);
                ?>
"><a href="<?php 
                echo htmlspecialchars($feed['href']);
                ?>
" <?php 
                foreach ($skin->tooltipAndAccesskeyAttribs('feed-' . $key) as $attr_key => $attr_value) {
                    echo $attr_key . '="' . $attr_value . '" ';
                }
                ?>
><?php 
                echo htmlspecialchars($feed['text']);
                ?>
</a>&nbsp;</span>
					<?php 
            }
            ?>
</li><?php 
        }
        foreach (array('contributions', 'blockip', 'emailuser', 'upload', 'specialpages') as $special) {
            if ($this->data['nav_urls'][$special]) {
                ?>
<li id="t-<?php 
                echo $special;
                ?>
"><a href="<?php 
                echo htmlspecialchars($this->data['nav_urls'][$special]['href']);
                ?>
" <?php 
                foreach ($skin->tooltipAndAccesskeyAttribs('t-' . $special) as $attr_key => $attr_value) {
                    echo $attr_key . '="' . $attr_value . '" ';
                }
                ?>
><?php 
                $this->msg($special);
                ?>
</a></li>
<?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 
            foreach ($skin->tooltipAndAccesskeyAttribs('t-print') as $attr_key => $attr_value) {
                echo $attr_key . '="' . $attr_value . '" ';
            }
            ?>
><?php 
            $this->msg('printableversion');
            ?>
</a></li><?php 
        }
        if (!empty($this->data['nav_urls']['permalink']['href'])) {
            ?>
				<li id="t-permalink"><a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['permalink']['href']);
            ?>
"<?php 
            foreach ($skin->tooltipAndAccesskeyAttribs('t-permalink') as $attr_key => $attr_value) {
                echo $attr_key . '="' . $attr_value . '" ';
            }
            ?>
><?php 
            $this->msg('permalink');
            ?>
</a></li><?php 
        } elseif ($this->data['nav_urls']['permalink']['href'] === '') {
            ?>
				<li id="t-ispermalink"<?php 
            echo $skin->tooltip('t-ispermalink');
            ?>
><?php 
            $this->msg('permalink');
            ?>
</li><?php 
        }
        wfRunHooks('MonoBookTemplateToolboxEnd', array(&$this));
        ?>
			</ul>
	</div>
<?php 
        if ($this->data['language_urls']) {
            ?>
	<div id="p-lang">
		<h2><?php 
            $this->msg('otherlanguages');
            ?>
</h2>
			<ul>
<?php 
            foreach ($this->data['language_urls'] as $langlink) {
                ?>
				<li class="<?php 
                echo htmlspecialchars($langlink['class']);
                ?>
"><?php 
                ?>
<a href="<?php 
                echo htmlspecialchars($langlink['href']);
                ?>
"><?php 
                echo $langlink['text'];
                ?>
</a></li>
<?php 
            }
            ?>
			</ul>
	</div>
<?php 
        }
        ?>
</div>
</div><!-- end of the left (by default at least) column -->

	<div id="content">
		<?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>
		<h2><?php 
        $this->data['displaytitle'] != "" ? $this->html('title') : $this->text('title');
        ?>
</h2>
			<h3 id="siteSub"><?php 
        $this->msg('tagline');
        ?>
</h3>
			<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 
        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 
        }
        ?>
			<!-- start content -->
			<?php 
        $this->html('bodytext');
        ?>
			<?php 
        if ($this->data['catlinks']) {
            ?>
<div id="catlinks"><?php 
            $this->html('catlinks');
            ?>
</div><?php 
        }
        ?>
			<!-- end content -->
	</div>

<!-- Top login, etc. bar -->
<!-- #p-personal moved to inside #content so the text color says the same -->
	<script type="<?php 
        $this->text('jsmimetype');
        ?>
"> if (window.isMSIE55) fixalpha(); </script>
</div>
			<div id="bottom">
			<div id="footer">
<?php 
        if ($this->data['poweredbyico']) {
            ?>
				<div id="f-poweredbyico"><?php 
            $this->html('poweredbyico');
            ?>
</div>
<?php 
        }
        if ($this->data['copyrightico']) {
            ?>
				<div id="f-copyrightico"><?php 
            $this->html('copyrightico');
            ?>
</div>
<?php 
        }
        // Generate additional footer links
        ?>
      <p class="copy">
      Copyright &copy; <?php 
        echo date('Y');
        ?>
 Red Hat, Inc. and others.  All Rights Reserved.  For comments or queries, please <a href="/contact">contact us</a>.
      </p>
      <p class="disclaimer">
      The Fedora Project is maintained and driven by the community and sponsored by Red Hat.  This is a community maintained site.  Red Hat is not responsible for content.
      </p>
			<ul>
<?php 
        $footerlinks = array('lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright');
        $count = 0;
        foreach ($footerlinks as $aLink) {
            $count++;
            $first = '';
            if ($count == 1) {
                $first = ' class="first"';
            }
            if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                ?>
				<li<?php 
                echo $first;
                ?>
 id="<?php 
                echo $aLink;
                ?>
"><?php 
                $this->html($aLink);
                ?>
</li>
<?php 
            }
        }
        ?>
			</ul>
			<ul>
<?php 
        $footerlinks = array('privacy', 'about', 'disclaimer', 'tagline');
        $count = 0;
        foreach ($footerlinks as $aLink) {
            $count++;
            $first = '';
            if ($count == 1) {
                $first = ' class="first"';
            }
            if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                ?>
				<li<?php 
                echo $first;
                ?>
 id="<?php 
                echo $aLink;
                ?>
"><?php 
                $this->html($aLink);
                ?>
</li>
<?php 
            }
        }
        ?>
        <li><a href="http://fedoraproject.org/en/sponsors">Sponsors</a></li>
        <li><a href="http://fedoraproject.org/wiki/Legal:Main">Legal</a></li>
        <li><a href="http://fedoraproject.org/wiki/Legal:Trademark_guidelines">Trademark Guidelines</a></li>
      </ul>
		</div>
		</div>
		
	<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        ?>

  <script src="https://apps.fedoraproject.org/fedmenu/js/jquery-1.11.2.min.js"></script>
  <script src="https://apps.fedoraproject.org/fedmenu/js/fedora-libravatar.js"></script>
  <script src="https://apps.fedoraproject.org/fedmenu/js/fedmenu.js"></script>
  <script>
    fedmenu({
        'url': 'https://apps.fedoraproject.org/js/data.js',
        'mimeType': 'application/javascript',
        'position': 'bottom-right',
        <?php 
        $subject = $skin->getTitle()->getInternalURL();
        $pattern = '/User:([a-zA-Z0-9]+)(\\/.*)?$/';
        preg_match($pattern, $subject, $matches);
        if (sizeof($matches) >= 2) {
            echo "'user': '******',";
        }
        ?>
    });
  </script>

<?php 
        $this->html('reporttime');
        if ($this->data['debug']) {
            ?>
<!-- Debug output:
<?php 
            $this->text('debug');
            ?>

-->
<?php 
        }
        ?>
</body></html>
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 20
0
	function execute() {
		wfProfileIn( __METHOD__ );
		global $wgContLang, $wgAllInOne, $wgArticle, $wgUser, $wgLogo, $wgStylePath, $wgStyleVersion, $wgRequest, $wgTitle, $wgSitename, $wgEnableFAST_HOME2, $wgExtensionsPath, $wgAllInOne, $wgContentNamespaces, $wgEnableRecipesTweaksExt, $wgBlankImgUrl;

		$skin = $wgUser->getSkin();
		$namespace = $wgTitle->getNamespace();

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php
	foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
		?>xmlns:<?php echo "{$tag}=\"{$ns}\" ";
	} ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>">
<?php		wfProfileIn( __METHOD__ . '-head'); ?>
	<head>
		<meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
                <!-- Skin = <?php echo basename(__FILE__) ?> -->
		<?php $this->html('headlinks') ?>

		<title><?php $this->text('pagetitle') ?></title>
		<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
<?php
	$allinone = $wgAllInOne;

	// Getting the extension CSS in a similar way to Oasis (whole skin should ideally be ported to Oasis soon).

	// Remove the media="print CSS from the normal array and add it to another so that it can be loaded asynchronously at the bottom of the page.
	global $wgOut;
	$printStyles = array();
	$tmpOut = new OutputPage();
	$tmpOut->styles = $wgOut->styles;
	foreach($tmpOut->styles as $style => $options) {
		if (isset($options['media']) && $options['media'] == 'print') {
			unset($tmpOut->styles[$style]);
			$printStyles[$style] = $options;
		}
	}

	// render CSS <link> tags
	$csslinks = $tmpOut->buildCssLinks();

	// Extension css
	print $csslinks;

	// Site-CSS.
	global $wgUser, $wgStylePath, $wgJsMimeType;
	$srcs = AssetsManager::getInstance()->getGroupLocalURL($wgUser->isLoggedIn() ? 'site_user_css' : 'site_anon_css');
	$srcs[] = $wgStylePath."/lyricsminimal/article.css"; // Probably ghetto.  This whole skin needs to just be rewritten as Oasis modifications anyway though.
	foreach($srcs as $src) {
		echo '<link rel="stylesheet" href="'. htmlspecialchars( $src ) .'">';
	}

	// Javascript (Oasis Style).
	$jsFiles =  '';
	$srcs = AssetsManager::getInstance()->getGroupCommonURL('oasis_shared_js');
	$srcs = array_merge($srcs, AssetsManager::getInstance()->getGroupCommonURL('oasis_extensions_js'));
	$srcs = array_merge($srcs, AssetsManager::getInstance()->getGroupLocalURL($wgUser->isLoggedIn() ? 'oasis_user_js' : 'oasis_anon_js'));
	foreach($srcs as $src) {
		$jsFiles .= "<script type=\"$wgJsMimeType\" src=\"$src\"></script>";
	}
	print $jsFiles;

	if($wgRequest->getVal('action') != '' || $namespace == NS_SPECIAL) {
		$this->html('WikiaScriptLoader');
		$this->html('JSloader');

		$this->html('headscripts');
	}



	$this->printAdditionalHead();
?>
	</head>
<?php		wfProfileOut( __METHOD__ . '-head');  ?>

<?php
wfProfileIn( __METHOD__ . '-body'); ?>
<?php
	if (WikiaPageType::isMainPage()){
		$isMainpage = ' mainpage';
	} else {
		$isMainpage = null;
	}

	$action = $wgRequest->getVal('action');
	if (in_array($action, array('edit', 'history', 'diff', 'delete', 'protect', 'unprotect', 'submit'))) {
		$body_css_action = 'action_' . $action;
	} else if (empty($action) || in_array($action, array('view', 'purge'))) {
		$body_css_action = 'action_view';
	} else {
		$body_css_action = '';
	}


	if(!isset($this->extraBodyClasses)){
		// For extra classes to put on the body tag.  This allows overriding sub-skins to create selectors specific to their sub-skin (such as custom answers).
		$this->extraBodyClasses = array();
	}
?>
	<body<?php if($this->data['body_onload'    ]) { ?> onload="<?php     $this->text('body_onload')     ?>"<?php } ?>
 class="mediawiki <?php $this->text('dir') ?> <?php $this->text('pageclass') ?><?php if(!empty($this->data['printable']) ) { ?> printable<?php } ?><?php if (!$wgUser->isLoggedIn()) { ?> loggedout<?php } ?> color2 wikiaSkinMonaco wikiaSkinLyricsMinimal<?=$isMainpage?> <?= $body_css_action ?><?php print " ".implode($this->extraBodyClasses, " "); ?>" id="body">
	<?php
	// Sometimes we need an ad delivered at the very top of the page (like for a skin)
	// This sucks to have a blocking call at the top of the page, but they promised
	// to only do it if they needed. Only use DART or Google (fast Ad Providers with good infrastructure)
	global $wgOut;
	if (WikiaPageType::isMainPage()){
		echo '<script type="text/javascript" src="/extensions/wikia/AdEngine/AdEngine.js"></script>' . "\n";
		echo AdEngine::getInstance()->getAd('HOME_INVISIBLE_TOP');
	} else if ($wgOut->isArticle() && WikiaPageType::isContentPage()){
		echo '<script type="text/javascript" src="/extensions/wikia/AdEngine/AdEngine.js"></script>' . "\n";
		echo AdEngine::getInstance()->getAd('INVISIBLE_TOP');
	}
?>
<?php
	// this hook allows adding extra HTML just after <body> opening tag
	// append your content to $html variable instead of echoing
	$html = '';
	wfRunHooks('GetHTMLAfterBody', array ($this, &$html));
	echo $html;

	// NOTE: Removed wikia_header and user links.
?>
		<!-- PAGE -->
<?php		wfProfileIn( __METHOD__ . '-page'); ?>

	<div class="monaco_shrinkwrap" id="monaco_shrinkwrap_main">
<?php
wfRunHooks('MonacoBeforeWikiaPage', array($this));
?>
		<div id="wikia_page">
<?php
wfRunHooks('MonacoBeforePageBar', array($this));
if(empty($wgEnableRecipesTweaksExt) || !RecipesTweaks::isHeaderStripeShown()) {
		echo AdEngine::getInstance()->getSetupHtml();
?>
		<div class='lyricsMinimalTop clearfix'>
			<div id="wiki_logo" style="background-image: url(<?= $wgLogo ?>);"><a href="<?= htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>" accesskey="z"><?= $wgSitename ?></a></div>

			<!-- // TODO: Place REAL leaderboard ad here. -->
			<!-- <div id="lyricsMinimalTop_leader"><img src="http://www.iab.net/media/image/728X90.gif"/></div> -->

		</div>
			<?php
				// NOTE: Removed page-bar page_bar here.
			?>
					<!-- ARTICLE -->

<?php }		wfProfileIn( __METHOD__ . '-article'); ?>
			<div id="article" <?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>>
				<a name="top" id="top"></a>
				<?php
				wfRunHooks('MonacoAfterArticle', array($this)); // recipes: not needed?
				global $wgSupressSiteNotice, $wgEnableCommunityMessagesExt;
				if ( empty( $wgEnableCommunityMessagesExt ) && empty( $wgSupressSiteNotice ) && $this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
				<?php
				global $wgSupressPageTitle;
				if( empty( $wgSupressPageTitle ) ){
					$this->printFirstHeading();
				}

				if ($wgRequest->getVal('action') == 'edit') {
					//echo '<br /><a href="#" id="editTipsLink" onclick="editTips(); return false;">Show Editing Tips</a>';
				}
				?>
				<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="contentSub2"><?php     $this->html('undelete') ?></div><?php } ?>
					<?php if($this->data['newtalk'] ) { ?><div class="usermessage noprint"><?php $this->html('newtalk')  ?></div><?php } ?>
					<?php if(!empty($skin->newuemsg)) { echo $skin->newuemsg; } ?>
					<?php echo $this->getTopAdCode(); ?>

					<!-- start content -->
					<?php
					// Display content
					$this->printContent();
					$this->printCategories();
					?>
					<!-- end content -->
					<?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
					<div class="visualClear"></div>
				</div>

				<!--google_ad_section_end-->
				<!--contextual_targeting_end-->

			</div>
			<!-- /ARTICLE -->
			<?php

			// NOTE: Removed article footer.

			wfProfileOut( __METHOD__ . '-article');
		?>
		</div>
		<!-- /PAGE -->
<!-- Begin Analytics -->
<?php
// Note, these were placed above the Ad calls intentionally because ad code screws with analytics
echo AnalyticsEngine::track('GA_Urchin', AnalyticsEngine::EVENT_PAGEVIEW);
echo AnalyticsEngine::track('GA_Urchin', 'hub', AdEngine::getCachedCategory());
global $wgCityId;
echo AnalyticsEngine::track('GA_Urchin', 'onewiki', array($wgCityId));
echo AnalyticsEngine::track('GA_Urchin', 'pagetime', array('lean_monaco'));
if (43339 == $wgCityId) echo AnalyticsEngine::track("GA_Urchin", "lyrics");
?>
<!-- End Analytics -->

<?php		wfProfileOut( __METHOD__ . '-page'); ?>

		<noscript><link rel="stylesheet" type="text/css" href="<?= $wgStylePath ?>/monaco/css/noscript.css?<?= $wgStyleVersion ?>" /></noscript>
<?php
	if(!($wgRequest->getVal('action') != '' || $namespace == NS_SPECIAL)) {
		$this->html('WikiaScriptLoader');
		$this->html('JSloader');
		$this->html('headscripts');
	}
	echo '<script type="text/javascript">/*<![CDATA[*/for(var i=0;i<wgAfterContentAndJS.length;i++){wgAfterContentAndJS[i]();}/*]]>*/</script>' . "\n";

if (array_key_exists("TOP_RIGHT_BOXAD", AdEngine::getInstance()->getPlaceholders())){
	// Reset elements with a "clear:none" to "clear:right" when the box ad is displayed
        // Fixes pages like this: http://en.dcdatabaseproject.com/Fang_Zhifu_(New_Earth)
	echo '<script type="text/javascript">AdEngine.resetCssClear("right");</script>' . "\n";
}

	// NOTE: Removed wikia_footer.

	// NOTE: Removed WIDGETS (sidebar stuff) here.

// curse like cobranding
$this->printCustomFooter();
?>

<?php
/* Put two "invisible" ad slots here. These are for loading ads that just load javascript,
but it isn't positioned at any particular part of a page, such as a slider or a interstitial */
if ($wgOut->isArticle() && WikiaPageType::isContentPage()){
	echo AdEngine::getInstance()->getAd('INVISIBLE_1');
}

echo AdEngine::getInstance()->getDelayedIframeLoadingCode();

if ($wgOut->isArticle() && WikiaPageType::isContentPage()){
	echo AdEngine::getInstance()->getAd('INVISIBLE_2');
}


echo '</div>';

// Quant serve moved *after* the ads because it depends on Athena/Provider values.
// macbre: RT #25697 - hide Quantcast Tags on edit pages
if ( in_array($wgRequest->getVal('action'), array('edit', 'submit')) ) {
	echo '<!-- QuantServe and comscore hidden on edit page -->';
}
else {
	echo AnalyticsEngine::track('Comscore', AnalyticsEngine::EVENT_PAGEVIEW);
	echo AnalyticsEngine::track('QuantServe', AnalyticsEngine::EVENT_PAGEVIEW);
	echo AnalyticsEngine::track('Exelate', AnalyticsEngine::EVENT_PAGEVIEW);
}

$this->html('bottomscripts'); /* JS call to runBodyOnloadHook */
wfRunHooks('SpecialFooter');
?>
		<div id="positioned_elements" class="reset"></div>
<?php
$this->html('reporttime');
wfProfileOut( __METHOD__ . '-body');
?>

	</body>
</html>
<?php
		wfProfileOut( __METHOD__ );
	} // end execute()
Exemplo n.º 21
0
    function head()
    {
        ?>
<style type="text/css" media="screen,projection">/*<![CDATA[*/
	@import "<?php 
        $this->text('stylepath');
        ?>
/common/shared.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";
	@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/main.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";
/*]]>*/</style>
<link rel="stylesheet" type="text/css" <?php 
        if (empty($this->data['printable'])) {
            ?>
media="print"<?php 
        }
        ?>
 href="<?php 
        $this->text('stylepath');
        ?>
/wolfbane/print.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
" />
<link rel="stylesheet" type="text/css" media="handheld" href="<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/handheld.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
" />
<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>
<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
<?php 
        if ($this->data['jsvarurl']) {
            ?>
<script type="<?php 
            $this->text('jsmimetype');
            ?>
" src="<?php 
            $this->text('jsvarurl');
            ?>
"><!-- site js --></script>
<script type="<?php 
            $this->text('jsmimetype');
            ?>
">
var watcht = "<?php 
            echo $this->getTabOut("watch", $this->data['content_actions']['watch']['text']);
            ?>
";
var uwatcht = "<?php 
            echo $this->getTabOut("unwatch", $this->data['content_actions']['unwatch']['text']);
            ?>
";
</script>
<script type="<?php 
            $this->text('jsmimetype');
            ?>
" src="<?php 
            $this->text('stylepath');
            ?>
/wolfbane/ajax-watch.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'];
        }
        ?>
<!-- Head Scripts -->
<?php 
        $this->html('headscripts');
    }
Exemplo n.º 22
0
    /**
     * Template filter callback for wikiHow 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 $wgArticle, $wgUser, $wgLang, $wgTitle, $wgRequest, $wgParser, $wgGoogleSiteVerification;
        global $wgOut, $wgScript, $wgStylePath, $wgLanguageCode, $wgForumLink;
        global $wgContLang, $wgXhtmlDefaultNamespace, $wgContLanguageCode;
        global $wgWikiHowSections, $IP, $wgServer, $wgServerName, $wgIsDomainTest;
        global $wgSSLsite, $wgSpecialPages;
        $prefix = "";
        if (class_exists('MobileWikihow')) {
            $mobileWikihow = new MobileWikihow();
            $result = $mobileWikihow->controller();
            // false means we stop processing template
            if (!$result) {
                return;
            }
        }
        $action = $wgRequest->getVal('action', 'view');
        if (count($wgRequest->getVal('diff')) > 0) {
            $action = 'diff';
        }
        $isMainPage = $wgTitle && $wgTitle->getNamespace() == NS_MAIN && $wgTitle->getText() == wfMsgForContent('mainpage') && $action == 'view';
        $isArticlePage = $wgTitle && !$isMainPage && $wgTitle->getNamespace() == NS_MAIN && $action == 'view';
        $isDocViewer = $wgTitle->getText() == "DocViewer";
        $isBehindHttpAuth = !empty($_SERVER['HTTP_AUTHORIZATION']);
        // determine whether or not the user is logged in
        $isLoggedIn = $wgUser->getID() > 0;
        $isTool = false;
        wfRunHooks('getToolStatus', array(&$isTool));
        $sk = $wgUser->getSkin();
        wikihowAds::setCategories();
        if (!$isLoggedIn && $action == "view") {
            wikihowAds::getGlobalChannels();
        }
        $isWikiHow = false;
        if ($wgArticle != null && $wgTitle->getNamespace() == NS_MAIN) {
            $whow = WikihowArticleEditor::newFromCurrent();
            $isWikiHow = $whow->isWikihow();
        }
        $showAds = wikihowAds::isEligibleForAds();
        $isIndexed = RobotPolicy::isIndexable($wgTitle);
        // set the title and what not
        $avatar = '';
        if ($wgTitle->getNamespace() == NS_USER || $wgTitle->getNamespace() == NS_USER_TALK) {
            $username = $wgTitle->getText();
            $usernameKey = $wgTitle->getDBKey();
            $avatar = $wgLanguageCode == 'en' ? Avatar::getPicture($usernameKey) : "";
            $pagetitle = $username;
            $this->set("pagetitle", $wgLang->getNsText(NS_USER) . ": {$pagetitle} - wikiHow");
            if ($wgTitle->getNamespace() == NS_USER_TALK) {
                $pagetitle = $wgLang->getNsText(NS_USER_TALK) . ": {$pagetitle}";
                $this->set("pagetitle", "{$pagetitle} - wikiHow");
            } elseif ($username == $wgUser->getName()) {
                //user's own page
                $profileboxname = wfMsg('profilebox-name');
                $profile_links = "<div id='gatEditRemoveButtons'>\n\t\t\t\t\t\t\t\t<a href='/Special:Profilebox' id='gatProfileEditButton' >Edit</a>\n\t\t\t\t\t\t\t\t | <a href='#' onclick='removeUserPage(\"{$profileboxname}\");'>Remove {$profileboxname}</a>\n\t\t\t\t\t\t\t\t </div>";
            }
            $h1 = $pagetitle . $profile_links;
            $this->set("title", $h1);
        }
        $title = $this->data['pagetitle'];
        if ($isWikiHow && $action == "view") {
            if ($wgLanguageCode == 'en') {
                if (!$this->titleTest) {
                    $this->titleTest = TitleTests::newFromTitle($wgTitle);
                }
                if ($this->titleTest) {
                    $title = $this->titleTest->getTitle();
                }
            } else {
                $howto = wfMsg('howto', $this->data['title']);
                $title = wfMsg('pagetitle', $howto);
            }
        }
        if ($isMainPage) {
            $title = 'wikiHow - ' . wfMsg('main_title');
        }
        if ($wgTitle->getNamespace() == NS_CATEGORY) {
            $title = wfMsg('category_title_tag', $wgTitle->getText());
        }
        $logoutPage = $wgLang->specialPage("Userlogout");
        $returnTarget = $wgTitle->getPrefixedURL();
        $returnto = strcasecmp(urlencode($logoutPage), $returnTarget) ? "returnto={$returnTarget}" : "";
        $login = "";
        if (!$wgUser->isAnon()) {
            $uname = $wgUser->getName();
            if (strlen($uname) > 16) {
                $uname = substr($uname, 0, 16) . "...";
            }
            $login = wfMsg('welcome_back', $wgUser->getUserPage()->getFullURL(), $uname);
            if ($wgLanguageCode == 'en' && $wgUser->isFacebookUser()) {
                $login = wfMsg('welcome_back_fb', $wgUser->getUserPage()->getFullURL(), $wgUser->getName());
            } elseif ($wgLanguageCode == 'en' && $wgUser->isGPlusUser()) {
                $gname = $wgUser->getName();
                if (substr($gname, 0, 3) == 'GP_') {
                    $gname = substr($gname, 0, 12) . '...';
                }
                $login = wfMsg('welcome_back_gp', $wgUser->getUserPage()->getFullURL(), $gname);
            }
        } else {
            if ($wgLanguageCode == "en") {
                $login = wfMsg('signup_or_login', $returnto) . " " . wfMsg('social_connect_header');
            } else {
                $login = wfMsg('signup_or_login', $returnto);
            }
        }
        //XX PROFILE EDIT/CREAT/DEL BOX DATE - need to check for pb flag in order to display this.
        $pbDate = "";
        $pbDateFlag = 0;
        $profilebox_name = wfMsg('profilebox-name');
        if ($wgTitle->getNamespace() == NS_USER) {
            if ($u = User::newFromName($wgTitle->getDBKey())) {
                if (UserPagePolicy::isGoodUserPage($wgTitle->getDBKey())) {
                    $pbDate = ProfileBox::getPageTop($u);
                    $pbDateFlag = true;
                }
            }
        }
        if (!$sk->suppressH1Tag()) {
            if ($isWikiHow && $action == "view") {
                if (Microdata::showRecipeTags() && Microdata::showhRecipeTags()) {
                    $itemprop_name1 = " fn'";
                    $itemprop_name2 = "";
                } else {
                    $itemprop_name1 = "' itemprop='name'";
                    $itemprop_name2 = " itemprop='url'";
                }
                $heading = "<h1 class='firstHeading" . $itemprop_name1 . "><a href=\"" . $wgTitle->getFullURL() . "\"" . $itemprop_name2 . ">" . wfMsg('howto', $this->data['title']) . "</a></h1>";
            } else {
                if ($wgTitle->getNamespace() == NS_USER && UserPagePolicy::isGoodUserPage($wgTitle->getDBKey()) || $wgTitle->getNamespace() == NS_USER_TALK) {
                    $heading = "<h1 class=\"firstHeading\" >" . $this->data['title'] . "</h1>  " . $pbDate;
                    if ($avatar != "") {
                        $heading = $avatar . "<div id='avatarNameWrap'>" . $heading . "</div><div style='clear: both;'> </div>";
                    }
                } else {
                    if ($this->data['title']) {
                        $heading = "<h1 class='firstHeading'>" . $this->data['title'] . "</h1>";
                    }
                }
            }
        }
        // get the breadcrumbs / category links at the top of the page
        $catLinksTop = $sk->getCategoryLinks(true);
        wfRunHooks('getBreadCrumbs', array(&$catLinksTop));
        $mainPageObj = Title::newMainPage();
        if (MWNamespace::isTalk($wgTitle->getNamespace()) && $action == "view") {
            $isPrintable = $wgRequest->getVal("printable") == "yes";
        }
        // QWER links for everyone on all pages
        //$helplink = $sk->makeLinkObj(Title::makeTitle(NS_PROJECT_TALK, 'Help-Team'), wfMsg('help'));
        $logoutlink = $sk->makeLinkObj(Title::makeTitle(NS_SPECIAL, 'Userlogout'), wfMsg('logout'));
        $rsslink = "<a href='" . $wgServer . "/feed.rss'>" . wfMsg('rss') . "</a>";
        $rplink = $sk->makeLinkObj(Title::makeTitle(NS_SPECIAL, "Randompage"), wfMsg('randompage'));
        if ($wgTitle->getNamespace() == NS_MAIN && !$isMainPage && $wgTitle->userCanEdit()) {
            $links[] = array(Title::makeTitle(NS_SPECIAL, "Recentchangeslinked")->getFullURL() . "/" . $wgTitle->getPrefixedURL(), wfMsg('recentchangeslinked'));
        }
        //Editing Tools
        $uploadlink = "";
        $freephotoslink = "";
        $uploadlink = $sk->makeLinkObj(Title::makeTitle(NS_SPECIAL, "Upload"), wfMsg('upload'));
        $freephotoslink = $sk->makeLinkObj(Title::makeTitle(NS_SPECIAL, "ImportFreeImages"), wfMsg('imageimport'));
        $relatedchangeslink = "";
        if ($wgArticle != null) {
            $relatedchangeslink = "<li> <a href='" . Title::makeTitle(NS_SPECIAL, "Recentchangeslinked")->getFullURL() . "/" . $wgTitle->getPrefixedURL() . "'>" . wfMsg('recentchangeslinked') . "</a></li>";
        }
        //search
        $searchTitle = Title::makeTitle(NS_SPECIAL, "LSearch");
        $otherLanguageLinks = array();
        $translationData = array();
        if ($this->data['language_urls']) {
            foreach ($this->data['language_urls'] as $lang) {
                if ($lang['code'] == $wgLanguageCode) {
                    continue;
                }
                $otherLanguageLinks[$lang['code']] = $lang['href'];
                $langMsg = $sk->getInterWikiCTA($lang['code'], $lang['text'], $lang['href']);
                if (!$langMsg) {
                    continue;
                }
                $encLangMsg = json_encode($langMsg);
                $translationData[] = "'{$lang['code']}': {'msg':{$encLangMsg}}";
            }
        }
        if (!$isMainPage && !$isDocViewer && !$_COOKIE["sitenoticebox"]) {
            $siteNotice = $sk->getSiteNotice();
        }
        // Right-to-left languages
        $rtl = $wgContLang->isRTL() ? " dir='RTL'" : '';
        $head_element = "<html xmlns:fb=\"https://www.facebook.com/2008/fbml\" xmlns=\"{$wgXhtmlDefaultNamespace}\" xml:lang=\"{$wgContLanguageCode}\" lang=\"{$wgContLanguageCode}\" {$rtl}>\n";
        $rtl_css = "";
        if ($wgContLang->isRTL()) {
            $rtl_css = "<style type=\"text/css\" media=\"all\">/*<![CDATA[*/ @import \\a" . wfGetPad("/extensions/min/f/skins/WikiHow/rtl.css") . "\"; /*]]>*/</style>";
            $rtl_css .= "\n   <!--[if IE]>\n   <style type=\"text/css\">\n   BODY { margin: 25px; }\n   </style>\n   <![endif]-->";
        }
        $printable_media = "print";
        if ($wgRequest->getVal('printable') == 'yes') {
            $printable_media = "all";
        }
        $featured = false;
        if (false && $wgTitle->getNamespace() == NS_MAIN) {
            $dbr = wfGetDB(DB_SLAVE);
            $page_isfeatured = $dbr->selectField('page', 'page_is_featured', array("page_id={$wgTitle->getArticleID()}"), __METHOD__);
            $featured = $page_isfeatured == 1;
        }
        $top_search = "";
        $footer_search = "";
        if ($wgLanguageCode == 'en') {
            //INTL: Search options for the english site are a bit more complex
            if (!$isLoggedIn) {
                $top_search = GoogSearch::getSearchBox("cse-search-box");
            } else {
                $top_search = '
				   <form id="bubble_search" name="search_site" action="' . $searchTitle->getFullURL() . '" method="get">
				   <input type="text" class="search_box" name="search" x-webkit-speech />
				   <input type="submit" value="Search" id="search_site_bubble" class="search_button" />
				   </form>';
            }
        } else {
            //INTL: International search just uses Google custom search
            $top_search = GoogSearch::getSearchBox("cse-search-box");
        }
        $text = $this->data['bodytext'];
        // Remove stray table under video section. Probably should eventually do it at
        // the source, but then have to go through all articles.
        if (strpos($text, '<a name="Video">') !== false) {
            $vidpattern = "<p><br /></p>\n<center>\n<table width=\"375px\">\n<tr>\n<td><br /></td>\n<td align=\"left\"></td>\n</tr>\n</table>\n</center>\n<p><br /></p>";
            $text = str_replace($vidpattern, "", $text);
        }
        $this->data['bodytext'] = $text;
        // hack to get the FA template working, remove after we go live
        $fa = '';
        if ($wgLanguageCode != "nl" && strpos($this->data['bodytext'], 'featurestar') !== false) {
            $fa = '<p id="feature_star">' . wfMsg('featured_article') . '</p>';
            //$this->data['bodytext'] = preg_replace("@<div id=\"featurestar\">(.|\n)*<div style=\"clear:both\"></div>@mU", '', $this->data['bodytext']);
        }
        $body = "";
        if ($wgTitle->userCanEdit() && $action != 'edit' && $action != 'diff' && $action != 'history' && ($isLoggedIn && !in_array($wgTitle->getNamespace(), array(NS_USER, NS_USER_TALK, NS_IMAGE, NS_CATEGORY)) || !in_array($wgTitle->getNamespace(), array(NS_USER, NS_USER_TALK, NS_IMAGE, NS_CATEGORY)))) {
            //INTL: Need bigger buttons for non-english sites
            $editlink_text = $wgTitle->getNamespace() == NS_MAIN ? wfMsg('editarticle') : wfMsg('edit');
            $heading = '<a href="' . $wgTitle->escapeLocalURL($sk->editUrlOptions()) . '" class="edit">' . $editlink_text . '</a>' . $heading;
        }
        if ($isArticlePage || $wgTitle->getNamespace() == NS_PROJECT && $action == 'view' || $wgTitle->getNamespace() == NS_CATEGORY && !$wgTitle->exists()) {
            if ($wgTitle->getNamespace() == NS_PROJECT && ($wgTitle->getDbKey() == 'RSS-feed' || $wgTitle->getDbKey() == 'Rising-star-feed')) {
                $list_page = true;
                $sticky = false;
            } else {
                $list_page = false;
                $sticky = true;
            }
            $body .= $heading . ArticleAuthors::getAuthorHeader() . $this->data['bodytext'];
            $body = '<div id="bodycontents">' . $body . '</div>';
            $this->data['bodytext'] = WikihowArticleHTML::processArticleHTML($body, array('sticky-headers' => $sticky, 'ns' => $wgTitle->getNamespace(), 'list-page' => $list_page));
        } else {
            if ($action == 'edit') {
                $heading .= WikihowArticleEditor::grabArticleEditLinks($wgRequest->getVal("guidededitor"));
            }
            $this->data['bodyheading'] = $heading;
            $body = '<div id="bodycontents">' . $this->data['bodytext'] . '</div>';
            if (!$isTool) {
                $this->data['bodytext'] = WikihowArticleHTML::processHTML($body, $action, array('show-gray-container' => $sk->showGrayContainer()));
            } else {
                // a little hack to style the no such special page messages for special pages that actually
                // exist
                if (false !== strpos($body, 'You have arrived at a "special page"')) {
                    $body = "<div class='minor_section'>{$body}</div>";
                }
                $this->data['bodytext'] = $body;
            }
        }
        // post-process the Steps section HTML to get the numbers working
        if ($wgTitle->getNamespace() == NS_MAIN && !$isMainPage && ($action == 'view' || $action == 'purge')) {
            // for preview article after edit, you have to munge the
            // steps of the previewHTML manually
            $body = $this->data['bodytext'];
            $opts = array();
            if (!$showAds) {
                $opts['no-ads'] = true;
            }
            //$this->data['bodytext'] = WikihowArticleHTML::postProcess($body, $opts);
        }
        // insert avatars into discussion, talk, and kudos pages
        if (MWNamespace::isTalk($wgTitle->getNamespace()) || $wgTitle->getNamespace() == NS_USER_KUDOS) {
            $this->data['bodytext'] = Avatar::insertAvatarIntoDiscussion($this->data['bodytext']);
        }
        //$navMenu = $sk->genNavigationMenu();
        $navTabs = $sk->genNavigationTabs();
        //XX TALK/DISCUSSION SUBMENU
        // add article_inner if it's not already there, CSS needs it
        if (strpos($this->data['bodytext'], "article_inner") === false && wfRunHooks('WrapBodyWithArticleInner', array())) {
            //echo "ADDING";
            //$this->data['bodytext'] = "<div class='article_inner'>{$this->data['bodytext']}</div>";
        }
        // set up the main page
        $mpActions = "";
        $mpWorldwide = '

		';
        $profileBoxIsUser = false;
        if ($isLoggedIn && $wgTitle && $wgTitle->getNamespace() == NS_USER) {
            $name = $wgTitle->getDBKey();
            $profileBoxUser = User::newFromName($name);
            if ($profileBoxUser && $wgUser->getID() == $profileBoxUser->getID()) {
                $profileBoxIsUser = true;
            }
        }
        // Reuben (11/2013): Micro-customization as a test for BR
        $slowSpeedUsers = array('BR');
        $isSlowSpeedUser = $wgUser && in_array($wgUser->getName(), $slowSpeedUsers);
        $optimizelyJS = false;
        if (class_exists('OptimizelyPageSelector') && $wgTitle && $wgTitle->exists()) {
            if (OptimizelyPageSelector::isArticleEnabled($wgTitle) && OptimizelyPageSelector::isUserEnabled($wgUser)) {
                $optimizelyJS = OptimizelyPageSelector::getOptimizelyTag();
            }
        }
        $showSpotlightRotate = $isMainPage && $wgLanguageCode == 'en';
        $showBreadCrumbs = $sk->showBreadCrumbs();
        $showSideBar = $sk->showSideBar();
        $showHeadSection = $sk->showHeadSection();
        $showArticleTabs = $wgTitle->getNamespace() != NS_SPECIAL && !$isMainPage;
        if (in_array($wgTitle->getNamespace(), array(NS_IMAGE)) && (empty($action) || $action == 'view') && !$isLoggedIn) {
            $showArticleTabs = false;
        }
        $showWikiTextWidget = false;
        if (class_exists('WikitextDownloader')) {
            $showWikiTextWidget = WikitextDownloader::isAuthorized() && !$isDocViewer;
        }
        $showRCWidget = class_exists('RCWidget') && $wgTitle->getNamespace() != NS_USER && (!$isLoggedIn || $wgUser->getOption('recent_changes_widget_show') != '0') && ($isLoggedIn || $isMainPage) && !in_array($wgTitle->getPrefixedText(), array('Special:Avatar', 'Special:ProfileBox', 'Special:IntroImageAdder')) && strpos($wgTitle->getPrefixedText(), 'Special:Userlog') === false && !$isDocViewer && $action != 'edit';
        $showFollowWidget = class_exists('FollowWidget') && !$isDocViewer && in_array($wgLanguageCode, array('en', 'de', 'es', 'pt'));
        $showSocialSharing = $wgTitle && $wgTitle->exists() && $wgTitle->getNamespace() == NS_MAIN && !$isSlowSpeedUser && class_exists('WikihowShare');
        $showSliderWidget = class_exists('Slider') && $wgTitle->exists() && $wgTitle->getNamespace() == NS_MAIN && !$isPrintable && !$isMainPage && $isIndexed && $showSocialSharing && $wgRequest->getVal('oldid') == '' && ($wgRequest->getVal('action') == '' || $wgRequest->getVal('action') == 'view');
        $showTopTenTips = $wgTitle->exists() && $wgTitle->getNamespace() == NS_MAIN && $wgLanguageCode == 'en' && !$isPrintable && !$isMainPage && $wgRequest->getVal('oldid') == '' && ($wgRequest->getVal('action') == '' || $wgRequest->getVal('action') == 'view');
        $showAltMethod = false;
        if (class_exists('AltMethodAdder')) {
            $showAltMethod = true;
        }
        $showExitTimer = $wgLanguageCode == 'en' && class_exists('BounceTimeLogger') && !$isSlowSpeedUser;
        $showRUM = ($isArticlePage || $isMainPage) && !$isBehindHttpAuth && !$isSlowSpeedUser;
        $showGoSquared = ($isArticlePage || $isMainPage) && !$isLoggedIn && !$isBehindHttpAuth && mt_rand(1, 100) <= 30;
        // 30% chance
        $showClickIgniter = !$isLoggedIn && !$isBehindHttpAuth && !$wgSSLsite;
        $showGA = !$isSlowSpeedUser;
        $showGAevents = $wgLanguageCode == 'en' && $isMainPage && !$isSlowSpeedUser;
        $isLiquid = false;
        //!$isMainPage && ( $wgTitle->getNameSpace() == NS_CATEGORY );
        $showFeaturedArticlesSidebar = $action == 'view' && !$isMainPage && !$isDocViewer && !$wgSSLsite && $wgTitle->getNamespace() != NS_USER;
        $isSpecialPage = $wgTitle->getNamespace() == NS_SPECIAL || $wgTitle->getNamespace() == NS_MAIN && $wgRequest->getVal('action') == 'protect' || $wgTitle->getNamespace() == NS_MAIN && $wgRequest->getVal('action') == 'delete';
        $showTextScroller = class_exists('TextScroller') && $wgTitle->exists() && $wgTitle->getNamespace() == NS_MAIN && !$isPrintable && !$isMainPage && strpos($this->data['bodytext'], 'textscroller_outer') !== false;
        $showImageFeedback = class_exists('ImageFeedback') && ImageFeedback::isValidPage();
        $showWikivideo = class_exists('WHVid') && ($wgTitle->exists() && $wgTitle->getNamespace() == NS_MAIN || $wgTitle->getNamespace() == NS_SPECIAL) && !$isPrintable && !$isMainPage && strpos($this->data['bodytext'], 'whvid_cont') !== false;
        $showStaffStats = !$isMainPage && $isLoggedIn && (in_array('staff', $wgUser->getGroups()) || in_array('staff_widget', $wgUser->getGroups())) && $wgTitle->getNamespace() == NS_MAIN && class_exists('Pagestats');
        $showThumbsUp = class_exists('ThumbsNotifications');
        $postLoadJS = $isArticlePage;
        // add present JS files to extensions/min/groupsConfig.php
        $fullJSuri = '/extensions/min/g/whjs' . (!$isArticlePage ? ',jqui' : '') . ($showExitTimer ? ',stu' : '') . ($showRCWidget ? ',rcw' : '') . ($showSpotlightRotate ? ',sp' : '') . ($showFollowWidget ? ',fl' : '') . ($showSliderWidget ? ',slj' : '') . ($showThumbsUp ? ',thm' : '') . ($showWikiTextWidget ? ',wkt' : '') . ($showAltMethod ? ',altj' : '') . ($showTopTenTips ? ',tpt' : '') . ($isMainPage ? ',hp' : '') . ($showWikivideo ? ',whv' : '') . ($showImageFeedback ? ',ii' : '') . ($showTextScroller ? ',ts' : '');
        if ($wgOut->mJSminCodes) {
            $fullJSuri .= ',' . join(',', $wgOut->mJSminCodes);
        }
        $cachedParam = $wgRequest && $wgRequest->getVal('c') == 't' ? '&c=t' : '';
        $fullJSuri .= '&r=' . WH_SITEREV . $cachedParam . '&e=.js';
        $fullCSSuri = '/extensions/min/g/whcss' . (!$isArticlePage ? ',jquic,nona' : '') . ($isLoggedIn ? ',li' : '') . ($showSliderWidget ? ',slc' : '') . ($showAltMethod ? ',altc' : '') . ($showTopTenTips ? ',tptc' : '') . ($showWikivideo ? ',whvc' : '') . ($showTextScroller ? ',tsc' : '') . ($isMainPage ? ',hpc' : '') . ($showImageFeedback ? ',iic' : '') . ($isSpecialPage ? ',spc' : '');
        if ($wgOut->mCSSminCodes) {
            $fullCSSuri .= ',' . join(',', $wgOut->mCSSminCodes);
        }
        $fullCSSuri .= '&r=' . WH_SITEREV . $cachedParam . '&e=.css';
        $tabsArray = $sk->getTabsArray($showArticleTabs);
        wfRunHooks('JustBeforeOutputHTML', array(&$this));
        ?>
<!DOCTYPE html>
<?php 
        echo $head_element;
        ?>
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">
	<title><?php 
        echo $title;
        ?>
</title>
	<?php 
        if ($showRUM) {
            ?>
<script>
<!--
window.UVPERF = {};
UVPERF.authtoken = 'b473c3f9-a845-4dc3-9432-7ad0441e00c3';
UVPERF.start = new Date().getTime();
//-->
</script>
	<?php 
        }
        ?>
	<?php 
        if ($wgIsDomainTest) {
            ?>
	<base href="http://www.wikihow.com/" />
	<?php 
        }
        ?>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<meta name="verify-v1" content="/Ur0RE4/QGQIq9F46KZyKIyL0ZnS96N5x1DwQJa7bR8=" />
	<meta name="google-site-verification" content="Jb3uMWyKPQ3B9lzp5hZvJjITDKG8xI8mnEpWifGXUb0" />
	<meta name="msvalidate.01" content="CFD80128CAD3E726220D4C2420D539BE" />
	<meta name="y_key" content="1b3ab4fc6fba3ab3" />
	<meta name="p:domain_verify" content="bb366527fa38aa5bc27356b728a2ec6f" />
	<?php 
        if ($isArticlePage || $isMainPage) {
            ?>
	<link rel="alternate" media="only screen and (max-width: 640px)" href="http://<?php 
            if ($wgLanguageCode != 'en') {
                echo $wgLanguageCode . ".";
            }
            ?>
m.wikihow.com/<?php 
            echo $wgTitle->getPartialUrl();
            ?>
">
	<?php 
        }
        echo Skin::makeGlobalVariablesScript($this->data);
        ?>
	<?php 
        // add CSS files to extensions/min/groupsConfig.php
        ?>
	<style type="text/css" media="all">/*<![CDATA[*/ @import "<?php 
        echo $fullCSSuri;
        ?>
"; /*]]>*/</style>
	<?php 
        // below is the minified http://www.wikihow.com/extensions/min/f/skins/owl/printable.css
        ?>
	<style type="text/css" media="<?php 
        echo $printable_media;
        ?>
">/*<![CDATA[*/ body{background-color:#FFF;font-size:1.2em;}#header_outer{background:none;position:relative;}#header{text-align:center;}#logo_link{float:none!important;}#article_shell{float:none;padding-bottom:2em;margin:0 auto;}.sticking{position:absolute!important;top:0!important;}#actions,#notification_count,#bubble_search,#cse-search-box,#header_space,#sidebar,#breadcrumb,#originators,#article_tabs,#sliderbox,#article_rating,#end_options,#footer_outer,.edit{display:none!important;} /*]]>*/</style>
		<?php 
        // Bootstapping certain javascript functions:
        // A function to merge one object with another; stub funcs
        // for button swapping (this should be done in CSS anyway);
        // initialize the timer for bounce stats tracking.
        ?>
		<script>
			<!--
			var WH = WH || {};
			WH.lang = WH.lang || {};
			button_swap = button_unswap = function(){};
			WH.exitTimerStartTime = (new Date()).getTime();
			WH.mergeLang = function(A){for(i in A){v=A[i];if(typeof v==='string'){WH.lang[i]=v;}}};
			//-->
		</script>
		<?php 
        if (!$postLoadJS) {
            ?>
			<script type="text/javascript" src="<?php 
            echo $fullJSuri;
            ?>
"></script>
		<?php 
        }
        ?>

		<?php 
        $this->html('headlinks');
        ?>
		
	<?php 
        if (!$wgIsDomainTest) {
            ?>
			<link rel='canonical' href='<?php 
            echo $wgTitle->getFullURL();
            ?>
'/>
			<link href="https://plus.google.com/102818024478962731382" rel="publisher" />
		<?php 
        }
        ?>
	<?php 
        if ($sk->isUserAgentMobile()) {
            ?>
			<link media="only screen and (max-device-width: 480px)" href="<?php 
            echo wfGetPad('/extensions/min/f/skins/WikiHow/iphone.css');
            ?>
" type="text/css" rel="stylesheet" />
		<?php 
        } else {
            ?>
			<!-- not mobile -->
		<?php 
        }
        ?>
	<!--<![endif]-->
	<?php 
        echo $rtl_css;
        ?>
	<link rel="alternate" type="application/rss+xml" title="wikiHow: How-to of the Day" href="http://www.wikihow.com/feed.rss"/>
	<link rel="apple-touch-icon" href="<?php 
        echo wfGetPad('/skins/WikiHow/safari-large-icon.png');
        ?>
" />
	<?php 
        //= wfMsg('Test_setup')
        ?>
	<?php 
        if (class_exists('CTALinks') && trim(wfMsgForContent('cta_feature')) == "on") {
            echo CTALinks::getGoogleControlScript();
        }
        ?>
	<?php 
        echo $wgOut->getHeadItems();
        ?>
			
	<?php 
        if ($wgTitle && $wgTitle->getText() == "Get Caramel off Pots and Pans") {
            echo wfMsg('Adunit_test_top');
        }
        ?>

	<?php 
        foreach ($otherLanguageLinks as $lang => $url) {
            ?>
			<link rel="alternate" hreflang="<?php 
            echo $lang;
            ?>
" href="<?php 
            echo htmlspecialchars($url);
            ?>
" />
		<?php 
        }
        ?>
		</head>
		<body <?php 
        if ($this->data['body_ondblclick']) {
            ?>
ondblclick="<?php 
            $this->text('body_ondblclick');
            ?>
"<?php 
        }
        ?>
			  <?php 
        if ($this->data['body_onload']) {
            ?>
onload="<?php 
            $this->text('body_onload');
            ?>
"<?php 
        }
        ?>
			>
		<?php 
        wfRunHooks('PageHeaderDisplay', array($sk->isUserAgentMobile()));
        ?>

		<?php 
        if (!$isLoggedIn) {
            echo wikihowAds::getSetup();
        }
        ?>
		<div id="header_outer"><div id="header">
			<ul id="actions">
				<?php 
        foreach ($navTabs as $tabid => $tab) {
            ?>
					<li id="<?php 
            echo $tabid;
            ?>
_li">
						<div class="nav_icon"></div>
						<a id='<?php 
            echo $tabid;
            ?>
' class='nav <?php 
            echo $tab['status'];
            ?>
' href='<?php 
            echo $tab['link'];
            ?>
' <?php 
            echo $tab['mouseevents'];
            ?>
><?php 
            echo $tab['text'];
            ?>
</a>
						<?php 
            echo $tab['menu'];
            ?>
					</li>
				<?php 
        }
        ?>
			</ul><!--end actions-->
			<?php 
        if ($sk->notifications_count > 0) {
            ?>
				<div id="notification_count" class="notice"><?php 
            echo $sk->notifications_count;
            ?>
</div>
			<?php 
        }
        ?>
			<?php 
        $holidayLogo = SkinWikihowskin::getHolidayLogo();
        $logoPath = $holidayLogo ? $holidayLogo : '/skins/owl/images/wikihow_logo.png';
        if ($wgLanguageCode != "en") {
            $logoPath = "/skins/owl/images/wikihow_logo_intl.png";
        }
        ?>
			<a href='<?php 
        echo $mainPageObj->getLocalURL();
        ?>
' id='logo_link'><img src="<?php 
        echo wfGetPad($logoPath);
        ?>
" class="logo" /></a>
			<?php 
        echo $top_search;
        ?>
			<?php 
        if ($wgLanguageCode == 'zh') {
            ?>
				<style>
					#header #wpUserVariant { background-color: #C9DCB9; border: medium none; left: 590px; position: relative; top: -48px; }
					#header.shrunk #wpUserVariant { top: -35px; }
					.search_box { width: 119px }
				</style>
				<form action="" method="post">
				<select id="wpUserVariant">
				<?php 
            $variant = $wgContLang->getPreferredVariant();
            $zhVarArr = array("zh" => "选择语言", "zh-hans" => "‪中文(简体)‬", "zh-hant" => "‪中文(繁體)‬", "zh-tw" => "‪中文(台灣)‬", "zh-sg" => "‪中文(新加坡)‬", "zh-hk" => "‪中文(香港)‬");
            foreach ($zhVarArr as $k => $v) {
                ?>
						<option <?php 
                if ($variant == $k) {
                    ?>
selected <?php 
                }
                ?>
 value="<?php 
                echo $k;
                ?>
"><?php 
                echo $v;
                ?>
</option>
					<?php 
            }
            ?>
				</select>
				</form>
			<?php 
        }
        ?>

		</div></div><!--end header-->
		<?php 
        wfRunHooks('AfterHeader', array(&$wgOut));
        ?>
		<div id="main_container" class="<?php 
        echo $isMainPage ? 'mainpage' : '';
        ?>
">
			<div id="header_space"></div>
		
		<div id="main">
		<?php 
        wfRunHooks('BeforeActionbar', array(&$wgOut));
        ?>
		<div id="actionbar" class="<?php 
        echo $isTool ? 'isTool' : '';
        ?>
">
			<?php 
        if ($showBreadCrumbs) {
            ?>
				<div id="gatBreadCrumb">
					<ul id="breadcrumb" class="Breadcrumbs">
						<?php 
            echo $catLinksTop;
            ?>
					</ul>
				</div>
			<?php 
        }
        ?>
			<?php 
        if (count($tabsArray) > 0) {
            echo $sk->getTabsHtml($tabsArray);
        }
        ?>

		</div><!--end actionbar-->
		<script>
		<!--
		WH.translationData = {<?php 
        echo join(',', $translationData);
        ?>
};
		//-->
		</script>
		<?php 
        echo $announcement;
        ?>
		<?php 
        echo $mpActions;
        ?>
		<?php 
        $sidebar = !$showSideBar ? 'no_sidebar' : '';
        // INTL: load mediawiki messages for sidebar expand and collapse for later use in sidebar boxes
        $langKeys = array('navlist_collapse', 'navlist_expand', 'usernameoremail', 'password');
        print Wikihow_i18n::genJSMsgs($langKeys);
        ?>
		<div id="container" class="<?php 
        echo $sidebar;
        ?>
">
		<div id="article_shell">
		<div id="article"<?php 
        echo Microdata::genSchemaHeader();
        ?>
>

			<?php 
        wfRunHooks('BeforeTabsLine', array(&$wgOut));
        ?>
			<?php 
        echo $profileBox;
        ?>
			<?php 
        if (!$isArticlePage && !$isMainPage && $this->data['bodyheading']) {
            echo '<div class="wh_block">' . $this->data['bodyheading'] . '</div>';
        }
        echo $this->html('bodytext');
        echo $bottom_site_notice;
        $showingArticleInfo = 0;
        if (in_array($wgTitle->getNamespace(), array(NS_MAIN, NS_PROJECT)) && $action == 'view' && !$isMainPage) {
            $catLinks = $sk->getCategoryLinks(false);
            $authors = ArticleAuthors::getAuthorFooter();
            if ($authors || is_array($this->data['language_urls']) || $catLinks) {
                $showingArticleInfo = 1;
            }
            ?>

				<div class="section">
					<?php 
            if ($showingArticleInfo) {
                ?>
						<h2 class="section_head" id="article_info_header"><span><?php 
                echo wfMsg('article_info');
                ?>
</span></h2>
						<div id="article_info" class="section_text">
					<?php 
            } else {
                ?>
						<h2 class="section_head" id="article_tools_header"><span><?php 
                echo wfMsg('article_tools');
                ?>
</span></h2>
						<div id="article_tools" class="section_text">
					<?php 
            }
            ?>
						<?php 
            echo $fa;
            ?>
						<?php 
            if ($catLinks) {
                ?>
							<p class="info"> <?php 
                echo wfMsg('categories');
                ?>
: <?php 
                echo $catLinks;
                ?>
</p>
						<?php 
            }
            ?>
						<p><?php 
            echo $authors;
            ?>
</p>
						<?php 
            if (is_array($this->data['language_urls'])) {
                ?>
							<p class="info"><?php 
                $this->msg('otherlanguages');
                ?>
:</p>
							<p class="info"><?php 
                $links = array();
                $sk = $wgUser->getSkin();
                foreach ($this->data['language_urls'] as $langlink) {
                    $linkText = $langlink['text'];
                    preg_match("@interwiki-(..)@", $langlink['class'], $langCode);
                    if (!empty($langCode[1])) {
                        $linkText = $sk->getInterWikiLinkText($linkText, $langCode[1]);
                    }
                    $links[] = htmlspecialchars(trim($langlink['language'])) . '&nbsp;<span><a href="' . htmlspecialchars($langlink['href']) . '">' . $linkText . "</a><span>";
                }
                echo implode("&#44;&nbsp;", $links);
                ?>
							</p>
						<?php 
            }
            //talk link
            if ($action == 'view' && MWNamespace::isTalk($wgTitle->getNamespace())) {
                $talk_link = '#postcomment';
            } else {
                $talk_link = $wgTitle->getTalkPage()->getLocalURL();
            }
            ?>
						<ul id="end_options">
							<li class="endop_discuss"><span></span><a href="<?php 
            echo $talk_link;
            ?>
" id="gatDiscussionFooter"><?php 
            echo wfMsg('at_discuss');
            ?>
</a></li>
							<li class="endop_print"><span></span><a href="<?php 
            echo $wgTitle->getLocalUrl('printable=yes');
            ?>
" id="gatPrintView"><?php 
            echo wfMsg('print');
            ?>
</a></li>
							<li class="endop_email"><span></span><a href="#" onclick="return emailLink();" id="gatSharingEmail"><?php 
            echo wfMsg('at_email');
            ?>
</a></li>
							<?php 
            if ($isLoggedIn) {
                ?>
								<?php 
                if ($wgTitle->userIsWatching()) {
                    ?>
									<li class="endop_watch"><span></span><a href="<?php 
                    echo $wgTitle->getLocalURL('action=unwatch');
                    ?>
"><?php 
                    echo wfMsg('at_remove_watch');
                    ?>
</a></li>
								<?php 
                } else {
                    ?>
									<li class="endop_watch"><span></span><a href="<?php 
                    echo $wgTitle->getLocalURL('action=watch');
                    ?>
"><?php 
                    echo wfMsg('at_watch');
                    ?>
</a></li>
								<?php 
                }
                ?>
							<?php 
            }
            ?>
							<li class="endop_edit"><span></span><a href="<?php 
            echo $wgTitle->getEditUrl();
            ?>
" id="gatEditFooter"><?php 
            echo wfMsg('edit');
            ?>
</a></li>
							<?php 
            if ($wgTitle->getNamespace() == NS_MAIN) {
                ?>
								<li class="endop_fanmail"><span></span><a href="/Special:ThankAuthors?target=<?php 
                echo $wgTitle->getPrefixedURL();
                ?>
" id="gatThankAuthors"><?php 
                echo wfMsg('at_fanmail');
                ?>
</a></li>
							<?php 
            }
            ?>
						</ul> <!--end end_options -->
							<?php 
            if (!in_array($wgTitle->getNamespace(), array(NS_USER, NS_CATEGORY))) {
                ?>

							<?php 
            }
            ?>
							<?php 
            if ($showAds && $wgTitle->getNamespace() == NS_MAIN) {
                //only show this ad on article pages
                echo wikihowAds::getAdUnitPlaceholder(7);
            }
            ?>
                        <div class="clearall"></div>
					</div><!--end article_info section_text-->
						<p class='page_stats'><?php 
            echo $sk->pageStats();
            ?>
</p>

						<div id='article_rating'>
							<?php 
            echo RateItem::showForm('article');
            ?>
						</div>
				</div><!--end section-->

			<?php 
        }
        if (in_array($wgTitle->getNamespace(), array(NS_USER, NS_MAIN, NS_PROJECT)) && $action == 'view' && !$isMainPage) {
            ?>

		</div> <!-- article -->
		<div id="">

			<?php 
        }
        ?>
		</div>  <!--end last_question-->
		<div class="clearall"></div>

		</div>  <!--end article_shell-->


		<?php 
        if ($showSideBar) {
            $loggedOutClass = "";
            if ($showAds && $wgTitle->getText() != 'Userlogin' && $wgTitle->getNamespace() == NS_MAIN) {
                $loggedOutClass = ' logged_out';
            }
            ?>
			<div id="sidebar">		
				<?php 
            echo $siteNotice;
            ?>

				<!-- Sidebar Top Widgets -->
				<?php 
            foreach ($sk->mSidebarTopWidgets as $sbWidget) {
                ?>
					<?php 
                echo $sbWidget;
                ?>
				<?php 
            }
            ?>
				<!-- END Sidebar Top Widgets -->

				<?php 
            if (!$isDocViewer) {
                ?>
				<div id="top_links" class="sidebox<?php 
                echo $loggedOutClass;
                ?>
" <?php 
                echo is_numeric(wfMsg('top_links_padding')) ? ' style="padding-left:' . wfMsg('top_links_padding') . 'px;padding-right:' . wfMsg('top_links_padding') . 'px;"' : '';
                ?>
>
					<a href="/Special:Randomizer" id="gatRandom" accesskey='x' class="button secondary"><?php 
                echo wfMsg('randompage');
                ?>
</a>
					<a href="/Special:Createpage" id="gatWriteAnArticle" class="button secondary"><?php 
                echo wfMsg('writearticle');
                ?>
</a>
					<?php 
                if (class_exists('Randomizer') && Randomizer::DEBUG && $wgTitle && $wgTitle->getNamespace() == NS_MAIN && $wgTitle->getArticleId()) {
                    ?>
						<?php 
                    echo Randomizer::getReason($wgTitle);
                    ?>
					<?php 
                }
                ?>
				</div><!--end top_links-->
				<?php 
            }
            ?>
				<?php 
            if ($showStaffStats) {
                ?>
					<div class="sidebox" style="padding-top:10px" id="staff_stats_box"></div>
				<?php 
            }
            ?>

				<?php 
            if ($showWikiTextWidget) {
                ?>
					<div class="sidebox" id="side_rc_widget">
						<a id='wikitext_downloader' href='#'>Download WikiText</a>
					</div><!--end sidebox-->
				<?php 
            }
            ?>


				<?php 
            if ($showAds && $wgTitle->getText() != 'Userlogin' && $wgTitle->getNamespace() == NS_MAIN) {
                // temporary ad code for amazon ad loading, added by Reuben 3/13, disabled 4/23, and re-enabled 5/28
                if ($wgLanguageCode == 'en') {
                    ?>
					<script>
						<!--
						var aax_src='3003';
						var amzn_targs = '';
						var url = encodeURIComponent(document.location);
						try { url = encodeURIComponent("" + window.top.location); } catch(e) {}
						document.write("<scr"+"ipt src='//aax-us-east.amazon-Adsystem.com/e/dtb/bid?src=" + aax_src + "&u="+url+"&cb=" + Math.round(Math.random()*10000000) + "'></scr"+"ipt>");
						document.close();
						//-->
					</script>
						<?php 
                }
                ?>
					<?php 
                //only show this ad on article pages
                //comment out next line to turn off HHM ad
                if (wikihowAds::isHHM() && $wgLanguageCode == 'en') {
                    echo wikihowAds::getHhmAd();
                } else {
                    echo wikihowAds::getCategoryAd();
                }
                //Temporairily taking down Jane
                /*if (class_exists('StarterTool')) {
                			//spellchecker test "ad"
                			echo "<a href='/Special:StarterTool?ref=1' style='display:none' id='starter_ad'><img src='" . wfGetPad('/skins/WikiHow/images/sidebar_spelling3.png') . "' nopin='nopin' /></a>";
                		}*/
            }
            //<!-- <a href="#"><img src="/skins/WikiHow/images/imgad.jpg" /></a> -->
            ?>

				<?php 
            if ($sk->getUserLinks()) {
                ?>
				<div class='sidebox'>
					<?php 
                echo $sk->getUserLinks();
                ?>
				</div>
				<?php 
            }
            ?>

				<?php 
            $related_articles = $sk->getRelatedArticlesBox($this);
            //disable custom link units
            //  if (!$isLoggedIn && $wgTitle->getNamespace() == NS_MAIN && !$isMainPage)
            //if ($related_articles != "")
            //$related_articles .= WikiHowTemplate::getAdUnitPlaceholder(2, true);
            if ($action == 'view' && $related_articles != "") {
                $related_articles = '<div id="side_related_articles" class="sidebox">' . $related_articles . '</div><!--end side_related_articles-->';
                echo $related_articles;
            }
            ?>

				<?php 
            if ($showSocialSharing) {
                ?>
					<div class="sidebox<?php 
                echo $loggedOutClass;
                ?>
" id="sidebar_share">
						<h3><?php 
                echo wfMsg('social_share');
                ?>
</h3>
						<?php 
                if ($isMainPage) {
                    echo WikihowShare::getMainPageShareButtons();
                } else {
                    echo WikihowShare::getTopShareButtons($isIndexed);
                }
                ?>
						<div style="clear:both; float:none;"></div>
					</div>
				<?php 
            }
            ?>

				<?php 
            if ($mpWorldwide !== "") {
                ?>
					<?php 
                echo $mpWorldwide;
                ?>
				<?php 
            }
            ?>

				<?php 
            /*
            <!--
            <div class="sidebox_shell">
            	<div class='sidebar_top'></div>
            	<div id="side_fb_timeline" class="sidebox">
            	</div>
            	<div class='sidebar_bottom_fold'></div>
            </div>
            -->
            <!--end sidebox_shell-->
            */
            ?>

				<!-- Sidebar Widgets -->
				<?php 
            foreach ($sk->mSidebarWidgets as $sbWidget) {
                ?>
					<?php 
                echo $sbWidget;
                ?>
				<?php 
            }
            ?>
				<!-- END Sidebar Widgets -->

				<?php 
            //if ($isLoggedIn) echo $navMenu;
            ?>


				<?php 
            if ($showFeaturedArticlesSidebar) {
                ?>
					<div id="side_featured_articles" class="sidebox">
						<?php 
                echo $sk->getFeaturedArticlesBox(4, 4);
                ?>
					</div>
				<?php 
            }
            ?>

				<?php 
            if ($showRCWidget) {
                ?>
					<div class="sidebox" id="side_rc_widget">
						<?php 
                RCWidget::showWidget();
                ?>
						<p class="bottom_link">
							<?php 
                if ($isLoggedIn) {
                    ?>
								<?php 
                    echo wfMsg('welcome', $wgUser->getName(), $wgUser->getUserPage()->getLocalURL());
                    ?>
							<?php 
                } else {
                    ?>
								<a href="/Special:Userlogin" id="gatWidgetBottom"><?php 
                    echo wfMsg('rcwidget_join_in');
                    ?>
</a>
							<?php 
                }
                ?>
							<a href="" id="play_pause_button" onclick="rcTransport(this); return false;" ></a>
						</p>
					</div><!--end side_recent_changes-->
				<?php 
            }
            ?>

				<?php 
            if (class_exists('FeaturedContributor') && ($wgTitle->getNamespace() == NS_MAIN || $wgTitle->getNamespace() == NS_USER) && !$isMainPage && !$isDocViewer) {
                ?>
					<div id="side_featured_contributor" class="sidebox">
						<?php 
                FeaturedContributor::showWidget();
                ?>
						<?php 
                if (!$isLoggedIn) {
                    ?>
							<p class="bottom_button">
								<a href="/Special:Userlogin" class="button secondary" id="gatFCWidgetBottom" onclick='gatTrack("Browsing","Feat_contrib_cta","Feat_contrib_wgt");'><?php 
                    echo wfMsg('fc_action');
                    ?>
</a>
							</p>
						<?php 
                }
                ?>
					</div><!--end side_featured_contributor-->
				<?php 
            }
            ?>

				<?php 
            //if (!$isLoggedIn) echo $navMenu;
            ?>

				<?php 
            echo $user_links;
            ?>
				<?php 
            if ($showFollowWidget) {
                ?>
					<div class="sidebox">
						<?php 
                FollowWidget::showWidget();
                ?>
					</div>
				<?php 
            }
            ?>
			</div><!--end sidebar-->
		<?php 
        }
        // end if $showSideBar
        ?>
		<div class="clearall" ></div>
		</div> <!--end container -->
		</div><!--end main-->
			<div id="clear_footer"></div>
		</div><!--end main_container-->
		<div id="footer_outer">
			<div id="footer">
				<div id="footer_side">
					<?php 
        if ($isLoggedIn) {
            ?>
						<?php 
            echo wfMsgExt('site_footer_owl', 'parse');
            ?>
					<?php 
        } else {
            ?>
						<?php 
            echo wfMsgExt('site_footer_owl_anon', 'parse');
            ?>
					<?php 
        }
        ?>
				</div><!--end footer_side-->

				<div id="footer_main">

					<div id="sub_footer">
						<?php 
        if ($isLoggedIn || $isMainPage) {
            ?>
							<?php 
            echo wfMsg('sub_footer_new', wfGetPad(), wfGetPad());
            ?>
						<?php 
        } else {
            ?>
							<?php 
            echo wfMsg('sub_footer_new_anon', wfGetPad(), wfGetPad());
            ?>
						<?php 
        }
        ?>
					</div>
				</div><!--end footer_main-->
			</div>
				<br class="clearall" />
		</div><!--end footer-->
		<div id="dialog-box" title=""></div>

		<?php 
        // Quick note/edit popup
        if ($action == 'diff' && $wgLanguageCode == 'en') {
            echo QuickNoteEdit::displayQuicknote();
            echo QuickNoteEdit::displayQuickedit();
        }
        // Slider box -- for non-logged in users on articles only
        if ($showSliderWidget) {
            echo Slider::getBox();
            echo '<div id="slideshowdetect"></div>';
        }
        ?>

		<div id="fb-root" ></div>

		<?php 
        if ($postLoadJS) {
            ?>
			<script type="text/javascript" src="<?php 
            echo $fullJSuri;
            ?>
"></script>
		<?php 
        }
        ?>
		<?php 
        if ($optimizelyJS) {
            print $optimizelyJS;
        }
        ?>

		<?php 
        if ($showExitTimer) {
            ?>
			<script>
				<!--
				if (WH.ExitTimer) {
					WH.ExitTimer.start();
				}
				//-->
			</script>
		<?php 
        }
        ?>

		<?php 
        if ($showRCWidget) {
            ?>
			<?php 
            RCWidget::showWidgetJS();
            ?>
		<?php 
        }
        ?>

		<script type="text/javascript">
			<!--
			var _gaq = _gaq || [];
	<?php 
        if ($showGA) {
            ?>
			_gaq.push(['_setAccount', 'UA-2375655-1']);
			_gaq.push(['_setDomainName', '.wikihow.com']);
			_gaq.push(['_trackPageview']);
			(function() {
				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
				ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
			})();
	<?php 
        }
        ?>
			//-->
		</script>

	<?php 
        if ($showGA) {
            ?>
		<?php 
            // Google Analytics Event Track
            ?>
		<script type="text/javascript">
			<!--
			if (typeof Event =='undefined' || typeof Event.observe == 'undefined') {
				jQuery(window).load(gatStartObservers);
			} else {
				Event.observe(window, 'load', gatStartObservers);
			}
			//-->
		</script>
		<?php 
            // END Google Analytics Event Track
            ?>
		<?php 
            if (class_exists('CTALinks') && trim(wfMsgForContent('cta_feature')) == "on") {
                echo CTALinks::getGoogleControlTrackingScript();
                echo CTALinks::getGoogleConversionScript();
            }
            ?>
		<?php 
            // Load event listeners
            ?>
		<?php 
            if ($showGAevents) {
                ?>
			<script type="text/javascript">
				<!--
				if (typeof Event =='undefined' || typeof Event.observe == 'undefined') {
					jQuery(window).load(initSA);
				} else {
					Event.observe(window, 'load', initSA);
				}
				//-->
			</script>
		<?php 
            }
            ?>
	<?php 
        }
        // $showGA
        ?>

		<?php 
        // Load event listeners all pages
        ?>
		<?php 
        if (class_exists('CTALinks') && trim(wfMsgForContent('cta_feature')) == "on") {
            echo CTALinks::getBlankCTA();
        }
        ?>

		<?php 
        if ($showClickIgniter) {
            ?>
			<script type="text/javascript">
			(function() {
				var ci = document.createElement('script'); ci.type = 'text/javascript'; ci.async = true;
				ci.src = 'http://cdn.clickigniter.io/ci.js';
				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ci, s);
			})();
			</script>
		<?php 
        }
        ?>
		<?php 
        if ($showGoSquared) {
            ?>
			<script type="text/javascript">
				var GoSquared = {};
				GoSquared.acct = "GSN-491441-Y";
				(function(w){
					function gs(){
						w._gstc_lt = +new Date;
						var d = document, g = d.createElement("script");
						g.type = "text/javascript";
						g.src = "//d1l6p2sc9645hc.cloudfront.net/tracker.js";
						g.async = true;
						var s = d.getElementsByTagName("script")[0];
						s.parentNode.insertBefore(g, s);
					}
					w.addEventListener ?
						w.addEventListener("load", gs, false) :
						w.attachEvent("onload", gs);
				})(window);
			</script>
		<?php 
        }
        ?>
		<?php 
        if ($showRUM) {
            ?>
		<script>
			(function(){
				var a=document.createElement('script'); a.type='text/javascript'; a.async=true;
				a.src='//yxjj4c.rumanalytics.com/sampler/basic2';
				var b=document.getElementsByTagName('script')[0]; b.parentNode.insertBefore(a,b);
			})();
		</script>
		<?php 
        }
        ?>
		<?php 
        wfRunHooks('ArticleJustBeforeBodyClose', array());
        ?>
		<?php 
        if (($wgRequest->getVal("action") == "edit" || $wgRequest->getVal("action") == "submit2") && $wgRequest->getVal('advanced', null) != 'true') {
            ?>
			<script type="text/javascript">
				if (document.getElementById('steps') && document.getElementById('wpTextbox1') == null) {
					InstallAC(document.editform,document.editform.q,document.editform.btnG,"./<?php 
            echo $wgLang->getNsText(NS_SPECIAL) . ":TitleSearch";
            ?>
","en");
				}
			</script>
		<?php 
        }
        ?>

		<?php 
        if ($wgLanguageCode == 'en' && !$isLoggedIn && class_exists('GoogSearch')) {
            ?>
			<?php 
            echo GoogSearch::getSearchBoxJS();
            ?>
		<?php 
        }
        ?>

<script type="text/javascript">
	(function ($) {
		$(document).ready(function() {
			WH.addScrollEffectToTOC();
		});

		$(window).load(function() {
			if ($('.twitter-share-button').length && (!$.browser.msie || $.browser.version > 7)) {

				$.getScript("https://platform.twitter.com/widgets.js", function() {
					twttr.events.bind('tweet', function(event) {
						if (event) {
							var targetUrl;
							if (event.target && event.target.nodeName == 'IFRAME') {
								targetUrl = extractParamFromUri(event.target.src, 'url');
							}
							_gaq.push(['_trackSocial', 'twitter', 'tweet', targetUrl]);
						}
					});

				});
			}

			if (isiPhone < 0 && isiPad < 0 && $('.gplus1_button').length) {
				WH.setGooglePlusOneLangCode();
				var node2 = document.createElement('script');
				node2.type = 'text/javascript';
				node2.async = true;
				node2.src = 'http://apis.google.com/js/plusone.js';
				$('body').append(node2);
			}
			if (typeof WH.FB != 'undefined') WH.FB.init('new');
			if (typeof WH.GP != 'undefined') WH.GP.init();

			if ($('#pinterest').length) {
				var node3 = document.createElement('script');
				node3.type = 'text/javascript';
				node3.async = true;
				node3.src = 'http://assets.pinterest.com/js/pinit.js';
				$('body').append(node3);
			}

			if (typeof WH.imageFeedback != 'undefined') {
				WH.imageFeedback();
			}
		});
	})(jQuery);
</script>
<?php 
        //Temporarily taking down Jane
        /*
        			var r = Math.random();
        			if(r <= .05) {
        				$('#starter_ad').show();
        			}*/
        if ($showStaffStats) {
            ?>
	<?php 
            echo Pagestats::getJSsnippet("article");
        }
        echo $wgOut->getScript();
        ?>

<?php 
        if (class_exists('GoodRevision')) {
            ?>
	<?php 
            $grevid = $wgTitle ? GoodRevision::getUsedRev($wgTitle->getArticleID()) : '';
            ?>
	<!-- shown patrolled revid=<?php 
            echo $grevid;
            ?>
, latest=<?php 
            echo $wgArticle ? $wgArticle->getLatest() : '';
            ?>
 -->
<?php 
        }
        echo wfReportTime();
        ?>
</body>
</html>
<?php 
    }
Exemplo n.º 23
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()
    {
        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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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');
        ?>
/common/shared.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";
			@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/main.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";
		/*]]>*/</style>
		<link rel="stylesheet" type="text/css" <?php 
        if (empty($this->data['printable'])) {
            ?>
media="print"<?php 
        }
        ?>
 href="<?php 
        $this->text('stylepath');
        ?>
/common/commonPrint.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
" />
		<!--[if lt IE 5.5000]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE50Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
		<!--[if IE 5.5000]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE55Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
		<!--[if IE 6]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE60Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
		<!--[if IE 7]><style type="text/css">@import "<?php 
        $this->text('stylepath');
        ?>
/<?php 
        $this->text('stylename');
        ?>
/IE70Fixes.css?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
";</style><![endif]-->
		<!--[if lt IE 7]><script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/IEFixes.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"></script>
		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
		
		<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>
                
		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js?<?php 
        echo $GLOBALS['wgStyleVersion'];
        ?>
"><!-- wikibits js --></script>
		<!-- Head Scripts -->
<?php 
        $this->html('headscripts');
        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'];
        }
        ?>
	</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="globalWrapper">
		<div id="column-content">
	<div id="content">
		<a name="top" id="top"></a>
		<?php 
        if ($this->data['sitenotice']) {
            ?>
<div id="siteNotice"><?php 
            $this->html('sitenotice');
            ?>
</div><?php 
        }
        ?>
		<h1 class="firstHeading"><?php 
        $this->data['displaytitle'] != "" ? $this->html('title') : $this->text('title');
        ?>
</h1>
		<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="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"><?php 
            $this->msg('jumpto');
            ?>
 <a href="#column-one"><?php 
            $this->msg('jumptonavigation');
            ?>
</a>, <a href="#searchInput"><?php 
            $this->msg('jumptosearch');
            ?>
</a></div><?php 
        }
        ?>
			<!-- start content -->
			<?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>
	</div>
		</div>
		<div id="column-one">
	<div id="p-cactions" class="portlet">
		<h5><?php 
        $this->msg('views');
        ?>
</h5>
		<div class="pBody">
			<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->tooltipAndAccesskey('ca-' . $key);
            ?>
><?php 
            echo htmlspecialchars($tab['text']);
            ?>
</a></li>
	<?php 
        }
        ?>
			</ul>
		</div>
	</div>
	<div class="portlet" id="p-personal">
		<h5><?php 
        $this->msg('personaltools');
        ?>
</h5>
		<div class="pBody">
			<ul>
<?php 
        foreach ($this->data['personal_urls'] as $key => $item) {
            ?>
				<li id="pt-<?php 
            echo Sanitizer::escapeId($key);
            ?>
"<?php 
            if ($item['active']) {
                ?>
 class="active"<?php 
            }
            ?>
><a href="<?php 
            echo htmlspecialchars($item['href']);
            ?>
"<?php 
            echo $skin->tooltipAndAccesskey('pt-' . $key);
            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" id="p-logo">
		<a style="background-image: url(<?php 
        $this->text('logopath');
        ?>
);" <?php 
        ?>
href="<?php 
        echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
        ?>
"<?php 
        echo $skin->tooltipAndAccesskey('n-mainpage');
        ?>
></a>
	</div>
	<script type="<?php 
        $this->text('jsmimetype');
        ?>
"> if (window.isMSIE55) fixalpha(); </script>
	<?php 
        foreach ($this->data['sidebar'] as $bar => $cont) {
            ?>
	<div class='portlet' id='p-<?php 
            echo Sanitizer::escapeId($bar);
            ?>
'<?php 
            echo $skin->tooltip('p-' . $bar);
            ?>
>
		<h5><?php 
            $out = wfMsg($bar);
            if (wfEmptyMsg($bar, $out)) {
                echo $bar;
            } else {
                echo $out;
            }
            ?>
</h5>
		<div class='pBody'>
			<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 $skin->tooltipAndAccesskey($val['id']);
                ?>
><?php 
                echo htmlspecialchars($val['text']);
                ?>
</a></li>
<?php 
            }
            ?>
			</ul>
		</div>
	</div>
	<?php 
        }
        ?>
	<div id="p-search" class="portlet">
		<h5><label for="searchInput"><?php 
        $this->msg('search');
        ?>
</label></h5>
		<div id="searchBody" class="pBody">
			<form action="<?php 
        $this->text('searchaction');
        ?>
" id="searchform"><div>
				<input id="searchInput" name="search" type="text"<?php 
        echo $skin->tooltipAndAccesskey('search');
        if (isset($this->data['search'])) {
            ?>
 value="<?php 
            $this->text('search');
            ?>
"<?php 
        }
        ?>
 />
				<input type='submit' name="go" class="searchButton" id="searchGoButton"	value="<?php 
        $this->msg('searcharticle');
        ?>
"<?php 
        echo $skin->tooltipAndAccesskey('search-go');
        ?>
 />&nbsp;
				<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php 
        $this->msg('searchbutton');
        ?>
"<?php 
        echo $skin->tooltipAndAccesskey('search-fulltext');
        ?>
 />
			</div></form>
		</div>
	</div>
	<div class="portlet" id="p-tb">
		<h5><?php 
        $this->msg('toolbox');
        ?>
</h5>
		<div class="pBody">
			<ul>
<?php 
        if ($this->data['notspecialpage']) {
            ?>
				<li id="t-whatlinkshere"><a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href']);
            ?>
"<?php 
            echo $skin->tooltipAndAccesskey('t-whatlinkshere');
            ?>
><?php 
            $this->msg('whatlinkshere');
            ?>
</a></li>
<?php 
            if ($this->data['nav_urls']['recentchangeslinked']) {
                ?>
				<li id="t-recentchangeslinked"><a href="<?php 
                echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href']);
                ?>
"<?php 
                echo $skin->tooltipAndAccesskey('t-recentchangeslinked');
                ?>
><?php 
                $this->msg('recentchangeslinked');
                ?>
</a></li>
<?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 $skin->tooltipAndAccesskey('t-trackbacklink');
            ?>
><?php 
            $this->msg('trackbacklink');
            ?>
</a></li>
<?php 
        }
        if ($this->data['feeds']) {
            ?>
			<li id="feedlinks"><?php 
            foreach ($this->data['feeds'] as $key => $feed) {
                ?>
<span id="feed-<?php 
                echo Sanitizer::escapeId($key);
                ?>
"><a href="<?php 
                echo htmlspecialchars($feed['href']);
                ?>
"<?php 
                echo $skin->tooltipAndAccesskey('feed-' . $key);
                ?>
><?php 
                echo htmlspecialchars($feed['text']);
                ?>
</a>&nbsp;</span>
					<?php 
            }
            ?>
</li><?php 
        }
        foreach (array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special) {
            if ($this->data['nav_urls'][$special]) {
                ?>
<li id="t-<?php 
                echo $special;
                ?>
"><a href="<?php 
                echo htmlspecialchars($this->data['nav_urls'][$special]['href']);
                ?>
"<?php 
                echo $skin->tooltipAndAccesskey('t-' . $special);
                ?>
><?php 
                $this->msg($special);
                ?>
</a></li>
<?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 $skin->tooltipAndAccesskey('t-print');
            ?>
><?php 
            $this->msg('printableversion');
            ?>
</a></li><?php 
        }
        if (!empty($this->data['nav_urls']['permalink']['href'])) {
            ?>
				<li id="t-permalink"><a href="<?php 
            echo htmlspecialchars($this->data['nav_urls']['permalink']['href']);
            ?>
"<?php 
            echo $skin->tooltipAndAccesskey('t-permalink');
            ?>
><?php 
            $this->msg('permalink');
            ?>
</a></li><?php 
        } elseif ($this->data['nav_urls']['permalink']['href'] === '') {
            ?>
				<li id="t-ispermalink"<?php 
            echo $skin->tooltip('t-ispermalink');
            ?>
><?php 
            $this->msg('permalink');
            ?>
</li><?php 
        }
        wfRunHooks('MonoBookTemplateToolboxEnd', array(&$this));
        ?>
			</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']);
                ?>
"><?php 
                ?>
<a href="<?php 
                echo htmlspecialchars($langlink['href']);
                ?>
"><?php 
                echo $langlink['text'];
                ?>
</a></li>
<?php 
            }
            ?>
			</ul>
		</div>
	</div>
<?php 
        }
        ?>
		</div><!-- end of the left (by default at least) column -->
			<div class="visualClear"></div>
			<div id="footer">
<?php 
        if ($this->data['poweredbyico']) {
            ?>
				<div id="f-poweredbyico"><?php 
            $this->html('poweredbyico');
            ?>
</div>
<?php 
        }
        if ($this->data['copyrightico']) {
            ?>
				<div id="f-copyrightico"><?php 
            $this->html('copyrightico');
            ?>
</div>
<?php 
        }
        // Generate additional footer links
        ?>
			<ul id="f-list">
<?php 
        $footerlinks = array('lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', 'privacy', 'about', 'disclaimer', 'tagline');
        foreach ($footerlinks as $aLink) {
            if (isset($this->data[$aLink]) && $this->data[$aLink]) {
                ?>
				<li id="<?php 
                echo $aLink;
                ?>
"><?php 
                $this->html($aLink);
                ?>
</li>
<?php 
            }
        }
        ?>
			</ul>
		</div>
		
	<?php 
        $this->html('bottomscripts');
        /* JS call to runBodyOnloadHook */
        ?>
</div>
<?php 
        $this->html('reporttime');
        if ($this->data['debug']) {
            ?>
<!-- Debug output:
<?php 
            $this->text('debug');
            ?>

-->
<?php 
        }
        ?>
</body></html>
<?php 
        wfRestoreWarnings();
    }
Exemplo n.º 24
0
    function execute()
    {
        global $wgRequest;
        $this->skin = $skin = $this->data['skin'];
        $action = $wgRequest->getText('action');
        // optimize the css generated <links>
        $links = $this->data['csslinks'];
        $links = str_replace("../../../../skins/../", "../", $links);
        $links = str_replace("?188", "", $links);
        preg_match_all('/<link[^>]*gen\\.css[^>]*\\/>/s', $links, $matches);
        if (count($matches)) {
            $links = str_replace($matches[0], "", $links);
        }
        $this->data['csslinks'] = $links;
        // 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="<?php 
        $this->text('xhtmldefaultnamespace');
        ?>
" <?php 
        foreach ($this->data['xhtmlnamespaces'] as $tag => $ns) {
            ?>
xmlns:<?php 
            echo "{$tag}=\"{$ns}\" ";
        }
        ?>
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');
        ?>
" />
		<title><?php 
        echo strip_tags($this->data['title']);
        ?>
</title>
		<?php 
        $this->html('csslinks');
        ?>

		<?php 
        print Skin::makeGlobalVariablesScript($this->data);
        ?>

		<script type="<?php 
        $this->text('jsmimetype');
        ?>
" src="<?php 
        $this->text('stylepath');
        ?>
/common/wikibits.js"></script>
<?php 
        $this->html('headscripts');
        if ($this->data['jsvarurl']) {
            ?>
		<script type="<?php 
            $this->text('jsmimetype');
            ?>
" src="<?php 
            $this->text('jsvarurl');
            ?>
"></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'];
        }
        ?>
	</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('dir');
        ?>
 <?php 
        $this->text('pageclass');
        ?>
 <?php 
        $this->text('skinnameclass');
        ?>
" style="margin: 0 1em 1em 1em; background: #FFFFFF">
	<div id="globalWrapper"><div id="bodyContent">
		<a name="top" id="top"></a>
		<h1 class="firstHeading"><?php 
        $this->html('title');
        ?>
</h1>
		<?php 
        $this->html('bodytext');
        ?>
		<?php 
        /* With categories */
        if ($this->data['catlinks']) {
            $this->html('catlinks');
        }
        ?>


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