admin email notification doesnt show smilies - but they show up on ecards admin email notification doesnt show smilies - but they show up on ecards
 

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

admin email notification doesnt show smilies - but they show up on ecards

Started by Gephri, February 18, 2006, 07:25:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gephri

Discovered that when I (admin) received email notification of a posted comment in my gallery, the link to any smilies that were used is not complete.  It probably is not a 'filter' problem because I can see images and smilies when I receive e-cards.

I looked into the source code of the received notification e-mail and see smiliey links like this:
<img src="images/smiles/icon_biggrin.gif" alt=""  />

Any idea how to input the URL of my SuperStar Gallery folder?

Thanks in advance.

Joachim Müller


Gephri

Hi GauGau;

Gallery is located at: http://www.superstarparents.com/glry/

And here's a link to an album that allows Anonymous users to make comments: http://www.superstarparents.com/glry/displayimage.php?album=1&pos=1

The problem is that if someone makes a comment and uses smilies, I (as the Admin) get a confirmation email with a broken link for every smiley because the link doesn't inlcude "http://www.superstarparents.com/glry/".


Nibbler

db_input.php

look for


            if ($CONFIG['email_comment_notification'] && !USER_IS_ADMIN ) {
                $mail_body = "<p>" . bb_decode(process_smilies($msg_body)) . "</p>\n\r ".$lang_db_input_php['email_comment_body'] . " " . $CONFIG['ecards_more_pic_target'] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $redirect;
                cpg_mail('admin', $lang_db_input_php['email_comment_subject'], make_clickable($mail_body));
            }


Try changing to


            if ($CONFIG['email_comment_notification'] && !USER_IS_ADMIN ) {
                $mail_body = "<p>" . bb_decode(process_smilies($msg_body, $CONFIG['ecards_more_pic_target'])) . "</p>\n\r ".$lang_db_input_php['email_comment_body'] . " " . $CONFIG['ecards_more_pic_target'] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $redirect;
                cpg_mail('admin', $lang_db_input_php['email_comment_subject'], make_clickable($mail_body));
            }

Gephri

Thanks for taking such a quick look.

Made the change but icon did not show up in email - email code below:

<p>What a great picture...I think I&#39;m seeing stars! <img src="images/smilies/icon_eek.gif" alt=""  /></p>

A comment has been posted in the <i>SuperStar</i> Photo Gallery!<br><br>Read it at <a href="http://www.superstarparents.com/glry/displayimage.php?pos=-15" rel="external">http://www.superstarparents.com/glry/displayimage.php?pos=-15</a>


Any other thoughts?

Nibbler

I see, this has been half fixed in CVS since release. Change the code earlier in the file too


            if ($CONFIG['email_comment_notification']) {
                $mail_body = "<p>" . bb_decode(process_smilies($msg_body, $CONFIG['ecards_more_pic_target'])) . "</p>\n\r ".$lang_db_input_php['email_comment_body'] . " " . $CONFIG['ecards_more_pic_target'].(substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/').$redirect;
                cpg_mail('admin', $lang_db_input_php['email_comment_subject'], make_clickable($mail_body));
            }

Gephri

That's it! Thanks, now works perfectly.
Now, let me recap the changes for anyone else wanting to make the update (hey maybe this will also improve my karma!)

Open db_input.php

Find
if ($CONFIG['email_comment_notification']) {
                $mail_body = "<p>" . bb_decode(process_smilies($msg_body)) . "</p>\n\r ".$lang_db_input_php['email_comment_body'] . " " . $CONFIG['ecards_more_pic_target'].(substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/').$redirect;
                cpg_mail('admin', $lang_db_input_php['email_comment_subject'], make_clickable($mail_body));
            }


Replace with
if ($CONFIG['email_comment_notification']) {
                $mail_body = "<p>" . bb_decode(process_smilies($msg_body, $CONFIG['ecards_more_pic_target'])) . "</p>\n\r ".$lang_db_input_php['email_comment_body'] . " " . $CONFIG['ecards_more_pic_target'].(substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/').$redirect;
                cpg_mail('admin', $lang_db_input_php['email_comment_subject'], make_clickable($mail_body));
            }


Next, find
if ($CONFIG['email_comment_notification'] && !USER_IS_ADMIN ) {
                $mail_body = "<p>" . bb_decode(process_smilies($msg_body)) . "</p>\n\r ".$lang_db_input_php['email_comment_body'] . " " . $CONFIG['ecards_more_pic_target'] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $redirect;
                cpg_mail('admin', $lang_db_input_php['email_comment_subject'], make_clickable($mail_body));
            }


replace with
if ($CONFIG['email_comment_notification'] && !USER_IS_ADMIN ) {
                $mail_body = "<p>" . bb_decode(process_smilies($msg_body, $CONFIG['ecards_more_pic_target'])) . "</p>\n\r ".$lang_db_input_php['email_comment_body'] . " " . $CONFIG['ecards_more_pic_target'] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $redirect;
                cpg_mail('admin', $lang_db_input_php['email_comment_subject'], make_clickable($mail_body));


finally, sit back and wait for someone to post a comment with a smiley!