Welcome, Guest. Please login or register.
Did you miss your activation email?
February 13, 2012, 03:34:57 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149700 Posts in 21103 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: How to create new admin tab ?  (Read 806 times)
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1680



« on: April 30, 2011, 12: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:

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

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!