Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » How to show a module to specific users?
How to show a module to specific users?
Re: How to show a module to specific users?
Hi sweet160,
Start with the Quick Start guide:
http://www.metamodpro.com/metamod/quick-start
Then you can use the following rule to check for username:
if ($user->username == "joe") return XXX;
if ($user->username == "bob") return YYY;
if ($user->username == "ann" or $user->username == "brenda") return ZZZ;
... replace XXX etc with the module numbers that you want to use for that user.
Hope that helps,
Stephen
Re: How to show a module to specific users?
Actually there's another way to do this, introduced recently, that can help if you have a long list of usernames that you want to give the same module.
if ($core_genius->check("userloginname = ann, brenda, charles, diane, ed, fred, geoff") ) return XXX;
if ($core_genius->check("userloginname = henry, ian, jake, kathy, liam, mary, niall") ) return YYY;
Re: How to show a module to specific users?
first of all thanks for this Module, maybe after 2 months I found a solution.
However, unfortunately I don't have any PHP knowledge..
To put it very simply, what i need is to to have a module shown depending on THE user id.
If I'm not wrong, the syntax to be used is as it follows:
if ($user->id == "63") return 40
where 63 is the user id (got it from user's panel) where 40 is the module id (set in specific 'metamodpos1', added in template's xml)
Unfortunately it is not working (Parse error: syntax error, unexpected $end in Z:\www\joomla\modules\mod_metamod\helper.php(539) : eval()'d code on line 1)
Is the sintax correct?
Can anyone send me some screens to understand the whole setup?
Thanks
- Index
- » MetaMod
- » MetaMod General Support
- » How to show a module to specific users?
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7638
- Newest User:
- moner86658
- Members Online:
- 0
- Guests Online:
- 129
- 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