MediaWiki
MediaWiki Howtos
Howto add Informations into this Wiki?
You must have a Login Account to create a new Site Sample URL
http://wiki.linuxonlinehelp.de/index.php/newsitetitle
Edit the New Site and add your Content, later Save and Exit..
External Images are NOT allowed and blocked by the Admin Settings!
open URL Sample:
https://wiki.linuxonlinehelp.de/index.php/?title=MediaWiki:Sidebar
or enter into search box:
MediaWiki:Sidebar
User Password reset
1. Login via SSH to the Webspace
2. go Maintenance Path
cd /maintenance/
3. enter
php changePassword.php --user=user --password=newpass
Create New User as Admin
https://wiki.linuxonlinehelp.de/index.php/Special:CreateAccount
Disable Account Create by everyone
edit LocalSettings.php set:
$wgGroupPermissions['*']['createaccount'] = false;
Disable edit by anonymous
edit localsettings.php set:
$wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['user']['edit'] = false; $wgGroupPermissions['sysop']['edit'] = false;
More Details: https://www.mediawiki.org/wiki/Manual:User_rights
Change Username on MySQL Console
login into the MySQL Server, change database and enter:
update user set user_name = 'NewName' where user_name = 'OldName'; update revision set rev_user_text = 'NewName' where rev_user_text = 'OldName'; update recentchanges set rc_user_text = 'NewName' where rc_user_text = 'OldName';
Disable Talk at Mediawiki (Spam)
Anyway, if you want to disable Talk in media wiki follow the next steps.
1. cd your_mediawiki_dir/include
2. cp SkinTemplate.php SkinTemplate.back (just in case)
3. mcedit/vi SkinTemplate.php
4. search for $content_actions['talk']
5. uncomment this lines:
/* $content_actions['talk'] = $this->tabAction( $talkpage, 'talk', $this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); */
or login as Admin User and enter into Searchbox:
MediaWiki:Common.css
set:
#ca-talk { display: none !important; }
Change Main Page
Login as Admin User and enter into Searchbox:
MediaWiki:Common.css
edit here the Common.css and paste:
.page-Wiki_Home .mw-redirectedfrom { display: none; }
now go to Main Page and select "move to" new article post! Save and logout! Check the new Index Page! (Refresh Browsers Cache F5)
Add a new Site to Media Wiki
Enable Mobile Frontend for MediaWiki
Install the Frontende Extension to Extensions Folder and enable on LocalSettings.php
Source: Download MediaWiki Mobile Extension
wfLoadExtension( 'MobileFrontend' ); $wgMFAutodetectMobileView = true;
Protect MediaWiki after Setup
If you have Setup the MediaWiki successful by URL Sample:
https://wiki.linuxonlinehelp.de/w/mw-config/index.php
don't forget to purge or rename the mw-config Folder!! Alternate set:
$sudo chmod 000 mw-config
Create Sitemap Script for Cronjob
Create a Bash Script for cron usage, like sitemapwiki.sh, enter:
#!/bin/bash cd /webspace/wiki/ #go to wiki path rm -rf sitemap #purge old sitemaps mkdir sitemap #create new directory for sitemaps php maintenance/generateSitemap.php \ --skip-redirects \ --fspath sitemap \ --server https://wiki.linuxonlinehelp.de \ --urlpath https://wiki.linuxonlinehelp.de/sitemap exit 0
Remark: Add the Sitemaps URL to Google/Bing Webmaster Tools! Check at the sitemaps path the Name of YOUR XML File Name!! Depends on MySQL Database Name! URL: https://wiki.linuxonlinehelp.de/sitemap/sitemap-index-databasename-wiki_.xml
Enable Apache24 Sitemap Access
add to vhosts Config of the Wiki:
<Directory "/webspace/wiki/sitemap/"> Require all granted AllowOverride All Options -Indexes </Directory>