1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-25 07:21:03 +02:00

Issue #2600 defining e_HTTP_STATIC now applies to images (using thumbUrl/toImage) as well as js/css.

eg. define('e_HTTP_STATIC', 'http://static.mydomain.com/');
This commit is contained in:
Cameron
2017-04-28 15:07:36 -07:00
parent e755b2c9d4
commit 4c6f015fa8
5 changed files with 39 additions and 22 deletions

View File

@@ -2529,6 +2529,11 @@ class e_parse extends e_parser
if($raw) $url = $this->createConstants($url, 'mix');
$baseurl = ($full ? SITEURL : e_HTTP).'thumb.php?';
if(defined('e_HTTP_STATIC'))
{
$baseurl = e_HTTP_STATIC.'thumb.php?';
}
$thurl = 'src='.urlencode($url).'&';
@@ -2722,6 +2727,11 @@ class e_parse extends e_parser
{
$base = (!empty($options['ebase'])) ? '{e_BASE}' : e_HTTP;
}
if(defined('e_HTTP_STATIC'))
{
$base = e_HTTP_STATIC;
}
// $base = (!empty($options['full'])) ? SITEURL : e_HTTP;
if(!empty($options['x']) && !empty($options['ext'])) // base64 encoded. Build URL for: RewriteRule ^media\/img\/([-A-Za-z0-9+/]*={0,3})\.(jpg|gif|png)?$ thumb.php?id=$1
@@ -5114,6 +5124,8 @@ class e_emotefilter
return;
}
$base = deftrue('e_HTTP_STATIC', SITEURLBASE);
foreach($this->emotes as $key => $value)
{
@@ -5130,8 +5142,10 @@ class e_emotefilter
$key = str_replace("!", "_", $key);
$filename = e_IMAGE."emotes/" . $pref['emotepack'] . "/" . $key;
$fileloc = SITEURLBASE.e_IMAGE_ABS."emotes/" . $pref['emotepack'] . "/" . $key;
$fileloc = $base.e_IMAGE_ABS."emotes/" . $pref['emotepack'] . "/" . $key;
$alt = str_replace(array('.png','.gif', '.jpg'),'', $key);