Admin Dashboard

edited June 2014 in Modules
Hi. I created module which has admin approval system..If a user submits a post, it will be published after admin approves it, so i need to set notification to admin whenever he logs in to dashboard.How can i set notification in dashboard..

Below code won't work..

$this->fuel->admin->set_notification('New post pending');

Comments

  • edited 3:17PM
    The dashboard area of FUEL is controlled by the 'dashboards' configuration parameter which you can set in the fuel/application/config/MY_fuel.php file. By default, it pulls in the dashboard from fuel. To create a dashboard, you will need to create an advanced module with a controller that returns a view. FUEL will ajax in it's contents. So for example, you could create an advanced module using the generate command line tool:
    php index.php fuel/generate/advanced my_module
    More here on advanced modules and generating them:
    http://docs.getfuelcms.com/modules/advanced
    http://docs.getfuelcms.com/modules/generate

    Then in your newly generated fuel/modules/my_module/controllers/ folder, add a "dashboard" controller. As an example, you can look in the fuel/modules/fuel/controllers/dashboard.php file.

    Then add this to your MY_fuel.php file:
    // dashboard modules to include $config['dashboards'] = array('my_module', 'fuel');
Sign In or Register to comment.