Flikr style image annotations - Page 6 Flikr style image annotations - Page 6
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Flikr style image annotations

Started by Nibbler, March 01, 2007, 04:11:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ff

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?

Fabricio Ferrero

Quote from: ff on February 09, 2009, 01:41:33 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 ;) : http://forum.coppermine-gallery.net/index.php/board,53.0.html
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

ff

Quote from: Fabricio Ferrero on February 09, 2009, 03:44: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 ;) : 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?)

Αndré

Quote from: ff on February 09, 2009, 03:55:43 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.

Quote from: ff on February 09, 2009, 01:41:33 PM
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) Select
function annotate_file_data($CURRENT_PIC_DATA){

[..]

    return $CURRENT_PIC_DATA;
}


Quote from: ff on February 09, 2009, 01:41:33 PM
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.

ff

Quote from: eenemeenemuu on February 09, 2009, 06:14:18 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) Select
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 :D

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

I'll just fiddle around.

Thank you.

bb3

Quote from: Farnsi on March 06, 2007, 12:33:57 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

Joachim Müller


bb3

Quote from: Joachim Müller on March 26, 2009, 07:58:53 AM
Works for me, see http://gallery.redlens.org/displayimage.php?album=random&cat=16&pos=-723

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

Αndré

Quote from: bb3 on March 26, 2009, 10:48:09 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.

bb3

Quote from: eenemeenemuu on March 26, 2009, 11:18:34 AM
Use the attached codebase.php file.

oh great!!

thank you sir for the big help

pftq

#110
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.

pftq

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.

Αndré

Quote from: pftq on June 09, 2009, 06: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.
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.

pftq

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)

CFR

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 :)


THX

boomsai

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

Αndré

Quote from: boomsai on July 22, 2009, 09:55:19 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.

boomsai

Quote from: eenemeenemuu on July 22, 2009, 10:04:18 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?


Αndré

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


In codebase.php, find
$sql = "SELECT * FROM {$CONFIG['TABLE_PREFIX']}notes WHERE pid = {$CURRENT_PIC_DATA['pid']}";
and replace with
$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
$html = '<div class="Photo fn-container" id="PhotoContainer">' . $html . '</div>';
and replace with
       $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>
           ";
       }

bitcloud

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? :)

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