mirror of
https://github.com/Hutchy68/pivot.git
synced 2024-11-24 11:29:04 +01:00
improvements, update to readme.md with config settings
This commit is contained in:
parent
c76ba86d9f
commit
efe9bb809b
@ -16,15 +16,17 @@ class Skinpivot extends SkinTemplate {
|
|||||||
global $wgPivotFeatures;
|
global $wgPivotFeatures;
|
||||||
$wgPivotFeaturesDefaults = array(
|
$wgPivotFeaturesDefaults = array(
|
||||||
'showActionsForAnon' => true,
|
'showActionsForAnon' => true,
|
||||||
'NavWrapperType' => '0',
|
'fixedNavBar' => false,
|
||||||
'showHelpUnderTools' => true,
|
'showHelpUnderTools' => true,
|
||||||
'showRecentChangesUnderTools' => true,
|
'showRecentChangesUnderTools' => true,
|
||||||
'wikiName' => &$GLOBALS['wgSitename'],
|
'wikiName' => &$GLOBALS['wgSitename'],
|
||||||
'wikiNameDesktop' => &$GLOBALS['wgSitename'],
|
'wikiNameDesktop' => &$GLOBALS['wgSitename'],
|
||||||
'navbarIcon' => false,
|
'navbarIcon' => true,
|
||||||
'IeEdgeCode' => 1,
|
'IeEdgeCode' => 1,
|
||||||
'showFooterIcons' => 0,
|
'showFooterIcons' => false,
|
||||||
'addThisFollowPUBID' => ''
|
'addThisPUBID' => '',
|
||||||
|
'useAddThisShare' => false,
|
||||||
|
'useAddThisFollow' => false
|
||||||
);
|
);
|
||||||
foreach ($wgPivotFeaturesDefaults as $fgOption => $fgOptionValue) {
|
foreach ($wgPivotFeaturesDefaults as $fgOption => $fgOptionValue) {
|
||||||
if ( !isset($wgPivotFeatures[$fgOption]) ) {
|
if ( !isset($wgPivotFeatures[$fgOption]) ) {
|
||||||
@ -61,16 +63,6 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
global $wgPivotFeatures;
|
global $wgPivotFeatures;
|
||||||
wfSuppressWarnings();
|
wfSuppressWarnings();
|
||||||
$this->html('headelement');
|
$this->html('headelement');
|
||||||
switch ($wgPivotFeatures['NavWrapperType']) {
|
|
||||||
case '0':
|
|
||||||
break;
|
|
||||||
case 'divonly':
|
|
||||||
echo "<div id='navwrapper'>";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
echo "<div id='navwrapper' class='". $wgPivotFeatures['NavWrapperType']. "'>";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
switch ($wgPivotFeatures['usePivotTabs']) {
|
switch ($wgPivotFeatures['usePivotTabs']) {
|
||||||
case 'true':
|
case 'true':
|
||||||
ob_start();
|
ob_start();
|
||||||
@ -84,24 +76,46 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
switch ($wgPivotFeatures['showFooterIcons']) {
|
||||||
|
case true:
|
||||||
|
$footerLeftClass = 'small-12 medium-8 large-9 columns';
|
||||||
|
$footerRightClass = 'small-12 medium-4 large-3 columns';
|
||||||
|
$poweredbyType = "icononly";
|
||||||
|
$poweredbyMakeType = 'withImage';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$footerLeftClass = 'small-12 medium-8 large-9 columns';
|
||||||
|
$footerRightClass = 'small-12 medium-4 large-3 columns';
|
||||||
|
$poweredbyType = "nocopyright";
|
||||||
|
$poweredbyMakeType = 'withoutImage';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!-- START FOREGROUNDTEMPLATE -->
|
<!-- START FOREGROUNDTEMPLATE -->
|
||||||
<div class="off-canvas-wrap docs-wrap" data-offcanvas="">
|
<div class="off-canvas-wrap docs-wrap" data-offcanvas="">
|
||||||
<div class="inner-wrap">
|
<div class="inner-wrap">
|
||||||
|
<?php if ($wgPivotFeatures['fixedNavBar'] != false) echo "<div class='fixed'>";?>
|
||||||
<nav class="tab-bar">
|
<nav class="tab-bar">
|
||||||
<section class="left-small show-for-small">
|
<section class="left-small show-for-small">
|
||||||
<a class="left-off-canvas-toggle"><span id="menu-user"><i class="fa fa-navicon fa-lg"></i></span></a>
|
<a class="left-off-canvas-toggle"><span id="menu-user"><i class="fa fa-navicon fa-lg"></i></span></a>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="middle tab-bar-section">
|
<section class="middle tab-bar-section">
|
||||||
<h1 class="title"><a href="<?php echo $this->data['nav_urls']['mainpage']['href']; ?>"><span class="show-for-medium-up"><?php echo $wgPivotFeatures['wikiNameDesktop']; ?></span><span class="show-for-small-only"><?php echo $wgPivotFeatures['wikiName']; ?></span></a></h1>
|
<h1 class="title"><a href="<?php echo $this->data['nav_urls']['mainpage']['href']; ?>">
|
||||||
|
<span class="show-for-medium-up"><?php echo $wgPivotFeatures['wikiNameDesktop']; ?></span>
|
||||||
|
<span class="show-for-small-only">
|
||||||
|
<?php if ($wgPivotFeatures['navbarIcon'] != false) { ?>
|
||||||
|
<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 } ?>
|
||||||
|
<?php echo $wgPivotFeatures['wikiName']; ?></span></a></h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="right-small">
|
<section class="right-small">
|
||||||
<a class="right-off-canvas-toggle"><span id="menu-user"><i class="fa fa-user fa-lg"></i></span></a>
|
<a class="right-off-canvas-toggle"><span id="menu-user"><i class="fa fa-user fa-lg"></i></span></a>
|
||||||
</section>
|
</section>
|
||||||
</nav>
|
</nav>
|
||||||
|
<?php if ($wgPivotFeatures['fixedNavBar'] != false) echo "</div>";?>
|
||||||
<aside class="left-off-canvas-menu">
|
<aside class="left-off-canvas-menu">
|
||||||
<ul class="off-canvas-list">
|
<ul class="off-canvas-list">
|
||||||
|
|
||||||
@ -143,9 +157,8 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
</ul>
|
</ul>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<section class="main-section">
|
<section class="main-section" <?php if ($wgPivotFeatures['fixedNavBar'] != false) echo "style='margin-top:2.8125em'"; ?>>
|
||||||
<?php if ($wgPivotFeatures['NavWrapperType'] != '0') echo "</div>"; ?>
|
|
||||||
|
|
||||||
<div id="page-content">
|
<div id="page-content">
|
||||||
|
|
||||||
<div id="mw-js-message" style="display:none;"></div>
|
<div id="mw-js-message" style="display:none;"></div>
|
||||||
@ -194,7 +207,7 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($wgUser->isLoggedIn() || $wgPivotFeatures['showActionsForAnon']): ?>
|
<?php if ($wgUser->isLoggedIn() || $wgPivotFeatures['showActionsForAnon']): ?>
|
||||||
<a href="#" data-options="align:left" data-dropdown="drop1" class="button secondary small radius pull-right" id="drop"><i class="fa fa-navicon fa-lg"><span id="page-actions" class="show-for-medium-up"> Page <?php echo wfMessage( 'actions' )->text() ?></span></i></a>
|
<a href="#" data-options="align:left" data-dropdown="drop1" class="button secondary small radius pull-right" id="drop"><i class="fa fa-navicon fa-lg"><span id="page-actions" class="show-for-medium-up"> <?php echo wfMessage( 'actions' )->text() ?></span></i></a>
|
||||||
<ul id="drop1" class="tiny content f-dropdown" data-dropdown-content>
|
<ul id="drop1" class="tiny content f-dropdown" data-dropdown-content>
|
||||||
<?php foreach( $this->data['content_actions'] as $key => $item ) { echo preg_replace(array('/\sprimary="1"/','/\scontext="[a-z]+"/','/\srel="archives"/'),'',$this->makeListItem($key, $item)); } ?>
|
<?php foreach( $this->data['content_actions'] as $key => $item ) { echo preg_replace(array('/\sprimary="1"/','/\scontext="[a-z]+"/','/\srel="archives"/'),'',$this->makeListItem($key, $item)); } ?>
|
||||||
<?php wfRunHooks( SkinTemplateToolboxEnd, array( &$this, true ) ); ?>
|
<?php wfRunHooks( SkinTemplateToolboxEnd, array( &$this, true ) ); ?>
|
||||||
@ -211,6 +224,10 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
$displaytitle = str_replace($pagetitle, $newtitle, $displaytitle);
|
$displaytitle = str_replace($pagetitle, $newtitle, $displaytitle);
|
||||||
?><h4 class="namespace label"><?php print $namespace; ?></h4><?php } ?>
|
?><h4 class="namespace label"><?php print $namespace; ?></h4><?php } ?>
|
||||||
<h2 class="title"><?php print $displaytitle; ?></h2>
|
<h2 class="title"><?php print $displaytitle; ?></h2>
|
||||||
|
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||||
|
<div class="addthis_sharing_toolbox show-for-large-up"></div>
|
||||||
|
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||||
|
<!-- moved to resource loader <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-50f7269b339fed7f" async="async"></script> -->
|
||||||
<?php if ( $this->data['isarticle'] ) { ?><h3 id="tagline"><?php $this->msg( 'tagline' ) ?></h3><?php } ?>
|
<?php if ( $this->data['isarticle'] ) { ?><h3 id="tagline"><?php $this->msg( 'tagline' ) ?></h3><?php } ?>
|
||||||
<h5 class="subtitle"><?php $this->html('subtitle') ?></h5>
|
<h5 class="subtitle"><?php $this->html('subtitle') ?></h5>
|
||||||
<div class="clear_both"></div>
|
<div class="clear_both"></div>
|
||||||
@ -234,18 +251,33 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
|
|
||||||
<footer class="row">
|
<footer class="row">
|
||||||
|
|
||||||
<ul class="large-12 columns">
|
<div id="footer">
|
||||||
<?php foreach ( $this->getFooterLinks( "flat" ) as $key ) { ?>
|
<div id="footer-left" class="<?php echo $footerLeftClass;?>">
|
||||||
<li id="footer-<?php echo $key ?>"><?php $this->html( $key ) ?></li>
|
<ul id="footer-left">
|
||||||
<?php } ?>
|
<?php foreach ( $this->getFooterLinks( "flat" ) as $key ) { ?>
|
||||||
</ul>
|
<li id="footer-<?php echo $key ?>"><?php $this->html( $key ) ?></li>
|
||||||
<ul> <?php foreach ( $this->getFooterIcons( "nocopyright" ) as $blockName => $footerIcons ) { ?>
|
<?php } ?>
|
||||||
<li class="<?php echo $blockName ?>"><?php foreach ( $footerIcons as $icon ) { ?>
|
</ul>
|
||||||
<?php echo $this->getSkin()->makeFooterIcon( $icon, 'withoutImage' ); ?>
|
</div>
|
||||||
|
<div id="footer-right-icons" class="<?php echo $footerRightClass;?>">
|
||||||
|
<ul id="footer-right">
|
||||||
|
<li class="social-follow">
|
||||||
|
<?php if ($wgPivotFeatures['addThisFollow'] != false) { ?>
|
||||||
|
<div class="social-links">
|
||||||
|
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||||
|
<div class="addthis_horizontal_follow_toolbox show-for-large-up"></div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</li>
|
||||||
|
<?php foreach ( $this->getFooterIcons( $poweredbyType ) as $blockName => $footerIcons ) { ?>
|
||||||
|
<li class="<?php echo $blockName ?>"><?php foreach ( $footerIcons as $icon ) { ?>
|
||||||
|
<?php echo $this->getSkin()->makeFooterIcon( $icon, $poweredbyMakeType ); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -261,6 +293,9 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
|
|
||||||
<?php $this->printTrail(); ?>
|
<?php $this->printTrail(); ?>
|
||||||
|
|
||||||
|
<?php if ($wgForegroundFeatures['addThisFollowPUBID'] != '') { ?>
|
||||||
|
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo $wgForegroundFeatures['addThisPUBID'];?>" async="async">></script>
|
||||||
|
<?php } ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
34
README.md
34
README.md
@ -37,20 +37,32 @@ To activate Pivot for all users and anonymous visitors, you need to set the `$wg
|
|||||||
|
|
||||||
Use following features in `LocalSettings.php` to change the behavior.
|
Use following features in `LocalSettings.php` to change the behavior.
|
||||||
|
|
||||||
- `showActionsForAnon => true` displays page actions for non-logged-in visitors.
|
- `'showActionsForAnon' => true` displays page actions for non-logged-in visitors.
|
||||||
- `NavWrapperType => 'divonly'`: only a div with id `navwrapper` will be created. `'0'` - no div will be created (old behavior), other values will be used as class.
|
- `'showHelpUnderTools' => true` a Link to "Help" will be created under "Tools".
|
||||||
- `showHelpUnderTools => true` a Link to "Help" will be created under "Tools".
|
- `'showRecentChangesUnderTool's => true` a Link to "recent changes" will be created under "Tools".
|
||||||
- `showRecentChangesUnderTools => true` a Link to "recent changes" will be created under "Tools".
|
- `'IeEdgeCode' => 1` will produce a meta tag with "X-UA-Compatible" content="IE=edge", `2` will sent a header, `0` nothing will be done
|
||||||
- `IeEdgeCode => 1` will produce a meta tag with "X-UA-Compatible" content="IE=edge", `2` will sent a header, `0` nothing will be done
|
- `'fixedNavBar' => false` will allow the NavBar to scroll with the content, `true` will lock the NavBar.
|
||||||
|
- `'navbarIcon' => false` no icon in mobile view, `true` to use the global set logopath image of the wiki.
|
||||||
|
- `'showFooterIcons' => false` will show text in place of footer icons, `true` will output the icons as globally set.
|
||||||
|
- `'addThisPUBID' => '' empty string will not fire the AddThis script, `'ra-##-#######'` publisher ID will allow the run the AddThis script in async.
|
||||||
|
- `'useAddThisShare' => false` default, do not use AddThis share, `true` will insert the share toolbox div directly under page title, but before the tagline.
|
||||||
|
- `'useAddThisFollow' => false` default, do not use AddThis follow, `true` will insert the follow toolbox div in the `right-footer` area before icon or text output.
|
||||||
|
|
||||||
These are the default values:
|
These are the default values:
|
||||||
|
|
||||||
$wgPivotFeatures = array(
|
$wgPivotFeatures = array(
|
||||||
'showActionsForAnon' => true,
|
'showActionsForAnon' => true,
|
||||||
'NavWrapperType' => 'divonly',
|
'fixedNavBar' => false,
|
||||||
'showHelpUnderTools' => true,
|
'showHelpUnderTools' => true,
|
||||||
'showRecentChangesUnderTools' => true,
|
'showRecentChangesUnderTools' => true,
|
||||||
'IeEdgeCode' => 1
|
'wikiName' => &$GLOBALS['wgSitename'],
|
||||||
|
'wikiNameDesktop' => &$GLOBALS['wgSitename'],
|
||||||
|
'navbarIcon' => false,
|
||||||
|
'IeEdgeCode' => 1,
|
||||||
|
'showFooterIcons' => false,
|
||||||
|
'addThisPUBID' => '',
|
||||||
|
'useAddThisShare' => false,
|
||||||
|
'useAddThisFollow' => false
|
||||||
);
|
);
|
||||||
|
|
||||||
### Usage of NavWrapperType
|
### Usage of NavWrapperType
|
||||||
|
@ -184,27 +184,16 @@ div.small-9.columns textarea {
|
|||||||
margin-bottom: 0.25em;
|
margin-bottom: 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer.row {
|
|
||||||
padding-top: 1.5em;
|
|
||||||
text-align: center;
|
|
||||||
font-size: .8em;
|
|
||||||
color: #333;
|
|
||||||
max-width: 100%;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
div {
|
div {
|
||||||
line-height: 1.60em;
|
line-height: 1.60em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* NOTICES, ALERTS, WARNINGS */
|
/* NOTICES, ALERTS, WARNINGS */
|
||||||
div#userloginprompt, p#userloginlink {
|
div#userloginprompt, p#userloginlink {
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* LISTS */
|
/* LISTS */
|
||||||
|
|
||||||
ul#drop1.f-dropdown {
|
ul#drop1.f-dropdown {
|
||||||
@ -224,15 +213,6 @@ ul#drop1.f-dropdown {
|
|||||||
margin: .5em 0 1em 2em;
|
margin: .5em 0 1em 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer.row ul {
|
|
||||||
list-style-type: none;
|
|
||||||
margin: .5em 0em;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer.row ul.views.columns li {
|
|
||||||
margin-right: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columns ul.special li {
|
.columns ul.special li {
|
||||||
float:none;
|
float:none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -264,10 +244,6 @@ footer.row ul.views.columns li {
|
|||||||
|
|
||||||
.mw-specialpages-table td ul.columns li {width: 50%;}
|
.mw-specialpages-table td ul.columns li {width: 50%;}
|
||||||
|
|
||||||
/*#mw-content-text .columns li {float:none;width:90%;}*/
|
|
||||||
|
|
||||||
footer.row ul.columns li { display: inline;float:none;}
|
|
||||||
|
|
||||||
.columns #mw-normal-catlinks ul li {
|
.columns #mw-normal-catlinks ul li {
|
||||||
float: none;
|
float: none;
|
||||||
width: auto;
|
width: auto;
|
||||||
@ -279,6 +255,66 @@ footer.row ul.columns li { display: inline;float:none;}
|
|||||||
|
|
||||||
ul.vcard { padding: 0.5em 0.5em 0.55em 0.5em; }
|
ul.vcard { padding: 0.5em 0.5em 0.55em 0.5em; }
|
||||||
|
|
||||||
|
/*#mw-content-text .columns li {float:none;width:90%;}*/
|
||||||
|
|
||||||
|
/* Footer Classes */
|
||||||
|
|
||||||
|
footer.row ul.columns li { display: inline;float:none;}
|
||||||
|
|
||||||
|
footer.row ul {
|
||||||
|
list-style-type: none;
|
||||||
|
margin: .5em 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer.row ul.views.columns li {
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer.row {
|
||||||
|
border-top: 1px solid #c3c3e5;
|
||||||
|
padding-top: 1em;
|
||||||
|
padding-bottom: 2em;
|
||||||
|
color: #333;
|
||||||
|
max-width: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
@media only screen and (min-width: 1025px) { footer.row { padding-bottom: .5em } }
|
||||||
|
|
||||||
|
ul#footer-left {
|
||||||
|
text-align: left;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
ul#footer-right {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
li#footer-privacy {
|
||||||
|
float: left;
|
||||||
|
margin-right: 2em;
|
||||||
|
}
|
||||||
|
li#footer-about {
|
||||||
|
float: left;
|
||||||
|
margin-right: 2em;
|
||||||
|
}
|
||||||
|
ul#footer-right li {
|
||||||
|
float: right;
|
||||||
|
margin: 0 0 .5em .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FollowUs AddThis Tweaks */
|
||||||
|
li.social-follow {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.addthis_horizontal_follow_toolbox {
|
||||||
|
float: right;
|
||||||
|
margin-bottom: .5em;
|
||||||
|
}
|
||||||
|
.social-links p {
|
||||||
|
margin:0 .2em 0 0;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* TABS */
|
/* TABS */
|
||||||
|
|
||||||
#mw-content-text ul.tabs {
|
#mw-content-text ul.tabs {
|
||||||
@ -1094,4 +1130,12 @@ td.htmlform-tip {
|
|||||||
.prefcache {
|
.prefcache {
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Orbit Slider Overrides for MW */
|
||||||
|
.orbit-container .orbit-slides-container img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.orbit-bullets {
|
||||||
|
margin: 0 auto 30px auto !important;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user