/**
 * @param  $skin Skin
 * @param  $tpl QuickTemplate
 * @return bool
 */
function wfLanguageSelectorSkinTemplateOutputPageBeforeExec(&$skin, &$tpl)
{
    global $wgLanguageSelectorLocation;
    global $wgLang, $wgContLang;
    if ($wgLanguageSelectorLocation == LANGUAGE_SELECTOR_AS_PORTLET) {
        $code = $wgLang->getCode();
        $lines = array();
        foreach (wfGetLanguageSelectorLanguages() as $ln) {
            $lines[] = array($href = $skin->getTitle()->getFullURL('setlang=' . $ln), 'text' => $wgContLang->getLanguageName($ln), 'href' => $href, 'id' => 'n-languageselector', 'active' => $ln == $code);
        }
        $tpl->data['sidebar']['languageselector'] = $lines;
        return true;
    }
    $key = null;
    switch ($wgLanguageSelectorLocation) {
        case LANGUAGE_SELECTOR_INTO_SITENOTICE:
            $key = 'sitenotice';
            break;
        case LANGUAGE_SELECTOR_INTO_TITLE:
            $key = 'title';
            break;
        case LANGUAGE_SELECTOR_INTO_SUBTITLE:
            $key = 'subtitle';
            break;
        case LANGUAGE_SELECTOR_INTO_CATLINKS:
            $key = 'catlinks';
            break;
    }
    if ($key) {
        $html = wfLanguageSelectorHTML($skin->getTitle());
        $tpl->set($key, $tpl->data[$key] . $html);
    }
    return true;
}
Exemplo n.º 2
0
    /**
     * Render the "more..." footer panel content
     * @TODO optimize with better caching (wfMessage()->parse() is heavy)
     */
    private function renderMore()
    {
        ?>
        <div class="section">
            <p><?php 
        echo wfMessage('sz-legalcontent')->text();
        ?>
</p>
            <ul>
                <li><?php 
        echo wfMessage('sz-gtcu')->parse();
        ?>
</li>
                <li><?php 
        echo wfMessage('sz-astcu')->parse();
        ?>
</li>
                <li><?php 
        echo wfMessage('sz-legalinfo')->parse();
        ?>
</li>
                <li><?php 
        echo wfMessage('sz-privacypolicy')->parse();
        ?>
</li>
            </ul>
        </div>

        <div class="section">
            <p><?php 
        echo wfMessage('sz-generalinfo')->text();
        ?>
</p>
            <ul>
                <li><?php 
        echo wfMessage('sz-about')->parse();
        ?>
</li>
                <li><?php 
        echo wfMessage('sz-freedoms')->parse();
        ?>
</li>
                <li><?php 
        echo wfMessage('sz-browse')->parse();
        ?>
</li>
                <li><?php 
        echo wfMessage('sz-help')->parse();
        ?>
</li>
                <li><?php 
        echo wfMessage('sz-faq')->parse();
        ?>
</li>
            </ul>
        </div>

        <div class="section">
            <p><?php 
        echo wfMessage('sz-communicate')->text();
        ?>
</p>
            <ul>
                <li><?php 
        echo wfMessage('sz-reportabuse')->parse();
        ?>
</li>
                <li><?php 
        echo wfMessage('sz-reportbug')->parse();
        ?>
</li>
                <li><?php 
        echo wfMessage('sz-technicalsupport')->parse();
        ?>
</li>
                <li><?php 
        echo wfMessage('sz-contactus')->parse();
        ?>
</li>
            </ul>
        </div>

        <div class="section">
            <p class="sread"><?php 
        echo wfMessage('sz-selectlang')->text();
        ?>
</p>
            <?php 
        echo wfLanguageSelectorHTML($this->skin->getTitle(), null, 'selectLang');
        ?>
            <p class="sread"><?php 
        echo wfMessage('sz-seizamonsocialnetworks')->text();
        ?>
</p>
            <ul class="socials">
                <li class="tumblr"><a href="http://www.davidcanwin.com">Tumblr</a></li>
                <li class="twitter"><a href="http://www.twitter.com/seizam">Twitter</a></li>
                <li class="fcbk"><a href="http://facebook.seizam.com">Facebook</a></li>
                <li class="linkedin"><a href="http://www.linkedin.com/company/seizam">LinkedIn</a></li>
            </ul>
            <?php 
        $footericons = $this->getFooterIcons("icononly");
        if (count($footericons) > 0) {
            ?>
                <ul id="footer-icons">
                    <?php 
            foreach ($footericons as $blockName => $footerIcons) {
                ?>
                        <li id="footer-<?php 
                echo htmlspecialchars($blockName);
                ?>
ico">
                            <?php 
                foreach ($footerIcons as $icon) {
                    ?>
                                <?php 
                    echo $this->skin->makeFooterIcon($icon);
                    ?>

                            <?php 
                }
                ?>
                        </li>
                    <?php 
            }
            ?>
                </ul>
            <?php 
        }
        ?>
        </div>
        <?php 
    }