PrototypeUseInBitweaver

description and use of the prototype library in bitweaver

Created by: xing, Last modification: 29 Dec 2005 (19:52 UTC)
The Prototype library is included with the Bitweaver in themes/js/prototype.js

To make use of the library, simply do the following in the php file that calls the template in need of the javascript library:

<?php
// Load common ajax library
$gBitSmarty->assign'loadAjax'TRUE );
?>


The prototype library version 1.4 which is currently still in development, allows for some great new features, which include the option to register functions which get executed during certain stages of execution. this allows for sophisticated debugging options and the like. we are not using prototype 1.4 generally since it's about twice as large (47kb) and we don't have any specific use for the extended options.
prototype 1.4 is present in our bitweaver distribution and is used when you want to debug some features, or you want to use the new version of the library. to turn on the debugging features, just call them from the php file like this:

<?php
// Load common ajax library
$gBitSmarty->assign'loadAjax'TRUE );
// i need to debug my crazy ajax code
$gBitSmarty->assign'jsDebug'TRUE );
?>

the debugger has some useful, ajax unrelated javascript debugging functions, which should be expanded to allow for better javascript developement.

this will atomatically include the library in the pages that need it.

Bitweaver Packages Using Prototype

  • All packages using the attachment browser
    • WikiPackage
    • ArticlesPackage
    • BlogsPackage
  • ChatterboxPackage
  • GmapPackage