[dokuwiki] not correct examples in devel:event:tpl_metaheader_output

  • From: "Mikhail I. Izmestev" <izmmishao5@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 06 Apr 2009 16:11:17 +0500

Hello.

    Page devel:event:tpl_metaheader_output contains not correct examples:
    1) example for adding javascript file dosen't work on current
versions of dokuwiki (i have wrote about it in a previous message
//www.freelists.org/post/dokuwiki/Problem-with-script-tag-generation-in-TPL-METAHEADER-OUTPUT-event).
Example should look like:

// Adding a JavaScript File
$event->data["script"][] = array <http://www.php.net/array> (
  "type" => "text/javascript",
  "src" => "lib/plugins/myplugin/javascript_library.js",
  "_data" => "",
);

    2) if you set $conf['userewrite'] to '2' or  '1' and
$conf['useslash'] = 1, then src attribute of script tag or href
attribute of link tag should start with root. Example should look like:

// Adding a stylesheet 
$event->data["link"][] = array <http://www.php.net/array> (
  "type" => "text/css",
  "rel" => "stylesheet", 
  "href" => DOKU_BASE."lib/plugins/myplugin/specialstyle.css",
);

// Adding a JavaScript File
$event->data["script"][] = array <http://www.php.net/array> (
  "type" => "text/javascript",
  "src" => DOKU_BASE."lib/plugins/myplugin/javascript_library.js",
  "_data" => "",
);

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: