Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Custom email template

7 years 11 months ago
Licenses:
JomSocial Expired

Hi, is it possible to set different email templates for the jomsocial emails?
I started creating an email template override and I noticed in the jomsocial email template the variable $email_type
which I could then use to detect which email is being sent and present my custom design. However the $email_type returns undefined.

Can someone point me in the right direction on how to set different email templates?

Thanks

7 years 11 months ago
Licenses:

Hi, Sarah.

You mean different email template for each email?
There is a base email file:
ROOT/components/com_community/templates/jomsocial/layouts/email.html.php
Which allows you to customize email alyout.
There are also dozens of other files that are loaded inside main email template... you may try to customize tem as well.

Is seems that there is only one email type $email_type = 'etype_friends_invite_users' other are undefined.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 11 months ago
Licenses:
JomSocial Expired

HI Michal,
Thanks for that.

There is no template/layout for the welcome email neither for the account details/activation email.
Do you know where I can find those? Is there a way to differentiate what is being sent?

Thanks

7 years 11 months ago
Licenses:

HI, Sarah.

Activate account email content is taken from Joomla! as in a fact when registering in JomSocial you create Joomla! account which (if set so) must be activated. In such a case variable $content in email.html.php loads Joomla! langauge constant COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY

So there is only one template but loads different content. If you want to customize content, then you need to override language constants or - in case of JS emails - child email template e.g email.profile.wallcomment.html.php.

No, there is no way to way to differentiate what is being sent except $email_type = 'etype_friends_invite_users'


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 11 months ago
Licenses:
JomSocial Expired

Thanks for clarifying I will have to set up my email template in a modular way where part of the structure and style a placed in the language override.

7 years 11 months ago
Licenses:
JomSocial Expired

Hi again Michal,
I think my idea above didn't quite solve my problem and Jomsocial language override seems to not accept html markup.
I added a couple of divs and a table to the constant COM_COMMUNITY_EMAIL_REGISTRATION_ACCOUNT_DETAILS
But when the welcome email comes through it seems to remove the entire html

Can you confirm it is the correct behavior?

Thanks

The following user(s) said Thank You: Xristoph Conrad
7 years 11 months ago
Licenses:
JomSocial Expired

Seems to me Tables and Divs are not accepted in the account activation and register language override values.
So instead I checked the requested taks in the email.html.php to present the user with a different template for the registration and the activation email.

<?php if(JFactory::getApplication()->input->get('task') =='register_save'){ ?>
Welcome Email template
<?php } ?>
or
<?php if(JFactory::getApplication()->input->get('task') =='registerUpdateProfile'){ ?>
Activate your account Template
<?php } ?>

Thanks

The following user(s) said Thank You: Xristoph Conrad
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW