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

Tegan Dowling tmdowling at gmail.com
Wed Aug 1 11:21:00 CDT 2007


On 7/31/07, Tegan Dowling <tmdowling at gmail.com> wrote:
> On 7/31/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > On Mon, Jul 30, 2007 at 11:48:17AM -0500, Tegan Dowling wrote:
> > > 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>
> >
> > I suspect the problem is that EnableHTML simply preserves the tags --
> > it doesn't preserve things in the middle of the tags.  So, in the first
> > <script> tag above the variable initializations end up being wrapped in
> > <pre>..</pre> tags.  The second one should've worked, however.
> >
> > Still, I'd probably write the above as
> >
> >     <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>
> >
> > so that PmWiki isn't tempted to put its own block markups in
> > the middle of the text.
> >
> > If that doesn't help, I'll see about setting up an example page
> > on pmwiki.org to see if we can troubleshoot this.
>
> Patrick:  Thanks so much for taking a shot at this -- I pasted your
> version onto the page, but when saved, it still doesn't display any
> part of either script section.
>
> If you could enable html, with "script", on a test page of the PmWiki
> site for testing this, that would be terrific.  Thanks again!
>
> Tegan

Something else I've tried, based on how I've seen some google adwords enabled:

In local/GroupName.PageName.php  I put

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

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

##eventbright
Markup('event200708a', 'directives', '/\\(:event200708a:\\)/e',"Keep(\"
<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>
\")");

And then on GroupName.PageName, I have (:event200708a:)

The event-insert is still invisible.



More information about the pmwiki-users mailing list