1
Ajax is becoming more and more in demand. So I want to do some addons to header.php
It seems that certain functions should be integrated into the XOOPS core. For now, lets just make it easier for those of us too impatient to wait for this to occur.
With this simple hack I want to call these scripts with a smarty tag.
Here's what I did
in header.phpFind:
$xoopsTpl->assign('xoops_js', '');
Add After
$xoopsTpl->assign('xoops_prototype', '');
$xoopsTpl->assign('xoops_scriptaculous', '');
By default scriptaculous.js loads the other .js files "dragdrop, effects, etc" as long as they are in the same directory.
Be sure to upload all of the .js files to your XOOPS_root/includes directory.
Now, instead of using this in my theme.html
<script type="text/javascript" src="<{$xoops_imageurl}>scripts/scriptaculous.js">script>
I use
<{$xoops_scriptaculous}>
<{$xoops_prototype}>
If I view the page source the scripts are being called properly... but the functionality is not there.
Any ideas?