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
-
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.
-
link and non-admin test user account?
-
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/".
-
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));
}
-
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'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?
-
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));
}
-
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!
-
Committed to CVS.