Permissions based menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jgreeno
Beginner
Beginner
Posts: 2
Joined: Wed Jan 16, 2008 4:13 pm

Permissions based menu

Post by jgreeno »

I have a need to display certain menus to certain people based on a grouping scheme within my site.
I use PHP to output the call the JS and I need the PHP to structure my permissions.
Basically this is the layout I need:

Code: Select all

// Show everyone this menu
$menu[]="<script type=\"text/javascript\" src=\"js/milonic_src.js\"></script>";
$menu[]="<script type=\"text/javascript\" src=\"js/mmenudom.js\"></script>";
$menu[]="<script type=\"text/javascript\" src=\"js/alluser_menu_data.js\"></script>";

// Show bob his own menu along with the all user menu
if(user="bob"){
 $menu[]="<script type=\"text/javascript\" src=\"js/milonic_src.js\"></script>";
 $menu[]="<script type=\"text/javascript\" src=\"js/mmenudom.js\"></script>";
 $menu[]="<script type=\"text/javascript\" src=\"js/bob_menu_data.js\"></script>";
}

// Show bob his own menu along with the all user menu but not bob's menu
if(user="dave"){
 $menu[]="<script type=\"text/javascript\" src=\"js/milonic_src.js\"></script>";
 $menu[]="<script type=\"text/javascript\" src=\"js/mmenudom.js\"></script>";
 $menu[]="<script type=\"text/javascript\" src=\"js/bob_menu_data.js\"></script>";
}
When I write my code like that I get nothing, no menu at all.. So, how can I get multiple menus onto the page simultaneously?

Thanks,

Justin
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Permissions based menu

Post by Ruth »

Hi,

I'm sorry, but you'll have to contact Milonic directly. There isn't any volunteer on the forum now that knows things like cookie and js functions and such. I do know that there have been posts and solutions about using cookies and also other ways to do things like get special menus.

viewtopic.php?p=13544#p13544

viewtopic.php?p=33682#33682

viewtopic.php?p=32723#32723

viewtopic.php?p=37758#p37758

viewtopic.php?p=13946#p13946

To contact Milonic you would go to the main site http://milonic.com/

Also, if you have a professional or above license with current support you can click the Tech Support text link at the bottom

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Permissions based menu

Post by Ruth »

Also, have you considered using the php menu, or changing your menu_data.js file to menu_data.php. I know this site uses menu_data.php And if you have any kind of php statements you need to have that ending since it would then process the data file through the php processor or whatever it is called.

Ruth
jgreeno
Beginner
Beginner
Posts: 2
Joined: Wed Jan 16, 2008 4:13 pm

Re: Permissions based menu

Post by jgreeno »

I tried changing it to menu_data.php and coding an if statement but it never evaluated correctly.. At any rate, after separating the menu into different parts, it works great.. I was even able to integrate the styling into my site's current style set.

What's funny is, I searched for a DHTML/JS menu solution for months and after many failed attempts, I just happened across Milonic.
After about 7 hours of coding and testing, I was able to put the menu into production and it works beautifully..
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Permissions based menu

Post by Ruth »

Well, I really like this menu, it's why I volunteer on the forum. It really is very easy to use and you can design it in so many ways.

I'm sure there is an easy way to do this, I just don't happen to have the knowledge. If you are a professional license or above user I suggest you fill out a support ticket at http://milonic.com/support/ You have to be logged in under the name used when you purchased the menu.

Ruth
Post Reply