1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Image size correction on bbcode [img] and automatically display full-width in admin when bbarea is used.

This commit is contained in:
Cameron 2014-05-31 23:18:01 -07:00
parent 2eb638f05e
commit 28c8c25ee4
3 changed files with 48 additions and 11 deletions

View File

@ -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.

View File

@ -3751,24 +3751,53 @@ class e_form
}
unset($tmp);
}
*
*
*
*
*/
$text .= "
$leftCell = $required."<span{$required_class}>".defset(vartrue($att['title']), vartrue($att['title']))."</span>".$label;
$rightCell = $this->renderElement($keyName, $model->getIfPosted($valPath), $att, varset($model_required[$key], array()), $model->getId())." {$help}";
if(vartrue($att['type']) == 'bbarea')
{
$text .= "
<tr><td colspan='2'>
<div style='padding-bottom:8px'>".$leftCell."</div>".
$rightCell."
</td>
</tr>
";
}
else
{
$text .= "
<tr>
<td>
".$required."<span{$required_class}>".defset(vartrue($att['title']), vartrue($att['title']))."</span>".$label."
".$leftCell."
</td>
<td>
".$this->renderElement($keyName, $model->getIfPosted($valPath), $att, varset($model_required[$key], array()), $model->getId())."
{$help}
".$rightCell."
</td>
</tr>
";
";
}
}
//if($bckp) $model->remove($bckp);
}
print_a($fdata);
if($required_help)
{
$required_help = '<div class="form-note">'.$this->getRequiredString().' - required fields</div>'; //TODO - lans

View File

@ -964,6 +964,9 @@ li.rssRow > div {
.media-carousel-item-glyph { width: 64px; height:64px; overflow:hidden; margin-right:5px; margin-bottom:0px }
.media-manager {padding:20px; min-height:400px }
/*
body { background-color: rgb(68, 68, 68); }