Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: admin email notification doesnt show smilies - but they show up on ecards  (Read 7574 times)

0 Members and 1 Guest are viewing this topic.

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235

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.
« Last Edit: February 20, 2006, 02:01:31 am by Nibbler »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: admin email notification doesnt show smilies - but they show up on ecards
« Reply #1 on: February 19, 2006, 12:32:32 pm »

link and non-admin test user account?
Logged

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: admin email notification doesnt show smilies - but they show up on ecards
« Reply #2 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/".

Logged

Nibbler

  • Guest
Re: admin email notification doesnt show smilies - but they show up on ecards
« Reply #3 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));
            }
Logged

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: admin email notification doesnt show smilies - but they show up on ecards
« Reply #4 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?
Logged

Nibbler

  • Guest
Re: admin email notification doesnt show smilies - but they show up on ecards
« Reply #5 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));
            }
Logged

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: admin email notification doesnt show smilies - but they show up on ecards
« Reply #6 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!
Logged

Nibbler

  • Guest
Re: admin email notification doesnt show smilies - but they show up on ecards
« Reply #7 on: February 20, 2006, 02:01:21 am »

Committed to CVS.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.