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.

 

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

sunnyjey
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

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.

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
3313 Posts
User info in posts
Administrator has disabled public posting

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.

sunnyjey
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

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

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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10778
Newest User:
negina4qx
Members Online:
0
Guests Online:
168

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