coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 ecards & email => Topic started by: sugar on October 15, 2006, 11:51:23 PM

Title: need help with gallery name display in email
Post by: sugar on October 15, 2006, 11:51:23 PM
Hi,

When emails with the registration link are sent to new users, the sender looks like:

"\"sugar&#39;s Photo Gallery\"" <myemail@something.com> 

In the config at 'general' I set the gallery name: (example:) sugar's Photo Gallery.

Can you help me? I use coppermine 1.4.9.

Thanks in advance!

sugar.
Title: Re: need help with gallery name display in email
Post by: Sami on October 16, 2006, 12:08:11 AM
Known issue ( '  will replace by &#39 ) ,
You can remove ' from gallery name
Title: Re: need help with gallery name display in email
Post by: sugar on October 16, 2006, 07:00:34 PM
Quote from: Sami on October 16, 2006, 12:08:11 AM
Known issue ( '  will replace by &#39 ) ,
You can remove ' from gallery name

Hi Sami,
thanks for your reply.
When I replace ' by &#39 then my title on the main page of my gallery looks like "sugar&#39s Photo Gallery". Grrrrr...
I don't want this. Is there no other possibility other than removing the ' ? I mean, it would be wrong english if I write "sugars Photo Gallery".
Title: Re: need help with gallery name display in email
Post by: Nibbler on October 16, 2006, 08:10:53 PM
I applaud your insistence on good grammar. :)

include/mailer.inc.php

find

if ($sender_name == '') { $sender_name = '"' . $CONFIG['gallery_name'] . '"'; }

change to


global $HTML_SUBST;
if ($sender_name == '') $sender_name = strtr($CONFIG['gallery_name'], array_flip($HTML_SUBST));
Title: Re: need help with gallery name display in email
Post by: sugar on October 17, 2006, 07:32:20 PM
Quote from: Nibbler on October 16, 2006, 08:10:53 PM
I applaud your insistence on good grammar. :)

Hehe  ;D

Quote
if ($sender_name == '') { $sender_name = '"' . $CONFIG['gallery_name'] . '"'; }

change to


global $HTML_SUBST;
if ($sender_name == '') $sender_name = strtr($CONFIG['gallery_name'], array_flip($HTML_SUBST));


Thanks a lot!
It works fine now with the senders name/title in the email, but in the email subject it's like before  :-\

Guess I have to change the code of the mailer.inc.php somewhere else as well? But where?

Title: Re: need help with gallery name display in email
Post by: sugar on October 23, 2006, 07:32:23 PM
Ok, I guess there is no soluton for the broken subject in emails?

Just want to know if I can stop searching for a fix...

Thanks for any reply in advance,

sugar.
Title: Re: need help with gallery name display in email
Post by: Nibbler on October 23, 2006, 08:28:43 PM
Apply the same code to the subject.

$subject = strtr($subject, array_flip($HTML_SUBST));
Title: Re: need help with gallery name display in email
Post by: sugar on October 27, 2006, 01:20:59 AM
Thank you very much, Nibbler!  :)

First, I didn't really know where to add the code you suggested, because I couldn't find something that looked right,
but then I inserted it right under the other code (see above post) and it seems too work (I made one user registration test).
YEAH!!
Thanks for your help! Now I'm very happy.  8)

I hope this little fix will be included in the next update of coppermine. ;)
Title: Re: need help with gallery name display in email
Post by: Nibbler on October 27, 2006, 01:38:52 AM
Quote from: sugar on October 27, 2006, 01:20:59 AM
I hope this little fix will be included in the next update of coppermine. ;)

Done.