Hi,
When trying to understand how to make custom members, I've discovered this in the code of the forum module...
--- line 72 > 87 of ForumRole.php ---
function FirstNamePublic() {
return $this->owner->FirstNamePublic || Permission::check('ADMIN');
}
function SurnamePublic() {
return $this->owner->SurnamePublic || Permission::check('ADMIN');
}
function OccupationPublic() {
return $this->owner->OccupationPublic || Permission::check('ADMIN');
}
...
---
Well, it seems to me that it would be much simpler if we simply had :
function isPublic($field) {
$prop = $field.'Public' ;
return $this->owner->$prop || Permission::check('ADMIN') ;
}
and changing in the template "ForumMemberProfile_Show" any <% if Control 'Tag'Public %> occurrence by <% if Control isPublic(Tag) %>
by doing this, it gets easier to extend if it needs to have more custom fields.