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.

 

Show module depending on field Community builder

Show module depending on field Community builder

Hello,

I want to show (or not) a module based on a field of Community builder (let's say profession). 
I found this: http://www.metamodpro.com/metamod/recip … lder-pages, looks what i need, but itsnot working (yes i replaced the #_ for the databasefield).

Can you help me with working code (latest versions of Joomla, CB, Metamod).

Regards Michel

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

Re: Show module depending on field Community builder

Hi Michel,

in Joomla 3.4 (and some previous versions) the database escape method has changed its name. Therefore replace this line from the example code:

$user_id = $db->getEscaped((int)($user->id));

With this simplified line:

$user_id = (int)($user->id);

The rest of it still works fine (I just installed the latest CB version to test). Keep the #_ part which gets automatically substituted for the correct database table prefix.

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

Re: Show module depending on field Community builder

Yes, it's working, thanks for the quick support!

Regards Michel

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

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
3
User Info:
 
Total Users:
4388
Newest User:
wilmer7878
Members Online:
2
Guests Online:
147


Forum Legend:

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