Including additional PHP Libraries in your Module
If the PHP scripts in your module rely on any 3rd party PHP scripts, libraries, or other support files, it is HIGHLY recommended that you place these files in your module's "include" directory. This will ensure the module's directory is kept clean and organized, and allow your module to not have files located throughout the Jamroom directories.
Note too that whenever possible, you should try to link to the "master" copies of any Jamroom support scripts. For example - if your module relies on the jQuery javascript library, you should use the jQuery file found at:
{$JAMROOM_URL}/include/js/jquery.js
This has the benefit of the Javascript file likely already being cached in the users browser, and will be faster.
Note that you do not need to include() any of the Jamroom PHP library scripts in your module that are found in:
jamroom/include
EXCEPT for the following, which are not loaded by default in Jamroom's includer:
- include/jamroom-payment.inc.php
- include/jamroom-ranking.inc.php
- include/jamroom-theme.inc.php
If you need to access functions that are located in these library files, you will need to use a PHP include() function call for the desired library script to ensure the functions are available in your module.
|