mirror of
https://github.com/e107inc/e107.git
synced 2025-08-17 20:01:47 +02:00
New {SETIMAGE} shortcode for theme developers. Using this prior to a media-manager image being called will allow one to set the default size for the image (ie. when not specified otherwise). eg. {SETIMAGE|w=293} will set the width of the images to 293px.
This commit is contained in:
@@ -65,6 +65,8 @@ class e_parse extends e_parser
|
||||
|
||||
// Highlight query
|
||||
var $e_query;
|
||||
|
||||
public $thumbWidth = 100;
|
||||
|
||||
// Set up the defaults
|
||||
var $e_optDefault = array(
|
||||
@@ -1833,7 +1835,7 @@ class e_parse extends e_parser
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!vartrue($options['w']) && !vartrue($options['h'])) $options['w'] = 100;
|
||||
if(!vartrue($options['w']) && !vartrue($options['h'])) $options['w'] = $this->thumbWidth;
|
||||
$thurl .= 'w='.((integer) vartrue($options['w'], 0)).'&h='.((integer) vartrue($options['h'], 0));
|
||||
}
|
||||
|
||||
@@ -2445,6 +2447,13 @@ class e_parser
|
||||
|
||||
|
||||
|
||||
// Parse i_xxxx to bootstrap glyph format.
|
||||
public function glyph($text)
|
||||
{
|
||||
$text = preg_replace('/\[(i_[\w]*)\]/',"<i class='$1'></i>", $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Perform and render XSS Test Comparison
|
||||
|
Reference in New Issue
Block a user