本文整理汇总了PHP中Linker::tooltip方法的典型用法代码示例。如果您正苦于以下问题:PHP Linker::tooltip方法的具体用法?PHP Linker::tooltip怎么用?PHP Linker::tooltip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Linker
的用法示例。
在下文中一共展示了Linker::tooltip方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: outputPortlet
/**
* Outputs a single sidebar portlet of any kind.
*/
private function outputPortlet($box)
{
if (!$box['content']) {
return;
}
?>
<div
role="navigation"
class="mw-portlet"
id="<?php
echo Sanitizer::escapeId($box['id']);
?>
"
<?php
echo Linker::tooltip($box['id']);
?>
>
<h3>
<?php
if (isset($box['headerMessage'])) {
$this->msg($box['headerMessage']);
} else {
echo htmlspecialchars($box['header']);
}
?>
</h3>
<?php
if (is_array($box['content'])) {
echo '<ul>';
foreach ($box['content'] as $key => $item) {
echo $this->makeListItem($key, $item);
}
echo '</ul>';
} else {
echo $box['content'];
}
?>
</div>
<?php
}
示例2: execute
/**
* Outputs the entire contents of the page
*/
public function execute()
{
global $wgGroupPermissions;
global $wgVectorUseIconWatch;
global $wgSearchPlacement;
global $wgMediaWikiBootstrapSkinLoginLocation;
global $wgMediaWikiBootstrapSkinAnonNavbar;
global $wgMediaWikiBootstrapSkinUseStandardLayout;
// Suppress warnings to prevent notices about missing indexes in $this->data
wfSuppressWarnings();
// search box locations
if (!$wgSearchPlacement) {
$wgSearchPlacement['top-nav'] = true;
$wgSearchPlacement['nav'] = true;
}
// Build additional attributes for navigation urls
$nav = $this->data['content_navigation'];
if ($wgVectorUseIconWatch) {
$mode = $this->getSkin()->getUser()->isWatched($this->getSkin()->getRelevantTitle()) ? 'unwatch' : 'watch';
if (isset($nav['actions'][$mode])) {
$nav['views'][$mode] = $nav['actions'][$mode];
$nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
$nav['views'][$mode]['primary'] = true;
unset($nav['actions'][$mode]);
}
}
$xmlID = '';
foreach ($nav as $section => $links) {
foreach ($links as $key => $link) {
if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
$link['class'] = rtrim('collapsible ' . $link['class'], ' ');
}
$xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
$nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
if ($link['class']) {
$nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
unset($nav[$section][$key]['class']);
}
if (isset($link['tooltiponly']) && $link['tooltiponly']) {
$nav[$section][$key]['key'] = Linker::tooltip($xmlID);
} else {
$nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
}
}
}
$this->data['namespace_urls'] = $nav['namespaces'];
$this->data['view_urls'] = $nav['views'];
$this->data['action_urls'] = $nav['actions'];
$this->data['variant_urls'] = $nav['variants'];
// Output HTML Page
$this->html('headelement');
?>
<div id="wrapper" class="container">
<!-- start navbar -->
<?php
if ($wgGroupPermissions['*']['edit'] || $wgMediaWikiBootstrapSkinAnonNavbar || $this->data['loggedin']) {
?>
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-nav-top">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand visible-xs" href="#"><?php
$this->html('sitename');
?>
</a>
</div>
<div class="navbar-collapse collapse" id="main-nav-top">
<?php
# Page options & menu
$this->renderNavigation(array('PAGE-OPTIONS'));
/*
# This content in other languages
if ($this->data['language_urls']) {
$this->renderNavigation(array('LANGUAGES'));
}
*/
# Edit button
$this->renderNavigation(array('EDIT'));
# Actions menu
$this->renderNavigation(array('ACTIONS'));
# Sidebar items to display in navbar
$this->renderNavigation(array('SIDEBARNAV'));
# Toolbox
if (!isset($portals['TOOLBOX'])) {
$this->renderNavigation(array('TOOLBOX'));
}
# Personal menu (at the right)
$this->renderNavigation(array('PERSONAL'));
# Search box (at the right)
if ($wgSearchPlacement['top-nav']) {
//.........这里部分代码省略.........
示例3: customBox
function customBox($bar, $cont)
{
?>
<li class='widget-container' id='<?php
echo Sanitizer::escapeId("p-{$bar}");
?>
'<?php
echo Linker::tooltip('p-' . $bar);
?>
>
<h3 class="widget-title">
<?php
$out = wfMsg($bar);
if (wfEmptyMsg($bar, $out)) {
echo htmlspecialchars($bar);
} else {
echo htmlspecialchars($out);
}
?>
</h3>
<?php
if (is_array($cont)) {
?>
<ul>
<?php
foreach ($cont as $key => $val) {
?>
<li id="<?php
echo Sanitizer::escapeId($val['id']);
?>
"<?php
if ($val['active']) {
?>
class="active" <?php
}
?>
><a href="<?php
echo htmlspecialchars($val['href']);
?>
"<?php
echo Linker::tooltipAndAccesskeyAttribs($val['id']);
?>
>
<?php
echo htmlspecialchars($val['text']);
?>
</a>
</li>
<?php
}
?>
</ul>
<?php
} else {
# allow raw HTML block to be defined by extensions
print $cont;
}
echo '</li>';
}
示例4: execute
public function execute()
{
global $wgUser;
global $wgForegroundFeatures;
wfSuppressWarnings();
$this->html('headelement');
switch ($wgForegroundFeatures['NavWrapperType']) {
case '0':
break;
case 'divonly':
echo "<div id='navwrapper'>";
break;
default:
echo "<div id='navwrapper' class='" . $wgForegroundFeatures['NavWrapperType'] . "'>";
break;
}
// Set default variables for footer and switch them if 'showFooterIcons' => true
$footerLeftClass = 'small-8 large-centered columns text-center';
$footerRightClass = 'large-12 small-12 columns';
$poweredbyType = "nocopyright";
$poweredbyMakeType = 'withoutImage';
switch ($wgForegroundFeatures['showFooterIcons']) {
case true:
$footerLeftClass = 'large-8 small-12 columns';
$footerRightClass = 'large-4 small-12 columns';
$poweredbyType = "icononly";
$poweredbyMakeType = 'withImage';
break;
default:
break;
}
?>
<!-- START FOREGROUNDTEMPLATE -->
<nav class="top-bar">
<ul class="title-area">
<li class="name">
<h1 class="title-name">
<a href="<?php
echo $this->data['nav_urls']['mainpage']['href'];
?>
">
<?php
if ($wgForegroundFeatures['navbarIcon'] != '0') {
?>
<img alt="<?php
echo $this->text('sitename');
?>
" src="<?php
echo $this->text('logopath');
?>
" style="max-width: 64px;height:auto; max-height:36px; display: inline-block; vertical-align:middle;">
<?php
}
?>
<div class="title-name" style="display: inline-block;"><?php
echo $wgForegroundFeatures['wikiName'];
?>
</div>
</a>
</h1>
</li>
<li class="toggle-topbar menu-icon">
<a href="#"><span><?php
echo wfMessage('foreground-menutitle')->text();
?>
</span></a>
</li>
</ul>
<section class="top-bar-section">
<ul id="top-bar-left" class="left">
<li class="divider"></li>
<?php
foreach ($this->getSidebar() as $boxName => $box) {
if ($box['header'] != wfMessage('toolbox')->text()) {
?>
<li class="has-dropdown active" id='<?php
echo Sanitizer::escapeId($box['id']);
?>
'<?php
echo Linker::tooltip($box['id']);
?>
>
<a href="#"><?php
echo htmlspecialchars($box['header']);
?>
</a>
<?php
if (is_array($box['content'])) {
?>
<ul class="dropdown">
<?php
foreach ($box['content'] as $key => $item) {
echo $this->makeListItem($key, $item);
}
?>
</ul>
<?php
//.........这里部分代码省略.........
示例5: execute
/**
* Outputs the entire contents of the (X)HTML page
*/
public function execute()
{
global $wgLang, $wgVectorUseIconWatch;
$this->skin = $this->data['skin'];
// Build additional attributes for navigation urls
//$nav = $this->skin->buildNavigationUrls();
$nav = $this->data['content_navigation'];
if ($wgVectorUseIconWatch) {
$mode = $this->skin->getTitle()->userIsWatching() ? 'unwatch' : 'watch';
if (isset($nav['actions'][$mode])) {
$nav['views'][$mode] = $nav['actions'][$mode];
$nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
$nav['views'][$mode]['primary'] = true;
unset($nav['actions'][$mode]);
}
}
$xmlID = '';
foreach ($nav as $section => $links) {
foreach ($links as $key => $link) {
if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
$link['class'] = rtrim('collapsible ' . $link['class'], ' ');
}
$xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
$nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
if ($link['class']) {
$nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
unset($nav[$section][$key]['class']);
}
if (isset($link['tooltiponly']) && $link['tooltiponly']) {
$nav[$section][$key]['key'] = Linker::tooltip($xmlID);
} else {
$nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
}
}
}
$this->data['namespace_urls'] = $nav['namespaces'];
$this->data['view_urls'] = $nav['views'];
$this->data['action_urls'] = $nav['actions'];
$this->data['variant_urls'] = $nav['variants'];
// Reverse horizontally rendered navigation elements
if ($wgLang->isRTL()) {
$this->data['view_urls'] = array_reverse($this->data['view_urls']);
$this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
$this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
}
// Output HTML Page
$this->html('headelement');
?>
<div id="idSngHeader">
<div id="p-logo"><a style="background-image: url(<?php
$this->text('logopath');
?>
);" href="<?php
echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
?>
" <?php
echo Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs('p-logo'));
?>
></a>
</div>
<?php
$this->renderNavigation('PERSONAL');
?>
<?php
$this->renderNavigation('SEARCH');
?>
<div id="idSngMenu" class="noprint">
<ul class="classSngMenu">
<?php
$this->renderPortals($this->data['sidebar']);
?>
<li><a href="<?php
echo $_SERVER['SCRIPT_NAME'];
?>
/Help:Contents">Help</a></li>
</ul>
</div> <!-- PaneMenu -->
<div id="idSngTitle">
<?php
$this->html('title');
?>
</div>
</div><!-- /PaneHeader -->
<div id="idSngSplitter">
<div id="idSngSplitLeft" class="noprint">
</div>
<div id="idSngSplitRight">
<a id="idTop"></a>
//.........这里部分代码省略.........
示例6: renderPortal
/**
* @param string $name
* @param array $content
* @param null|string $msg
* @param null|string|array $hook
*/
protected function renderPortal($name, $content, $msg = null, $hook = null)
{
if ($msg === null) {
$msg = $name;
}
$msgObj = wfMessage($msg);
$labelId = Sanitizer::escapeId("p-{$name}-label");
?>
<?php
if ($this->config->get('MetrolookSearchBar')) {
?>
<div class="portal" role="navigation" id='<?php
echo Sanitizer::escapeId("p-{$name}");
?>
'<?php
echo Linker::tooltip('p-' . $name);
?>
aria-labelledby='<?php
echo $labelId;
?>
'>
<h5<?php
$this->html('userlangattributes');
?>
id='<?php
echo $labelId;
?>
'><?php
echo htmlspecialchars($msgObj->exists() ? $msgObj->text() : $msg);
?>
</h5>
<?php
} else {
?>
<div class="portal-custom" role="navigation" id='<?php
echo Sanitizer::escapeId("p-{$name}");
?>
'<?php
echo Linker::tooltip('p-' . $name);
?>
aria-labelledby='<?php
echo $labelId;
?>
'>
<h5<?php
$this->html('userlangattributes');
?>
id='<?php
echo $labelId;
?>
'><?php
echo htmlspecialchars($msgObj->exists() ? $msgObj->text() : $msg);
?>
</h5>
<?php
}
?>
<?php
if ($this->config->get('MetrolookSearchBar')) {
?>
<div class="body">
<?php
} else {
?>
<div class="body-custom">
<?php
}
?>
<?php
if (is_array($content)) {
?>
<ul>
<?php
foreach ($content as $key => $val) {
echo $this->makeListItem($key, $val);
}
if ($hook !== null) {
Hooks::run($hook, array(&$this, true));
}
?>
</ul>
<?php
} else {
echo $content;
/* Allow raw HTML block to be defined by extensions */
}
$this->renderAfterPortlet($name);
?>
</div>
</div>
<?php
}
示例7: outputNavDropdown
private function outputNavDropdown($box)
{
if (!$box['content']) {
return;
}
?>
<li class="dropdown" id="<?php
echo Sanitizer::escapeId($box['id']);
?>
"<?php
echo Linker::tooltip($box['id']);
?>
>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<?php
if (isset($box['headerSafe'])) {
echo $box['headerSafe'];
} else {
if (isset($box['headerMessage'])) {
$this->msg($box['headerMessage']);
} else {
echo htmlspecialchars($box['header']);
}
}
?>
<span class="caret"></span></a>
<ul class="dropdown-menu <?php
if (isset($box['ulClass'])) {
echo $box['ulClass'];
}
?>
">
<?php
if (is_array($box['content'])) {
echo '<li>';
foreach ($box['content'] as $key => $item) {
echo $this->makeListItem($key, $item);
}
echo '</li>';
} else {
echo $box['content'];
}
?>
</ul>
</li><?php
}
示例8: renderPortal
private function renderPortal($name, $content, $msg = null, $hook = null)
{
if ($msg === null) {
$msg = $name;
}
?>
<div class="portal" id='<?php
echo Sanitizer::escapeId("p-{$name}");
?>
'<?php
echo Linker::tooltip('p-' . $name);
?>
>
<h5<?php
$this->html('userlangattributes');
?>
><?php
$msgObj = wfMessage($msg);
echo htmlspecialchars($msgObj->exists() ? $msgObj->text() : $msg);
?>
</h5>
<div class="body">
<?php
if (is_array($content)) {
?>
<ul>
<?php
foreach ($content as $key => $val) {
?>
<?php
echo $this->makeListItem($key, $val);
?>
<?php
}
if ($hook !== null) {
wfRunHooks($hook, array(&$this, true));
}
?>
</ul>
<?php
} else {
?>
<?php
echo $content;
/* Allow raw HTML block to be defined by extensions */
}
?>
</div>
</div>
<?php
}
示例9: execute
/**
* Outputs the entire contents of the (X)HTML page
*/
public function execute()
{
global $wgGroupPermissions;
global $wgVectorUseIconWatch;
global $wgSearchPlacement;
global $wgBootstrapSkinLogoLocation;
global $wgBootstrapSkinLoginLocation;
global $wgBootstrapSkinAnonNavbar;
global $wgBootstrapSkinUseStandardLayout;
if (!$wgSearchPlacement) {
$wgSearchPlacement['header'] = true;
$wgSearchPlacement['nav'] = false;
$wgSearchPlacement['footer'] = false;
}
// Build additional attributes for navigation urls
$nav = $this->data['content_navigation'];
if ($wgVectorUseIconWatch) {
$mode = $this->getSkin()->getTitle()->userIsWatching() ? 'unwatch' : 'watch';
if (isset($nav['actions'][$mode])) {
$nav['views'][$mode] = $nav['actions'][$mode];
$nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
$nav['views'][$mode]['primary'] = true;
unset($nav['actions'][$mode]);
}
}
$xmlID = '';
foreach ($nav as $section => $links) {
foreach ($links as $key => $link) {
if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
$link['class'] = rtrim('collapsible ' . $link['class'], ' ');
}
$xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
$nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
if ($link['class']) {
$nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
unset($nav[$section][$key]['class']);
}
if (isset($link['tooltiponly']) && $link['tooltiponly']) {
$nav[$section][$key]['key'] = Linker::tooltip($xmlID);
} else {
$nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
}
}
}
$this->data['namespace_urls'] = $nav['namespaces'];
$this->data['view_urls'] = $nav['views'];
$this->data['action_urls'] = $nav['actions'];
$this->data['variant_urls'] = $nav['variants'];
// Output HTML Page
$this->html('headelement');
?>
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<!-- Header -->
<div id="page-header" class="container-fluid <?php
echo $this->data['loggedin'] ? 'signed-in' : 'signed-out';
?>
">
<div class="col-md-10 pull-left" style="margin-left:-16px;">
<ul class="nav navbar-nav pull-left searchform-disabled">
<li class="active"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
?>
"><i class="fa fa-home"></i> Main Page</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-info"></i> Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu text-left" role="menu">
<li><a href="[[Members One]]<">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a href="" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-info"></i> Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu text-left mwbs-color-white" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</div>
<div class="col-md-2 hidden-xs hidden-sm" style="margin-top:20px;">
<?php
if ($wgSearchPlacement['header']) {
$this->renderNavigation(array('SEARCH'));
}
?>
</div>
<div class="col-md-2">
//.........这里部分代码省略.........
示例10: renderContentOther
/**
* Render the ContentOther (Languages, Categories, Toolbox...)
*/
private function renderContentOther()
{
if ($this->data['language_urls']) {
?>
<!-- language_urls -->
<div class="portal" id="p-lang"<?php
echo Linker::tooltip('p-lang');
?>
>
<h5<?php
$this->html('userlangattributes');
?>
><?php
echo wfMessage('otherlanguages')->text() . wfMsgExt('colon-separator', 'escapenoentities');
?>
</h5>
<ul>
<?php
$this->renderNavigation(array('LANG'));
?>
</ul>
</div>
<!-- /language_urls -->
<?php
}
?>
<?php
if ($this->data['catlinks']) {
?>
<!-- catlinks -->
<?php
$this->html('catlinks');
?>
<!-- /catlinks -->
<?php
}
?>
<!-- toolbox -->
<div class="portal" id="p-tb"<?php
echo Linker::tooltip('p-tb');
?>
>
<h5<?php
$this->html('userlangattributes');
?>
><?php
echo wfMessage('toolbox')->text() . wfMsgExt('colon-separator', 'escapenoentities');
?>
</h5>
<ul>
<?php
$this->renderNavigation(array('TOOLBOX'));
?>
</ul>
</div>
<!-- /toolbox -->
<?php
}
示例11: execute
/**
* Outputs the entire contents of the (X)HTML page
*/
public function execute()
{
// Build additional attributes for navigation urls
global $wgUser;
$nav = $this->data['content_navigation'];
if ($this->config->get('LibreUseIconWatch')) {
$mode = $this->getSkin()->getUser()->isWatched($this->getSkin()->getRelevantTitle()) ? 'unwatch' : 'watch';
if (isset($nav['actions'][$mode])) {
$nav['views'][$mode] = $nav['actions'][$mode];
$nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
$nav['views'][$mode]['primary'] = true;
unset($nav['actions'][$mode]);
}
}
$xmlID = '';
foreach ($nav as $section => $links) {
foreach ($links as $key => $link) {
if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
$link['class'] = rtrim('collapsible ' . $link['class'], ' ');
}
$xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
$nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
if ($link['class']) {
$nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
unset($nav[$section][$key]['class']);
}
if (isset($link['tooltiponly']) && $link['tooltiponly']) {
$nav[$section][$key]['key'] = Linker::tooltip($xmlID);
} else {
$nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
}
}
}
$this->data['namespace_urls'] = $nav['namespaces'];
$this->data['view_urls'] = $nav['views'];
$this->data['action_urls'] = $nav['actions'];
$this->data['variant_urls'] = $nav['variants'];
// Reverse horizontally rendered navigation elements
if ($this->data['rtl']) {
$this->data['view_urls'] = array_reverse($this->data['view_urls']);
$this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
$this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
}
$userLinks = $this->getPersonalTools();
$user = $wgUser->isLoggedIn() ? array_shift($userLinks) : array_pop($userLinks);
$userLink = $user['links'][0];
// Output HTML Page
$this->html('headelement');
?>
<div class="container">
<!-- Static navbar -->
<nav class="navbar navbar-default navbar-fixed-top libre_navbar">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="glyphicon glyphicon-th-large" aria-hidden="true"></span>
</button>
<div class="dropdown">
<?php
if ($wgUser->isLoggedIn()) {
$loginfuc = "data-toggle=\"dropdown\"";
$loginbtn = "user";
} else {
$loginbtn = "lock";
$loginfuc = "onclick=\"location.href='" . $userLink['href'] . "'\"";
}
?>
<button type="button" class="navbar-toggle collapsed dropdown-toggle" <?php
echo $loginfuc;
?>
aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="glyphicon glyphicon-<?php
echo $loginbtn;
?>
" aria-hidden="true"></span>
</button>
<?php
if ($wgUser->isLoggedIn()) {
?>
<ul class="dropdown-menu libre_personal_dropdown" role="menu">
<?php
$this->renderNavigation('PERSONAL');
?>
</ul>
<?php
}
?>
</div>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#nav_search" aria-expanded="false" aria-controls="nav_search">
<span class="sr-only">Toggle navigation</span>
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</button>
<a class="navbar-brand" href="/wiki/리브레_위키:현관"><img alt="<?php
echo $this->msg('tagline');
//.........这里部分代码省略.........
示例12: assemblePortlet
/**
* Returns a single sidebar portlet of any kind (monobook style)
*/
private function assemblePortlet($box)
{
if (!$box['content']) {
return;
}
if (!isset($box['class'])) {
$box['class'] = 'mw-portlet';
} else {
$box['class'] .= ' mw-portlet';
}
$content = '<div role="navigation" class="' . $box['class'] . '" id="' . Sanitizer::escapeId($box['id']) . '"' . Linker::tooltip($box['id']) . '>';
$content .= '<h3>';
if (isset($box['headerMessage'])) {
$content .= $this->getMsg($box['headerMessage'])->escaped();
} else {
$content .= htmlspecialchars($box['header']);
}
$content .= '</h3>';
if (is_array($box['content'])) {
$content .= '<ul>';
foreach ($box['content'] as $key => $item) {
$content .= $this->makeListItem($key, $item);
}
$content .= '</ul>';
} else {
$content .= $box['content'];
}
$content .= '</div>';
return $content;
}
示例13: die
* @since Version 1.0
* @ingroup Skins
* @author Tom Hutchison
* @license 2-clause BSD
*/
if (!defined('MEDIAWIKI')) {
die("Not Directly Called So What Are You Doing?");
}
foreach ($this->getSidebar() as $boxName => $box) {
if ($box['header'] != wfMessage('toolbox')->text()) {
?>
<li id='<?php
echo Sanitizer::escapeId($box['id']);
?>
'<?php
echo Linker::tooltip($box['id']);
?>
>
<li><label><?php
echo htmlspecialchars($box['header']);
?>
</label></li>
<?php
if (is_array($box['content'])) {
?>
<?php
foreach ($box['content'] as $key => $item) {
echo $this->makeListItem($key, $item);
}
?>
<?php
示例14: execute
/**
* Outputs the entire contents of the (X)HTML page
*/
public function execute()
{
global $wgLang, $wgVectorUseIconWatch;
$this->skin = $this->data['skin'];
// Build additional attributes for navigation urls
//$nav = $this->skin->buildNavigationUrls();
$nav = $this->data['content_navigation'];
if ($wgVectorUseIconWatch) {
$mode = $this->skin->getTitle()->userIsWatching() ? 'unwatch' : 'watch';
if (isset($nav['actions'][$mode])) {
$nav['views'][$mode] = $nav['actions'][$mode];
$nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
$nav['views'][$mode]['primary'] = true;
unset($nav['actions'][$mode]);
}
}
$xmlID = '';
foreach ($nav as $section => $links) {
foreach ($links as $key => $link) {
if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
$link['class'] = rtrim('collapsible ' . $link['class'], ' ');
}
$xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
$nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
if ($link['class']) {
$nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
unset($nav[$section][$key]['class']);
}
if (isset($link['tooltiponly']) && $link['tooltiponly']) {
$nav[$section][$key]['key'] = Linker::tooltip($xmlID);
} else {
$nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
}
}
}
$this->data['namespace_urls'] = $nav['namespaces'];
$this->data['view_urls'] = $nav['views'];
$this->data['action_urls'] = $nav['actions'];
$this->data['variant_urls'] = $nav['variants'];
// Reverse horizontally rendered navigation elements
if ($wgLang->isRTL()) {
$this->data['view_urls'] = array_reverse($this->data['view_urls']);
$this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
}
// Output HTML Page
$this->html('headelement');
global $Cppreference2SkinRootLink;
$root_link = '/';
if (isset($Cppreference2SkinRootLink)) {
$root_link = htmlspecialchars($Cppreference2SkinRootLink);
}
?>
<!-- header -->
<div id="mw-head" class="noprint">
<div id="cpp-head-first-base">
<div id="cpp-head-first">
<h5><a href="<?php
echo $root_link;
?>
">
<?php
global $wgSitename;
echo $wgSitename;
?>
</a></h5>
<div id="cpp-head-search">
<?php
$this->renderNavigation('SEARCH');
?>
</div>
<div id="cpp-head-personal">
<?php
$this->renderNavigation('PERSONAL');
?>
</div>
</div>
</div>
<div id="cpp-head-second-base">
<div id="cpp-head-second">
<div id="cpp-head-tools-left">
<?php
$this->renderNavigation(array('NAMESPACES', 'VARIANTS'));
?>
</div>
<div id="cpp-head-tools-right">
<?php
$this->renderNavigation(array('VIEWS', 'ACTIONS'));
?>
</div>
</div>
</div>
</div>
<!-- /header -->
<!-- content -->
<div id="cpp-content-base">
<div id="content">
//.........这里部分代码省略.........
示例15: execute
//.........这里部分代码省略.........
?>
class="floating-toc-enabled" <?php
}
?>
>
<div id="sidebar">
<div id="pcgw-logo">
<a href="<?php
echo htmlspecialchars($this->data['nav_urls']['mainpage']['href']);
?>
">
<img src="<?php
$this->text('logopath');
?>
" alt="<?php
$this->text('sitename');
?>
" width="145px" height="88px"/>
</a>
</div>
<nav class="sidebar-nav">
<?php
$sidebar = $this->getSidebar();
if (isset($sidebar["TOOLBOX"]["content"]["print"])) {
unset($sidebar["TOOLBOX"]["content"]["print"]);
}
foreach ($sidebar as $boxName => $box) {
?>
<div id="<?php
echo Sanitizer::escapeId($box['id']);
?>
"<?php
echo Linker::tooltip($box['id']);
?>
>
<?php
if (is_array($box['content'])) {
?>
<ul>
<li><?php
echo htmlspecialchars($box['header']);
?>
</li>
<?php
foreach ($box['content'] as $key => $item) {
echo $this->makeListItem($key, $item);
}
?>
</ul>
<?php
} else {
echo $box['content'];
}
}
?>
</nav>
<?php
if ($toggleGoogleAds == true) {
?>
<!-- sidebar ad -->
<div class="ad-sidebar-container">
<?php
echo $wgSkinOverclockedAds['sidebar'];
?>