Add text annotations to your images like on Flickr. Pretty cool.
This plugin is a port from the cpg1.4.x plugin 'Flickr style image annotations (http://forum.coppermine-gallery.net/index.php/topic,41715.0.html)' created by Nibbler.
I fixed some bugs and added a new meta album 'lastnotes'. There is also a button which deletes orphaned entries (the annotations won't be deleted when you delete files).
Download: http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/cpg1.5.x_plugin_annotate_v2.11.zip/download
Subversion access
This plugin resides in the subversion repository as well. Advanced users who know their way around in subversion are welcome and encouraged to take a look at the most recent version of this plugin that is available through SVN access exclusively. Please understand though that the usage of the subversion repository itself is beyond the scope of support on the coppermine support board - if you have questions how to use subversion, take a look at the documentation that comes with cpg1.5.x, section "Subversion (http://documentation.coppermine-gallery.net/en/dev_subversion.htm)" for a start. The "official" releases of this plugin often lag behind in version count and features behind what is in the subversion repository. For subversion web access try http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/annotate/. To check out using your local subversion client, use https://coppermine.svn.sourceforge.net/svnroot/coppermine/branches/cpg1.5.x/plugins/annotate/.
Coder / Contributor discussion only: Code suggestion discussion in a separate thread "annotate plugin for cpg1.5.x: use less queries (http://forum.coppermine-gallery.net/index.php/topic,62908.0.html)" (not accessible for all).
Version 2.4 fixes a bug (typo) that prevented adding new annotations.
Version 2.6 takes care of the new meta album validation (http://forum.coppermine-gallery.net/index.php/topic,63977.msg318086.html#msg318086).
Version 2.7 visually integrates to the new file menu (buttonlist).
I know it was talked about briefly in the 1.4x version thread; but is there any (simple) way to add annotations to the gallery-wide search?
I'd love to use this to tag family photo albums, then search for those people in photos.
Currently there is no real search. But there is a meta album 'shownotes', which can be accessed from every annotation.
I created a custom search form, which fits the needs of my personal gallery. It contains a list of all different annotations and you can search for pictures where you tagged person 1 AND person 2. I'm not sure if it's possible to extend the built-in in that way. Alternatively the custom search form could be added to this plugin if desired.
Is it possible to add the option to allow user by group permission to add/edit/delete any image in the gallery instead of just their own?
Isn't this option already built-in?
Users only have the option to adjust their own posts. It would be nice to allow a registered user to comment directly on someone else's images. I am sure that some boards would rather only allow the user the ability annotate on their own so it would be best to have an option in the permissions configuration screen to check off it that are allowed global or local permission. As admin I have the ability to add/edit/delete any annotations and that is what I would like all of my registered users to have too. Thank you for the time. Even a code hack at this time would be great if possible.
Quote from: paintblr on April 13, 2010, 07:19:25 PM
As admin I have the ability to add/edit/delete any annotations and that is what I would like all of my registered users to have too.
That's already possible. Just set it accordingly on the plugin config page.
I hate to disagree, but I disagree. ;D
The settings are set identical for admin as registered users and I can add/edit/delete any images as admin, but registed users can only add/edit/delete from their own images. Feel free to test in my gallery I will set the global registration password to "test" for the next few hours and this is the gallery link http://www.granbycameraclub.com/gallery (http://www.granbycameraclub.com/gallery).
Please provide a test account.
We certainly won't go through registration just to be able to support you ::)
Is there a way that I can PM you a password? I would be happy to create a test account.
No. The PM system has been disabled. Please post user name and password in this thread.
username = test
password = test
Please change the password after you login so that it does not get flooded. Thanks!
I can confirm your issue and have tracked it down to r7306. I'll fix it and release a new version asap.
Version 2.8 should fix your issue.
Again it would be best to allow admin to assign global or local permissions to each group for that.
PS. I tested with IE7 and IE8 and it did not work for add, edit, or delete. Just an FYI if not tested yet.
The test account doesn't work anymore. I've tested in on my local testbed and the buttons will be displayed for your own and pictures from other users. What exactly does not work for you?
A config setting could be added later, if your actual issue is fixed.
I just tested with Firefox and it is working like "I" want it to. I think that other's would rather you have the option of only allowing annotating on the user submitted images. GREAT thank you to you for your time and VERY quick responses.
I deleted the test account because you never changed the password as I requested and it left our gallery open for spam attack. <-- Not meant to me mean at all, just a fact.
The issue with IE7 and IE8 are that you cannot see the annotations on the image or add/edit/delete them. The button for annotate is there, but does not do anything. I tested both IE7 and IE8 with both XP home and XP PRO. For now I can just tell my users if they want that function they need to use Firefox, but I thought that you would want to know about it and it would be great it Firefox was not required. Please note that I have not tested with other browsers, but these are the leaders so I only tested with them.
IE issue should be fixed with version 2.9. Please confirm.
Darn you Andre' .. If I could get the people that work for me to work as fast and good as you I would be a happy man. IE8 checks out fine now. Thank you!!!!
Here is just another suggestion. Could we give the user the option to turn off "allow annotations" for individual images or albums even? I would prefer the default to be allow equals yes and let them turn it off if needed.
One minute later and another suggestion. Can we add a hyperlink like "Most viewed" and "Top rated" that would filter to just show annotated images in the gallery?
Quote from: paintblr on April 15, 2010, 06:11:19 PM
Can we add a hyperlink like "Most viewed" and "Top rated" that would filter to just show annotated images in the gallery?
Meta album 'lastnotes' already exists. I'll think about your other suggestions later.
So sorry. I do not see it in my gallery and I assume that I need to activate it to get it to show up. Any advice?
You have to add the link manually to your gallery. Currently there is no option to add it automatically to your gallery. Maybe it will be added later. You can access it here: http://www.granbycameraclub.com/gallery/thumbnails.php?album=lastnotes
Have an issue installing this plugin on http://www.sk-foto.info with PHP4.
QuoteParse error: syntax error, unexpected '(', expecting '}' in /var/www/SoMeThInG/html/coppermine/plugins/annotate/codebase.php on line 83
installs fine with PHP5
Attached updated plugin in initial post.
Installes well with PHP4.
But my be i am to stupid to annotate any of the pictures...
Please check the annotation permissions for your user group. You currently only have an (empty) list. You need to enable free text annotations in the first place to build the list and then switch back to e.g. list-only.
many thanks!
works now :)
Quote from: Αndré on April 14, 2010, 04:01:43 PM
Version 2.8 should fix your issue.
I've installed 2.10 version but I got the same problem: as administrator I see annotate button and annotations but as registered user I see nothing (neither buttons nor text!) My configuration as attachment...
can you help me?
Please post a link to your gallery and a test user (non-admin) account.
Quote from: Αndré on November 01, 2010, 02:38:55 PM
Please post a link to your gallery and a test user (non-admin) account.
Sorry mate but I don't understand what you could check using a non admin account. You have to believe me ! :-) Anyway, i had a look at the codebase.php module and force "annotate" to all registered users in order they can annotate any picture, owned or not. Like Flicker, I think these notes are very useful for commenting part of pictures. I did this changes
function annotate_get_level($what) {
global $CONFIG, $cpg_udb;
// Admin always have the highest permission
if ($what == "permissions" && GALLERY_ADMIN_MODE) {
return 3;
}
else
Return 2;
----
----
----
and it seems to work fine because all users has its annotate button and are be able to leave annotations about any picture. Only one question : returning 2 could be "dangerous" for the other annotations ? I've checked and doesn't seem but could be better you opinion ! ::)
Beautiful tool !
Sorry, but I cannot support individual mods. Instead I'd like to figure out why the plugin doesn't work as expected for you.
Quote from: Αndré on November 01, 2010, 06:40:19 PM
Sorry, but I cannot support individual mods. Instead I'd like to figure out why the plugin doesn't work as expected for you.
I told you Andre: As administrator I can make annotations everywhere but not as a registered user (only works on owned pictures). That was my question ! :-) Thank you anyway.
Quote from: willy2010 on November 01, 2010, 06:53:07 PM
not as a registered user (only works on owned pictures)
Just tested. As regular user I can add annotations to pictures from other users (the admin in my case). If you don't want to post a link you're on your own.
russian
Quote from: MISHA on November 11, 2010, 09:47:00 PM
russian
Here is the full Russian translation of this plugin.
Based on
MISHA.
A lot of changes by
Makc666.
Thanks for your contributions. Added Russian language file in r8034.
Upgrading from CPG 1.4.x
This might just be from my experience but I couldn't get the meta album working earlier as it was returning a critical error:
While executing query 'SELECT *, user_time AS msg_date
...
It turns out when upgrading from the cpg1.4.x version there was no user_time column so I had to add that manually to the database. Just pointing this out incase other users have the same trouble.
On a side note, I added a preview of the annotation on the "Last annotations" page so it is similar to last comments. It might be worthwhile to have this in the mod if you get a chance to implement it. Example:
http://www.pftq.com/gallery/thumbnails.php?album=lastnotes
Some Suggested Fixes:
These were some changes I had implemented in my copy of the CPG 1.4.x version.
The below fixes the flickering boxes when the mouse moves over the picture. Edit in lib/photonotes.js
Replace:
this.container.DisableAllNotes();
this.EnableNote();
with
this.container.DisableAllNotes();
//this.EnableNote(); **pftq // No need to flicker every hover
Replace:
if(!this.container.editing && this.editable) /* nibbler */
{
this.ShowNoteText();
with
if(!this.container.editing && this.editable) /* nibbler */
{
this.ShowNoteText();
this.EnableNote(); /* pftq */ // Place here so only flicker when editing
Replace:
editable: true /* nibbler */
with
highlighted: false, /* pftq */
editable: true /* nibbler */
Replace:
this.HideNoteText();
with
this.HideNoteText();
this.highlighted= false; /* pftq */
Some other problems I've run into that I haven't been able to resolve:
When annotating, the buttons for "Save", "Cancel", etc all have "null" prepended so that they show up as "nullSave".
You can login as 'test' with password 'test' if you want to check on my gallery:
http://www.pftq.com/gallery/
I'm also unable to give regular members permission to annotate. I think it might be due to the SMF bridge, and the solution posted by willy2010 on the last page seems to work, except I only added it for registered users as so:
if(USER_ID) return 2;
This might be related as well but I'm unable to view annotations from non-admin users (both admin and test account). I'll update this thread if I figure out why that might be. All user permissions are RWD, so I don't think that should be the issue.
Yay, I've fixed the notes not showing for non-Admins. It was indeed a bridging problem. :)
For the codebase.php, find:
$sql = "SELECT n.*, u.user_name FROM {$CONFIG['TABLE_PREFIX']}plugin_annotate n INNER JOIN {$CONFIG['TABLE_USERS']} u ON n.user_id = u.user_id WHERE n.pid = {$data['pid']}";
$result = cpg_db_query($sql);
$notes = array();
while ($row = mysql_fetch_assoc($result)) {
//$row['note'] = addslashes($row['note']);
$notes[] = $row;
}
and replace with
// pftq: Don't include the CPG user table; bridges don't use it
$sql = "SELECT * FROM {$CONFIG['TABLE_PREFIX']}plugin_annotate WHERE pid = {$data['pid']}";
$result = cpg_db_query($sql);
$notes = array();
while ($row = mysql_fetch_assoc($result)) {
//$row['note'] = addslashes($row['note']);
$row['user_name']=get_username($row['user_id']); // pftq: Let CPG find the username, works with bridges
$notes[] = $row;
}
Still have to figure out why I'm getting "nullSave", "nullDelete" etc though. :D
Fixed the "null..." issue. I had menu icons disabled for my gallery via Config > Themes.
The plugin actually accounts for this but for whatever reason, there's a block of code outside the condition:
$annotate_icon_array['announcement'] = cpg_fetch_icon('announcement', 1);
$annotate_icon_array['configure'] = cpg_fetch_icon('config', 1);
$annotate_icon_array['update_database'] = cpg_fetch_icon('update_database', 1);
$annotate_icon_array['import'] = cpg_fetch_icon('download', 1);
$annotate_icon_array['manage'] = cpg_fetch_icon('edit', 1);
$annotate_icon_array['ok'] = cpg_fetch_icon('ok', 2);
$annotate_icon_array['cancel'] = cpg_fetch_icon('cancel', 2);
$annotate_icon_array['delete'] = cpg_fetch_icon('delete', 2);
This should be moved inside the brackets for
if ($CONFIG['enable_menu_icons'] == 2) {
and then copy this into the else clause
$annotate_icon_array['announcement'] = '';
$annotate_icon_array['configure'] = '';
$annotate_icon_array['update_database'] = '';
$annotate_icon_array['import'] = '';
$annotate_icon_array['manage'] = '';
$annotate_icon_array['ok'] = '';
$annotate_icon_array['cancel'] = '';
$annotate_icon_array['delete'] = '';
I also managed to get the textbox to wrap beneath the annotations if there isn't enough room going out to the side. Might be just me, but the annotations too close to the right tended to go off screen. The changes below solve it. You can see how it works here:
http://www.pftq.com/gallery/displayimage.php?pid=3044
(the annotation to the far right wraps down instead)
The code is a bit long though:
In lib/photonotes.js
Replace the last couple lines of 'PhotoNote.prototype.PositionNote = function()' with:
// pftq: Wrap to bottom, not extend off-screen
var noteX = this.rect.left + this.YOffset + this.rect.width;
var noteY = this.rect.top - 4;
if(noteX+3*this.rect.width>this.maxRight) {
if(noteX+2*this.rect.width<this.maxRight) {
//this.gui.ElementNote.style.width=(this.rect.width*2-this.YOffset)+'px';
}
else if(noteX+this.rect.width-this.YOffset<this.maxRight&&
this.maxRight-noteX>30) {
//this.gui.ElementNote.style.width=this.maxRight-noteX-this.YOffset+'px';
}
else {
var noteWidth=this.rect.width*2;
if(noteWidth>this.maxRight/2)
noteWidth=this.rect.width;
if(noteWidth>this.maxRight/2) noteWidth=this.maxRight/2;
while(noteWidth<50) noteWidth=50;
noteX= this.rect.left + this.YOffset*2 + (this.rect.width-noteWidth)/2;
if(noteX+noteWidth>this.maxRight)
noteX = this.maxRight - noteWidth-this.YOffset;
if(noteX<0) noteX=0;
noteY = this.rect.top + this.rect.height + this.YOffset/2;
//this.gui.ElementNote.style.width=noteWidth+'px';
}
}
this.gui.ElementNote.style.left = noteX + 'px';
this.gui.ElementNote.style.top = noteY + 'px';
Change 'function PhotoNote(text,id,rect,annotator_name,annotator_id)' to
function PhotoNote(text,id,rect,annotator_name,annotator_id, maxRight)
Add above 'editable: true /* nibbler */' :
maxRight:maxRight, /* pftq */
Then in codebase.php, just add an extra $container_width argument to the following function calls:
var note = new PhotoNote(annotations[n].note, 'note' + n,...
var newNote = new PhotoNote(note_text, 'note' + n, new PhotoNoteRe...
Eh - sorry for all the code. :D I didn't expect to change so much of it, but I hope someone finds it useful. :)
Text not wrapping is a problem indeed for those with small screens, like on a laptop. On my 21" or 19" monitor, no problem at all, lots of space for the annotation text to show even if it is at the rightmost of the picture. It still is better if it can wrap within the image frame and not go past. Good idea to fix this.
However, I checked your link, http://www.pftq.com/gallery/displayimage.php?pid=3044, and "Waste Ink Tubing" still does not wrap, and just goes past the frame of the image. This is on my 21" monitor. Since text is white and your background outside the image frame is also white, then one can't see the remaining text. It is shown as "Waste Ink Tub". Is this fix only for small screens ?
Ah thanks for catching that. It turns out to be a browser issue rather than the screen resolution. On IE, it works fine but it seems like the text doesn't wrap in Firefox.
I'm trying things out to see why that might be, but I'm hoping someone who helped code the original plugin might know.
Haven't figured out why the text isn't wrapping for Firefox yet, but in the mean time I updated the code I posted above so that it doesn't change the width of the textbox (so the text doesn't protrude out of it).
It still at least moves the text to the bottom if the note is too close to the right side.
This is one more change to codebase.php that should be made:
Find
$data['menu'] = '<div class="buttonlist align_right"><ul>'.$menu_buttons.'</ul></div>';
Replace with:
$data['menu'] = '<div class="buttonlist align_right"><ul><li> </li>'.$menu_buttons.'</ul></div>';
Add "<!-- " under "<script type="text/javascript">".
Add "// -->" above "</script>".
Without the empty these changes, it becomes invalid HTML because of the javascript not being interpreted correctly by the W3C validator.
Hi @ all
attached an error message in Internet Explorer. It will not see a caption.
Also I have is the problem that the label on the blue background also.
The above instructions I have tried to replicate without success.
Who can help me here? all changes were reversed!!
http://fotofreunde-rathenow.adtg.de/Teil5 (http://fotofreunde-rathenow.adtg.de/Teil5)
VG
CMFA
Quote
Details zum Fehler auf der Webseite
Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Zeitstempel: Sun, 9 Jan 2011 17:30:34 UTC
Meldung: Das Objekt unterstützt diese Aktion nicht.
Zeile: 424
Zeichen: 5
Code: 0
URI: http://fotofreunde-rathenow.adtg.de/Teil5/plugins/annotate/lib/photonotes.js
Meldung: 'notes.notes.0' ist Null oder kein Objekt
Zeile: 385
Zeichen: 1
Code: 0
URI: http://fotofreunde-rathenow.adtg.de/Teil5/displayimage.php?album=35&pid=212
Meldung: 'notes.notes.0' ist Null oder kein Objekt
Zeile: 385
Zeichen: 1
Code: 0
URI: http://fotofreunde-rathenow.adtg.de/Teil5/displayimage.php?album=35&pid=212
Quote from: pftq on December 19, 2010, 02:05:35 PM
On a side note, I added a preview of the annotation on the "Last annotations" page so it is similar to last comments.
Please post the needed code changes.
Quote from: pftq on December 19, 2010, 02:05:35 PM
flickering boxes when the mouse moves over the picture.
Please elaborate. I haven't recognized that behavior (I'm using Firefox).
Quote from: pftq on December 19, 2010, 03:44:34 PM
notes not showing for non-Admins
Can you please try if the following fix works as well?
In
codebase.php, find
$sql = "SELECT n.*, u.user_name FROM {$CONFIG['TABLE_PREFIX']}plugin_annotate n INNER JOIN {$CONFIG['TABLE_USERS']} u ON n.user_id = u.user_id WHERE n.pid = {$data['pid']}";
$result = cpg_db_query($sql);
$notes = array();
while ($row = mysql_fetch_assoc($result)) {
//$row['note'] = addslashes($row['note']);
$notes[] = $row;
}
and replace with
global $cpg_udb;
$sql = "SELECT n.*, u.".$cpg_udb->field['username']." AS user_name FROM {$CONFIG['TABLE_PREFIX']}plugin_annotate n INNER JOIN ".$cpg_udb->usertable." u ON n.user_id = u.".$cpg_udb->field['user_id']." WHERE n.pid = {$data['pid']}";
$result = cpg_db_query($sql);
$notes = array();
while ($row = mysql_fetch_assoc($result)) {
//$row['note'] = addslashes($row['note']);
$notes[] = $row;
}
Please report if that works, too.
Quote from: pftq on December 19, 2010, 04:16:45 PM
Fixed the "null..." issue.
I'll commit that fix soon.
Your changes regarding wrapping the text beneath the annotation and the invalid HTML I have to do some more testing.
Thanks Andre - I'm not at my home computer right now but will get back to you about those changes as soon as possible.
The flickering occurs in Internet Explorer (I know, everyone should use FF - but about half my visitors are not very tech-savy and just use IE). It's mainly when your mouse moves across the white outline of the box (so as if pointing at the box outline is not pointing at the picture).
The fix for non-admin you posted works. I'd like suggest the following which also includes date/time:
global $cpg_udb, $lang_date;
$sql = "SELECT n.*, u.".$cpg_udb->field['username']." AS user_name FROM {$CONFIG['TABLE_PREFIX']}plugin_annotate n INNER JOIN ".$cpg_udb->usertable." u ON n.user_id = u.".$cpg_udb->field['user_id']." WHERE n.pid = {$data['pid']}";
$result = cpg_db_query($sql);
$notes = array();
while ($row = mysql_fetch_assoc($result)) {
//$row['note'] = addslashes($row['note']);
$row['date']=localised_date($row['user_time'], $lang_date['lastup']); // pftq: Show date on note
$notes[] = $row;
}
You can then do this in the photonotes.js file:
function PhotoNote(text,id,rect,annotator_name,annotator_id, date_str, maxRight) /* pftq: added date and maxRight */
{
var props = {
text: text,
id: id,
rect: rect,
annotator_name: annotator_name,
annotator_id: annotator_id,
selected: false,
container: null,
dragresize: null,
oldRect: null,
YOffset: 10,
XOffset: 0,
onsave: null,
ondelete: null,
gui: null,
highlighted: false, /* pftq */
date_str:date_str, /* pftq */
maxRight:maxRight, /* pftq */
editable: true /* nibbler */
};
Under // add annotator name and link to profile, you can use date_str to format the comment time as I've done here:
http://www.pftq.com/gallery/displayimage.php?pid=3044
For the last viewed (annotations), I currently have it implemented as a mod to build_caption which is why I didn't post the code. I can look into using a plugin hook when I get a chance though.
If you want, I can attach the current version of the plugin I have now to maybe save you some of the work.
Quote from: pftq on January 24, 2011, 02:33:57 PM
If you want, I can attach the current version of the plugin I have now to maybe save you some of the work.
Thanks, but I've already applied some changes to my local working copy and also committed something to the svn repository. So I'll do the other changes manually, too.
Hi
I got a problem it doesnt work with joomla bridge yet version cpg1.5 what could I do?
You will unfortunately have to work that out for yourself. The bridge is from a third party and something we cannot support as we simply do not know it.
Quote from: haferlin on February 04, 2011, 06:14:42 PM
it doesnt work with joomla bridge yet
If you say what
exactly doesn't work, it
may be possible to fix that without knowing the Joomla bridge.
I figure it is request db` problem because doesn't save annotation neither super administrator or administror
on version 1.4 cpg worked perfect
*excuse me english
Great plugin! Thanks for creating this.
Is there a way I can get the note popup box to fit to the width of the contained text, and more importantly, is there a way for me to have the note popup box to be central to the target area.
I am using this plugin to allow clients to make comments about design work, and sometimes they have lengthy comments. When the popup appears it can be offscreen which I don't mind, but looks broken to the client.
I'm not much of a coder, but I can dabble a bit and if it comes to it I have access to developers.
Version 2.11 fixes the display of the annotation buttons for pictures of other users if rapid annotation is enabled and currently displayed.
Nice plugin... But is there a way to use the lightbox plugin (http://forum.coppermine-gallery.net/index.php/topic,62905.html) with the annotations plugin?
If i use booth i can´t place/see the annotations frame.
regards
If it currently doesn't work, you have to adjust at least one plugin. I currently have too little time and personal interest to make those plugins compatible, sorry.
The plug-in incorrectly works in a CPG on bridge mode (usual users don't have rights to addition of annotations). It can be corrected?
I love this plug-in already, but I'd like to second curtj's request from a while back. Is there a way to modify the annotation note box itself for lengthier comments? Ideally, it would be able to dynamically scale to the contents of the box, but if that's too much trouble, it'd be nice to know where I could preset the height/width of the note and I'll just define a size that notes are unlikely to go over; both cases I know that I need to introduce some form of line breaking (it'd be nice if this could be done while entering text).
I plan on using annotate for translations - basically I'll be creating an annotation over each sentence/paragraph and put the translations as the note. This will often lead to 2-3 (or more) lines of text. That said, I'll also be primarily the only one using this feature so I could get away with a "quick fix".
Any thoughts would be greatly appreciated!
Version 3.0 (attached to initial post) contains several changes. Detailed changelog (http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/annotate/?view=log) can be found in the SVN repository. Most important are:
- Moved JavaScript code to separate file (saves traffic)
- Load annotation list right before it will be opened (that means it won't load on every page load, thus saves some traffic)
- Added config option to disable plugin for mobile devices
- Code optimizations (changed order of code blocks, so they just get executed when needed)
- Align note to the left/right of the box, depending where's more space
Hi, is there any way to have this plugin allow annotations be created/modiefied by only the image uploader and admin? currently it seems (v3.0) that if you allow a user group to create or modify annotations, they can do this on any and all images.
I'm getting a "stack overflow" error using IE8. Firefox works fine. on this image: http://nzgc.co.nz/displayimage.php?album=lastup&cat=0&pid=9
I'm assuming it's due to the number of annotations, but there's no fail safe preventing me from putting too many in (and how many is too many)
<!--Coppermine Photo Gallery 1.5.12 (stable)-->
You should upgrade.
http://forum.coppermine-gallery.net/index.php/topic,74682.0.html
http://documentation.coppermine-gallery.net/en/upgrading.htm
I'm not seeing annotations in Chrome or IE9, did you disable it?
This is most likely a independent browser issue.
http://answers.microsoft.com/en-us/ie/forum/ie8-windows_other/stack-overflow-at-line-96/e75e61a7-09fd-4c83-8d66-6090bef07aa7
http://answers.microsoft.com/en-us/ie/forum/ie8-windows_other/stack-overflow-at-line-92/4c321f6d-9e2e-4eac-a57c-3e6fff39709f
Hi guys,
I've noticed an issue on our site where the annotations move around on the photo when changing the screen size. If anyone could shed some light on it, it would greatly appreciated as it's rather confusing when the annotation box for one person goes over another. I am currently running the latest version (v3.0) of the annotations plugin however it has been doing this on every version.
A test account has been set up if required;
http://www.hittherock.com (http://www.hittherock.com)
username : Test
password : test
example page is http://www.hittherock.com/gallery/displayimage.php?pid=13#top_display_media (http://www.hittherock.com/gallery/displayimage.php?pid=13#top_display_media)
Quote from: Beau_M on October 12, 2012, 05:42:01 AM
example page is http://www.hittherock.com/gallery/displayimage.php?pid=13#top_display_media (http://www.hittherock.com/gallery/displayimage.php?pid=13#top_display_media)
Unfortunately I cannot see any annotations with the provided test user account.
Quote from: Αndré on October 12, 2012, 09:08:49 AM
Unfortunately I cannot see any annotations with the provided test user account.
Αndré, sorry I should have mentioned that the annotations can only be seen when logged in, that was the reason for the test account.
I am logged in as user "Test", but cannot see any annotations.
Andre, sorry about that, now fixed.
Now I get a 404 error page when trying to access displayimage.php. Please check if the file exists and its permissions.
Argh I can't win! Try this one instead, http://www.hittherock.com/Gallery/displayimage.php?pid=13#top_display_media (http://www.hittherock.com/Gallery/displayimage.php?pid=13#top_display_media)
Thanks for your patience Andre.
I am using Coppermine 1.5.24 and when I to to install the plugin cpg1.5.x_plugin_annotate_v3.0.zip I get this error
Critical error
There was an error while processing a database query
Please enable debug mode and post the extended error message. I assume it complains the "TYPE=MyISAM".
Here it is thanks
While executing query '
CREATE TABLE IF NOT EXISTS `copper_plugin_annotate` (
nid smallint(5) unsigned NOT NULL auto_increment,
pid mediumint(8) unsigned NOT NULL,
posx smallint(5) unsigned NOT NULL,
posy smallint(5) unsigned NOT NULL,
width smallint(5) unsigned NOT NULL,
height smallint(5) unsigned NOT NULL,
note text NOT NULL,
user_id smallint(5) unsigned NOT NULL,
PRIMARY KEY (nid)
) TYPE=MyISAM COMMENT='Contains the data for the annotate plugin'' in plugins/annotate/codebase.php on line 328
mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM COMMENT='Contains the data for the annotate plugin'' at line 11
Sorry I lift this out
File: /home/rickmick/public_html/include/functions.inc.php - Line: 272
I was able to change the schema.sql from ) TYPE=MyISAM
to this
) ENGINE=MyISAM
I'm sure if that should be the way to do it but it works now.
Remove
TYPE=MyISAM COMMENT='Contains the data for the annotate plugin'
from schema.sql and it should work as expected.
Tried to apply V3.
Get critical error. I have enabled the debug for all. Details in attachment. user=test; psw=test Thanks.
[removed attachment by request]
Unfortunately your screenshot doesn't contain an error message. Without an error message I cannot fix anything.
Here is the text, sorry
While executing query '
CREATE TABLE IF NOT EXISTS `cpg15x_plugin_annotate` (
nid smallint(5) unsigned NOT NULL auto_increment,
pid mediumint(8) unsigned NOT NULL,
posx smallint(5) unsigned NOT NULL,
posy smallint(5) unsigned NOT NULL,
width smallint(5) unsigned NOT NULL,
height smallint(5) unsigned NOT NULL,
note text NOT NULL,
user_id smallint(5) unsigned NOT NULL,
PRIMARY KEY (nid)
) TYPE=MyISAM COMMENT='Contains the data for the annotate plugin'' in plugins/annotate/codebase.php on line 328
mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM COMMENT='Contains the data for the annotate plugin'' at line 11
Please use the fix that's directly above your post ::)
But there is no such text in codebase.php of the plugin.... ???? Or am I completely crazy...
It's in schema.sql, sorry. I've just fixed the typo in my previous post.
Thanks Andre!!!
And sorry for not seeing he fix... :)
Can't find how to remove attachment. Don't wnt for anyone to see. Thanks
Quote from: mr5 on October 29, 2013, 04:47:47 PM
Can't find how to remove attachment.
Removed as requested.
Hello!
I am sending an Estonian translation for Annotate Plugin v3.0 / cpg1.5x. You can use it as you like.
Regards, Leeni
Added in SVN revision 8834. Thank you for your contribution.
I'm attempting to use Flickr style image annotations for cpg1.5.x - using: cpg1.5.x_plugin_annotate_v3.0.zip (45.63 kB - downloaded 552 times.) from the announcement thread. I'm doing this on a virgin copy of 1.5.40 from the admin login config plugin manager and get the following error:
"Critical error
There was an error while processing a database query"
Other plugins seem to work OK.
I note that the last time several files were edited was back in July and August of 2012, so I'm wondering if anyone has used this plugin in the most recent version of CPG?
Also, what php debugging program to the developers use. Being able to step through code probably would lead me to the cause of the error.
A note to: Αndré & allvip, thanks to your help I've made my project "live" a couple of weeks ago and it works GREAT.
Any insight will be appreciated.
Bob Miers
In the plugin file, schema.sql, remove "TYPE=MyISAM" in the last line of the file. (or change it to "ENGINE=MyISAM")
ron4mac
Thank you so very much. I would have never discovered the fix.
Now I can see if it will accomplish the job that I want it to do.
Thank you,
Bob Miers
Merged with announcement thread. Will update the plugin as soon as possible.
There is possibly a bug in how the annotation links are formed above the photo. When a person appears on several photos in different categories and albums, clicking on such a link initiates a search. However, the results of such a search display the album title under the search result (instead of the actual title of the photo). Even more problematically, upon opening such a photo from such a link, the wrong caption is still displayed below the photo itself.
Please try if it works as expected if you replace
r.title
with
p.title
in codebase.php.