First Image as Thumbnails

Hi TP,

I know there are many concernss regarding this but I just want to confirm if there's still no quick fix to this?

I'm not PHP expert but I know the section I need to edit is this part
$item->introtext = str_replace($txtimgel,"",$item->introtext);
					if (preg_match_all("#http#",$txtimgel,$txtimelsr,PREG_PATTERN_ORDER) > 0) {
						preg_match_all("#src=\"([\-\/\_A-Za-z0-9\.\:]+)\"#",$txtimgel,$txtimgelsr);
						if (!empty($item->thumb_images)) {
							$item->thumb_images = $txtimgelsr[1][0] . "\n" . $item->thumb_images;
						}
						else {
							$item->thumb_images = $txtimgelsr[1][0];
						}

I hope to hear from you soon. Thank you!
11 years 4 months ago #1 by John Tower

Please Log in or Create an account to join the conversation.

Hello

You need to understand about the introtext part function.
The codes above will try process your article image in introtext part of your article. But if you have more than one image on that part then the last one will get processed. So you need to make sure you only have one image on that introtext part and place another images if any into the fulltext part of your article. (You will get a fulltext part if you separate your article content into two part (one or two paragraph for introtext and the rest for fulltext part) by clicking Read more button at the bottom of your Editor.)
11 years 4 months ago #2 by erwinschro

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum