[Pmwiki-users] include javascript in wiki page
Patrick R. Michaud
pmichaud
Sun Nov 23 08:50:58 CST 2003
A little bit shorter (no need for the array_merge_recursive):
$JScriptPath = 'http://your.domain.com/pmwiki/jscript';
$InlineReplacements["/jscript:($UrlPathPattern)/"] =
"<script src='$ScriptPath/\$1' type='text/javascript'></script>";
Should work just fine.
Pm
On Saturday, November 22, 2003, 7:00:09 PM, you wrote:
> hi,
> I want to include Java script in wiki page. ie i want a random picture
> for each refresh.
> after several search i've found nothing on
> http://www.pmichaud.com/wiki/PmWiki.
> I'm not a programmer but i try this and it works ! in local.php :
> $ScriptPath = 'http://your.domain.com/pmwiki/jscript';
> $jscript = array ( "/jscript:($UrlPathPattern)/" => "<script
> src='$ScriptPath/$1' type='text/javascript'></script>");
> $InlineReplacements = array_merge_recursive ($InlineReplacements,
> $jscript);
> create a myscript.js, then just insert jscript:myscript.js in wiki
> page..
> i'm looking for a better solution, any idea?
> ________________________________________________________
> mtra
> ________________________________________________________
> _______________________________________________
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com
More information about the pmwiki-users
mailing list