On 25/05/05, Crit Van Tuyl <critster(a)gmail.com> wrote:
I need to enable javascript. How do I go about doing
that?
"Enable" meaning? If you mean "allow any user to insert arbitrary
JavaScript", I hope you're extremely sure who you're users are; note
also that because it's designed to be open, the security within
MediaWiki (like forcing logins and preventing new accounts) isn't very
thoroughly tested and definitely not guaranteed foolproof.
But if security doesn't worry you, you need to enable the appropriate
HTML tags and/or attributes in includes/Parser.php - there's a
function called something like "stripHtmlTags" I think, which removes
everything except a whitelisted set of elements. There's also a
variable you can set in LocalSettings.php (copy and modify from
includes/DefaultSettings.php) that allows any HTML between <html> and
</html> (I think).
----
On the other hand, if what you actually want to do is allow something
specific to be done with JavaScript within your wiki, you're asking
the wrong question - rather than enabling JavaScript, you want to
enable a function which you've written in JavaScript. The sane way to
do this is to write an "extension" - not as scary as it sounds - that
inserts that function, and only that function, on demand.
You might want to browse around from
http://meta.wikimedia.org/wiki/MediaWiki_extensions and/or modify the
"CharInsert" extension, which does exactly this (in this case, it's a
function for creating a clickable link to insert a character into the
edit box that might otherwise be awkward for users to type) -
http://cvs.sourceforge.net/viewcvs.py/wikipedia/extensions/CharInsert/CharI…
--
Rowan Collins BSc
[IMSoP]