[SOLVED] Personalizing Notifications (more than translate)?

12 years 3 days ago - 11 years 11 months ago #195498 by jaume_teixido
Hi again... every day I more satisfied with GJ choose, but also, every day I have new ideas and (maybe) whishlist thinks...


exist any way to personalize the notifications mails (not translate), add variables (for exemple event description, location, time, ...)?

it's possible add a logo or banner?

thanks.

Please Log in to join the conversation.

12 years 2 days ago #195608 by krileon
They're language strings, which in most cases support substitutions so you can put whatever you want. Please see included English language plugin to begin changing the strings. Some locations such as the Event integration for example support addition substitutions like the below.

[event_id]
[event_title]
[event_event]
[event_url]
[event_date]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 11 months ago #196127 by jaume_teixido
Replied by jaume_teixido on topic Re: Personalizing Notifications (more than translate)?
It's ok... I have problems with the message charset... could you please help me and try to oriented where I must to configure another charset to just affect to he mail messages...

for the rest of places the charset it's ok...

Please Log in to join the conversation.

11 years 11 months ago #196154 by krileon
I don't understand what you're asking, sorry. All stings need to be UTF8.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 11 months ago #196158 by jaume_teixido
Replied by jaume_teixido on topic Re: Personalizing Notifications (more than translate)?
I personalize using html table the message (i know that is not the best way but for me is the easyest one

if ( ( $row->published == 0 ) && $events_approve && ( ! cbgjClass::hasAccess( 'mod_lvl4', $authorized ) ) && $notification_params->get( 'group_eventapprove' ) ) {
$message = CBTxt::P( '[user] scheduled [event_url] in [group] and requires approval!', array( '[event_id]' => $row->id, '[event_event]' => $row->getEvent(), '[event_title]' => $row->getTitle(), '[event_url]' => $row->getTitle( 0, true ), '[event_date]' => $row->getDate() ) );
} elseif ( $notification_params->get( 'group_eventnew' ) ) {
$message = '<table style="text-align: left; width: 500px;" border="0" cellpadding="2" cellspacing="2" http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">'
. '<tbody>'
. '<tr>'
. '<td colspan="2" rowspan="1">'
. '<img alt="" src="www.cevilassardemar.cat/webjoomla/images/logo.png">'
. '</td>'
. '</tr>'
. '<tr>'
. '<td style="width: 50px; vertical-align: top;" colspan="1" rowspan="6">'
. CBTxt::P( '[avatar]', array( '[avatar]' => $row->getOwnerAvatar( true ) ) )
. '</td>'
. '<td>'
. CBTxt::P( '[user] ens proposa...')
. '</td>'
. '</tr>'
. '<tr>'
. '<td>'
. '<h2>'
. CBTxt::P('[event_title] a [group]', array( '[event_title]' => $row->getTitle(), '[event_url]' => $row->getTitle( 0, true )))
. '</h2>'
. '</td>'
. '</tr>'
. '<tr>'
. '<td>'
. CBTxt::P( '[event_event]', array( '[event_event]' => $row->getEvent()))
. '</td>'
. '</tr>'
. '<tr>'
. '<td>'
. CBTxt::P( 'On anem: [event_location]', array('[event_location]' => $row->location))
. '</td>'
. '</tr>'
. '<tr>'
. '<td>'
. CBTxt::P( 'On quedem: [event_address]', array('[event_address]' => $row->address))
. '</td>'
. '</tr>'
. '<tr>'
. '<td>'
. CBTxt::P( 'Quan quedem: [event_date]', array('[event_date]' => $row->getDate()))
. '</td>'
. '</tr>'
. '<tr>'
. '<td colspan="2" rowspan="1">'
. '</td>'
. '</tr>'
. '<tr>'
. '<td colspan="2" rowspan="1">El Centre Excursionista Vilassar de Mar declina qualsevol responsabilitat sobre les activitats proposades per socis, socies i resta de persones que facin ús dels seus recursos de comunicació. També recomana revisar bé si les condicions propies per realitzar aquesta activitat són les necessèries. Recorda que si et vols donar de baixa d´aquestes nofiticacions ho pots fer tu mateix des de la nostra web accedint al menú de notificacions.'
. '</tr>'
. '<tr>'
. '<td colspan="2" rowspan="1">'
. '</td>'
. '</tr>'
. '<tr>'
. '<td colspan="2" rowspan="1">Accedeix a la nostra <a href="www.cevilassardemar.cat">web per veure la resta de propostes que et fem.'
. '</tr>'
. '</tbody>'
. '</table>';

}
}


the problem is that the messages are sent without correct charset

no àá ñ éè etc...

Please Log in to join the conversation.

11 years 11 months ago #196163 by krileon
Don't know what to tell you. Why did you edit the source code? You're supposed to be altering the message through language strings. All characters must be valid UTF8.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.169 seconds

Facebook Twitter LinkedIn