mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Fixes #795 Sitebutton path error in emails. Use {SITEBUTTON=email} if you have a custom email template.
This commit is contained in:
@@ -172,8 +172,8 @@ $EMAIL_TEMPLATE['default']['header'] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHT
|
|||||||
<style type='text/css'>
|
<style type='text/css'>
|
||||||
body { padding:10px; background-color: #E1E1E1 }
|
body { padding:10px; background-color: #E1E1E1 }
|
||||||
div#body { padding:10px; width: 800px; background-color: #FFFFFF; border-radius: 5px; font-family: helvetica,arial }
|
div#body { padding:10px; width: 800px; background-color: #FFFFFF; border-radius: 5px; font-family: helvetica,arial }
|
||||||
.video-thumbnail { max-width: 100% }
|
.video-thumbnail { max-width: 400px }
|
||||||
|
.media img { max-width:600px }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ $EMAIL_TEMPLATE['default']['header'] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHT
|
|||||||
<div id='body'>
|
<div id='body'>
|
||||||
";
|
";
|
||||||
|
|
||||||
$EMAIL_TEMPLATE['default']['body'] = "{BODY}";
|
$EMAIL_TEMPLATE['default']['body'] = "{BODY}<br />{MEDIA1}{MEDIA2}{MEDIA3}{MEDIA4}{MEDIA5}";
|
||||||
|
|
||||||
$EMAIL_TEMPLATE['default']['footer'] = "<br /><br />
|
$EMAIL_TEMPLATE['default']['footer'] = "<br /><br />
|
||||||
{SITENAME=link}
|
{SITENAME=link}
|
||||||
@@ -226,7 +226,7 @@ $EMAIL_TEMPLATE['signup']['body'] = "
|
|||||||
{SITENAME=link}<br />
|
{SITENAME=link}<br />
|
||||||
{SITEURL}
|
{SITEURL}
|
||||||
|
|
||||||
<br /><br />".($includeSiteButton ? "<a href='".SITEURL."' title=''>{SITEBUTTON}</a>" : '')."
|
<br /><br />{SITEBUTTON=email}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
";
|
";
|
||||||
|
@@ -8,11 +8,27 @@ if (!defined('e107_INIT')) { exit; }
|
|||||||
|
|
||||||
class siteinfo_shortcodes // must match the folder name of the plugin.
|
class siteinfo_shortcodes // must match the folder name of the plugin.
|
||||||
{
|
{
|
||||||
function sc_sitebutton()
|
function sc_sitebutton($parm='')
|
||||||
{
|
{
|
||||||
$path = ($_POST['sitebutton'] && $_POST['ajax_used']) ? e107::getParser()->replaceConstants($_POST['sitebutton']) : (strstr(SITEBUTTON, 'http:') ? SITEBUTTON : e_IMAGE.SITEBUTTON);
|
|
||||||
|
if($_POST['sitebutton'] && $_POST['ajax_used'])
|
||||||
|
{
|
||||||
|
$path = e107::getParser()->replaceConstants($_POST['sitebutton']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$path = (strstr(SITEBUTTON, 'http:') ? SITEBUTTON : e_IMAGE.SITEBUTTON);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($parm == 'email')
|
||||||
|
{
|
||||||
|
$path = e107::getConfig()->get('sitebutton');
|
||||||
|
}
|
||||||
//TODO use CSS class?
|
//TODO use CSS class?
|
||||||
return '<a href="'.SITEURL.'"><img src="'.$path.'" alt="'.SITENAME.'" /></a>';
|
if(!empty($path))
|
||||||
|
{
|
||||||
|
return '<a href="'.SITEURL.'"><img src="'.$path.'" alt="'.SITENAME.'" /></a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sc_sitedisclaimer()
|
function sc_sitedisclaimer()
|
||||||
|
Reference in New Issue
Block a user