Difference between revisions of "WikiServer - Configuring the Wiki"
Jump to navigation
Jump to search
Line 30: | Line 30: | ||
Install [[mediawikiwiki:Extension:LinkTarget|Extension:LinkTarget]] by first [[mediawikiwiki:Special:ExtensionDistributor/LinkTarget|downloading]] the file and pasting it into your Extensions folder of your wiki install. Then paste the following into your LocalSettings.php file:<br> | Install [[mediawikiwiki:Extension:LinkTarget|Extension:LinkTarget]] by first [[mediawikiwiki:Special:ExtensionDistributor/LinkTarget|downloading]] the file and pasting it into your Extensions folder of your wiki install. Then paste the following into your LocalSettings.php file:<br> | ||
− | + | require_once "$IP/extensions/LinkTarget/LinkTarget.php"; | |
+ | $wgLinkTargetParentClasses = ' /*ENTER SOME CLASSES HERE*/ '; | ||
− | + | $wgExternalLinkTarget = '_blank'; | |
− | + | $wgLinkTargetParentClasses = array( 'foo', 'bar' ); | |
− | $wgExternalLinkTarget = '_blank'; | + | $wgLinkTargetDefault = '_self';</code> |
− | |||
− | $wgLinkTargetParentClasses = array( 'foo', 'bar' ); | ||
− | |||
− | $wgLinkTargetDefault = '_self';</code> | ||
==InterWiki Links== | ==InterWiki Links== |
Revision as of 02:24, 28 July 2020
Little snippets of configuration to add to LocalSettings.php...
To add any of them:
sudo vim /var/www/wiki/LocalSettings.php
Contents
Uploadable File Types
search for $wgFileExtensions
If you don't find it, you can add it.
on my wiki, it looks like:
######################################### # Uploadable File Types ######################################### $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'epub', 'ino', 'c', 'cpp', 'h', 'zip', 'gz', 'mp3', 'txt' );
You likely don't want ino, c, cpp, h
Open external links in new window
######################################### # Open external links in new window. ######################################### $wgExternalLinkTarget = '_blank';
Assign how links are opened by 'groups'
Install Extension:LinkTarget by first downloading the file and pasting it into your Extensions folder of your wiki install. Then paste the following into your LocalSettings.php file:
require_once "$IP/extensions/LinkTarget/LinkTarget.php"; $wgLinkTargetParentClasses = ' /*ENTER SOME CLASSES HERE*/ ';
$wgExternalLinkTarget = '_blank'; $wgLinkTargetParentClasses = array( 'foo', 'bar' ); $wgLinkTargetDefault = '_self';
InterWiki Links
######################################### # InterWiki configuration ######################################### // To grant sysops permissions to edit interwiki data $wgGroupPermissions['sysop']['interwiki'] = true; // To create a new user group that may edit interwiki data // (bureaucrats can add users to this group) # $wgGroupPermissions['developer']['interwiki'] = true; // delete the comment indicator # as appropriate
See InterWiki Linking for a little bit more detail