. ??
    ~
Advanced Hosters -

freee
: 17.03.2009
: 1
# : 04, 2010 11:55 am
. 9.0

img , , ?



:
// *************************
// START MODERN RELATED NEWS
// *************************
preg_match('|<img(.*) src="([^"]*)"[^>]*>|is', $related['short_story'], $pts);
$thumba_parts = pathinfo($pts[2]);

if($pts[2]){
$pictitle = stripslashes( $related['title'] );
$pic = $thumba_parts['dirname'].'/'.$thumba_parts['basename'];
$wide = str_replace('thumbs/', "", $pic);
if(file_exists($wide)) $preview = "<a href=\"$wide\" onclick=\"return hs.expand(this)\"><img src=\"$pic\" width=\"64px\"; alt=\"$pictitle\" title=\"$pictitle\"></a>";
else $preview = "<img src=\"$pic\" width=\"64px\"; alt=\"$pictitle\" title=\"$pictitle\">";
}
else $preview = "<img src=\"$xfvalue_img\" width=\"64px\" height=\"64px\">";
$related['short_story'] = preg_replace("/\[attachment=[[:digit:]]*\]/si","",stripslashes($related['short_story']));
$related['short_story'] = preg_replace("/<!--*-->/si","",$related['short_story']);
$related['short_story'] = strip_tags($related['short_story']);
if( strlen( $related['short_story'] ) > $config['related_news_n'] ) $related['short_story'] = substr( $related['short_story'], 0, $config['related_news_n'] ) . " ... <a href=\"$full_link\"></a>";

$xfrelated = xfieldsdataload( $related['xfields'] );
$buffer .= "<div style=\"width:33%;float:left\"><table><tr><td height='200'><a  href=\"" . $full_link . "\">" . stripslashes( $related['title'] ) . "</a><br><br><a href=\"" . $full_link . "\"><img src=\"" . stripslashes( $xfrelated['img'] ) . "\" width='200' height='140' alt=\"\" /></a></td></tr></table></div>";

// *************************
// END MODERN RELATED NEWS
// *************************

    ~