Skin Foreground

De Mi caja de notas

Un projet de rhabiller (skin) ce site mediawiki - https://foreground.wikiproject.net/wiki/Main_Page


Installation de la version https://github.com/jthingelstad/foreground

Params via LocalSettings 

fait le 2020-271 à raffiner

//Param skin foreground


$wgForegroundFeatures = array(

 '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".
 'showRecentChangesUnderTools' => true,
 'enableTabs' => false,
 'wikiName' => &$GLOBALS['wgSitename'],
 'navbarIcon' => true, //affichage du logo
 'IeEdgeCode' => 1,
 'showFooterIcons' => false, //suppresses the output of footer icons.
 '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' => ,
 'useAddThisFollow' => 

);


Docs à l'étude

Usage de NavWrapperType

Avec un réglage du comme :

   'NavWrapperType' => 'divonly'

et la div créée appelée `navwrapper`, les visiteurs anonymes peuvent modifier le réglage de la navbar (fixe ou collante) par User-Script (Firefox-extensions comme greasemonkey or scriptish), les utilisateurs peuvent prendre un gadget ou leur JavaScript, CSS ... :

   $('#navwrapper').addClass('sticky');


Ou vous pouvrez régler la classe dans LocalSettings.php avec :

   'NavWrapperType' => 'contain-to-grid fixed'

et les visiteurs pourront retirer cette classe par leur propre JavaScript ou gadget ...

Icône Navbar

Avec un réglage comme :

   'navbarIcon' => true

Une icône en haut de la navbar sera placée utilisant l'image en cours réglée par `$wgLogo` dans `LocalSettings.php`. Regarder https://www.mediawiki.org/wiki/Manual:$wgLogo pour plus d'informations sur `$wgLogo`.

L'icône sera retaillée pour tenir dans une H/l de 64px x 36px ou un ratio de 16:9.

Voir l'aide sous les Outils

This will add the help link under tools. To control what the help link will link to use the message page, `MediaWiki:Helppage` to set the link target. The link target can be a local page, Help:Contents, or an external URL, https://www.mediawiki.org/wiki/Help:Contents.

Boutons AddThis

With a setting like:

   'addThisFollowPUBID' => 'yourAddThis-PubID'

Important, this feature uses the free or paid version of the https://addthis.com horizontal Follow Buttons only. Choose which social media FollowUs buttons(Twitter, Facebook, YouTube, etc.) and at the bottom of the screen locate the script. Within the script you will see something similar `...#pubid=ra-5378f4902d02197">`. Everything after the `=` sign and up to the `">` is your Publisher ID. To turn on social follow icons, insert your publisher id:

   'addThisFollowPUBID' => 'ra-5378f4902d02197'


Notes sur les autres skins

As you build a wiki out with Foreground you will likely use the responsive grid from Foundation. This is key to making a responsive wiki, and is one of the largest _migration_ requirements when you want to move a wiki that previously used Vector (and likely a lot of tables for layout) to Foreground. Once you do this, the ability of a user to select whatever skin will be removed. If you take full advantage of Foreground in your templates the lack of the Foundation grid will make viewing the wiki using [Vector](https://wikiapiary.com/wiki/Skin:Vector) or [MonoBook](https://wikiapiary.com/wiki/Skin:MonoBook) very difficult.

Because of this, it is suggested that you set the `$wgSkipSkins` variable to make sure that everyone sees the site as you intended it. This removes other skins from being user selectable options.

   # Foreground is specific, so lets disable other skins
   $wgSkipSkins = array( 'cologneblue', 'modern', 'monobook', 'vector' );

You may also want to allow users to set a User CSS if they want to tweak things inside of Foreground. This is entirely optional.

   # Allow User CSS, mostly for skin testing
   $wgAllowUserCss = true;

Utiliser Foreground

Il y a une [liste de discussion pour discuter de Foreground](https://lists.wikimedia.org/mailman/listinfo/foreground). Please join to connect with others and explore questions about using Foreground on your wiki. You can see a list of wikis with [Foreground installed at WikiApiary](https://wikiapiary.com/wiki/Skin:Foreground).