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

Turn off thumbnail posting?

Discussion in 'XenForo Questions and Support' started by jauburn, Nov 17, 2011.

  1. jauburn

    jauburn Well-Known Member

    With attachments that are images, some of our users accidentally post them as thumbnails when they'd rather have posted the "full image." Can we remove the thumbnail option? No one wants them.
  2. Fuhrmann

    Fuhrmann Well-Known Member

    You can edit the template attachment_editor_attachment and remove the following line:

    <input type="button" name="thumb" value="{xen:phrase thumbnail}" class="button smallButton AttachmentInserter" />
  3. jauburn

    jauburn Well-Known Member

    That didn't work. Or, more precisely, it removed the "thumbnail" button, but unless one clicks the Full Image option, the image still posts as a thumbnail.
  4. jauburn

    jauburn Well-Known Member

    I could really use some help with this because users continue to inadvertently post thumbnails on my forum, and no one wants to see anything but the full sized images. How can I remove the ability to post the thumbnails by default?
  5. Mike

    Mike XenForo Developer Staff Member

    You would need to make significant modifications to the code.
  6. jauburn

    jauburn Well-Known Member

    Can I at least change the default behavior from thumbnail to full size?
  7. Mike

    Mike XenForo Developer Staff Member

    You may be able to modify the attachment item template for this, but I'm not 100% sure - it would certainly have to be redesigned for your needs.
  8. Fuhrmann

    Fuhrmann Well-Known Member

  9. Fuhrmann

    Fuhrmann Well-Known Member

    Works for me (you have to change the core files, but...it is what you've asked):

    Open the file js/xenforo/full/attachment_editor.js. I use this file because I use Uncompressed Javascript from the full folder. If you use compressed, I really dont know if this will apply to you.

    With the file is opened, search for this:

    $attachment.attr('id', 'attachment' + e.ajaxData.attachment_id);
    Below, add this:

    //This is a image?
    if ($templateHtml.find('img').length)
    html = '<img src="' + $thumbnail.find('a').attr('href') + '" class="attachFull bbCodeImage" alt="attachFull' + $thumbnail.find('a').data('attachmentid') + '" /> ';
    var editor = XenForo.getEditorInForm($('#AttachmentUploader').closest('form'));
    editor.execCommand('mceInsertContent', false, html);
    I really do not know if this is a safe/proper way. But works for me.
  10. rafass

    rafass Well-Known Member

    Hello! after 4 years, this is still the best way to get rid the option
    "insert every image as"
    [Thumbnail] [Full image]
    and insert everything with Full image?
  11. AndyB

    AndyB Well-Known Member

Share This Page