Loading...
 
Skip to main content

Features / Usability


Javascript Problems

I'm trying to put some javascript on my tikiwiki site - it is on Polaris (v 1.8.5) on a commercial shared server. Any javascript I put on a page or in a module box has the initial and final tags (which identify it as jscript) stripped out, and the code is rendered inoperable. So I searched and discovered the tikimods.com plugin for jscript and put a copy of the wikiplugin_js.php in my lib/wiki-plugins/ directory, but the tags are still stripped out when I save anything with jscript. I have activated the 'allow html' both globally and on the page where I want jscript, and I have all kinds of html on other pages no problems.

Questions:
1) what should the permissions be for the plugin file?

2) Is there any sort of reboot for the wiki server that needs to be done to get newly uploaded plugins recognized?

3) What else might prevent me from embedding jscript in a wikipage or module?? Or alternatively, how do you get javascript on your wiki?

Thanks, Floridian

My answers are inline below:
> Questions:
> 1) what should the permissions be for the plugin file?

Use the same permissions as other plugins that do work on your site.

> 2) Is there any sort of reboot for the wiki server that needs to be done to get newly uploaded plugins recognized?

NO

> 3) What else might prevent me from embedding jscript in a wikipage or module?? Or alternatively, how do you get javascript on your wiki?

If you are using the TikiMODS PluginJSQuestion then you shouldn't be putting any tags on the page at all. The PluginJS inserts the tags on the fly when the page is rendered.

Some javascripts need some of their code to be in a specific place, for example in the HEAD of the page, or at the very start or end of the page BODY. The code inserted using the PluginJS is inserted only into the page BODY.

I haven't tested the TikiMODS.comQuestion PluginJS with Tiki 1.8.5. Maybe someone else can comment on that.