Keyword

Prevent users from creating new tags in Free tagging (with auto complete) mode? (SOLVED)

  • Manos
  • Manos's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 weeks ago #88142 by Manos
Hi,How can I prevent users from creating new tags in Free tagging (with auto complete) mode?Thanks,Manos

Please Log in or Create an account to join the conversation.

  • Manos
  • Manos's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 11 months ago #88143 by Manos
Hi,

I found the solution. I have disabled the new tags creation from all user levels before Administrators, in other words, the only users that are allowed to create new tags are the Administrators and the Super Administrators.
Here's how you do it:
You need to change the file administrator/components/com_k2/models/tag.php at line 68.
The current line looks like this:
if($user->gid<24 && $params->get('lockTags'))
JError::raiseError(403, JText::_("ALERTNOTAUTH"));

Modification (Notice that I am keeping the previous line as a comment.):
// The following change prevents users with less than administrator level access to create tags. 02/09/2010 by Manos
// if($user->gid<24 && $params->get('lockTags'))
if($user->gid<24)
JError::raiseError(403, JText::_("ALERTNOTAUTH"));

I hope this will help someone, because it gave me a big headache for over a month. :D

For those that it’s hard to perform the “operation” I attach the revised file. Just copy it to directory administrator/components/com_k2/models.
The file is from version K2 v2.4.1.

Take care,

Manos

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum