[Mediawiki-l] MediaWiki default edit toolbar short of stuff...

Jack D. Pond jack.pond at psitex.com
Tue Apr 3 12:21:04 UTC 2007


The easiest way I've found is to modify the default .js files.  This can be
done on an individual basis by user by modifying the .js file that
corresponds to their skin (e.g. User:JohnDoe/monobook.js) or by modifying
for all users on the wiki using the common.js (MediaWiki:common.js).  Note
these are case sensitive.

Wikipedia user MarkS has put together a nice little toolset that you can
crib.
http://en.wikipedia.org/wiki/User:MarkS/Extra_edit_buttons/dev.js

{{subst:js|User:MarkS/XEB/dev.js}}

See User:MarkS/XEB/dev.js  However, note this changes and sometimes has
errors in it.

The way I've done it is load it into my own wiki(s) at a special area (e.g.
MediaWiki:Extraeditbuttons.js),

Then change the common.js to reference:

/* Any JavaScript here will be loaded for all users on every page load. */

//<pre>
document.write('<script type="text/javascript" src="' 
             +
'http://wiki.[yourwiki]/index.php?title=MediaWiki:Extraeditbuttons.js' 
             +
'&action=raw&ctype=text/javascript&dontcountme=s"></script>');

//</pre>

The one thing that I didn't see documented anywhere is that both of these
segments have to start and end with the pre tags.  You will have to manually
refresh your browser to get it to take effect.

//<pre>

. . .

//</pre>

Also remember this is running as javascript on the local browser - and this
can have some really funky side effects.  For MarkS code has bugs starting
around line 219  that can be fixed with the following:

### Start of fix

	//  table
	extendAButton(Isrc+"0/04/Button_array.png",XEBPopupTable);
	extendAButton(Isrc+"7/79/Button_reflink.png",XEBPopupRef);
	extendAButton(Isrc+"b/b8/Button_Globe.png",XEBPopupGeoLink);
	extendAButton(Isrc+"4/49/Button_talk.png",XEBPopupTalk);
	extendAButton(Isrc+"1/1c/Button_advanced_image.png",XEBPopupImage);
	
//extendAButton(Isrc+"6/6a/Button_sup_letter.png",XEBPopupFormattedText);

	// redirect
	for (c=0;c < XEBOrder2.length;c++)
	{
		 if (XEBOrder[c] = 'V') break;
	}
	if(c == XEBOrder2.length)
	{

// FIX THIS LATER
//		allEditButtons[bu_len+c].onclick=function();
		var a='#REDIRECT \[\['+prompt("Which page do you want to
redirect to\?")+'\]\]';
		document.editform.elements['wpTextbox1'].value=a;
		document.editform.elements['wpSummary'].value=a;
		document.editform.elements['wpWatchthis'].checked=false;
	};

### end of fix

Jack D. Pond
CIO, Montgomery County, PA
 
"Better be despised for too anxious apprehensions, than ruined by too
confident security." -- Edmund Burke, 1729-1797
-----Original Message-----
From: mediawiki-l-bounces at lists.wikimedia.org
[mailto:mediawiki-l-bounces at lists.wikimedia.org] On Behalf Of Dhruba
Bandopadhyay
Sent: Sunday, April 01, 2007 12:33 PM
To: mediawiki-l at lists.wikimedia.org
Subject: [Mediawiki-l] MediaWiki default edit toolbar short of stuff...

I have been using MediaWiki for a long time and noticed that the default
edit toolbar is short of functionality... compared to wikimedia.org's
toolbar. How does one get the same toolbar as wikimedia.org's toolbar? Is it
an additional plug-in / installation? Or is there a setting in the
config/settings file?
 
Cheers
_________________________________________________________________
i'm making a difference. Make every IM count for the cause of your choice.
Join Now.
http://clk.atdmt.com/MSN/go/msnnkwme0080000001msn/direct/01/?href=http://im.
live.com/messenger/im/home/?source=wlmailtagline
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l at lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l




More information about the MediaWiki-l mailing list