MediaWIKI Upgrade: Difference between revisions

mNo edit summary
 
Line 76: Line 76:


===Alternative for Modifying Files (CSS)===
===Alternative for Modifying Files (CSS)===
Instead of changing code in files, CSS can be used to modify visibility of elements on a MediaWiki Site.  The below script can be placed in the LocalSettings.php file and modify what appears for anonymous users and logged in users (probably not necessary to change anything for logged in users.<syntaxhighlight lang="text">
Instead of changing code in files, CSS can be used to modify visibility of elements on a MediaWiki Site.  The below script can be placed in the LocalSettings.php file and modify what appears for anonymous users and logged in users (probably not necessary to change anything for logged in users).<syntaxhighlight lang="text">
function efAddSkinStyles(OutputPage &$out, Skin &$skin) {
function efAddSkinStyles(OutputPage &$out, Skin &$skin) {
     if(!$skin->getUser()->isLoggedIn()) {
     if(!$skin->getUser()->isRegistered()) {
         if ($skin->getSkinName() == 'vector') {
         if ($skin->getSkinName() == 'vector') {
             $out->addInlineStyle('#ca-history { display:none; }');
             $out->addInlineStyle('#ca-history { display:none; }');
Line 89: Line 89:
             $out->addInlineStyle('#ca-talk { display:none; }');
             $out->addInlineStyle('#ca-talk { display:none; }');
             $out->addInlineStyle('#ca-viewsource { display:none; }');
             $out->addInlineStyle('#ca-viewsource { display:none; }');
             # $out->addInlineStyle('#footer-info-lastmod { display:none; }');
             $out->addInlineStyle('#footer-info-lastmod { display:none; }');
             }
             }
     } else {
     } else {
Line 100: Line 100:
$wgHooks['BeforePageDisplay'][] = 'efAddSkinStyles';
$wgHooks['BeforePageDisplay'][] = 'efAddSkinStyles';
</syntaxhighlight>The "#footer-info-lastmod" ID that is commented out above will disable the display of "Last edited / Last modified" for anonymous users.
</syntaxhighlight>The "#footer-info-lastmod" ID that is commented out above will disable the display of "Last edited / Last modified" for anonymous users.
As of version 1.36.0, an error message noting a "Deprecated Function" will pop up if the following line is left in place:     if(!$skin->getUser()->IsLoggedIn()) {
The above code replaces the IsLoggedIn with isRegistered Function.


===Extensions===
===Extensions===
Upgrade extensions (if there are upgrades).  Visual Editor is one that needs to be kept up.  Hopefully nothing breaks for extensions that don't have upgrades available.
Upgrade extensions (if there are upgrades).  Visual Editor is one that needs to be kept up.  Hopefully nothing breaks for extensions that don't have upgrades available.


== Database Update ==
==Database Update==
...and finally, don't forget to update the database structure.  From the /WhatEverPathToWebSite/WebSite/maintenance Directory;<syntaxhighlight lang="text">
...and finally, don't forget to update the database structure.  From the /WhatEverPathToWebSite/WebSite/maintenance Directory;<syntaxhighlight lang="text">
php update.php
php update.php
</syntaxhighlight>It can be done from the GUI, but is recommended that it be done from the command line.<br />
</syntaxhighlight>It can be done from the GUI, but is recommended that it be done from the command line.<br />