Home/Featuredbox

* allow defining a time span during which the box should be displayed
 * added fields optional fields to point to diffenret header and home logos for the duration
This commit is contained in:
Sarjuuk
2017-01-20 18:10:31 +01:00
parent 8fd52835a6
commit d0f64fe66c
8 changed files with 89 additions and 50 deletions

View File

@@ -1014,8 +1014,8 @@ class Util
return $data;
}
else
return htmlspecialchars(trim($data), ENT_QUOTES, 'utf-8');
return htmlspecialchars(trim($data), ENT_QUOTES, 'utf-8');
}
public static function jsEscape($data)
@@ -1027,14 +1027,32 @@ class Util
return $data;
}
else
return strtr(trim($data), array(
'\\' => '\\\\',
"'" => "\\'",
'"' => '\\"',
"\r" => '\\r',
"\n" => '\\n'
));
return strtr(trim($data), array(
'\\' => '\\\\',
"'" => "\\'",
'"' => '\\"',
"\r" => '\\r',
"\n" => '\\n'
));
}
public static function defStatic($data)
{
if (is_array($data))
{
foreach ($data as &$v)
$v = self::defStatic($v);
return $data;
}
return strtr($data, array(
'<script' => '<scr"+"ipt',
'script>' => 'scr"+"ipt>',
'HOST_URL' => HOST_URL,
'STATIC_URL' => STATIC_URL
));
}
// default back to enUS if localization unavailable