Nov design za emaile - V DELU
This commit is contained in:
parent
e1ac5b0e6d
commit
43ee83567d
@ -537,7 +537,7 @@ class MailAdapter{
|
||||
$this->phpMailerClass->Subject = $email_subject;
|
||||
|
||||
// Vsebina maila
|
||||
$this->phpMailerClass->msgHTML($email_msg);
|
||||
$this->prepareEmailDesign($email_msg);
|
||||
|
||||
|
||||
// Loop cez prejemnike in posiljanje
|
||||
@ -664,7 +664,7 @@ class MailAdapter{
|
||||
$this->phpMailerClass->Subject = $email_subject;
|
||||
|
||||
// Vsebina maila
|
||||
$this->phpMailerClass->msgHTML($email_msg);
|
||||
$this->prepareEmailDesign($email_msg);
|
||||
|
||||
|
||||
// Loop cez prejemnike in posiljanje
|
||||
@ -707,6 +707,163 @@ class MailAdapter{
|
||||
}
|
||||
}
|
||||
|
||||
// Pripravimo design emaila
|
||||
private function prepareEmailDesign($content){
|
||||
global $lang, $app_settings, $site_domain;
|
||||
|
||||
// V nekaterih primerih ne designeramo maila
|
||||
if(!in_array($this->type, array('account', 'payments')) || !in_array($site_domain, array('localhost', 'www.1ka.si', 'test.1ka.si', 'test2.1ka.si'))){
|
||||
$this->phpMailerClass->msgHTML($content);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Logo
|
||||
$logo_src = ($lang['id'] == '1') ? 'https://www.1ka.si/public/img/logo/1ka_slo.png' : 'https://www.1ka.si/public/img/logo/1ka_eng.png';
|
||||
|
||||
// Naslov
|
||||
//$heading = 'Naslovček';
|
||||
$heading_html = ($heading != '') ? '<tr><td style="color: #153643; font-family: Montserrat,sans-serif;"><h1 style="font-size: 24px; margin: 0;">'.$heading.'</h1></td></tr>' : '';
|
||||
|
||||
// Vsebina
|
||||
$text = $content;
|
||||
$text_html = ($text != '') ? '<tr><td style="color: #153643; font-family: Montserrat,sans-serif; font-size: 16px; line-height: 24px; padding: 20px 0 30px 0;"><p style="margin: 0;">'.$text.'</p></td></tr>' : '';
|
||||
|
||||
// Slika
|
||||
//$image = '<img src="https://www.go-tel.si/upload/relevantna-slika.png" style="display: block;" />';
|
||||
$image_html = ($image != '') ? '<tr><td align="center">'.$image.'</td></tr>' : '';
|
||||
|
||||
// Gumb
|
||||
//$button_html = '<tr><td align="center"><a href="https://1ka.si" style="text-decoration:none"><p style="font-family: Montserrat,sans-serif; font-size: 18px; padding: 20px 0 20px 0;text-align:center;background-color:#1e88e5;color:white;">Call to Action</p></a></td></tr>';
|
||||
|
||||
// Podpis
|
||||
$signature_html = '<tr><td style="color: #153643; font-family: Montserrat,sans-serif; font-size: 16px; line-height: 24px; padding: 20px 0 0 0;"><p style="margin: 0;">'.$lang['srv_1ka_mail_signature_bye'].'</p></td></tr>';
|
||||
|
||||
|
||||
$designed_content = '
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-GB">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>1ka template</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
|
||||
<style type="text/css">
|
||||
a[x-apple-data-detectors] {color: inherit !important;}
|
||||
|
||||
a{
|
||||
color:#1e88e5;
|
||||
text-decoration:none;
|
||||
transition:0.2s;
|
||||
}
|
||||
a:hover{
|
||||
color: #4ca0ea;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px){
|
||||
table.white_holder{
|
||||
border-collapse:collapse;
|
||||
width:100%;
|
||||
}
|
||||
.content img{
|
||||
width:100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="margin: 0; padding: 0;background-color:#1e88e5" bgcolor="#1e88e5">
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 30px 15px 30px 15px;">
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" width="570" class="white_holder">
|
||||
<tr>
|
||||
<td align="center" bgcolor="white" style="padding: 30px 0 30px 0;">
|
||||
<img src="'.$logo_src.'" alt="header" width="100" style="display: block;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#ffffff" style="padding: 20px 30px 40px 30px;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="content">
|
||||
|
||||
<!-- NASLOV -->
|
||||
'.$heading_html.'
|
||||
|
||||
<!-- SLIKA -->
|
||||
'.$image_html.'
|
||||
|
||||
<!-- VSEBINA -->
|
||||
'.$text_html.'
|
||||
|
||||
<!-- GUMB -->
|
||||
'.$button_html.'
|
||||
|
||||
<!-- PODPIS -->
|
||||
'.$signature_html.'
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#f7f7f7" style="padding: 30px 30px;color:#ababab;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;">
|
||||
<tr>
|
||||
<td style="color: #828282; font-family: Montserrat,sans-serif; font-size: 13px;">
|
||||
<p style="margin: 0 0 15px 0;">'.$lang['email_template_footer'].'</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;">
|
||||
<tr>
|
||||
<td>
|
||||
<a href="https://www.facebook.com/1KAenklikanketa/" target="_blank">
|
||||
<img src="https://facebookbrand.com/wp-content/uploads/2019/04/f_logo_RGB-Hex-Blue_512.png?w=512&h=512" alt="Facebook." width="35" height="35" style="display: block;" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td style="background-color:#f7f7f7;width:20px;" width="20"> </td>
|
||||
<td>
|
||||
<a href="https://www.youtube.com/channel/UCWhsQe9qIjGpbD0-TCdPg7Q" target="_blank">
|
||||
<img src="https://www.go-tel.si/upload/yt-logo.png" alt="youtube." width="35" height="35" style="display: block;" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td style="background-color:#f7f7f7;width:20px;" width="20" > </td>
|
||||
<td>
|
||||
<a href="https://twitter.com/enklikanketa" target="_blank">
|
||||
<img src="https://cdn.cms-twdigitalassets.com/content/dam/developer-twitter/images/Twitter_logo_blue_48.png" alt="Twitter." width="35" height="35" style="display: block;" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table> <!-- ® 1KA -->
|
||||
<p style="color: #efefef; font-family: Montserrat,sans-serif; font-size: 12px; line-height: 24px; padding: 5px 0 30px 0;text-align:center">
|
||||
Sporočilo smo vam poslali na tralala@gmail.com.
|
||||
<br>
|
||||
Za odjavo kliknite <a href="#" style="color: #efefef">tukaj</a>.
|
||||
<br>
|
||||
Za spremembo nastavitev kliknite <a href="#" style="color: #efefef">tukaj</a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
';
|
||||
|
||||
|
||||
/*echo $designed_content;
|
||||
die();*/
|
||||
|
||||
$this->phpMailerClass->msgHTML($designed_content);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Preveri ce je mail veljaven
|
||||
|
10
lang/1.php
10
lang/1.php
@ -7903,7 +7903,15 @@ $lang = array (
|
||||
|
||||
'install_finish_title' => 'Zaključek namestitve',
|
||||
'install_finish_text' => 'Namestitev je uspešno zaključena.',
|
||||
'install_finish_redirect' => 'Na naslovnico',
|
||||
'install_finish_redirect' => 'Na naslovnico',
|
||||
|
||||
|
||||
|
||||
/* EMAIL TEMPLATE */
|
||||
'email_template_footer' => 'Potrebujete pomoč pri ustvarjanju ankete ali analiziranju podatkov? Poglejte naš <a href="https://www.1ka.si/d/sl/pomoc">priročnik</a> ali zaprosite za pomoč enega od <a href="https://www.go-tel.si/instrukcije/1ka">naših strokovnjakov</a>.',
|
||||
'email_template_footer2_recipient' => 'Sporočilo smo vam poslali na',
|
||||
'email_template_footer2_unsubscribe' => 'Za odjavo kliknite <a href="#" style="color: #efefef">tukaj</a>.',
|
||||
'email_template_footer2_unsubscribe' => 'Za spremembo nastavitev kliknite <a href="#" style="color: #efefef">tukaj</a>.',
|
||||
|
||||
|
||||
|
||||
|
@ -7797,6 +7797,15 @@ GDPR introduction preview",
|
||||
'install_finish_title' => 'Installation finished.',
|
||||
'install_finish_text' => 'Application installation successfully finished.',
|
||||
'install_finish_redirect' => 'To main page',
|
||||
|
||||
|
||||
|
||||
/* EMAIL TEMPLATE */
|
||||
'email_template_footer' => 'Do you need help with creating a survey or analizing data? Take a look at our in-detail <a href="https://www.1ka.si/d/en/help">help section</a> or hire one of <a href="https://www.go-tel.si/instrukcije/1ka">our specialists</a> to help you.',
|
||||
'email_template_footer2_recipient' => 'This message was sent to',
|
||||
'email_template_footer2_unsubscribe' => 'To unsubscribe click <a href="#" style="color: #efefef">here</a>.',
|
||||
'email_template_footer2_unsubscribe' => 'To change your settings click <a href="#" style="color: #efefef">here</a>.',
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user