Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 07:18:48 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Maintenance release cpg1.4.25 - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix an issue with http uploads that could occur in particular versions of PHP.The fix is not security-critical, so if your gallery is running fine with cpg1.4.23 or cpg1.4.24 you don't need to upgrade. If you are running an older version than cpg1.4.23, you must update to this latest version as soon as possible because of the security impact (the past few maintenance releases before cpg1.4.24 all were security-related).
[more]
   Home   Help Search Board rules Login Register  
Pages: 1 2 3 4 5 [6] 7   Go Down
  Send this topic  |  Print  
Author Topic: Flikr style image annotations  (Read 50579 times)
0 Members and 1 Guest are viewing this topic.
ff
Coppermine regular visitor
**
Gender: Male
Netherlands Netherlands

Posts: 80


WWW
« Reply #100 on: February 09, 2009, 12:41:33 pm »

Hi,

Posted this question at (http://forum.coppermine-gallery.net/index.php/topic,53290.280.html) EnlargeIt!, but am not sure where to ask this.

Annotations did work perfectly but with EnlargeIt! I can't see them.
Admin has EnlargeIt! disabled, and Annotations work great (if you put them as last plugin in the list).

Is it possible to have both plugins to work next to eachother (or with eachother)?
If yes, is this something a plugin novice like me can do, or is it very difficult?

ps. In which thread do you have to ask this kind of questions?
In the thread of the latest added plugin or the first added one?
Logged
Fabricio Ferrero
Dev Team member
****
Gender: Male
Argentina Argentina

Posts: 1927


From San Juan, Argentina, to the World!


WWW
« Reply #101 on: February 09, 2009, 02:44:43 pm »

ps. In which thread do you have to ask this kind of questions?
In the thread of the latest added plugin or the first added one?
None of them, I would suggest creating a new one (for the next time..) in plugins board, that's the pourpouse of it Wink : http://forum.coppermine-gallery.net/index.php/board,53.0.html
Logged

Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website
Mi red de Rotaractianos:  Rotaract Latino
ff
Coppermine regular visitor
**
Gender: Male
Netherlands Netherlands

Posts: 80


WWW
« Reply #102 on: February 09, 2009, 02:55:43 pm »

None of them, I would suggest creating a new one (for the next time..) in plugins board, that's the pourpouse of it Wink : http://forum.coppermine-gallery.net/index.php/board,53.0.html

Whoops...sorry

Feel free to move the two questions and remove them from the wrong threads (or can I remove them myself?)
Logged
Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #103 on: February 09, 2009, 05:14:18 pm »

Feel free to move the two questions and remove them from the wrong threads (or can I remove them myself?)
You can't move & merge them yourself. This can only be done by a moderator of that board.

Is it possible to have both plugins to work next to eachother (or with eachother)?
You have to integrate and adapt the html output from the annotations plugin into the enlargeit plugin.

You'll find the necessary code in the function annotate_file_data:
Code: (annotate/codebase.php)
function annotate_file_data($CURRENT_PIC_DATA){

[..]

    return $CURRENT_PIC_DATA;
}

If yes, is this something a plugin novice like me can do, or is it very difficult?
Some basic php and html skills should be enough. I can't say exactly what you have to change, because I'm not familiar with the enlargeit plugin code.
Logged

ff
Coppermine regular visitor
**
Gender: Male
Netherlands Netherlands

Posts: 80


WWW
« Reply #104 on: February 09, 2009, 05:31:44 pm »


You have to integrate and adapt the html output from the annotations plugin into the enlargeit plugin.

You'll find the necessary code in the function annotate_file_data:
Code: (annotate/codebase.php)
function annotate_file_data($CURRENT_PIC_DATA){

[..]

    return $CURRENT_PIC_DATA;
}
Some basic php and html skills should be enough. I can't say exactly what you have to change, because I'm not familiar with the enlargeit plugin code.

Pfff me neither Cheesy

I couldn't even get the caption underneath the image :/

I'll just fiddle around.

Thank you.
Logged
bb3
Coppermine novice
*
Philippines Philippines

Posts: 34


« Reply #105 on: March 26, 2009, 01:01:22 am »

awesome, thanks!
one question: Is it possible to put the button down to where the others are located (crop and rotate..)?

same question here.

http://gallery.redlens.org

username: test
pword: user
Logged
Joachim Müller
Administrator
*****
Gender: Male
Germany Germany

Posts: 45051


aka "GauGau"


WWW
« Reply #106 on: March 26, 2009, 06:58:53 am »

Works for me, see http://gallery.redlens.org/displayimage.php?album=random&cat=16&pos=-723
Logged
bb3
Coppermine novice
*
Philippines Philippines

Posts: 34


« Reply #107 on: March 26, 2009, 09:48:09 am »


hi joachim,

sorry but i was asking if it is possible to change the location of the "annotate" button. I want it to place beside the "edit", "Crop"
If it is possible, how can i make it.

thanks
Logged
Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #108 on: March 26, 2009, 10:18:34 am »

i was asking if it is possible to change the location of the "annotate" button. I want it to place beside the "edit", "Crop"
Use the attached codebase.php file.

* codebase.zip (2.7 KB - downloaded 98 times.)
Logged

bb3
Coppermine novice
*
Philippines Philippines

Posts: 34


« Reply #109 on: March 26, 2009, 12:48:34 pm »

Use the attached codebase.php file.

oh great!!

thank you sir for the big help
Logged
pftq
Contributor
***
Posts: 81


« Reply #110 on: June 08, 2009, 03:09:18 pm »

I moved the button towards the top of the image (outside the borders) - you can also style it as well using #annotate.

Also, it now shows who pute the note: "Comment... - Author"

Minor fix - users also cannot drag all the other notes now when they've deleted one of their own notes (the dragresize was left on true after delete).

Sample: http://www.pftq.com/gallery/displayimage.php?pos=-3044

I can't figure out how to make it work with bridges though (like with SMF).  I've added the code for SMF but it's rather rough - the user has to go into the codebase file and toggle bridging on or off with the boolean variable, as well as set the databases again.  If possible, it'd be nice to just tie it into the coppermine's actual bridge code.


**updated - fixed the single quotes being decoded correctly.  Not sure if that was my doing but just redownload if it's an issue.
Also fixed the flickering when your mouse hovers over boxes you can edit.  It only flickers during the actual editing after you've clicked on the box now.

* annotate.zip (12.72 KB - downloaded 66 times.)
« Last Edit: June 10, 2009, 03:14:54 am by pftq » Logged
pftq
Contributor
***
Posts: 81


« Reply #111 on: June 09, 2009, 05:54:31 am »

Also managed to add timestamps to the annotations so they can be viewed back like comments (last annotations) - such as:
http://www.pftq.com/gallery/thumbnails.php?album=lastanno

But that was done via direct modding of the theme and function files.  Not quite sure how it'd be done for a plugin though.
Logged
Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #112 on: June 09, 2009, 07:01:18 am »

Also managed to add timestamps to the annotations so they can be viewed back like comments (last annotations) - such as:
http://www.pftq.com/gallery/thumbnails.php?album=lastanno

But that was done via direct modding of the theme and function files.  Not quite sure how it'd be done for a plugin though.
It's not possible in cpg1.4.x. In the next major release cpg1.5.x will be a plugin hook to add custom meta albums.


PS: I made similar modifications (and some more) to get a dynamical drop down list of person names which my users can add to the pictures, created the meta albums as well and created a search for the anntotations (in my case: to search for persons on pictures).
Because this is a very specialized version of this plugin, I want to create a new plugin since a while. Maybe I'll create one for cpg1.5.x if it's possible to integrate all features without file modifications.
Logged

pftq
Contributor
***
Posts: 81


« Reply #113 on: June 10, 2009, 03:12:14 am »

Ah ok.  Well here's a version of the plugin with timestamp anyways.  Also included a few fixes:

- Cancel button actually deletes the note when first creating a new one. (original code has .nid=0 instead of .id=0).
- Removes tooltip so it doesn't overlap with the notes.


You won't be able to see the date but at least it's saved.  If you want to have the meta-albums, you'd have to mod the files though.

Note, if you already have a previous version installed - you'll have to add the column 'ctime' (int) to your mysql table. (usually cpg_notes or whatever prefix your gallery has)

* annotate-withTimestamp.zip (13.16 KB - downloaded 66 times.)
Logged
CFR
Coppermine newbie

France France

Posts: 7


« Reply #114 on: June 20, 2009, 10:24:25 pm »

Cool plugin but when is instaled another plugin is disabled: LightBox Slideshow Plugin http://forum.coppermine-gallery.net/index.php/topic,59013.msg290739.html#msg290739.
Maybe someone know solution Smiley


THX
Logged
boomsai
Coppermine newbie

Gender: Male
Switzerland Switzerland

Posts: 11


« Reply #115 on: July 22, 2009, 08:55:19 pm »

Hello
Concratulations! A super script! Very easy to install in coppermine!
I am searching for a script who can members: mark himself on every picture, also when they not uploaded by themselves with a link to the member profile.
Unfortunatly i do not have the know how to modified the script.
I recognize some other people are interested in.
Who can help me?
Thanx and greets
marcel
Logged
Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #116 on: July 22, 2009, 09:04:18 pm »

I am searching for a script who can members: mark himself on every picture, also when they not uploaded by themselves with a link to the member profile.
Shall your members can only mark themselves? If yes, it's easy to modify the script to store the user id inestead of an individual note. I'm not sure if it's possible to display the link, but it should be easy to display the link above/below the image.
Logged

boomsai
Coppermine newbie

Gender: Male
Switzerland Switzerland

Posts: 11


« Reply #117 on: July 22, 2009, 10:00:03 pm »

Shall your members can only mark themselves? If yes, it's easy to modify the script to store the user id inestead of an individual note. I'm not sure if it's possible to display the link, but it should be easy to display the link above/below the image.

Thanx a lot for your help!
Yes only the registered user should have the right to set his username on the picture his on it.
You mean this is easy?

 
Logged
Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #118 on: July 23, 2009, 07:13:30 am »

In lib/photonotes.js, delete
Code:
editArea.appendChild(editAreaText);


In codebase.php, find
Code:
$sql = "SELECT * FROM {$CONFIG['TABLE_PREFIX']}notes WHERE pid = {$CURRENT_PIC_DATA['pid']}";
and replace with
Code:
$sql = "SELECT *, u.user_name AS note FROM {$CONFIG['TABLE_PREFIX']}notes n INNER JOIN {$CONFIG['TABLE_USERS']} u ON n.user_id = u.user_id WHERE n.pid = {$CURRENT_PIC_DATA['pid']}";


In codebase.php, find
Code:
$html = '<div class="Photo fn-container" id="PhotoContainer">' . $html . '</div>';
and replace with
Code:
       $html = '<div class="Photo fn-container" id="PhotoContainer">' . $html . '</div>';

        $sql = "SELECT u.user_name, u.user_id FROM {$CONFIG['TABLE_PREFIX']}notes n INNER JOIN {$CONFIG['TABLE_USERS']} u ON n.user_id = u.user_id WHERE n.pid = {$CURRENT_PIC_DATA['pid']}  ORDER BY posx, posy";
        $result = cpg_db_query($sql);
        $profile_links = "";
        while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
            $profile_links .= "<a href=\"profile.php?uid={$row['user_id']}\">{$row['user_name']}</a> ";
        }
        if ($profile_links != "") {
     $html .= "
         <div style=\"clear: both; padding-top: 10px;\">
                    $profile_links
         </div>
            ";
        }
Logged

bitcloud
Coppermine frequent poster
***
Posts: 113


« Reply #119 on: July 31, 2009, 04:20:00 pm »

Cheers for this plugin mate,

All's well except for 2 things:
I can't seem to drag the square all the way to the right side, or the lower side of the image (it stops about 20px or so from the right or the bottom sides)
Is this a known issue? The $html part contains only the image code, so it's not that... is there anywhere I can manually adjust this to beat it into submission? Smiley

The other thing is more of a request. I wanted to add searching to the main search. Thanks for the custom search, but I really want to integrate it with the main search so "annotations" is maybe another entry, and the results simply come up inline with the others... Anyone have any clues on how I might do this? (SQL joins or something?)

Cheers
BC
Logged
Pages: 1 2 3 4 5 [6] 7   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.085 seconds with 17 queries.