Our client wanted to have more control over the privacy settings for each field on the JomSocial registration page, since by default it defaults to public.
I believe there may be plugins available to do this and we may consider developing something to achieve this shortly, although until this is available here is how to do it.
All you need to do is duplicate the template file register.profile.php placing this template either in your custom jomsocial template, or within your custom Joomla template overrides folder '{root}/templates/{customtemplate}/html/com_community'.
Then simply open up the template in your favourite editor and change line 41, which looks like this:
< ?php echo CPrivacy::getHTML( 'privacy' . $field->id, '30' ); ?>
Change this to:
< ?php echo CPrivacy::getHTML( 'privacy' . $field->id, '30' ); ?>
Note the additional parameter being passed to the function, the number 30 is for friends only, privacy settings are as follows:
- 0 = public
- 20 = site members
- 30 = friends only
- 40 = only me
Also, if you wanted to make specific fields have different settings you could do it by field ID, and your line 41 could look something like:
< ?php echo CPrivacy::getHTML( 'privacy' . $field->id, (in_array($field->id, array('1','2','3','4','5')) ? '30' : '0') ); ?>
This checks to see if the field ID ($field->id) is in the passed array (1,2,3,4), which if returns true makes the default option '30' otherwise it returns as '0', which would be friends only or public.


