[HOME PAGE] [STORES] [CLASSICISTRANIERI.COM] [FOTO] [YOUTUBE CHANNEL]


Bug 7245 – Hooks for EditPage Toolbar (function getEditToolbar)

Last modified: 2011-11-13 22:49:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7245 - Hooks for EditPage Toolbar (function getEditToolbar)
Hooks for EditPage Toolbar (function getEditToolbar)
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.6.x
PC Linux
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-06 12:51 UTC by Volker Graubaum
Modified: 2011-11-13 22:49 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Added sitetoolbar function (824 bytes, patch)
2007-03-17 10:34 UTC, Gunter Schmidt
Details
Example of customized site toolbar (5.09 KB, text/plain)
2007-03-17 10:35 UTC, Gunter Schmidt
Details

Description Volker Graubaum 2006-09-06 12:51:02 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
Comment 1 Gunter Schmidt 2007-03-17 10:34:12 UTC
Created attachment 3354 [details]
Added sitetoolbar function
Comment 2 Gunter Schmidt 2007-03-17 10:35:44 UTC
Created attachment 3355 [details]
Example of customized site toolbar
Comment 3 Gunter Schmidt 2007-03-17 10:35:57 UTC
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(
Comment 4 Rob Church 2007-03-17 16:48:57 UTC
The editing toolbar can already be changed via JavaScript; we provide a
straightforward array to customise it.
Comment 5 Gunter Schmidt 2007-03-17 17:51:25 UTC
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
Comment 6 Volker Graubaum 2007-03-17 18:15:09 UTC
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
Comment 7 Chad H. 2009-04-28 02:37:50 UTC
(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.
Comment 8 Sam Reed (reedy) 2011-11-13 22:49:53 UTC
WONTFIX per chad

Note You need to log in before you can comment on or make changes to this bug.


Contents Listing Alphabetical by Author:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Unknown Other

Contents Listing Alphabetical by Title:
# A B C D E F G H I J K L M N O P Q R S T U V W Y Z Other

Medical Encyclopedia

Browse by first letter of topic:


A-Ag Ah-Ap Aq-Az B-Bk Bl-Bz C-Cg Ch-Co
Cp-Cz D-Di Dj-Dz E-Ep Eq-Ez F G
H-Hf Hg-Hz I-In Io-Iz J K L-Ln
Lo-Lz M-Mf Mg-Mz N O P-Pl Pm-Pz
Q R S-Sh Si-Sp Sq-Sz T-Tn To-Tz
U V W X Y Z 0-9

Biblioteca - SPANISH

Biblioteca Solidaria - SPANISH

Bugzilla

Ebooks Gratuits

Encyclopaedia Britannica 1911 - PDF

Project Gutenberg: DVD-ROM 2007

Project Gutenberg ENGLISH Selection

Project Gutenberg SPANISH Selection

Standard E-books

Wikipedia Articles Indexes

Wikipedia for Schools - ENGLISH

Wikipedia for Schools - FRENCH

Wikipedia for Schools - SPANISH

Wikipedia for Schools - PORTUGUESE

Wikipedia 2016 - FRENCH

Wikipedia HTML - CATALAN

Wikipedia Picture of the Year 2006

Wikipedia Picture of the Year 2007

Wikipedia Picture of the Year 2008

Wikipedia Picture of the Year 2009

Wikipedia Picture of the Year 2010

Wikipedia Picture of the Year 2011