UCM Blog

Latest News and Updates from the Ultimate Client Manager team

Creating your own Dashboard Widgets in the AdminLTE UCM theme

It is possible to create your own Dashboard Widgets for the new AdminLTE UCM theme with a little bit of PHP knowledge.

Have a look in the includes/plugin_theme_adminlte/dashboard_widgets/ folder. Here you will see a single file for each existing dashboard widget. Simply copy one of those files and rename it to widget_SOMETHING.php and away you go. Here is some sample PHP code for a Dashboard Widget:

https://gist.github.com/dtbaker/3f92abe32b8d813cb8a0

If you want your “Job” dashboard widget to exclude certain jobs based on name: Edit the file includes/plugin_theme_adminlte/dashboard_widgets/widget_jobs.php and change this line:

$jobs = module_job::get_jobs(array(‘completed’=>3),array(‘columns’=>’u.job_id’));

to this:

$jobs = module_job::get_jobs(array(‘completed’=>3),array(‘columns’=>’u.job_id’,’custom_where’=>” AND u.`name` NOT LIKE ‘%TEMPLATE%'”));

This will make the dashboard widget ignore any jobs that have the word “Template” in them.

dtbakerCreating your own Dashboard Widgets in the AdminLTE UCM theme
Share this post