1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Please provide ability to disable user tagging

Discussion in 'XenForo Suggestions' started by AndyB, Jul 18, 2013.

  1. AndyB

    AndyB Well-Known Member

    On my forum I don't want members using the new user tagging function. Please provide a master switch in the Admin CP to disable this feature completely.

    When disabled, the drop down would not be displayed after typing the @ character followed by a few characters. Also the Alert Preferences options for tagging would not be shown.
     
  2. Biker

    Biker Well-Known Member

    You can turn it off via usergroup permissions.

    tag.png
     
  3. AndyB

    AndyB Well-Known Member

    That doesn't disable the user tagging function, that only turns off the Alert function if set to zero.

    I would like to have user tagging completely disabled, no drop down, no BBCode link, no Alert Preferences.
     
  4. Biker

    Biker Well-Known Member

    Hmmm. You're right. One would think with how that permission is worded, setting it to zero would disable the feature entirely.
     
    xf_phantom likes this.
  5. Chris D

    Chris D XenForo Developer Staff Member

    Not disagreeing with the suggestion and I don't disagree with the logic of having an on off switch.

    But what I don't understand is the reason why you would want to disable it.
     
    Dan Allen likes this.
  6. Martok

    Martok Well-Known Member

    I'm curious to know why you want to disable user tagging?

    I'm not saying you're wrong to request a global option to switch it off, just interested in your reasons. My users love it on my forums. :)
     
  7. AndyB

    AndyB Well-Known Member

    Starting off a message with @joeblow makes it very difficult to follow a conversation. I don't want my members to start a post with a user tag. Instead I want them to quote the message using the Reply function. The Reply function which quotes the message is extremely important for in-depth conversations on a forum.

    The user tag is only useful for sites like Facebook which don't have a reply function.
     
  8. Jeremy

    Jeremy XenForo Moderator Staff Member

    You can turn off the @ symbol in your options, and edit out the content from the templates. If you style it the same, they'll be none the wiser. The probability of a user 'stumbling' into this is probably rather low. And if they do, it just provides access to a member card. If it doesn't alert the user, the probability of a user quoting someone to get the alert is higher than a tag.

    Turning off the functionality won't change posting habits if members decide they'd rather speak 'directly' to a person by putting their name in a post.
     
  9. Martok

    Martok Well-Known Member

    Interesting that you seem to be having users replacing the quote option with a user tag (I assume that you're running 1.2 beta/RC and this is what they are doing?) I've not found this to be the case on my forums, quotes are still being used and the user tag is generally invoked to get a user's attention or when simply referring to a user when there isn't something to quote.
     
    Amaury likes this.
  10. AndyB

    AndyB Well-Known Member

    Hi King Kovifor,

    Your suggestion doesn't disable the drop down when a member types the @ character followed by a few characters.
     
  11. AndyB

    AndyB Well-Known Member

    I don't want members doing this either because it disrupts the flow of reading when you have tags inline with the text.
     
  12. Jeremy

    Jeremy XenForo Moderator Staff Member

    AndyB, I may have mis-phrased, but as you can see over at XenAdmins, we've disabled the @ symbol before a tag, so it won't disrupt it. It won't disable the drop down, but really, how often will someone type "@" in a post. There's also a slight delay in the @ drop down appearing, so it may even not even be noticed.

    ACP -> Options -> User Alerts -> [ ] Keep the @ character with user tagging
     
    Last edited: Jul 18, 2013
  13. xf_phantom

    xf_phantom Well-Known Member

    yea, the @ is hardcoded in the javascript file and there's no option to deactivate it..:(

    i've just removed the call of initAutocomplete in the bb_code_edit.js file
     
  14. AndyB

    AndyB Well-Known Member

    Hi xf_phantom,

    Would you be so kind as to share how you disabled the initAutocomplete in the bb_code_edit.js file.
     
    Last edited: Jul 18, 2013
  15. AndyB

    AndyB Well-Known Member

    It's not about someone typing the @ symbol by accident, but on purpose.
     
  16. xf_phantom

    xf_phantom Well-Known Member

    I've created a new option (enableUserTagging), created a new event listener for event editor_setup (could be probably done via the Template Modification System too, to avoid the extra event listener)
    PHP:
    $editorOptions['json']['usertagging'] = XenForo_Application::getOptions()->enableUserTagging;
    and this is the change in the js file
    HTML:
    if (this.options.usertagging){
                    this.initAutoComplete();
    }
    
     
    Last edited: Jul 18, 2013
    AlexT likes this.
  17. AndyB

    AndyB Well-Known Member

    Hi xf_phantom,

    Thank you for sharing your knowledge. I'm afraid my level of understanding this type of coding is not there yet. Please tell me if the following is correct:

    1) Your modification disables the drop down when the @ character is typed followed by a few characters.
    2) You modified two files to do this.

    If these two assumptions are correct, it would be great if you could explain which files were modified and where to place the code.

    Thank you.
     
  18. xf_phantom

    xf_phantom Well-Known Member

    Wouldn't
    Code:
    XenForo.BbCodeWysiwygEditor.prototype.initAutoComplete = function(){};
    work work too?

    Any JS Experts here?:D
     
  19. xf_phantom

    xf_phantom Well-Known Member

    If you want, you could try this addon (just 1 template edit)
    no extra events and no xenforo core filechange:)
     

    Attached Files:

    AndyB likes this.
  20. AndyB

    AndyB Well-Known Member

    That works perfectly, xf_phantom. Thank you kindly.

    Your one line template modification disables the user tagging function.

    I prefer to add the code to the editor_js_setup template directly and here's what I did.

    Code:
    <xen:require js="js/redactor/redactor.js" />
    <xen:require js="js/xenforo/bb_code_edit.js" />
    <xen:require css="editor_ui.css" />
    
    <script>
    /* added code to disable user tagging */
    XenForo.BbCodeWysiwygEditor.prototype.initAutoComplete = function(){};
    
    if (typeof RELANG === 'undefined')
    {
       var RELANG = {};
    }
    
    RELANG.xf = {
       image: "{xen:jsescape {xen:phrase image}}",
       link: "{xen:jsescape {xen:phrase link}}",
       link_insert: "{xen:jsescape {xen:phrase link}}",
       unlink: "{xen:jsescape {xen:phrase unlink}}",
       quote: "{xen:jsescape {xen:phrase quote}}",
       code: "{xen:jsescape {xen:phrase code}}",
       bold: "{xen:jsescape {xen:phrase bold_ctrl_b}}",
       italic: "{xen:jsescape {xen:phrase italic_ctrl_i}}",
       fontcolor: "{xen:jsescape {xen:phrase text_color}}",
       unorderedlist: "{xen:jsescape {xen:phrase unordered_list}}",
       orderedlist: "{xen:jsescape {xen:phrase ordered_list}}",
       outdent: "{xen:jsescape {xen:phrase outdent}}",
       indent: "{xen:jsescape {xen:phrase indent}}",
       none: "{xen:jsescape {xen:phrase none}}",
       align_left:   "{xen:jsescape {xen:phrase align_left}}",
       align_center: "{xen:jsescape {xen:phrase align_center}}",
       align_right: "{xen:jsescape {xen:phrase align_right}}",
       deleted: "{xen:jsescape {xen:phrase strike_through}}",
       underline: "{xen:jsescape {xen:phrase underline_ctrl_u}}",
       alignment: "{xen:jsescape {xen:phrase alignment}}",
       undo: "{xen:jsescape {xen:phrase undo_ctrl_z}}",
       redo: "{xen:jsescape {xen:phrase redo_ctrl_y}}",
    
       remove_formatting: "{xen:jsescape {xen:phrase remove_formatting}}",
       font_size: "{xen:jsescape {xen:phrase font_size}}",
       font_family: "{xen:jsescape {xen:phrase font_family}}",
       smilies: "{xen:jsescape {xen:phrase smilies}}",
       media: "{xen:jsescape {xen:phrase media}}",
      
       drafts: "{xen:jsescape {xen:phrase drafts}}",
       save_draft: "{xen:jsescape {xen:phrase save_draft}}",
       delete_draft: "{xen:jsescape {xen:phrase delete_draft}}",
       draft_saved: "{xen:jsescape {xen:phrase draft_saved}}",
       draft_deleted: "{xen:jsescape {xen:phrase draft_deleted}}",
    
       switch_mode_bb: "{xen:jsescape {xen:phrase use_bb_code_editor}}",
       switch_mode_rich: "{xen:jsescape {xen:phrase use_rich_text_editor}}",
      
       reply_placeholder: "{xen:jsescape {xen:phrase reply_placeholder}}",
      
       drop_files_here_to_upload: "{xen:jsescape {xen:phrase drop_files_here_to_upload}}",
       uploads_are_not_available: "{xen:jsescape {xen:phrase uploads_are_not_available}}"
    };
    </script>
    
     

Share This Page