mirror of
https://github.com/Hutchy68/pivot.git
synced 2024-11-22 02:19:03 +01:00
Merge pull request #22 from Hutchy68/addthis-fixes
Fixes for addthis, changelog.md, v1.0.2, readme.md
This commit is contained in:
commit
c63881a9ed
@ -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
|
||||
|
||||
* [enhancement] License update on Special:Version
|
||||
|
@ -26,8 +26,8 @@ class SkinPivot extends SkinTemplate {
|
||||
'IeEdgeCode' => 1,
|
||||
'showFooterIcons' => false,
|
||||
'addThisPUBID' => '',
|
||||
'useAddThisShare' => false,
|
||||
'useAddThisFollow' => false
|
||||
'useAddThisShare' => '',
|
||||
'useAddThisFollow' => ''
|
||||
);
|
||||
foreach ($wgPivotFeaturesDefaults as $fgOption => $fgOptionValue) {
|
||||
if ( !isset($wgPivotFeatures[$fgOption]) ) {
|
||||
@ -211,9 +211,9 @@ class pivotTemplate extends BaseTemplate {
|
||||
$displaytitle = str_replace($pagetitle, $newtitle, $displaytitle);
|
||||
?><h4 class="namespace label"><?php print $namespace; ?></h4><?php } ?>
|
||||
<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 -->
|
||||
<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 -->
|
||||
<?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">
|
||||
<ul id="footer-right">
|
||||
<li class="social-follow hide-for-print">
|
||||
<?php if ($wgPivotFeatures['useAddThisFollow'] != false) { ?>
|
||||
<?php if ($wgPivotFeatures['useAddThisFollow'] !== '') { ?>
|
||||
<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 class="<?php echo $wgPivotFeatures['useAddThisFollow']; ?> hide-for-print"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</li>
|
||||
@ -284,7 +284,7 @@ class pivotTemplate extends BaseTemplate {
|
||||
|
||||
<?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>
|
||||
<?php } ?>
|
||||
</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.
|
||||
|
||||
- `'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".
|
||||
- `'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
|
||||
- `'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.
|
||||
- `'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' => ''` 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' => ''` 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:
|
||||
|
||||
$wgPivotFeaturesDefaults = array(
|
||||
$wgPivotFeatures = array(
|
||||
'showActionsForAnon' => true,
|
||||
'fixedNavBar' => false,
|
||||
'usePivotTabs' => false,
|
||||
'showHelpUnderTools' => true,
|
||||
'showRecentChangesUnderTools' => true,
|
||||
'wikiName' => &$GLOBALS['wgSitename'],
|
||||
@ -65,9 +59,9 @@ These are the default values and the example of the array to change the defaults
|
||||
'IeEdgeCode' => 1,
|
||||
'showFooterIcons' => false,
|
||||
'addThisPUBID' => '',
|
||||
'useAddThisShare' => false,
|
||||
'useAddThisFollow' => false
|
||||
);
|
||||
'useAddThisShare' => '',
|
||||
'useAddThisFollow' => ''
|
||||
);
|
||||
|
||||
|
||||
### Notes on other skins
|
||||
|
@ -323,7 +323,8 @@ ul#footer-right li {
|
||||
li.social-follow {
|
||||
width: 100%;
|
||||
}
|
||||
.addthis_horizontal_follow_toolbox {
|
||||
footer .addthis_horizontal_follow_toolbox,
|
||||
footer .addthis_toolbox {
|
||||
float: right;
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user