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: E-mail notification on comments  (Read 6219 times)

0 Members and 1 Guest are viewing this topic.

Davide Renda

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
E-mail notification on comments
« on: July 04, 2007, 05:54:47 pm »

Is it possible (and if yes, how) to add the picture title in the notification e-mail sent on new comments?

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: E-mail notification on comments
« Reply #1 on: July 04, 2007, 07:58:53 pm »

It's added by default... just have a look at the english lang file
Code: [Select]
$lang_db_owner_comment_notify_email = <<<EOT
Hello {USER_NAME},

{COMMENTER_NAME} just commented on a pic from {OWNER_NAME}
with the title {PIC_TITLE}.
You will not get any more notifications regarding this pic till you
visit the site.

To read the comment click <a href="{IMAGE_LINK}">{IMAGE_LINK}</a>

To unsubscribe click <a href="{UNSUBSCRIBE_LINK}">{UNSUBSCRIBE_LINK}</a>

Best regards,
{ADMIN}

EOT;

torkio

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 94
Re: E-mail notification on comments
« Reply #2 on: July 04, 2007, 09:12:15 pm »

Thank ti Lontano for posting my problem in this place

I'have the comments notification inside file db_input.php

the code is the below
//Start New User Notification Code
                                 $result = cpg_db_query("SELECT owner_id, notify  FROM {$CONFIG['TABLE_PICTURES']} WHERE pid=".$pid);
                                 list($uid, $notify) = mysql_fetch_row($result);
      
                                // We can't send an email if this pic was uploaded by a guest
                                //User must request notification.
                                if ($uid && $notify == "Yes"){
         
                                                // This can get the right info if the bridge is enabled or not.
                                              $picture_owner_data = $cpg_udb->get_user_infos($uid);

                                               
                                               //make sure we don't email ourself and that we arent being flooded
                                                if(USER_ID != $uid ){
                                                                // check the user has specified an email address
                                                                if ($picture_owner_data['user_email']){
                                                                                $subject = "Nuovo commento www.micromosso.com ".USER_NAME;
                                                                                $mail_body  = "Ciao ".$picture_owner_data['user_name']."!!<br />\n<br />\n".USER_NAME." ha commentato la tua foto dal titolo  <br /><br />\n";
                                                                                $mail_body .= "<a href=http://"."www.micromosso.com/galleria/displayimage.php?pos=-".$pid."".">www.micromosso.com/galleria/displayimage.php?pos=-".$pid."</a><br /><br />\n";
                                                                                $mail_body .= "Buona lettura e ricorda di commentare le foto degl'altri utenti.<br />\n";
                                                                                $mail_body .= "<br />\n<br />\n Grazie, il Team di <br />{$CONFIG['gallery_name']} ";
                                                                                $appo= $picture_owner_data['user_email'];
                                                               cpg_mail($appo, $subject, $mail_body);
                                                               }

                                                               
                                           }
                                }
// End User Notification Code.


ok after the word titolo i wish display the name of picture...

can you help me ????
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: E-mail notification on comments
« Reply #3 on: July 05, 2007, 07:15:18 am »

the filename? like dscf_00023.jpg

torkio

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 94
Re: E-mail notification on comments
« Reply #4 on: July 05, 2007, 09:36:16 am »

the filename? like dscf_00023.jpg

no stramm, I prefer the "title" of picture and not the filename if possible :)
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: E-mail notification on comments
« Reply #5 on: July 05, 2007, 06:28:30 pm »

As already said, the modpack by default adds the picture title. That's why I asked. From looking at the code you posted I can tell you that this is not the modpack notification code. You probably have added your own code or someone elses mod here. Just download the actual modpack and compare the files... or download the modpack for 1.4.9, same thing... that's different code, you'll see.

This said I can't help you much. My advice would be to update to 1.4.12 and then apply the modpack again. After that you can use the modpack subscription functionality.

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: E-mail notification on comments
« Reply #6 on: July 05, 2007, 06:35:53 pm »

on a sidenote... your coppermine doesn't identify as modpack 1.4.9, so you probably haven't uploaded all files. That and modded files -> giving you support is nearly impossible cause no one is able to know what code actually is running on your site.

torkio

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 94
Re: E-mail notification on comments
« Reply #7 on: July 05, 2007, 07:04:34 pm »

ok Stramm ... amny thanks  :-\
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: E-mail notification on comments
« Reply #8 on: July 05, 2007, 07:54:36 pm »

No need to sing the blues... just do as suggested and upgrade to 1.4.12... then you have what you need, the title in the subscription email. Despite that it's recommended to update anyway. Read the announcement threads for a list of fixed CPG issues.
http://forum.coppermine-gallery.net/index.php?board=58.0

An italian lang file for the modpack is available for some time now. Lontano posted his work in October 2006. Finally I've added it to the modpack 1.4.11 and 1.4.12. So you don't need to worry about that anymore (as far as I understood that was your concern in the thread from the italian board).
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.