[pmwiki-users] should enabling html also enable js?

Tegan Dowling tmdowling at gmail.com
Mon Jul 30 11:48:17 CDT 2007


Hi, List:

I have a wiki on which all pages are edit-protected.  On one
particular page (which has edit-access limited to admins), I'd like to
have some html and javascript.  In the past, I've had no problem
enabling html on such pages, so I'm thinking that in this case the
difference is the javascript.  Is there something extra that I need to
do for that?

In my cookbook directory, I have the enablehtml recipe from
http://www.pmichaud.com/wiki/Cookbook/EnableHTML.

In local/ I have a file GroupName.PageName.php which contains

<?php if (!defined('PmWiki')) exit();

	// Enable HTML
		include_once('cookbook/enablehtml.php');
		EnableHtml('a|script');

On the page itself, I have the following (except with a real event ID number):

<script type="text/javascript">
	eventbrite_event = "EventIDHere";
	eventbrite_view = "full";
	eventbrite_width = "80%";
	eventbrite_height = "1500";
</script>
<script type="text/javascript" src="http://www.eventbrite.com/js/events.js">
</script>
<a href="http://www.eventbrite.com/">Online Event Registration</a> -
<a href="http://www.eventbrite.com/">Powered by www.eventbrite.com</a>

None of the javascript stuff appears on the saved page.  The links
come through fine, as usual when html is enabled.

What I've tried:
1) Removed all line-breaks, so that everything from the first "<script
..." to the last "</script>" was on one line.
2) Reversed the order of the two scripts
3) Moved all of the "eventbrite_..." parameters inside the script's < brackets >
4) Combined the two scripts into one
5) Several combinations of the above.

I did find the cookbook page
http://pmwiki.org/wiki/Cookbook/JavaScript-Editable, but didn't
understand it -- it looks like it's just a repeat of what's already in
the lower part of the EnableHTML page; I don't see anything
javascript-specific about it, and am not clear how I'd implement it
anyhow, so haven't tried.

Anyone got a hint for me?



More information about the pmwiki-users mailing list