forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: Davide Renda on July 04, 2007, 05:54:47 pm

Title: E-mail notification on comments
Post by: Davide Renda 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?
Title: Re: E-mail notification on comments
Post by: Stramm 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;
Title: Re: E-mail notification on comments
Post by: torkio 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 ????
Title: Re: E-mail notification on comments
Post by: Stramm on July 05, 2007, 07:15:18 am
the filename? like dscf_00023.jpg
Title: Re: E-mail notification on comments
Post by: torkio 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 :)
Title: Re: E-mail notification on comments
Post by: Stramm 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.
Title: Re: E-mail notification on comments
Post by: Stramm 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.
Title: Re: E-mail notification on comments
Post by: torkio on July 05, 2007, 07:04:34 pm
ok Stramm ... amny thanks  :-\
Title: Re: E-mail notification on comments
Post by: Stramm 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).