The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UserSpice 4 Manual
#4
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...

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.
  Reply


Messages In This Thread
UserSpice 4 Manual - by lasan13 - 08-23-2016, 03:32 PM
UserSpice 4 Manual - by mudmin - 08-24-2016, 01:21 AM
UserSpice 4 Manual - by lasan13 - 08-24-2016, 04:37 AM
UserSpice 4 Manual - by mudmin - 08-24-2016, 12:43 PM
UserSpice 4 Manual - by lasan13 - 08-25-2016, 11:38 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)