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

Turn off thumbnail posting?

jauburn

Well-known member
#1
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.
 

Fuhrmann

Well-known member
#2
You can edit the template attachment_editor_attachment and remove the following line:

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

jauburn

Well-known member
#3
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.
 

jauburn

Well-known member
#4
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?
 

Mike

XenForo developer
Staff member
#7
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.
 

Fuhrmann

Well-known member
#9
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:

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

Code:
//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.
 

rafass

Well-known member
#10
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?