mirror of
https://github.com/e107inc/e107.git
synced 2025-08-19 12:51:52 +02:00
Image size correction on bbcode [img] and automatically display full-width in admin when bbarea is used.
This commit is contained in:
@@ -82,11 +82,16 @@ class bb_img extends e_bb_base
|
||||
|
||||
parse_str($parm,$imgParms);
|
||||
|
||||
// foreach($tmp as $p => $v)
|
||||
|
||||
if(!vartrue($imgParms['width']) && strpos($parm,'width')!==false) // Calculate thumbnail width from style.
|
||||
{
|
||||
// $imgParms[$p]=$v;
|
||||
}
|
||||
|
||||
preg_match("/width:([\d]*)/i", $parm, $m);
|
||||
if($m[1] > 0)
|
||||
{
|
||||
$imgParms['width'] = $m[1];
|
||||
}
|
||||
}
|
||||
|
||||
if(!vartrue($imgParms['alt'])) // Generate an Alt value from filename if one not found.
|
||||
{
|
||||
preg_match("/([\w]*)(?:\.png|\.jpg|\.jpeg|\.gif)/i", $code_text, $match); // Generate required Alt attribute.
|
||||
|
Reference in New Issue
Block a user