The height is arbitrary, you can change it of course (see the last code)
Open your src/pfcurlprocessing.php file
Look for this line:
- Code: Select all
// pad it with a space so we can match things at the start of the 1st line.
$ret = ' ' . $text;
Immediately after it, paste:
- Code: Select all
// look for a jpg, gif, or png reference
// if not found, carry on as normal
$pos = strpos($ret,"jpg") || $pos = strpos($ret,"JPG") || $pos = strpos($ret,"png") || $pos = strpos($ret,"PNG") || $pos = strpos($ret,"gif") || $pos = strpos($ret,"GIF");
if($pos === false) {
come down to:
- Code: Select all
// Remove our padding..
$ret = substr($ret, 1);
Immediately after it, paste:
- Code: Select all
} else {
// remove padding also
$ret = substr($ret, 1);
$ret = trim($ret);
list($height) = getimagesize($ret);
// make sure we do have an image
if ($height) {
// find details and adjust if need be
if ($height <= 320) {
$height=$height;
} else {
$height = 320;
}
$ret = '<img src="' .$ret. '" height="' .$height. '">';
}}
EDITED ^^^^^^^^^^^^ this last portion has been updated.
See the next post
Your next line, already there, will read:
- Code: Select all
return($ret);
}
Enjoy