SimplePortal
Development => Bugs => Fixed or Bogus Bugs => Topic started by: realnc on December 03, 2009, 04:03:51 PM
-
SimplePortal 2.3.1
SMF 2.0 RC2
There is a problem with posts appearing on the portal front page that contain images that use "width" to limit the size of the image. For example, if the post specifies "width=220" in the img tag, SP rewrites this into "width=300" (by looking at the generated HTML the browser receives), breaking the intended layout of the poster.
I'm not sure if this has anything to do with the modifications I made to the img tag in Subs.php to support the "align", "hspace" and "vspace" attributes:
array(
'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'align' => array('optional' => true, 'value' => ' align="$1"', 'match' => '(left|right|middle|top|bottom)'),
'hspace' => array('optional' => true, 'value' => ' hspace="$1"', 'match' => '(\d+)'),
'vspace' => array('optional' => true, 'value' => ' vspace="$1"', 'match' => '(\d+)'),
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height}{align}{vspace}{hspace} class="bbc_img" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
'disabled_content' => '($1)',
),
-
I can't replicate this issue, could you please post a link to your website?
-
It doesn't seem to happen always. Here's a post where it does happen.
Forum post: http://foss.math.aegean.gr/~realnc/forum/index.php/topic,8022.0.html
Portal: http://foss.math.aegean.gr/~realnc/forum/index.php?sa=news;start=5
-
Does this still happen when you use style="height: xx; width: xx;" instead of width and height attributes for img tag?
-
Any updates realnc?
Okay, I see what you mean. However, I'm unable to reproduce the issue.
I have made a post with an image and set its width as 50 in the img tag. SP resizer didn't override it though.