Difference between revisions of "Footer Examples"

From Tweeki
Jump to: navigation, search
 
(21 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
   |msg-footer=FOOTER
 
   |msg-footer=FOOTER
 
   |msg-footer-custom=LOGIN
 
   |msg-footer-custom=LOGIN
   |config-options=
+
   |config-options=<pre style="font-size:10px">
 
$wgTweekiSkinHideAll['footer-info'] = true;
 
$wgTweekiSkinHideAll['footer-info'] = true;
$wgTweekiSkinHideLoggedin['footer-custom'] = true;
+
$wgTweekiSkinHideLoggedin['footer-custom'] = true;</pre>
 
   |content=<ul id="footer-places">
 
   |content=<ul id="footer-places">
 
<li id="footer-places-privacy">[[Tweeki:Privacy policy|Privacy policy]]</li>
 
<li id="footer-places-privacy">[[Tweeki:Privacy policy|Privacy policy]]</li>
Line 19: Line 19:
 
}}
 
}}
  
=== Settings for tweeki.thai-land.at ===
+
=== Show Icons ===
  
 
{{footer-settings
 
{{footer-settings
   |config-options=
+
   |config-options=<pre style="font-size:10px">
  $wgTweekiSkinHideAll['footer-icons'] = true;
+
$wgTweekiSkinFooterIcons = true;</pre>
 +
  |content=<ul id="footer-places">
 +
<li id="footer-places-privacy">[[Tweeki:Privacy policy|Privacy policy]]</li>
 +
<li id="footer-places-about">[[Tweeki:About|About Tweeki]]</li>
 +
<li id="footer-places-disclaimer">[[Tweeki:General disclaimer|Disclaimers]]</li>
 +
</ul><ul id="footer-custom">
 +
<li class="dropup">[[Welcome|Login]]</li>
 +
</ul><ul id="footer-icons">[[File:Tweeki_footer_icons.png|link=]]</ul>
 +
}}
 +
 
 +
=== Settings for tweeki.kollabor.at ===
 +
 
 +
{{footer-settings
 +
  |config-options=<pre style="font-size:10px">
 +
  $wgTweekiSkinHideAll['footer-icons'] = true;</pre>
 
   |content=<ul id="footer-places">
 
   |content=<ul id="footer-places">
 
<li id="footer-places-privacy">[[Tweeki:Privacy policy|Privacy policy]]</li>
 
<li id="footer-places-privacy">[[Tweeki:Privacy policy|Privacy policy]]</li>
Line 41: Line 55:
  
 
{{footer-settings
 
{{footer-settings
   |config-options=
+
   |config-options=<pre style="font-size:10px">
  $wgTweekiSkinHideAll['footer-info'] = false;
+
  $wgTweekiSkinHideAll['footer-info'] = false;</pre>
 
   |content=<ul id="footer-info"><li id="footer-info-lastmod">This page was last modified on 10 March 2017, at 19:32.</li><li id="footer-info-copyright">Content is available under [[Welcome|CC-by-sa]].</li></ul><ul id="footer-places">
 
   |content=<ul id="footer-info"><li id="footer-info-lastmod">This page was last modified on 10 March 2017, at 19:32.</li><li id="footer-info-copyright">Content is available under [[Welcome|CC-by-sa]].</li></ul><ul id="footer-places">
 
<li id="footer-places-privacy">[[Tweeki:Privacy policy|Privacy policy]]</li>
 
<li id="footer-places-privacy">[[Tweeki:Privacy policy|Privacy policy]]</li>
Line 49: Line 63:
 
</ul><ul id="footer-custom">
 
</ul><ul id="footer-custom">
 
<li class="dropup">[[Welcome|Login]]</li>
 
<li class="dropup">[[Welcome|Login]]</li>
</ul>
+
</ul><ul id="footer-icons"><li id="footer-copyrightico"><span>[[Welcome|CC-by-sa]]</span></li><li id="footer-poweredbyico"><span>[[Welcome|Powered by MediaWiki]]</span><span>[[Welcome|Powered by Semantic MediaWiki]]</span></li></ul>
 
}}
 
}}
  
=== Add Custom Content ===
+
=== Add Custom Links ===
  
 
{{footer-settings
 
{{footer-settings
 
   |msg-footer-custom=My Page
 
   |msg-footer-custom=My Page
   |config-options=
+
   |config-options=<pre style="font-size:10px">
$wgTweekiSkinHideLoggedin['footer-custom'] = false;
+
$wgTweekiSkinHideLoggedin['footer-custom'] = false;</pre>
   |content=<ul id="footer-info"><li id="footer-info-lastmod">This page was last modified on 10 March 2017, at 19:32.</li><li id="footer-info-copyright">Content is available under [[Welcome|CC-by-sa]].</li></ul><ul id="footer-places">
+
   |content=<ul id="footer-places">
 
<li id="footer-places-privacy">[[Tweeki:Privacy policy|Privacy policy]]</li>
 
<li id="footer-places-privacy">[[Tweeki:Privacy policy|Privacy policy]]</li>
 
<li id="footer-places-about">[[Tweeki:About|About Tweeki]]</li>
 
<li id="footer-places-about">[[Tweeki:About|About Tweeki]]</li>
Line 64: Line 78:
 
</ul><ul id="footer-custom">
 
</ul><ul id="footer-custom">
 
<li class="dropup">[[Welcome|My Page]]</li>
 
<li class="dropup">[[Welcome|My Page]]</li>
 +
</ul><ul id="footer-icons"><li id="footer-copyrightico"><span>[[Welcome|CC-by-sa]]</span></li><li id="footer-poweredbyico"><span>[[Welcome|Powered by MediaWiki]]</span><span>[[Welcome|Powered by Semantic MediaWiki]]</span></li></ul>
 +
}}
 +
 +
=== Show Only Custom Links ===
 +
 +
You can add as many links as you wish using standard [[Buttons|button markup]].
 +
 +
{{footer-settings
 +
  |msg-footer-custom=My Page,Another Page{{!}}Page Title
 +
  |config-options=<pre style="font-size:10px">
 +
$wgTweekiSkinHideLoggedin['footer-custom'] = false;
 +
$wgTweekiSkinHideAll['footer-places'] = true;
 +
$wgTweekiSkinHideAll['footer-icons'] = true;</pre>
 +
  |content=<ul id="footer-custom">
 +
<li class="dropup">[[Welcome|My Page]]</li><li class="dropup">[[Welcome|Page Title]]</li>
 
</ul>
 
</ul>
 +
}}
 +
 +
=== Completely customize the footer ===
 +
 +
If you want complete control over the footer's content, you should use the <code>$wgTweekiSkinSpecialElements</code> configuration setting and overwrite the default function. Define your own function in <code>LocalSettings.php</code> or in an extension that directly outputs the HTML code for your footer.
 +
 +
{{footer-settings
 +
  |config-options=<pre style="font-size:10px">
 +
$wgTweekiSkinSpecialElements['FOOTER'] = 'myFooter';
 +
 +
function myFooter( $skin, $context ) {
 +
    echo 'My custom footer.';
 +
}</pre>
 +
  |content=My custom footer.
 
}}
 
}}

Latest revision as of 13:21, 25 June 2021

Default

By default, footer-info is hidden for all users, and footer-custom (with a login link as standard content) will only be shown to anonymous users.

This is how the footer looks for anonymous users:

CONFIG Messages Configuration Options
  • MediaWiki:Tweeki-footer: FOOTER
  • MediaWiki:Tweeki-footer-custom: LOGIN
$wgTweekiSkinHideAll['footer-info'] = true;
$wgTweekiSkinHideLoggedin['footer-custom'] = true;
RESULT

Show Icons

CONFIG Messages Configuration Options
$wgTweekiSkinFooterIcons = true;
RESULT

Settings for tweeki.kollabor.at

CONFIG Messages Configuration Options
 $wgTweekiSkinHideAll['footer-icons'] = true;
RESULT

Show footer-info

footer-info contains information about the time of the last edit and about the copyright.

You can additionally set $wgMaxCredits to a non-zero value to show one, some or all of the contributors to a page.


CONFIG Messages Configuration Options
 $wgTweekiSkinHideAll['footer-info'] = false;
RESULT

Add Custom Links

CONFIG Messages Configuration Options
  • MediaWiki:Tweeki-footer-custom: My Page
$wgTweekiSkinHideLoggedin['footer-custom'] = false;
RESULT

Show Only Custom Links

You can add as many links as you wish using standard button markup.

CONFIG Messages Configuration Options
  • MediaWiki:Tweeki-footer-custom: My Page,Another Page|Page Title
$wgTweekiSkinHideLoggedin['footer-custom'] = false;
$wgTweekiSkinHideAll['footer-places'] = true;
$wgTweekiSkinHideAll['footer-icons'] = true;
RESULT

Completely customize the footer

If you want complete control over the footer's content, you should use the $wgTweekiSkinSpecialElements configuration setting and overwrite the default function. Define your own function in LocalSettings.php or in an extension that directly outputs the HTML code for your footer.

CONFIG Messages Configuration Options
$wgTweekiSkinSpecialElements['FOOTER'] = 'myFooter';

function myFooter( $skin, $context ) {
    echo 'My custom footer.';
}
RESULT