I've now discovered that when the 'sampleText' to be inserted via the custom button is changed from the example text given below to the following lines:
:*see also: {{hide| ::*link 1 ::*link 2}}
then the button no longer shows. I assume this has something to do with the symbols used. Is there any way around this? I've changed the text back to normal text: http://www.chainsofreason.org/wiki/MediaWiki:Common.js (see right at the bottom) - and it works again.
Derrick
On Nov 19, 2007 7:45 PM, Derrick Farnell derrick.farnell@gmail.com wrote:
I've got it now: it works when I put the ==subheadings== between /* and */, which is probably what you were meaning before, but I didn't realise these symbols were code for commenting-out.
Thanks a lot for your help!
Best, Derrick
On Nov 19, 2007 5:08 PM, Jim Hu jimhu@tamu.edu wrote:
I copied this part from yours into a test wiki and it works for me (note that this is the only thing in Common.js in the test, other parts of what you have may be causing the problem):
/** ****************************************************** == Extra toolbar options == *<nowiki>
- Description: UNDOCUMENTED
- Maintainers: [[User:MarkS]]?, [[User:Voice of All]], [[User:R.
Koot]] */
//This is a modified copy of a script by User:MarkS for extra features added by User:Voice of All. // This is based on the original code on Wikipedia:Tools/Editing tools // To disable this script, add <code>mwCustomEditButtons = [];<code> to [[Special:Mypage/monobook.js]]
if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://www.chainsofreason.org/w/images/ extra_buttons/link_button.png", "speedTip": "Redirect", "tagOpen": "", "tagClose": "", "sampleText": "First line of template text\n" + "Second line of template text\n" + "Third and final line of template text." }; }
/*</nowiki>*/
On Nov 19, 2007, at 2:04 AM, Derrick Farnell wrote:
I've now added that extra code as it appears in your Common.js file:
http://www.chainsofreason.org/wiki/MediaWiki:Common.js
but it still didn't work.
Is there perhaps another file that I should also be changing? Like a file more directly associated with the editor than common.js?
Derrick
On Nov 18, 2007 11:49 PM, Jim Hu jimhu@tamu.edu wrote:
I think the ==Subheadings== need to be inside the part that is commented out.
JH
On Nov 18, 2007, at 2:12 AM, Derrick Farnell wrote:
Re adding the edit toolbar button, I've now added the code to the bottom of this page:
http://www.chainsofreason.org/wiki/MediaWiki:Common.js
but the extra button doesn't appear in the toolbar. Any ideas about what I've done wrong?!
Derrick
<snip>
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l