08-24-2016, 12:43 PM
Ahh. Ok. Well changing the menu based on user level is super easy. There is a function in there (users/includes/navigation.php) called checkMenu.
When you go into the page on the dashboard to administer the permission levels, you'll notice that if you click on a level (ie Administrator) it has an ID. That id is what you need for the function. For example, there is a line of code that says...
The 2 in there means Administrator. So only administrators can see the menu links between that line and the closing }
Regarding the graphs, yeah...the file structure has changed a lot since version 3. Hopefully it won't be changing anymore.
If you want to create your own panels to go into the control panel (including graphs), just create a file
Note that's usersc not users and it will automatically be imported into your dashboard. The great thing about this is that you won't be affected by any updates (hopefully), so nothing should break.
When you go into the page on the dashboard to administer the permission levels, you'll notice that if you click on a level (ie Administrator) it has an ID. That id is what you need for the function. For example, there is a line of code that says...
Code:
<?php if (checkMenu(2,$user->data()->id)){
The 2 in there means Administrator. So only administrators can see the menu links between that line and the closing }
Regarding the graphs, yeah...the file structure has changed a lot since version 3. Hopefully it won't be changing anymore.
If you want to create your own panels to go into the control panel (including graphs), just create a file
Code:
usersc/includes/admin_panels.php
Note that's usersc not users and it will automatically be imported into your dashboard. The great thing about this is that you won't be affected by any updates (hopefully), so nothing should break.