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