Email templates support for BBC/HTML

Started by asmith, January 22, 2016, 02:51:21 AM

Previous topic - Next topic

asmith

Hello,

I tried modifying Emailtemplates.{language}.php for both BBC/HTML, none of them worked. (They both sent the actual BBC or HTML)

Am I missing something? Or is it possible to add support for one of them at least?

Kindred

I believe that you can use HTML in the template -- of course, you also have to change the mail-type as well (don't recall where that is set)

but why?   HTML in emails is just plain annoying on any device other than a full computer.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

asmith

@margarett,
Thanks for the link. I do write private mods for myself to track the changes I'm doing to my forum. I'm familiar with the sendmail(). The point of this thread is to somehow add some solution for 2.1

@kindred,
Using HTML is not always to do fancy stuff. For example for right-to-left languages, you could wrap the email into <div style="direction: rtl"></div>. Because not all email providers auto-detect the right-to-left.

Moreover, some languages look better in some other system font. E.g. Persian looks much better in Tahoma but the system default is Arial.
In a multilingual forum, I've put $txt['lang_css'] = 'Persian-utf8.css'; in index.persian-utf8.php so that I could catch it inside index.template.php to add a custom language css.

On topic, that div could also define a new font-family for the email template.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

asmith

Maybe just add a HTML key into each template set that needs HTML:

$txt['resend_pending_message_html'] = true;
$txt['resend_pending_message_subject'] = 'Welcome to {FORUMNAME}';
$txt['resend_pending_message_body']  = 'Click on the activation link';


and modify sendmail() to act on that. (default still would be false)


Advertisement: