Advanced search  

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]

Pages: 1 2 3 4 5 [6] 7 8   Go Down

Author Topic: Flikr style image annotations  (Read 202151 times)

0 Members and 1 Guest are viewing this topic.

ff

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: Flikr style image annotations
« Reply #100 on: February 09, 2009, 01: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
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Flikr style image annotations
« Reply #101 on: February 09, 2009, 03: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 ;) : 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

Catching up! :)

ff

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: Flikr style image annotations
« Reply #102 on: February 09, 2009, 03: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 ;) : 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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Flikr style image annotations
« Reply #103 on: February 09, 2009, 06: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) [Select]
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 frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: Flikr style image annotations
« Reply #104 on: February 09, 2009, 06: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) [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.
Logged

bb3

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Flikr style image annotations
« Reply #105 on: March 26, 2009, 02: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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Flikr style image annotations
« Reply #106 on: March 26, 2009, 07:58:53 am »

Logged

bb3

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Flikr style image annotations
« Reply #107 on: March 26, 2009, 10:48:09 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Flikr style image annotations
« Reply #108 on: March 26, 2009, 11: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.
Logged

bb3

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Flikr style image annotations
« Reply #109 on: March 26, 2009, 01:48:34 pm »

Use the attached codebase.php file.

oh great!!

thank you sir for the big help
Logged

pftq

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 111
Re: Flikr style image annotations
« Reply #110 on: June 08, 2009, 04: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.
« Last Edit: June 10, 2009, 04:14:54 am by pftq »
Logged

pftq

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 111
Re: Flikr style image annotations
« Reply #111 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Flikr style image annotations
« Reply #112 on: June 09, 2009, 08: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
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 111
Re: Flikr style image annotations
« Reply #113 on: June 10, 2009, 04: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)
Logged

CFR

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Flikr style image annotations
« Reply #114 on: June 20, 2009, 11: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 :)


THX
Logged

boomsai

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
Re: Flikr style image annotations
« Reply #115 on: July 22, 2009, 09: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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Flikr style image annotations
« Reply #116 on: July 22, 2009, 10: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 novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
Re: Flikr style image annotations
« Reply #117 on: July 22, 2009, 11: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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Flikr style image annotations
« Reply #118 on: July 23, 2009, 08:13:30 am »

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

In codebase.php, find
Code: [Select]
$sql = "SELECT * FROM {$CONFIG['TABLE_PREFIX']}notes WHERE pid = {$CURRENT_PIC_DATA['pid']}";and replace with
Code: [Select]
$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: [Select]
$html = '<div class="Photo fn-container" id="PhotoContainer">' . $html . '</div>';and replace with
Code: [Select]
       $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
  • ***
  • Offline Offline
  • Posts: 117
Re: Flikr style image annotations
« Reply #119 on: July 31, 2009, 05: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? :)

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 8   Go Up
 

Page created in 0.041 seconds with 20 queries.