Last modified: 2011-11-13 22:49:53 UTC
Hi, IMHO, the function getEditToolbar should have 2 hooks for changing the toolarray and changing the whole toolbar. The diff should be this: 1529a1531,1537 > // add hook for additionalToolbar Elements > // first hook extends the normal array.... > // change requiered for PHP5 since passByReference is not allowed anymore > // > > wfRunHooks( 'changeToolarray', array( &$toolarray ) ); > 1550c1557 < --- > wfRunHooks( 'addToolbarElements', array( &$toolbar ) ); Greetings
Created attachment 3354 [details] Added sitetoolbar function
Created attachment 3355 [details] Example of customized site toolbar
I think it would be easier to have a parameter for LocalSettings.php: $wgUseSiteToolbar = true; In order to use it, the admin would have to create a file sitetoolbar.php in the main directory (see attachment) and add the new buttons to /skins/common/images. And a change in EditPage.php, see patch (Note: This change can be delivered as part of MediaWiki for there is a parameter). Insert: if ( $wgUseSiteToolbar = true ) { // would be nicer if we could have MediaWiki:SiteToolbar like MediaWiki:common.css #print "<br>$IP/sitetoolbar.php"; if(file_exists("$IP/sitetoolbar.php")) { include_once("$IP/sitetoolbar.php"); $toolarray=$sitetoolarray; } } if ( count ($toolarray) == 0 ) // if there is a problem with the sitetoolarray before: $toolarray = array(
The editing toolbar can already be changed via JavaScript; we provide a straightforward array to customise it.
Maybe it would be a good idea to document that customization procedure somewhere, otherwise it is worthless: http://meta.wikimedia.org/wiki/Customizing:Edit_Toolbar
Hi, I dislike both ways mentioned here http://meta.wikimedia.org/wiki/Customizing:Edit_Toolbar In both ways, I've to make the changes more often. (each update) I even would prefer the hooks more than the SiteToolbar since I don't have to reevent existings Elements, but this would be fine for me too. Greetings Volker
(In reply to comment #4) > The editing toolbar can already be changed via JavaScript; we provide a > straightforward array to customise it. This is how we customize the edit toolbar. Suggest closing WONTFIX since a method of configuring this already exists. (In reply to comment #6) > Hi, > > I dislike both ways mentioned here > > http://meta.wikimedia.org/wiki/Customizing:Edit_Toolbar > > In both ways, I've to make the changes more often. (each update) > I even would prefer the hooks more than the SiteToolbar since > I don't have to reevent existings Elements, but this would be fine for me > too. > > Greetings Volker Nothing should ever be lost during an update. TBH, that page on meta that suggests hacking the code should be deleted.
WONTFIX per chad