Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Display Module only to CB Profile owner
Display Module only to CB Profile owner
Display Module only to CB Profile owner
Hello I would like to knw whether it is possible to display ONLY on the Page of Profile owner of Community builder? The module should not display while browing other members profile.
For eg i want to display 'friends birthday module' so it should be visible only on my CB Profile page. It should disappear if I view other members profile
I really need this functionality.
Thank you
Re: Display Module only to CB Profile owner
You say you want to display "friends birthday module". Does that mean that it has to detect the birthday of one (or all) of your friends? Or your own birthday?
In any case, the general code for detecting if you are on your own profile page instead of someone else's would be this:
Code:
if ($option == "com_comprofiler") {
$task = JRequest::getVar('task');
if ($task == 'userDetails' or $task == 'userProfile' or $task == 'manageConnections' or $task == '') {
$user_from_url = JRequest::getInt('user',0);
if ($user_from_url == 0 or $user_from_url == $user->id) return 101;
}
}
I think that does what you want - only includes module 101 when you are logged in and on your "own" profile page.
Re: Display Module only to CB Profile owner
Millions Thanks to you! This has open infinite possibilities.
I could show various modules like birthday Alert, Network suggest because of this.
At present i am using Module to plugin commercial joomla extension to load modules in my cb profiles.
I wish the Metamod come with new CB Plugin where any Modules can be loaded directly into CB Profile with all added inherit features of Metamod.
thank you once again.
Re: Display Module only to CB Profile owner
I hear you! I'm prototyping some ways to incorporate these sorts of rules into MetaMod without cluttering up the interface. It's challenging.
Best regards,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Display Module only to CB Profile owner
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Posts this week:
- 2
- User Info:
- Total Users:
- 7642
- Newest User:
- mary26
- Members Online:
- 0
- Guests Online:
- 193
- 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