User Login

API - Partial Classes

Starting from ver. 0.5 jCore can be extended using the API or more precisely using Partial Classes. All source code classes are prepended with an _ (underscore) and then empty classes are created for each of them so it is easy to extend every part of the classes.

Lets take for example if you would like to add a Print link to the post you would extend the empty posts.class.php in lib/ directory to something like this:

This will add a Print link after the other links (Read more, Comments). If you would like to add it before the other links just move parent::displayFunctions($row); below your link.

You can add your own code for both jCore server and client too, for the client you just have to copy over the empty class files from lib/ to your client's lib/ directory.

For help on functions that can be extend (usually all of them) please have a look at the original codes in the lib/sources/ directory. There shouldn't be any big changes in the future so you can safely build your own modifications on the current code but if there will be changes you will be notified in the news section about them so you can make the necessary changes too.

If you have any further questions please don't hesitate to write in the comments below.