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]   Go Down

Author Topic: "im on this picture" button  (Read 12679 times)

0 Members and 1 Guest are viewing this topic.

gnomen

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
"im on this picture" button
« on: July 06, 2004, 04:56:01 pm »

my old gallery system had a cool function (just about the only one  :D) it allowed users that where loggod in to push a button labeled "im on this picture" and it was added to a comment like field, i was also possible to wiev all pictures with one person on,
sort of like the cpg album most wieved etc.
im guessing that it is pretty simpel to add such a folder since it behaves like the favorites folder in cpg but i dont wont to use that function since people such be able to have favorite pictures without themselves in them ;)

hoping anyone kan help me, i'm an idiot at programming myself  :\'(
« Last Edit: July 07, 2004, 02:59:10 am by gnomen »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: "im on this picture" button
« Reply #1 on: July 07, 2004, 05:51:10 am »

I use the keywords field in the pic description to note who is on the pics. When viewing the pics and clicking on a name, you'll get all pics the person turns up on. You can even post links like http://yourdomain.tld/your_coppermine_folder/thumbnails.php?album=search&search=the_name_of_the_person
Try if this works for you as well.

GauGau
Logged

gnomen

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: "im on this picture" button
« Reply #2 on: July 07, 2004, 11:19:59 am »

yes that would work perfectly, eccept i have no chance of naming all the persons on my over 3000 pictures, most of them are groupshots and i dont know the name of a third. could anyone "in the know" be able to make the code for a link that  adds the name of the user to the comment field? then i can add those i know and the rest can add themselves, that way i should be free of misspelled names and dublets.

by the way. I must say best gallery system ever, nice support, nice peoble on the forum. Top grades from me ;D
Logged

skybax

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 180
    • SKYBAX Communications
Re: "im on this picture" button
« Reply #3 on: August 12, 2004, 05:43:12 pm »

This is possible, but not recommend because it allows users access to the dbase to write... could be a security threat... but the general struction of the command to add a button so the user can add their username (or with full name mod...) to the keywords would work something like this:

Code: [Select]
if (USER_ID){
if (isset($HTTP_POST_VARS['submitDescription'])) process_post_data();
echo "button to add" . USER_ID . "to keywords";

} else {

   $redirect = $redirect . "register.php";
       header("Location: $redirect");

   exit();
}


function process_post_data() {

       global $HTTP_POST_VARS, $CONFIG;
        global $lang_errors;

                $pid          = (int)$HTTP_POST_VARS['pid'];
                $aid          = (int)$HTTP_POST_VARS['aid'];

                $keywords     = $HTTP_POST_VARS['keywords'];

                $query = "SELECT category, filepath, filename FROM {$CONFIG['TABLE_PICTURES']}, {$CONFIG['TABLE_ALBUMS']} WHERE {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND pid='$pid'";
                $result = db_query($query);
                if (!mysql_num_rows($result)) cpg_die(CRITICAL_ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
                $pic = mysql_fetch_array($result);
                mysql_free_result($result);


                $update  = ", keywords = '".addslashes($keywords)."'";
             
}

** PLEASE NOTE THIS IS NOT TESTED OR MEANT TO BE USED SECURELY - JUST AN EXAMPLE OF HOW TO STRUCTURE THE CODE... no support from me if you use this...

-T 8)
Logged
(http://www.skybax.com/hotImage/post_footer.gif)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

gnomen

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: "im on this picture" button
« Reply #4 on: August 12, 2004, 11:43:25 pm »

thanks a lot i'll try to make it, work, try... since i'm the worst coder in the world ;D
Logged

timmy3

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: "im on this picture" button
« Reply #5 on: August 21, 2004, 12:29:45 am »

i too would be very interested in this.

like gnomen i lack the programming skills to do it.  >:(
Logged

Richy.nl

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
    • Richy.nl - Professional Photography
Re: "im on this picture" button
« Reply #6 on: August 27, 2004, 04:08:09 pm »

Yeah, this would be one of the best futures on my CPG system also!!!

I'm making photos of people on diverse situations at parties and on the street. So, when one of the photos are used for a magazine, I need to have a modelrelease of the person on the photo. So this is what I'm thinking about:

- Shoot the photo
- Give them my website
- They register
- They Login
- They search for the photo
- Point with cursor on the photo who they are.
- Under the photo will be the Name of the persons...

It can be also some kind of dating site system... but that's for the future. ;)

My idea to devellop it:
- table with user_photo info
- wich person on wich photo (there can be more than one person on 1 photo)

So technically something like to use the coordinates on the photo and the horizontal position of the person to use for the position of the photo.

For an example of this function you can have a look at one of the biggest Party community in the Netherlands:


That's me with my girlfriend...  :P

http://party.snt.utwente.nl/flock/SECTION/gallery/ACTION/one/PUSERID/19641/IMGID/108515.html









RatKing

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
    • Personal website
Re: "im on this picture" button
« Reply #7 on: August 30, 2004, 06:56:09 pm »

Richy.nl - I have been thinking about this a little while now but it would leave you very open to abuse lets just say we have 1000 people registered and one of them is a real nob he or she could click on every single picture as them being in it, which would defeat the whole purpose of the MOD.

It's no very difficult to build this but it is very open to users who want to make it useless. :(

I am however building it just to see if I can get this working (should be able to) so in a few days or so depending on how much time I have I will post the full mod :)
Logged

skybax

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 180
    • SKYBAX Communications
Re: "im on this picture" button
« Reply #8 on: August 31, 2004, 10:48:40 pm »

I'm making photos of people on diverse situations at parties and on the street. So, when one of the photos are used for a magazine, I need to have a modelrelease of the person on the photo. So this is what I'm thinking about:

- Shoot the photo
- Give them my website
- They register
- They Login
- They search for the photo
- Point with cursor on the photo who they are.
- Under the photo will be the Name of the persons...

[off topic] This comes from someone who has worked in multiple areas of photography (modeling to forensic), You might need to be a little more proactive with your model release idea. In some areas, legally you are responcible for making sure your release forms are complete - and often times before the shoot... just a thought. [/off topic]

BUT! I do like your idea - it could work well for a stock photography idea. Another thing I just thought of along the lines to make it work for you specifically, and to address RatKing's concerns. You would need to build in a simple switch to determine if the person has already "signed" the work. Granted this would be "harder" to integrate for shots with multiple models. However all you need is a simple check for if image is "signed" don't display sign button...

-T 8)
Logged
(http://www.skybax.com/hotImage/post_footer.gif)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

gnomen

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: "im on this picture" button
« Reply #9 on: September 06, 2004, 07:07:04 pm »

I am however building it just to see if I can get this working (should be able to) so in a few days or so depending on how much time I have I will post the full mod :)

sounds great, looking forward to see the result, please post an address here :D
Logged

RatKing

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
    • Personal website
Re: "im on this picture" button
« Reply #10 on: September 11, 2004, 09:09:10 pm »

 :-\\ Going to go on a course for a week so no development on this code... I have how ever 90% of the code done I'll post it as soon as I have a fully working version somewhere in the next two weeks.  :)
Logged

gnomen

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: "im on this picture" button
« Reply #11 on: September 12, 2004, 04:44:11 pm »

 ;D sounds gret, have a good course
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.