[Mediawiki-l] How do you remove edit buttons from the toolbar?

Ekompute .info ekompute at gmail.com
Sun Aug 16 05:37:18 UTC 2009


Hi, I change the codes directly in SkinTemplate.php and it was a breeze. Can
common.css override SkinTemplate, ie. instead of changing the codes in
SkinTemplate.php, I paste those codes in Common.css like what we would do if
we were to change any of the css files?
Looks like it cannot be done because SkinTemplate is a php file.
Alternatively, how about having a second copy of SkinTemplate.php in the
relevant skin folder and then redirecting the reference to point to the
correct SkinTemplate?

PM Poon

On Sun, Aug 16, 2009 at 6:34 AM, Platonides <Platonides at gmail.com> wrote:

> Matthias Korn wrote:
> > I think he was referring to the buttons in the editing toolbar, which
> > can not be hidden by CSS afaik.
> >
> > Here is what I did quite some time ago (so I don't remember how I did
> > it and if anything else apart from this is neccessary):
> > http://wiki.rockinchina.com/index.php?title=MediaWiki:Common.js
> >
> > Actually, removing buttons 6,7 does not seem to work (file link and
> > math are still there). But maybe it will get you started. Tell me if
> > you sorted out how to remove those two though... ;-)
> >
> > Best,
> > matsch
>
> It doesn't work because the removing code is run before the button are
> added.
>
> Try this instead:
>
> > function addButton(imageFile, speedTip, tagOpen, tagClose, sampleText,
> imageId) {
> >         if ((imageId=="mw-editbutton-image") ||
> (imageId=="mw-editbutton-media")) return;
> >       mwEditButtons[mwEditButtons.length] =
> >               {"imageId": imageId,
> >                "imageFile": imageFile,
> >                "speedTip": speedTip,
> >                "tagOpen": tagOpen,
> >                "tagClose": tagClose,
> >                "sampleText": sampleText};
> > }
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>



-- 
PM Poon

* http://dummipedia.org The 5-Minute Concise Encyclopedia
* http://dummipedia.com The Dummipedia Amazon Online Store


More information about the MediaWiki-l mailing list