For a community-supported news site we wanted the autotag tickbox to only be ticked for "regular" non-editors and on node creation.

Here's a nasty little hack I did while we experiment with the module to achieve this.

Insert on line 53 after the $checkbox value is set.

    /**
     * Custom code to only autotag for regular users,
     * on the node add page.
     * Assumes the default is unchecked 
     */
    if (arg(1) == 'add') {
      global $user;
      if ( (in_array('senior admin', $user->roles)) || (in_array('senior editor', $user->roles)) || (in_array('reporter', $user->roles)) || (in_array('copy editor', $user->roles)) ) {
      } else {
        $checkbox_default_value = 1;
      }
    }
    /****/

Comments

ken hawkins’s picture

Issue summary: View changes

typo

sdrycroft’s picture

Issue summary: View changes
Status: Postponed » Closed (works as designed)

Is it not possible to achieve this in an additional module?