mirror of
https://github.com/Hutchy68/pivot.git
synced 2024-11-21 18:09:03 +01:00
Fixes for AddThis, test for content pages for social share, updates to changelog and readme
This commit is contained in:
parent
36c97ff4df
commit
3346f18058
@ -1,3 +1,8 @@
|
|||||||
|
## Version 1.0.2
|
||||||
|
|
||||||
|
* [bug fix] AddThis div container
|
||||||
|
* [enhancement] Hide AddThis on non content pages by disabling <script> from running
|
||||||
|
|
||||||
## Version 1.0.1
|
## Version 1.0.1
|
||||||
|
|
||||||
* [enhancement] License update on Special:Version
|
* [enhancement] License update on Special:Version
|
||||||
|
@ -26,8 +26,8 @@ class SkinPivot extends SkinTemplate {
|
|||||||
'IeEdgeCode' => 1,
|
'IeEdgeCode' => 1,
|
||||||
'showFooterIcons' => false,
|
'showFooterIcons' => false,
|
||||||
'addThisPUBID' => '',
|
'addThisPUBID' => '',
|
||||||
'useAddThisShare' => false,
|
'useAddThisShare' => '',
|
||||||
'useAddThisFollow' => false
|
'useAddThisFollow' => ''
|
||||||
);
|
);
|
||||||
foreach ($wgPivotFeaturesDefaults as $fgOption => $fgOptionValue) {
|
foreach ($wgPivotFeaturesDefaults as $fgOption => $fgOptionValue) {
|
||||||
if ( !isset($wgPivotFeatures[$fgOption]) ) {
|
if ( !isset($wgPivotFeatures[$fgOption]) ) {
|
||||||
@ -211,9 +211,9 @@ 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>
|
||||||
<?php if ($wgPivotFeatures['useAddThisShare'] != false) { ?>
|
<?php if ($wgPivotFeatures['useAddThisShare'] !== '') { ?>
|
||||||
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||||
<div class="addthis_sharing_toolbox show-for-large-up hide-for-print"></div>
|
<div class="<?php echo $wgPivotFeatures['useAddThisShare']; ?> hide-for-print"></div>
|
||||||
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?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 } ?>
|
||||||
@ -252,10 +252,10 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
<div id="footer-right-icons" class="small-12 medium-4 large-3 columns hide-for-print">
|
<div id="footer-right-icons" class="small-12 medium-4 large-3 columns hide-for-print">
|
||||||
<ul id="footer-right">
|
<ul id="footer-right">
|
||||||
<li class="social-follow hide-for-print">
|
<li class="social-follow hide-for-print">
|
||||||
<?php if ($wgPivotFeatures['useAddThisFollow'] != false) { ?>
|
<?php if ($wgPivotFeatures['useAddThisFollow'] !== '') { ?>
|
||||||
<div class="social-links">
|
<div class="social-links">
|
||||||
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||||
<div class="addthis_horizontal_follow_toolbox show-for-large-up"></div>
|
<div class="<?php echo $wgPivotFeatures['useAddThisFollow']; ?> hide-for-print"></div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</li>
|
</li>
|
||||||
@ -284,7 +284,7 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
|
|
||||||
<?php $this->printTrail(); ?>
|
<?php $this->printTrail(); ?>
|
||||||
|
|
||||||
<?php if ($wgPivotFeatures['addThisPUBID'] != '') { ?>
|
<?php if ($this->data['isarticle'] && $wgPivotFeatures['addThisPUBID'] !== '') { ?>
|
||||||
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo $wgPivotFeatures['addThisPUBID']; ?>" async="async">></script>
|
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo $wgPivotFeatures['addThisPUBID']; ?>" async="async">></script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</body>
|
</body>
|
||||||
|
26
README.md
26
README.md
@ -36,27 +36,21 @@ 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.
|
||||||
- `'fixedNavBar' => false` will allow the NavBar to scroll with the content, `true` will lock the NavBar.
|
|
||||||
- `'usePivotTabs' => false` set to true will enable Foundation 5 tab coding to pass thru HTML sanitizer.
|
|
||||||
- `'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".
|
- `'showRecentChangesUnderTool's => true` a Link to "recent changes" will be created under "Tools".
|
||||||
- `'wikiName' => &$GLOBALS['wgSitename']` set a shorter wiki name which doesn't change the real name used when creating the wiki.
|
|
||||||
- `'wikiNameDesktop' => &$GLOBALS['wgSitename']` set a longer wiki name for desktop view. Helpful when used in conjunction with `wikiName` or default `$wgSitename`.
|
|
||||||
- `'navbarIcon' => false` no icon in mobile view, `true` to use the global set logopath image of the wiki.
|
|
||||||
- `'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.
|
- `'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.
|
- `'addThisPUBID' => ''` empty string will not fire the AddThis script, `'ra-##-#######'` publisher ID will allow the run the AddThis script in async on content pages only.
|
||||||
- `'useAddThisShare' => false` default, do not use AddThis share, `true` will insert the share toolbox div directly under page title, but before the tagline.
|
- `'useAddThisShare' => ''` default empty string, do not use AddThis share, `your_addthis_specific_div_class_string` will insert the share toolbox div directly under page title, but before the tagline with your custom div class.
|
||||||
- `'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.
|
- `'useAddThisFollow' => ''` default empty string, do not use AddThis follow, `your_addthis_specific_div_class_string` will insert the follow toolbox div in the `right-footer` area before icon or text output with your custom div class.
|
||||||
|
|
||||||
For a more detailed explanation of each feature, see the https://pivot.wikiproject.net/wiki/Pivot_features page.
|
These are the default values and the example of the array to change the defaults. Add the following after `wfLoadSkin( 'pivot' );` in `LocalSettings.php` to change the feature defaults:
|
||||||
|
|
||||||
These are the default values and the example of the array to change the defaults. Add the following after `wfLoadSkin( 'pivot' );` in `LocalSettings.php` then change the feature defaults:
|
$wgPivotFeatures = array(
|
||||||
|
|
||||||
$wgPivotFeaturesDefaults = array(
|
|
||||||
'showActionsForAnon' => true,
|
'showActionsForAnon' => true,
|
||||||
'fixedNavBar' => false,
|
'fixedNavBar' => false,
|
||||||
'usePivotTabs' => false,
|
|
||||||
'showHelpUnderTools' => true,
|
'showHelpUnderTools' => true,
|
||||||
'showRecentChangesUnderTools' => true,
|
'showRecentChangesUnderTools' => true,
|
||||||
'wikiName' => &$GLOBALS['wgSitename'],
|
'wikiName' => &$GLOBALS['wgSitename'],
|
||||||
@ -65,9 +59,9 @@ These are the default values and the example of the array to change the defaults
|
|||||||
'IeEdgeCode' => 1,
|
'IeEdgeCode' => 1,
|
||||||
'showFooterIcons' => false,
|
'showFooterIcons' => false,
|
||||||
'addThisPUBID' => '',
|
'addThisPUBID' => '',
|
||||||
'useAddThisShare' => false,
|
'useAddThisShare' => '',
|
||||||
'useAddThisFollow' => false
|
'useAddThisFollow' => ''
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
### Notes on other skins
|
### Notes on other skins
|
||||||
|
@ -323,7 +323,8 @@ ul#footer-right li {
|
|||||||
li.social-follow {
|
li.social-follow {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.addthis_horizontal_follow_toolbox {
|
footer .addthis_horizontal_follow_toolbox,
|
||||||
|
footer .addthis_toolbox {
|
||||||
float: right;
|
float: right;
|
||||||
margin-bottom: .5em;
|
margin-bottom: .5em;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user