"im on this picture" button "im on this picture" button
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

"im on this picture" button

Started by gnomen, July 06, 2004, 04:56:01 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

gnomen

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  :\'(

Joachim Müller

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

gnomen

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

skybax

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:

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)
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

gnomen

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

timmy3

i too would be very interested in this.

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

Richy.nl

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

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

skybax

Quote from: Richy.nl on August 27, 2004, 04:08:09 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)
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

gnomen

Quote from: RatKing on August 30, 2004, 06:56:09 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

RatKing

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

gnomen

 ;D sounds gret, have a good course