Extension:HideEditOnPreview
From MediaWiki.org
|
HideEditOnPreview Release status: unknown |
|
|---|---|
| Implementation | Page action |
| Description | Hides the edit-link (tab) in preview mode |
| Author(s) | Hendrik Brummermann |
| Version | 1.1 |
| Download | see below |
[edit] Installation
Installation: Copy the code under "source code" and save it as HideEditOnPreview.php and add that file to your extension folder the following to LocalSettings.php:
require_once($IP."/extensions/HideEditOnPreview.php");
[edit] Source code
<?php /** * Hides the edit-link (tab) in preview mode because user click on it to return * to the edit box. It will, however, reload the edit box destroying all unsaved * changes. * * Installation: Copy HideEditOnPreview.php to your extension folder and add * require_once($IP."/extensions/HideEditOnPreview.php"); * to your LocalSettings.php * * @author Hendrik Brummermann * @version 1.1 */ $wgHooks['SkinTemplateContentActions'][] = 'hideEditOnPreview'; function hideEditOnPreview($actions) { global $wgRequest; if ( $wgRequest->getVal('action') == 'submit' ) { unset($actions['edit']); } return true; } $wgExtensionCredits['other'][] = array( 'name' => 'HideEditOnPreview', 'version' => '1.1', 'author' => 'Hendrik Brummermann', 'url' => 'http://mediawiki.org/wiki/Extension:HideEditOnPreview', 'description' => 'Hides the edit-link (tab) in preview mode' ); ?>

