Extension:ChangePersonal/pl
Jump to navigation
Jump to search
![]() | This page is outdated. |
![]() | Prosimy o rozbudowę treści tej strony. |
![]() | This extension stores its source code on a wiki page. Please be aware that this code may be unreviewed or maliciously altered. They may contain security holes, outdated interfaces that are no longer compatible etc. Uwaga: No localisation updates are provided for this extension by translatewiki.net . |
![]() | To rozszerzenie nie jest aktualnie aktywnie rozwijane! Pomimo, że może nadal działać, jakiekolwiek zgłoszenia błędów lub propozycji funkcji będą najprawdopodobniej ignorowane. |
changepersonal Status wydania: niewspierane |
|
---|---|
Realizacja | Rozszerzenie parsera |
Opis | This allows personal links to be changed |
Autor(zy) | Thomas Lorentsen (matxdyskusja) |
Ostatnia wersja | 0.9 (2007-11-15) |
MediaWiki | 1.11 |
Licencja | Nie określono |
Pobieranie | Zobacz niżej |
Co to rozszerzenie potrafi?
This is a quick extension to allow changes to personal_urls. I used this to modify the login link to point to the special page. Other personal_urls can be modifed quickly with this extension.
Użycie
Install and edit or append to the extension what you need to change
Instalacja
To install this extension, add the following to LocalSettings.php :
require_once("$IP/extensions/changepersonal.php");
Kod
<?
/*
* Change Personal for changing the personal urls
* @author Thomas Lorentsen
* @copyright © 2007 by Thomas Lorentsen
* @licence GNU General Public Licence 3.0 or later
*/
if( !defined( 'MEDIAWIKI' ) ) {
echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" );
die();
}
$wgExtensionCredits['parserhook'][] = array(
'name' => 'Change Personal',
'author' => 'Thomas Lorentsen',
'url' => 'https://www.mediawiki.org/wiki/Extension:ChangePersonal',
'description' => "Changes the personal urls such as the login link"
);
function changePersonal(&$personal_urls, &$wgTitle) {
# This points the login link at the top right to the special page
$personal_urls['login']['href'] = './Special:Userlogin?returnto=' . $wgTitle->mUrlform;
$personal_urls['anonlogin']['href'] = './Special:Userlogin?returnto=' . $wgTitle->mUrlform;
# Append to this as needed
return true;
}
$wgHooks['PersonalUrls'][] = 'changePersonal';
Problemy
When viewing special pages, this can cause the redirection to be wrong. It has been found that using a hardcoded url works.
A better solution is needed!