Thumbnails: how to make Minifront Page find the fulltext image first and after the intro image?

Hi!

I know that, for the creation of the thumbnails, Minifront page looks first for the intro image and, if it doesn't exist, it looks for the fulltext image.

I would like the module to do everything in reverse: first the fulltext and after the intro.

This interests me in particular regarding the Default theme.

Could you give me the code needed to do this and tell me exactly where to put it?

Thanks,
Vincenzo
4 years 1 month ago #1 by Vincenzo

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

  • Posted by TemplatePlazza (5261) Offline
Hi, you need to modify the helper file : Helper/MinifrontpageproHelper.php
at line 197 you will see this code :
if (!empty($images->image_intro) ) { 
				$orig_image = $images->image_intro;
			} elseif (empty($images->image_intro) && !empty($images->image_fulltext) ) { 
				$orig_image = $images->image_fulltext;

change that to :
if (!empty($images->image_fulltext) ) { 
				$orig_image = $images->image_fulltext;
			} elseif (empty($images->image_fulltext) && !empty($images->image_intro) ) { 
				$orig_image = $images->image_intro;

Please note this modification is not an update safe, so it will be re-apply it everytime you install a new update.
4 years 1 month ago #2 by TemplatePlazza

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

Powered by Kunena Forum