Hi

Is there another way to add a picture to the body without clicking insert?
I don't see how a user would guess what to do.

Here are the modules I am using:
ImageAPI 6.x-1.10
ImageCache 6.x-2.0-beta12
ImageMagick 6.x-1.1
ImageField 6.x-3.10
Insert 6.x-1.1
Drupal core 6.22
PHP Version 5.2.10 (ubuntu linux)

Best Regards,
Jorge.

Comments

quicksketch’s picture

Category: feature » support

There are lots of solutions to insert images into posts. This module just provides a button to Insert. Some other solutions might be Media or IMCE modules. I don't see what's non-intuitive about an "Insert" button inserting the image, I don't plan on this module introducing any other mechanisms besides the one it was designed to accomplish.

Taesto’s picture

I am currently doing usability testing with a panel of users for a website using Insert module.

As crazy as it may sound, ALL my users upload the image, then forget to insert it in the text field.

So the image is displayed as thumbnail, but the big version of the image is missing.

It seems hard to imagine for us here on drupal.org, but most people using the internet can have problems with 1) clicking inside the textfield and 2) clicking on "Insert". People are lazy and they just click "Upload" and think it's good when they see the small thumbnail displayed. But the bigger image is not inserted yet. When they see it's not working, they get pissed, and just like that, you lost a user. They don't read the submission guidelines and don't want to invest any time in learning how it works.

I am looking for a way to automatically insert the uploaded image in the textfield.
Maybe with jquery, on event "image is uploaded", do a "onfocus" on the textfield, then simulate a userclick on the "Insert' button ?

quicksketch’s picture

You can automatically insert the image into the textarea by using jQuery's $.live() method (in 1.3 or later) to detect when a new image has been uploaded and automatically click the Insert button for your users. You could also add a Drupal.behavior to the page, which gets called automatically for you after an AJAX request like a file upload. I don't plan on changing the behavior of Insert to automatically insert the image upon upload.

Taesto’s picture

Ok thanks, I'll try that. By the way, clicking on Insert does not work if the user has not clicked at least once in the textfield where the image is to be inserted.

quicksketch’s picture

Title: Usability » Automatically insert into last textarea upon upload

By the way, clicking on Insert does not work if the user has not clicked at least once in the textfield where the image is to be inserted.

Please file a new issue for this and describe what modules you're using together that causes this problem to occur.

quicksketch’s picture

Status: Active » Closed (fixed)
cthshabel’s picture

Issue summary: View changes

I have been trying to get this working using Drupal.behavior to click insert after a file has been uploaded. It works fine, but how can we mark a file as "already-inserted"? I know I can add an "already-inserted" class via jquery to avoid inserting again if user uploads more files; however, if a user edits that document again, those "already-inserted" classes won't be present anymore. How can we indicate a file has been inserted already so if they upload more, then it won't insert all of them again?

cthshabel’s picture

Ok, figured I would update this and I know it's closed so sorry for commenting on a closed thread!

But here is the VERY basic jquery to make the insert function automatically happen. Luckily there was a "ajax-new-content" class to signal where the new content was.

Thanks anyways for such an awesome addition. EXACTLY what we needed.

/**
* Bulk Media Plupload Insert
*
*
*
*/

(function ($) {
Drupal.behaviors.bulkmediapluploadinsert = {
attach: function (context, settings) {
$("#edit-field-images .tabledrag-processed > tbody > tr.ajax-new-content.draggable").nextAll("tr").addClass('ajax-new-content'); // Add ajax new content class
$("#edit-field-images .tabledrag-processed > tbody > tr.ajax-new-content.draggable .insert-processed").once().trigger('click'); // Click insert
}
};
})(jQuery);

redhatusr’s picture

thank you cthshabel for the code. Its also working on Drupal 7 on ckeditor_insert module