mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +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);
|
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.
|
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.
|
preg_match("/([\w]*)(?:\.png|\.jpg|\.jpeg|\.gif)/i", $code_text, $match); // Generate required Alt attribute.
|
||||||
|
@@ -3751,24 +3751,53 @@ class e_form
|
|||||||
}
|
}
|
||||||
unset($tmp);
|
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>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
".$required."<span{$required_class}>".defset(vartrue($att['title']), vartrue($att['title']))."</span>".$label."
|
".$leftCell."
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
".$this->renderElement($keyName, $model->getIfPosted($valPath), $att, varset($model_required[$key], array()), $model->getId())."
|
".$rightCell."
|
||||||
{$help}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//if($bckp) $model->remove($bckp);
|
//if($bckp) $model->remove($bckp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print_a($fdata);
|
||||||
|
|
||||||
if($required_help)
|
if($required_help)
|
||||||
{
|
{
|
||||||
$required_help = '<div class="form-note">'.$this->getRequiredString().' - required fields</div>'; //TODO - lans
|
$required_help = '<div class="form-note">'.$this->getRequiredString().' - required fields</div>'; //TODO - lans
|
||||||
|
@@ -964,6 +964,9 @@ li.rssRow > div {
|
|||||||
|
|
||||||
.media-carousel-item-glyph { width: 64px; height:64px; overflow:hidden; margin-right:5px; margin-bottom:0px }
|
.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); }
|
body { background-color: rgb(68, 68, 68); }
|
||||||
|
Reference in New Issue
Block a user