[pmwiki-users] Enable javascript in locked-down wiki?

Tegan Dowling tmdowling at gmail.com
Sun Feb 14 08:39:59 CST 2010


 On Sun, Feb 14, 2010 at 12:53 AM, Simon <nzskiwi at gmail.com> wrote:

> Just one page, or all.


Just one page


> If one page what I have done (based on original advice from PM) was to add
> the following to config.php
>
> Markup('includefile', 'directives',
> '/\\(:includefile\\s+([-\\w.]+)\\s*:\\)/e', "Keep(implode('',
> file('/home/websitename/public_html/includefiles/$1')))");
>
> In your wiki page try
>
> (:includefile myfile.js:)
>

What would the content of myfile.js be? The code that makes up the widget,
or something else?

>
> where myfile.js is in the directory includefiles
>

Thanks, Simon!


>
>
>  On 14 February 2010 14:36, Tegan Dowling <tmdowling at gmail.com> wrote:
>
>>  For a school's site, I'd like embed this widget code in a page:
>>
>> <script type="text/javascript" src="
>> http://widgets1.renlearn.com/content/widgets/readingactivity/readingactivitywidget.js"></script><script>if
>> (READINGACTIVITYWIDGET) READINGACTIVITYWIDGET.renderWidget('
>> http://widgets1.renlearn.com/', 'MCPSCX6');</script><noscript>Enable
>> Javascript in your browser to view this content.</noscript>
>>
>> I do have html enabled on the site, and I added "script" and "noscript" to
>> the list of html terms to enable -- in local\config.php I have:
>>
>> include_once("$FarmD/cookbook/enablehtml.php");
>>
>> EnableHtml("a|select|option|form|input|iframe|img|small|object|param|embed|script|noscript");
>>
>> Having done that at least results in hiding the lines above when I add
>> them to a page, but it doesn't suffice to display the widget.
>>
>> Can I add something else to the enablehtml stuff on config.php that will
>> make this work?  I don't know from javascript, so I don't know if part of
>> doing this right might be to put some of the widget code in the header of
>> the skin.tmpl file -- but if so, which part, and what goes on the page
>> itself?
>>
>> Thanks!
>>
>> Tegan
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100214/dd89b0eb/attachment.html 


More information about the pmwiki-users mailing list