forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Gephri on February 18, 2006, 07:25:57 pm

Title: admin email notification doesnt show smilies - but they show up on ecards
Post by: Gephri on February 18, 2006, 07:25:57 pm
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.
Title: Re: admin email notification doesnt show smilies - but they show up on ecards
Post by: Joachim Müller on February 19, 2006, 12:32:32 pm
link and non-admin test user account?
Title: Re: admin email notification doesnt show smilies - but they show up on ecards
Post by: Gephri on February 19, 2006, 05:40:52 pm
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/".

Title: Re: admin email notification doesnt show smilies - but they show up on ecards
Post by: Nibbler on February 19, 2006, 05:52:39 pm
db_input.php

look for

Code: [Select]
            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

Code: [Select]
            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));
            }
Title: Re: admin email notification doesnt show smilies - but they show up on ecards
Post by: Gephri on February 19, 2006, 06:36:54 pm
Thanks for taking such a quick look.

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

Code: [Select]
<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?
Title: Re: admin email notification doesnt show smilies - but they show up on ecards
Post by: Nibbler on February 19, 2006, 06:49:48 pm
I see, this has been half fixed in CVS since release. Change the code earlier in the file too

Code: [Select]
            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));
            }
Title: Re: admin email notification doesnt show smilies - but they show up on ecards
Post by: Gephri on February 19, 2006, 07:23:57 pm
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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
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!
Title: Re: admin email notification doesnt show smilies - but they show up on ecards
Post by: Nibbler on February 20, 2006, 02:01:21 am
Committed to CVS.