A lot has been done since the last release but still long way till the new 0.5 version but some of the new features already include API like system, Searchable Modules, Members Only option for Photo gallery and Shopping also Digital Goods for shopping (Download Store system). Read more to view the detailed list of upcoming features and win a Google AdWords promotional code worth of $50.
About Modules
Modules are classes that extend the site's funcionality with further features like Photo Gallery, Search module, File Sharing and others. There are two kinds of modules, the Official ones and the Third Party Modules.
Official modules are the ones that are maintained by me meaning that they should always be compatible with new jCore releases and if any problems/bugs appear just contact me and I will focus my atention on fixing them ASAP.
Third party modules are the ones submitted by our webmasters / power users who have their own ideas and they like to share it with us. These modules are maintained by their respective owners and compatibility should be noted in the descriptions. If you notice any bugs, have any suggestions to these modules please contact their respective owners, or better, leave comments.
Modules should be made of one file that needs be copied over to the lib/modules/ directory to install them. There may be cases where more files are included into one module umbrella in those case all files will be recuired to be in the same directory.
Please see How-to -> Install -> Modules for more information on how to install modules.
For DEVELOPERS
A few tips for developers when creating a new module. Please note that your module should have only one file - it's easier to install them, and all modules have to be class-es.
First important thing when you create a module is to register/add it to the modules list, this is done by using:
modules::add('ModuleID', 'Module Description');
ModuleID = an unique id without space only containing characters from A-Z
Module Description = this can contain spaces and other non-alphabetic characters but please note that this text will appear below the icons, so it's good to keep it to two max 2 words, the rest won't be seen unless you modify the admin.css
After module is added/registered it is time to create your class. There are a few rules that you should know about modules as following:
__construct() & __destruct() functions should always be defined and here you should always load your own language files and on destruct reload the original language file. For e.g.:
function __construct() {
languages::load('search');
}
function __destruct() {
languages::loadMessages();
}
Here the construct loads the "search.mo" file from the selected language directory (for e.g. en_US) while the destruct loads back the original language file that is used for the whole site (messages.mo).
The second important thing is to have an installSQL() and installFiles() functions which both get called if the module is loaded for the first time. These function install all the neccesary files/tables that are needed for the module to function.
The third important thing is to have a display() function declared which will display the content of your module. There is an optional function here, if you want to allow ajax request you can check for $this->arguments and use a function called displayArguments() to get the results back. For a full example please see the attached file below.
For the admin part you have to define two functions, one is displayAdmin() while the other is verifyAdmin(); Here you can define your own admin system for your module, please see the attached file for a full example.
If you use forms for your module please consider using the form.class.php, that way you should be able to create new forms easily and your module will be css/js compatible with the rest of the modules.
As usually the best way to understand something is to look at examples so I have attached an empty module below that should have all the minimum requirements to build a module as it was thought to be.
Happy coding and please consider sharing your module with the rest of us.