Default thumb when no image...

Free responsive Joomla 2.5 and 3.x module to present your content with easy and intuitive way.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Thu Sep 01, 2011 1:27 pm
Hi !

I have a very important question : I use GK4 for display K2 article.
Sometimes, there is no image (thumbnail) defined for the article, so GK4 don't display any image.

How I could simply add a default image in the code ?

I try to add at line 242 in layout.parts.php :

Code: Select all
if ($item_image_exists == false){
   $img_src=JURI::root()."modules/mod_news_pro_gk4/tmpl/no_image-400x400.jpg";
   $item_image_exists = true;
}


I want the program take this image if he don't find any src image, and with it he creates the thumbnail in the good size alone...

But this didn't work, how I can do ?


For example, I have that when an article don't have thumbnail :

Image

You see the first article, how put a default image for him ?
User avatar
Junior Boarder

GK User
Thu Jan 26, 2012 5:33 am
Did you manage to do this? need the same...
User avatar
Expert Boarder

GK User
Sat Jun 16, 2012 4:10 pm
Did change it my self I did change every instance of

Code: Select all
default'.$config['module_id'].'.png'


@ layout.parts.php

to
Code: Select all
default.jpg'


One default image for all modules... simpler...
User avatar
Expert Boarder

GK User
Wed Mar 27, 2013 5:36 pm
Ok but I gues that now, every article has the same default thumbnail.

Can anyone solve this problem properly? When k2 article has no image, I would like to display default one. More over it would be great if it coul be one of few images random picked.
User avatar
Fresh Boarder


cron