WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • How to create new admin tab ?
  • Print
Pages: [1]   Go Down

Author Topic: How to create new admin tab ?  (Read 5938 times)

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
How to create new admin tab ?
« on: April 30, 2011, 01:17:40 AM »
Hi,

I would like to add another Menu item at WB Backend (Pages, Media,Add-ons...) For example to call it Dashboard. For example: I have multilang. site with multiple news groups on different pages. Now I would like that user cannot see Pages menu and my page tree, or that user doesnt have to open each news page to add new news.. I would like to make him additional tab - Dashboard where he could add a new post to selected group, activate comments etc.. This is just a basic idea, and this could be very useful for lot of things..

Now, my concerns are how to make this. This tab for example called "Dashboard" should appear at Access-> Groups (to check on checkbox to give access for this group like: Admin tools, Pages, Media etc..) , then it must appear at top menu etc..

I have no idea how to make this ??

I created a folder called "dashboard" in admin/ folder with following code in index.php :
Code: [Select]

require('../../config.php');
require_once(WB_PATH.'/framework/class.admin.php');
$admin = new admin('Dashboard','dashboard');

// Setup template object
$template = new Template(THEME_PATH.'/templates');
$template->set_file('page', 'dashboard.htt'); <--------- with a simple html in it..
$template->set_block('page', 'main_block', 'main');

// Insert values into the template object
$template->set_var(array(
'SOMETHING' => 'Hi',
'TEST' => 'Testing this..'
)
);


// Parse template object
$template->parse('main', 'main_block', false);
$template->pparse('output', 'page');

// Print admin footer
$admin->print_footer();

but it returns "Insufficient privelliges to be here"..

Could someone point me to right direction..

cheers
Ivan
Logged
Web developer

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • How to create new admin tab ?
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2