Witam, mam problem z obrazkiem, który po wyświetleniu "wyjeżdża" poza ramkę.
Zdjęcie:
Kod PHP (dodane parsowanie BBCode):
protected function fetchNews( $limit )
{
$this->DB->build( array( 'select' => 'p.*, t.*',
'from' => array( 'posts' => 'p',
'topics' => 't' ),
'where' => 't.tid = p.topic_id AND t.forum_id = 5 AND new_topic = 1 AND tdelete_time = 0',
'limit' => $limit,
'order' => 't.tid DESC' ) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$row['text'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $row['post'] );
$news[] = $row;
}
return $news;
}
public function doExecute( ipsRegistry $registry )
{
IPSText::getTextClass('bbcode') -> parse_html = 1;
IPSText::getTextClass('bbcode') -> parse_nl2br = 0;
IPSText::getTextClass('bbcode') -> parse_bbcode = 1;
IPSText::getTextClass('bbcode') -> parse_smilies = 1;
IPSText::getTextClass('bbcode') -> parsing_section = 'news_news_main';
$news = $this->fetchNews( 2 );
}
<div class="news_body" style="margin: 0;padding: 0;">
<p>{$row['text']}</p>
</div>
.news_body {
font-size: 14px;
line-height: 22px;
}