Loading...
 

PluginJSFILE

Description/Usage

This plugin provides the ability to use traditional copy-and-paste javascript code snippets in your wiki pages.

This plugin does one thing: it inserts the contents of the javascript into the BODY of a wiki page (inbetween the < BODY > and < /BODY > tags) at the position where the .js file is called. So, this works for javascripts that only need code to be put in the BODY of a web page.

--> For javascripts where code also needs to be inserted into the HEAD (inbetween the < HEAD > and < /HEAD > tags), an update to this plugin is in the works biggrin

Instructions for Use
  1. Copy and paste your code snippet into a new text document, and remove the , and tags.
  2. Save the document with .js at the end in place of .txt (or you can rename it after saving).
  3. Put this new .js file in the root folder of your tiki installation.

Use the following syntax (replacing js-file_name.js with the name of the new .js file) in the wiki page where you want the javascript to run: {JSFILE(file=js-file_name.js)}{JSFILE}

Download

Installation

Version 2 of JSFILE includes a head parameter {JSFILE(head=js-file_name.js,file=js-file_name.js)}{JSFILE} which allows JavaScript to be added into the HEAD section on the WIKI page.
This version requires 1 line of code to be added in your header.tpl:

Find this near the top of your header.tpl, the key is the /title:
Copy to clipboard
{elseif $forum_info.name ne ''} : {$forum_info.name} {/if} </title> {* --- jscalendar block --- *} {if $feature_jscalendar eq 'y'} <link rel="StyleSheet" href="lib/jscalendar/calendar-system.css" type="text/css"></link>

and insert the line after the /title:
Copy to clipboard
{if $jshead ne ''}{/if}

Your finished code should look like:
Copy to clipboard
{elseif $thread_info.title ne ''} : {$thread_info.title} {elseif $forum_info.name ne ''} : {$forum_info.name} {/if} </title> {if $jshead ne ''}{/if} {* --- jscalendar block --- *} {if $feature_jscalendar eq 'y'} <link rel="StyleSheet" href="lib/jscalendar/calendar-system.css" type="text/css"></link>


arrow This plugin is current under development and available from http://mods.tiki.org


Page last modified on Friday 20 September 2019 16:14:06 GMT-0000

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting