E-mail notification on comments E-mail notification on comments
 

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]

Main Menu

E-mail notification on comments

Started by Davide Renda, July 04, 2007, 05:54:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Davide Renda

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

Stramm

It's added by default... just have a look at the english lang file
$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

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 ????

Stramm


torkio

Quote from: Stramm on July 05, 2007, 07:15:18 AM
the filename? like dscf_00023.jpg

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

Stramm

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

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


Stramm

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