UPDATES EasyBlog 6.0.11 Released! Update to the latest version now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is offline
It is currently off working hours and most of us aren't around

Rest assured that we will get back to you as soon as the day starts tomorrow!
  Support is offline

EasyBlog Notification Email Styling

Jamie Barker · ·
12:49 AM Friday, 18 November 2022
Urgent
Hi there,

After updating EasyBlog to v6, we wanted to make changes to the look of the email notifications, for example the "New Post" email.

We want to change the colour of the "View Post" button at the bottom of the email from the "primary" blue to our branded green, but cannot see how this is achieved.

From what I can work out, the button is generated via the "/foundry/themes/html/email/button.php" template file:
<td align="center" bgcolor="<?php echo $buttonColor->background;?>" role="presentation" style="border:none;border-radius:3px;cursor:auto;mso-padding-alt:10px 25px;background:<?php echo $buttonColor->background;?>;" valign="middle">
<a href="/<?php echo $link;?>" style="display: inline-block;background: <?php echo $buttonColor->background;?>;color: <?php echo $buttonColor->text;?>;font-family: Arial, sans-serif;font-size: 16px;font-weight: bold;line-height: 120%;margin: 0;text-transform: none;padding: 10px 25px;mso-padding-alt: 0px;border-radius: 3px;text-decoration: none;" target="_blank">
<?php echo JText::_($text);?>
</a>
</td>


How can we change the $buttonColor variable to our own colour? If we override this template and replace that variable with a hardcoded colour, that would mean every button will be coloured that way. Is there a way to only change the colour for the "New Post" email? In the "/com_easyblog/themes/wireframe/emails/post.new.php" template file, I can see the button is being inserted here with this code:

<?php echo $this->fd->html('email.button', 'COM_EASYBLOG_VIEW_POST', $templatePreview ? 'javascript:void(0);' : $blogLink, 'primary'); ?>


Changing "primary" to other variables takes effect (eg "danger" turns the button red) but how can we create a new variable to apply our changes to make the button a specific colour of green?

Thanks in advance for your assistance, please let me know if you need any clarification on the question.
The replies under this section are restricted to logged in users or users with an active subscription with us