rendered paste body//// Turns an URL from the [img] tag into an <img> tag or a <a href...> tag//function handle_img_tag($url, $is_signature = false){ global $lang_common, $pun_config, $pun_user; $img_tag = '<a href="'.$url.'"><'.$lang_common['Image link'].'></a>'; if ($is_signature && $pun_user['show_img_sig'] != '0') $img_tag = '<img class="sigimage" src="'.$url.'" alt="'.htmlspecialchars($url).'" />'; else if (!$is_signature && $pun_user['show_img'] != '0') { $imagehw = @getimagesize($url); if ($imagehw) { $width = $imagehw[0]; $height = $imagehw[1]; $img_tag = '<img class="postimg" src="'.$url.'" alt="'.htmlspecialchars($url).'" />'; if ($width > 550) { $img_tag = '<a href="'.$url.'" rel="lightbox">' . $img_tag . '</a>'; } } else { $img_tag = '<strong>error: image ' . $url . ' cannot be loaded.</strong>'; } } return $img_tag;}