Thanks for your help Alexis. I did use the double quotes. I've now replaced the lines of normal text with the lines of wikitext:
http://www.chainsofreason.org/wiki/MediaWiki:Common.js
(at the bottom of the page)
and the toolbar button disappears again. Also, the show/hide functionality - created by the first section of the code on the above page - no longer works too. *However*, when I delete Template:Hide, which is used to implement the show/hide functionality, the button appears, and when pressed inserts the wikitext. So the problem is obviously due to the fact that the wikitext that I want users to be able to insert using the button contains the wikitext for the hide template. Removing the template removes the problem (of course, in your case, the template never existed in the first place). But now I don't have the show/hide functionality!
Any ideas how I can have both?! I don't know any javascript, and very little wikitext.
Derrick
(BTW, re the missing button image, it's now located at
http://www.chainsofreason.org/w/images/extra_buttons/see_also.png)
On Nov 22, 2007 9:35 AM, Alexis Moinet alexis.moinet@fpms.ac.be wrote:
Derrick Farnell wrote :
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.
Did you forget to use "" ?
"sampleText": ":*see also: {{hide|\n" + "::*link 1\n" + "::*link 2}}"works for me, it inserts
:*see also: {{hide| ::*link 1 ::*link 2
in my text
(BTW http://www.chainsofreason.org/w/images/extra_buttons/link_button.pngreturns a "404 not found" error, so your image seems not to be there anymore)
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l