Difference between revisions of "Create new skin"
From its-wiki.no
Josef.Noll (Talk | contribs) (Created page with "Create new design for a project: - Copy /etc/skins/BIF (including big.php) into a new directory, e.g. SAT - change all BIF into SAT - create namespace (see further down) - cre...") |
Josef.Noll (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | Create new design for a project | + | = Create new design for a project= |
− | + | following examples in owncloud file CreateNewSkin_setup.docx | |
− | + | * Copy /etc/skins/bif (including BIF*.php) into a new directory, e.g. SAT | |
− | + | * change all BIF into SAT (or project shortcut) | |
− | + | * create namespace (see further down) | |
− | + | * create home page for that namespace, explanation of elements in [[BasicInternet:How_to_edit]] | |
+ | ** wrong: edit /etc/nginx/sites-enabled/default and add subdirectory, e.g. sat.unik.no (ask Arild to do) | ||
+ | * create logo sat_logo.png and put it into $IP/skins/common/images | ||
− | + | = Update custom skin (SAT) = | |
edits in sat.php | edits in sat.php | ||
− | + | * include the background-image sat_logo.png - 190 x 105 px | |
− | + | * and link http://cwi.unik.no/SAT:SAT (!note: no 'wiki' in this link) | |
− | edit sat_template.css | + | edit sat_template.css |
− | + | * NOT sure which colours to change…. | |
+ | * ''note:'' open issue | ||
+ | == Customisation of the wiki == | ||
Navbar is defined through MediaWiki:Hf-nsheader-SAT | Navbar is defined through MediaWiki:Hf-nsheader-SAT | ||
− | + | * [[Template:Main_Navbar]], [[Template:CWI_Navbar]], | |
− | grep | + | <pre> grep -rnw '.' -e "navbar" </pre> to identify text in directory |
− | + | * edit header | |
− | + | <pre> MediaWiki:Hf-nsheader-BasicInternet which includes | |
− | + | - {{PAGENAME}}, | |
− | + | - {{BasicInternet Navbar}} | |
+ | - MediaWiki:Hf-nsfooter-BasicInternet | ||
+ | </pre> | ||
− | + | == edit namespaces.php == | |
− | edit namespaces.php | + | <pre> |
# Skins | # Skins | ||
$wgSkinPerNamespace[NS_BIF] = "bif"; | $wgSkinPerNamespace[NS_BIF] = "bif"; | ||
$wgSkinPerNamespace[NS_BIF_TALK] = "bif"; | $wgSkinPerNamespace[NS_BIF_TALK] = "bif"; | ||
+ | </pre> | ||
− | Extension: | + | = Access control, Extension:Lockdown = |
# in extensions.php | # in extensions.php | ||
− | require_once "$IP/extensions/Lockdown/Lockdown.php"; | + | <pre> require_once "$IP/extensions/Lockdown/Lockdown.php"; </pre> |
− | + | = Examples = | |
− | + | <pre># Namespace SAT ESA-Ka-band 178,179 | |
− | # Namespace SAT ESA-Ka-band 178,179 | + | |
define("NS_SAT", 178); | define("NS_SAT", 178); | ||
define("NS_SAT_TALK", 179); | define("NS_SAT_TALK", 179); | ||
Line 64: | Line 70: | ||
#prevent inclusion of pages from that namespace | #prevent inclusion of pages from that namespace | ||
# $wgNonincludableNamespaces[] = 178; # public namespace | # $wgNonincludableNamespaces[] = 178; # public namespace | ||
− | $wgNonincludableNamespaces[] = 179; | + | $wgNonincludableNamespaces[] = 179; </pre> |
− | + | == Basic Admin settings == | |
− | # create user group 'BasicAdminUsers' | + | <pre> # create user group 'BasicAdminUsers' |
$wgGroupPermissions['BasicAdminUsers']['read'] = true; | $wgGroupPermissions['BasicAdminUsers']['read'] = true; | ||
#restrict "read" permission to logged in users | #restrict "read" permission to logged in users | ||
Line 77: | Line 83: | ||
#prevent inclusion of pages from that namespace | #prevent inclusion of pages from that namespace | ||
$wgNonincludableNamespaces[] = 170; | $wgNonincludableNamespaces[] = 170; | ||
− | $wgNonincludableNamespaces[] = 171; | + | $wgNonincludableNamespaces[] = 171; </pre> |
− | + | ||
− | # create user group 'CitiAdminUsers' | + | == Citi Admin settings == |
+ | </pre># create user group 'CitiAdminUsers' | ||
$wgGroupPermissions['CitiAdminUsers']['read'] = true; | $wgGroupPermissions['CitiAdminUsers']['read'] = true; | ||
#restrict "read" permission to logged in users | #restrict "read" permission to logged in users | ||
Line 91: | Line 98: | ||
#prevent inclusion of pages from that namespace | #prevent inclusion of pages from that namespace | ||
$wgNonincludableNamespaces[] = 174; | $wgNonincludableNamespaces[] = 174; | ||
− | $wgNonincludableNamespaces[] = 175; | + | $wgNonincludableNamespaces[] = 175; </pre> |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | == define custom namespaces == | ||
+ | <pre> | ||
# in namespaces.php | # in namespaces.php | ||
#creating a group - as soon as the group permission is addressed, the group is created | #creating a group - as soon as the group permission is addressed, the group is created | ||
$wgGroupPermissions['CitiAdmin']['read'] = true; | $wgGroupPermissions['CitiAdmin']['read'] = true; | ||
− | + | # namespace example | |
− | + | ||
− | + | ||
− | # | + | |
$wgExtraNamespaces[100] = 'Private'; | $wgExtraNamespaces[100] = 'Private'; | ||
$wgExtraNamespaces[101] = 'Private_talk'; | $wgExtraNamespaces[101] = 'Private_talk'; | ||
Line 129: | Line 120: | ||
# $wgNonincludableNamespaces[] = 178; # public namespace | # $wgNonincludableNamespaces[] = 178; # public namespace | ||
$wgNonincludableNamespaces[] = 179; | $wgNonincludableNamespaces[] = 179; | ||
− | </ | + | </pre> |
[[Category:IT-help]] | [[Category:IT-help]] |
Revision as of 19:12, 6 April 2015
Wiki for ITS | ||||||
---|---|---|---|---|---|---|
|
= Create new design for a project=
following examples in owncloud file CreateNewSkin_setup.docx
- Copy /etc/skins/bif (including BIF*.php) into a new directory, e.g. SAT
- change all BIF into SAT (or project shortcut)
- create namespace (see further down)
- create home page for that namespace, explanation of elements in BasicInternet:How_to_edit
- wrong: edit /etc/nginx/sites-enabled/default and add subdirectory, e.g. sat.unik.no (ask Arild to do)
- create logo sat_logo.png and put it into $IP/skins/common/images
Contents
Update custom skin (SAT)
edits in sat.php
- include the background-image sat_logo.png - 190 x 105 px
- and link http://cwi.unik.no/SAT:SAT (!note: no 'wiki' in this link)
edit sat_template.css
- NOT sure which colours to change….
- note: open issue
Customisation of the wiki
Navbar is defined through MediaWiki:Hf-nsheader-SAT
grep -rnw '.' -e "navbar"to identify text in directory
- edit header
MediaWiki:Hf-nsheader-BasicInternet which includes - {{PAGENAME}}, - {{BasicInternet Navbar}} - MediaWiki:Hf-nsfooter-BasicInternet
edit namespaces.php
# Skins $wgSkinPerNamespace[NS_BIF] = "bif"; $wgSkinPerNamespace[NS_BIF_TALK] = "bif";
Access control, Extension:Lockdown
- in extensions.php
require_once "$IP/extensions/Lockdown/Lockdown.php";
Examples
# Namespace SAT ESA-Ka-band 178,179 define("NS_SAT", 178); define("NS_SAT_TALK", 179); # include custom NS to configuration array $wgExtraNamespaces[NS_SAT] = 'SAT'; $wgExtraNamespaces[NS_SAT_TALK] = 'SAT_talk'; # Restrict SAT namespace edit $wgNamespaceProtection[NS_SAT] = array('SAT-edit'); $wgNamespaceProtection[NS_SAT_TALK] = array('SAT-talk-edit'); $wgGroupPermissions['SATUsers']['SAT-edit'] = true; $wgGroupPermissions['SATUsers']['SAT-talk-edit'] = true; # enable namespaces search $wgNamespacesToBeSearchedDefault[NS_SAT] = true; $wgNamespacesToBeSearchedDefault[NS_SAT_TALK] = false; # enale Namespaces Subpages $wgNamespacesWithSubpages[NS_SAT] = true; $wgNamespacesWithSubpages[NS_SAT_TALK] = true; # add to NamespacesWithSemanticLinks $smwgNamespacesWithSemanticLinks [NS_SAT] = true; # create user group 'SATUsers' $wgGroupPermissions['SATUsers']['write'] = true; #restrict "read" permission to logged in users $wgNamespacePermissionLockdown[178]['read'] = array('*'); $wgNamespacePermissionLockdown[178]['edit'] = array('SATUsers'); $wgNamespacePermissionLockdown[178]['create'] = array('SATUsers'); $wgNamespacePermissionLockdown[179]['read'] = array('SATUsers'); #prevent inclusion of pages from that namespace # $wgNonincludableNamespaces[] = 178; # public namespace $wgNonincludableNamespaces[] = 179;
Basic Admin settings
# create user group 'BasicAdminUsers' $wgGroupPermissions['BasicAdminUsers']['read'] = true; #restrict "read" permission to logged in users $wgNamespacePermissionLockdown[170]['read'] = array('BasicAdminUsers'); # only BasicAdminUsers can read $wgNamespacePermissionLockdown[170]['edit'] = array('BasicAdminUsers'); $wgNamespacePermissionLockdown[170]['create'] = array('BasicAdminUsers'); $wgNamespacePermissionLockdown[171]['read'] = array('BasicAdminUsers'); #prevent inclusion of pages from that namespace $wgNonincludableNamespaces[] = 170; $wgNonincludableNamespaces[] = 171;
Citi Admin settings
</pre># create user group 'CitiAdminUsers' $wgGroupPermissions['CitiAdminUsers']['read'] = true;
- restrict "read" permission to logged in users
$wgNamespacePermissionLockdown[174]['read'] = array('CitiAdminUsers'); # only CitiAdminUsers can read $wgNamespacePermissionLockdown[174]['edit'] = array('CitiAdminUsers'); $wgNamespacePermissionLockdown[174]['createpage'] = array('CitiAdminUsers'); $wgNamespacePermissionLockdown[174]['upload'] = array('CitiAdminUsers'); $wgNamespacePermissionLockdown[175]['read'] = array('CitiAdminUsers');
- prevent inclusion of pages from that namespace
$wgNonincludableNamespaces[] = 174; $wgNonincludableNamespaces[] = 175; </pre>
define custom namespaces
# in namespaces.php #creating a group - as soon as the group permission is addressed, the group is created $wgGroupPermissions['CitiAdmin']['read'] = true; # namespace example $wgExtraNamespaces[100] = 'Private'; $wgExtraNamespaces[101] = 'Private_talk'; # create user group $wgGroupPermissions['SATUsers']['write'] = true; #restrict "read" permission to logged in users $wgNamespacePermissionLockdown[178]['read'] = array('*'); $wgNamespacePermissionLockdown[178]['edit'] = array('SATUsers'); $wgNamespacePermissionLockdown[178]['create'] = array('SATUsers'); $wgNamespacePermissionLockdown[179]['read'] = array('SATUsers'); #prevent inclusion of pages from that namespace # $wgNonincludableNamespaces[] = 178; # public namespace $wgNonincludableNamespaces[] = 179;