Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Oh dear it's not working

Oh dear it's not working

Using Joomla 1.5.14 with a Rockettheme template (Rokwebify)
I'm not a php expert - but have tried my best with the code. I want each logged in user to have their own custom usermenu. I created a menu (id 95) for user 'trial1'. Then I inserted this code into metamod:

// if ($user->username != "trial1")
return 95;


(where 95 is the item id of trial1's user menu).
Metamod displays, but it displays on all other users' menus as well.

I've assigned menu item 95 to display on 'NONE' of the pages, and the metmod module to display on "ALL' of the pages. I've also set both modules as 'registered'.
DO you have any clue as to what I might be missing?

heidi239
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Oh dear it's not working

Hi Heidi,

I think this will help:

1 - turn OFF the title display in the MetaMod. Otherwise you get the title appearing on all of the other pages.
2 - the rule should not have the "//" in front of it. When you put that, the line gets ignored by PHP. The "//" was just there in the original example so that PHP would ignore it :-)

Once you have removed the "//", then the "return 95;" will only be executed when the previous line is executed and succeeds.

Hope that helps,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1686
Total Polls:
6
Total Posts:
5940
Total Posts Today:
1
User Info:
 
Total Users:
5198
Newest User:
Paramountdental
Members Online:
0
Guests Online:
115

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked