1

I want to create a premium membership where certain groups have more features than the other. They can edit these features but the result of that feature should be visible to everyone. For example the premium member can add their own music. Regular members can't. However regular users can listen to the music of the premium member.

How do I restrict the editing of a certain Tab and it's field to a certain groups but the accessability should be public?

I'm using Joomla 2 Community Builder.

1

I assume you're referring to the fields within a tab, not the Tab itself, so you can modify the attributes of the form fields in it's model.

// One method that can be used to determine if they CAN edit
// Example for Categories, adjust for Community Builder
$canEdit    = $user->authorise('core.edit', 'com_content.category.' . $catid);

$this->form->setFieldAttribute('name', 'class', 'readonly');
$this->form->setFieldAttribute('name', 'readonly', 'true');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.