User talk:MarkS/Extra edit buttons

From Wikipedia, the free encyclopedia

May you please add a button for right to left align? Thanks, David

You mean right Image:Button_align_right.png for left? For what in fact is left used? --Olliminatore 15:16, 19 September 2006 (UTC)
As of 13 October 2006 XEB includes left aligned, centred and right aligned buttons --MarkS (talk) 15:45, 13 October 2006 (UTC)

When adding your own new buttons, how do we specify the url for the button's image? You look like you're using the absolute path of the image ex: 6/6a/Button_sup_letter.png. But I can't see that path when I search for that image on wikipedia. So I assume I create images using gimp, them upload them to wikipedia. But how do I know the path to the image?

Thanks in advance, Jason L Michael

Hi Jason, you can find the absolute path to the image by clicking on its link in its description page, e.g. here, you would click on the text right beneath the picture which says "John_W._Bricker_cropped.jpg‎ (10KB, MIME type: image/jpeg)". That takes you to the absolute path: http://upload.wikimedia.org/wikipedia/en/7/77/John_W._Bricker_cropped.jpg
--Matt57 15:45, 28 October 2006 (UTC)
All the icons are now in commons so rather than specify the full path on each line 'http://upload.wikimedia.org/wikipedia/commons/' is added to the front of each URL. If you are looking at the code then you can see variable Isrc is defined at the top to hold this part of the URL. Isrc is then added to the location specified for each button.


[edit] Reference tags

Hello there. This seems like a great tool, but there's one more thing I'm missing. There's plenty of reference templates available out there and copy-pasting them and then filling them with content might be a tedious task. Is there a way to create buttons that would paste the three most common templates?

  • {{cite book | author = | coauthors = | title = | year = | editor = | pages = | chapter = | chapterurl = | publisher = | location = | id =ISBN | url = | format = | accessdate = }}
  • {{cite journal | author = | year = | month = | title = | journal = | volume = | issue = | pages = | id = | url = | format = | accessdate = }}
  • {{cite web | author= | title= | publisher= | year= | work= | url= | accessdate= }}

//Halibutt 09:02, 31 October 2006 (UTC)

There are two ways:
  1. You could use the mwCustomEditButtons function directly in your own monobook.js. mwCustomEditButtons is an array which contains details of the buttons to add. You can see an example of using it in extraeditbuttons.js.
  2. Extra buttons can be added. These would probably be non-standard buttons. This ensures the buttons don't appear automatically for everybody. You would then need to use XEBOrder to get the buttons to appear.
I'm willing to follow the second option and add the buttons into XEB. Would you be willing to design the icons? --MarkS (talk) 20:34, 1 November 2006 (UTC)