Does this module work with Imagefield DRUPAL-6--3-0
j0rd - May 2, 2009 - 17:36
| Project: | Image Annotate |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Does this module work with the latest Imagefield module. I know the API has changed a lot.
I've installed Image_Annotate and am trying to get it to work with the image.module ....with no success. I'm not able to get the "Image with annotations" handling option.
I've tested with Imagefield.module as well, to no avail.
I've also activated comments for the node-type and on the particular nodes I'm trying to get. Testing as admin so permissions are not the issue either.
If you could let me know what else I can do on my end to get this to work with the latest drupal and other contrib modules it would be appreciated. Otherwise confirm it is not currently working.
Cheers,
Jordan

#1
In function
function image_annotate_field_formatter_info() {
'image_annotate' => array('label' => t('Image with annotations'),
'field types' => array('filefield'),
'suitability callback' => 'image_annotate_handles_file',
'css' => array(drupal_get_path('module','image_annotate') .'/tag.css'),
'description' => t('Display a picture and its annotations.'),
),
field types needs to get changed to filefield instead of image. This will allow the display widget to popup and be selectable in "display fields" section of a node-type. The module appears to be broken from this point on again though.
Also I can't figure out how to get it working with image.module
#2
The module fails to add a note, because this JavaScript in tag.js
// TODO: remove these *EVIL* fixesform.attr('action', '/comment/reply/'+ image.nid); /* Evil! */
$('#image-annotate-edit-form input').attr('for', ''); /* Kicking babies evil! */
// Add the image note information to the form action on submission
form.submit(function() {
var areaFields = $('<input type="hidden" value="1" name="image-annotate"/>'+
'<input type="hidden" value="'+ editable.area.height() +'" name="image-annotate-height"/>'+
'<input type="hidden" value="'+ editable.area.width() +'" name="image-annotate-width"/>'+
'<input type="hidden" value="'+ editable.area.position().top +'" name="image-annotate-top"/>'+
'<input type="hidden" value="'+ editable.area.position().left +'" name="image-annotate-left"/>'+
'<input type="hidden" value="'+ editable.image.field +'" name="image-annotate-field"/>');
form.append(areaFields);
});
does not work.
In image_annotate.module
<?phpfunction image_annotate_comment(&$comment, $op) {
...
if (is_numeric($_POST['image-annotate']) && $_POST['image-annotate']) {
...
db_query('INSERT INTO {image_annotate} (cid, field_name, size_width, size_height, position_top, position_left) VALUES (%d, \'%s\', %d, %d, %d, %d)', $comment['cid'], $field, $width, $height, $top, $left);
}
...
?>
$_POST['image-annotate'] and the other appended hidden fields do not exist and therefore nothing is saved to the database. Could someone write a working form? Maybe the reused comment form changed.
#3
subscribe
#4
subscribe
#5
There is a new version: I used jQuery UI 1.6 (http://code.google.com/p/jquery-ui/downloads/list?can=3&q=1.6) and Image Annotate 2.1, can you confirm this still happen.
#6
I activated this module along with imagefield 3.2, and jquery UI module (with 1.6 jquery UI unzipped to jquery.ui) and I only see Image and File upload as my two options when creating a new file field in my content type. Am I missing anything?