FAQ Detail

Question : How to customize my copy ?

Answer :

The script contains 4 types of php files. Controllers, models, views and helpers. We didn't use any custom library. Now if you want to customize your copy then there are a set of rules. We explain them on the documentation. The rules are simple.
A) Updating Controllers :

For all controllers there are two types of file. core file and general file. As an example for a controller named "show" , there are two seperate file under ROOT/application/modules/show/controllers . They are i) show.php and ii) show_core.php . Show file extends show_core file. So if you need to change/extend any of the functions under show_core.php then simply copy it to show.php and then make the changes. On our updates we always update the core files. So in this way you changes will be untouched after updating .


B) Updating models :

Same as Controllers. See #A

C) Updating views :

There are two types of view . Admin views and front end views. Admin views are under ROOT/application/modules/admin/views directory and frontend views are under ROOT/application/modules/themes/views directory. Now if you want to modify any admin views then follow the process below

i) Updating admin views: You'll see there are two separate directories under ROOT/application/modules/admin/views named as "default" and "custom" . On our updated we always updates files within default directory. So if you need to change any view then simply copy that file with custom directory. Maintain the directory structure. Means if you want to extend default/template/dashboard_view.php then create a directory name template under custom directory and then copy that dashboard_view.php file within that. Then you can change this file. The application will automatically identify if a file is extended via custom directory or not. If it found the file within custom view then it'll load it from there, other wise it will load from the default directory.

ii  ) Updating frontend views: All the views for front end is managed as themes. Themes are located under "ROOT/application/modules/themes/views/" directory. If you want to change any view or want to make custom theme, then follow the below procedures.

Copy the default directory under "ROOT/application/modules/themes/views/"
Rename it like as you wish.(No spaces)
Edit the NEW_DIR/assets/config.xml file and change the text within <name></name> tag
Now from admin panel > menu > themes , you can find the new theme you just make. Click the active button and activate the theme.
Now you can change any views like you wish.

We will update only default theme codes for future updates. So if you make any changes to these views under default directory, they will be lost. So please follow the above process to make a theme and update the views.

D) Updating helpers : 

All the helpers for the script are located under "ROOT/system/helpers" directory. But please don't update these files if you need any changes. Extending a helper file is very much simple. Suppose you want to extend is_installed() function on dbcbase_helper.php, then make another file named as "MY_dbcbase_helper.php" under "ROOT/application/helpers" directory and write the function with same name there. This will override the original helper file. We will update the helpers under "ROOT/system/helpers" for future updates.