This is an excellent module. Meets my requirements perfectly. Just one thing..how do I hide the rep tag drop down option from people who have not been assigned any permission to manage or administrate rep tag. They can see all the code entered in the rep tag module even when they have apparently no permission assigned. Thanks.

Comments

pete-drupal’s picture

Version: 5.x-1.8 » 5.x-1.10
Component: Code » Installation / Configuration

Excellent module indeed!

You seem to assume that only authorized admin users of the reptag module should have access to the reptag help section.

In fact it is my understanding that (authorized) reptag admin users define the tags, but any user who is authorized to create/edit nodes/comments is potentially able to use tags and add them to their text fields and should therefore have access to the reptag help section.

Access control is in fact even more advanced, since it can be controlled on a reptag module by module basis, and for each content field of any custom content type (CCK).

From a quick code inspection (source: reptag.module, function reptag_form_alter), it seems that the field set containing online help can be hidden on node / comment forms by unchecking one or more of the following settings:

General settings (go to Home » Administer » Site configuration » Rep[lacement]Tags » Settings » General)

  • UNcheck the admin general setting "Enable Rep[lacement]Tags"
  • UNcheck the admin general setting "Show 'Rep[lacement]Tags - Help' section on add/edit node pages"
  • UNcheck the admin general setting "Enable RepTag-Support for comments" (only displayed if the comments module is enabled)

Alternatively, the help section can also be disabled on a per node type basis, but I have not found a place in the admin pages where this can be set, so setting the variable programmatically might be the only option (add this in your custom module):

  • variable_set('reptag_type_disable_<mynodetype>', 1); where <mynodetype> is one of the supported node types defined in the database table 'node_type'

There doesn't seem to be a way to hide the help section based on user role, but it should not be too complex to patch the reptag module and define a new user access permission which would allow only selected roles to view the help section.

Suggestion for future improvement: I believe the display of the help section could be further optimized as follows: if a create/edit node form contains only content fields for which reptag is disabled, then the help section could be hidden, since it would be useless in this context.

dman’s picture

Status: Active » Closed (works as designed)

That sounds like an accurate explanation.
Admins can DEFINE reptags
Users that can use input formats for which reptag is enabled can USE reptag expressions. And see the documentation for what they can use.
More granularity is POSSIBLE but more complex than is currently imagined.