Happy to share a modification to this mod (used on 1.1.13, I might provide the changes for 2.0 later). I was upset with the permission system being if it is ON then you can delete and add, so I setup another permission where the original is changed to delete, and my new one is add only. you must have both on to do both.
function AddTag()
{
global $context, $txt, $mbname, $db_prefix, $ID_MEMBER;
// Get the Topic
$topic = (int) $_REQUEST['topic'];
if (empty($topic))
fatal_error($txt['smftags_err_notopic'],false);
// Check permission
$a_manage = allowedTo('smftags_manage');
function AddTag()
{
global $context, $txt, $mbname, $db_prefix, $ID_MEMBER;
// Get the Topic
$topic = (int) $_REQUEST['topic'];
if (empty($topic))
fatal_error($txt['smftags_err_notopic'],false);
// Check permission
$a_manage = allowedTo('smftags_manage_add');
$txt['permissionname_smftags_manage'] = 'Manage Tags';
$txt['permissionhelp_smftags_manage'] = 'Users can modify the tag settings and add and remove tags';
$txt['cannot_smftags_manage'] = 'You are not allowed to manage tags.';$txt['permissionname_smftags_manage'] = 'Manage Tags';
$txt['permissionhelp_smftags_manage'] = 'Users can modify the tag settings and add and remove tags';
$txt['cannot_smftags_manage'] = 'You are not allowed to manage tags.';
$txt['permissionname_smftags_manage_add'] = 'Add Tags';
$txt['permissionhelp_smftags_manage_add'] = 'Users can add tags';
$txt['cannot_smftags_manage_add'] = 'You are not allowed to add tags.';do the above with utf8 if you must.
'smftags_manage' => false'smftags_manage' => false
'smftags_manage_add' => false
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a> if(!$context['user']['is_guest'] && allowedTo('smftags_manage'))
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_manage_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
most importantly this does not allow the creation of tags on new topics, unless with permission:
//Tagging system Mod
if(!isset($context['num_replies'])) //Tagging system Mod
if(!isset($context['num_replies']))
if(!$context['user']['is_guest'] && allowedTo('smftags_manage_add'))