The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (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
how to hide link
#10
sire, check the original navigation.php file. There you have <php> code for showing content only to certain groups (like showing admin dashboard only to admins)

[Image: Navigation.PNG?dl=0]

Code:
<pre>
Code:
<!-- Here goes navigation for every visitor (logged, not logged, admins, not admins... -->

<!--------------------------------------------------------------------------------------->
<?php if($user->isLoggedIn()){?>
   <!-- Here goes navigation only for logged visitors ----------------------------------->

   <!------------------------------------------------------------------------------------>
  
   <?php if (checkMenu(2,$user->data()->id)){?>
      <!-- Here goes navigation only for admins (visitors with permission level 2) ------>

      <!--------------------------------------------------------------------------------->
   <?php }?>

   <?php if (checkMenu(1,$user->data()->id)){?>
      <!-- Here goes navigation only for users (visitors with permission level 1) ------->

      <!--------------------------------------------------------------------------------->
   <?php }?>
<?php }else{?>
   <!-- Here goes navigation only for users who are not logged in ----------------------->

   <!------------------------------------------------------------------------------------>
<?php }?>
</pre>


This code should be somewhat familiar with navigation.php. Try to add yourself <ul> and <li> classes and check if you can get the navigation you want. You should only change the navigation.php file in usersc/includes folder NOT in users/includes!

Also check bootstrap navbar to see how you can easily make navigation with buttons, links, dropdown menus and combine these two codes together.
  Reply


Messages In This Thread
how to hide link - by ejaw - 07-14-2016, 12:47 PM
how to hide link - by mudmin - 07-14-2016, 01:29 PM
how to hide link - by ejaw - 07-15-2016, 10:57 AM
how to hide link - by picassoo - 10-05-2016, 04:18 AM
how to hide link - by ejaw - 11-02-2016, 01:51 PM
how to hide link - by dan - 11-07-2016, 12:39 AM
how to hide link - by sire - 03-14-2017, 10:13 PM
how to hide link - by mudmin - 03-15-2017, 04:22 AM
how to hide link - by sire - 03-19-2017, 05:37 AM
how to hide link - by JUG - 03-19-2017, 07:20 AM
how to hide link - by JUG - 03-19-2017, 07:30 AM
how to hide link - by sire - 03-19-2017, 08:14 AM
how to hide link - by JUG - 03-19-2017, 08:38 AM
how to hide link - by sire - 03-19-2017, 08:43 AM
how to hide link - by sire - 03-19-2017, 08:46 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)