RSS
Home
Welcome, Guest
Please Login or Register.    Lost Password?

Show a "No Picture" image when no image is loaded
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Show a "No Picture" image when no image is loaded
#1354
Show a "No Picture" image when no image is loaded 1 Year, 10 Months ago Karma: 0
Need some help to show custom 'noimage.jpg' in a property details and agentlistings, when there is no picture uploaded.
It would be nice to show a custom image (or to show nothing) instead of big empty canvas in property detailes page.

Thank you!
touringxxxxx
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1989
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 0
As I can see link to the picture is formed like that
Code:

<img height="75" width="100" alt="... " src="/images/properties/images/thumbs/2/noimage.jpg">

the problem is - this additional folder after "thumbs". I got rid of it in Firefox firebug and "noimage.jpg" attached perfectly. So the only thing left to find out where to cut the code ))))) I work on it - cause it really annoing
eu4ria
Junior Boarder
Posts: 39
graphgraph
User Offline Click here to see the profile of this user
ICQ#: 330816743 Gender: Male Location: Odessa, Ukraine Birthday: 08/04
The administrator has disabled public write access.
 
#1990
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 26
Hi.
Copy your 'noimage.jpg' in images/properties/images/

I use details1.php.
Find near line 259 this block :

Code:


<table>
<tr>
<td width="250px" valign="top">
<img style="padding:2px; border: 1px solid #CCCCCC;" src="< php echo $rout_image.$image1;?>" alt="<?php echo $Product->image1desc;?>" width="250px" height="190">
</td>




And change by :

Code:


<table>
<tr>
<td width="250px" valign="top">
   <?php if ($this->ImagesProduct[0]->name !=NULL) { ?>
      <img style="padding:2px; border: 1px solid #CCCCCC;" src="<?php echo $rout_image.$image1;?>" alt="<?php echo $Product->image1desc;?>" width="250px" height="190">
   <?php } else { ?>
      <img style="padding:2px; border: 1px solid #CCCCCC;" src="images/properties/images/noimage.jpg" alt="<?php echo $Product->image1desc;?>" width="250px" height="190">
   <?php } ?>
</td>



You can adapt this for list.php with an image like noimage_thumb.jpg.
sigouil
New job => Less time :(
Platinum Boarder
Posts: 411
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: France Birthday: 12/31
Last Edit: 2010/04/22 13:26 By sigouil.
The administrator has disabled public write access.
Sorry for my English. It is a Google translation.
 
#1993
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 0
Thanks for answer. Meantime I did my way - I just put a background in "index.css" for class ".imagendetalles". I use "list3.php" so your way is too difficult for me to adap, then more in "list3.php" the code for image seems to be completely different
eu4ria
Junior Boarder
Posts: 39
graphgraph
User Offline Click here to see the profile of this user
ICQ#: 330816743 Gender: Male Location: Odessa, Ukraine Birthday: 08/04
The administrator has disabled public write access.
 
#2001
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 26
Your solution is good, but for each thumbs, you load 2 images. The background and the thumb.
You can change in list3.php, down line 147 :

Code:


<?php
$watermark='DETAILS_MARKET'.$row->available.'-'.$lang->getTag().'.png';

$imgTag='<img src="'.$rout_thumb.$img.'" alt="'. str_replace('"',' ',$row->name) .'" width="'.$WidthThumbs.'" height="'.$HeightThumbs.'" />'; 

?>



by :

Code:


<?php
$watermark='DETAILS_MARKET'.$row->available.'-'.$lang->getTag().'.png';
if ($this->Images[$row->id][0]->name!=NULL){
$imgTag='<img src="'.$rout_thumb.$img.'" alt="'. str_replace('"',' ',$row->name) .'" width="'.$WidthThumbs.'" height="'.$HeightThumbs.'" />';
} else {
$imgTag='<img src="'.'images/properties/images/thumbs/'.$img.'" alt="'. str_replace('"',' ',$row->name) .'" width="'.$WidthThumbs.'" height="'.$HeightThumbs.'" />';
}
?>




and copy an image 'noimage.jpg' in your 'images/properties/images/thumbs/' dir.
Default is 100x75px.
sigouil
New job => Less time :(
Platinum Boarder
Posts: 411
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: France Birthday: 12/31
The administrator has disabled public write access.
Sorry for my English. It is a Google translation.
 
#2003
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 0
Great thanks! works all right and of couse that way is better then mine! Regards!
eu4ria
Junior Boarder
Posts: 39
graphgraph
User Offline Click here to see the profile of this user
ICQ#: 330816743 Gender: Male Location: Odessa, Ukraine Birthday: 08/04
The administrator has disabled public write access.
 
#2004
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 26
Pleasure.
Edit the title of your post and add [SOLVED]
sigouil
New job => Less time :(
Platinum Boarder
Posts: 411
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: France Birthday: 12/31
The administrator has disabled public write access.
Sorry for my English. It is a Google translation.
 
#2275
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 0
Muchas Gracias por su ayuda... otro problema solucionado, solo quedaria pendiente para los modulos.. Carrusel y ultimas propiedades...

he inentado algunos codigos pero sin resultado...
mtzea
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2399
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 0
Hi the solution works in listings but where do I make changes in details? Without an image, the page is a real mess.
matttbm
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/05/13 12:32 By matttbm.
The administrator has disabled public write access.
 
#2400
Re:Show a 1 Year, 9 Months ago Karma: 26
matttbm wrote:
Hi the solution works in listings but where do I make changes in details? Without an image, the page is a real mess.

Have you search to the forum?
Your reponse here.
sigouil
New job => Less time :(
Platinum Boarder
Posts: 411
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: France Birthday: 12/31
The administrator has disabled public write access.
Sorry for my English. It is a Google translation.
 
#2413
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 0
Hi sigouil,

Thanks for the speedy response.

I have used your fix in the listing template and it works perfectly thankyou .

However I cannot find the code to replace (below) in the details template, so consequently I am unable to change it for your fix .

-------

<?php
$watermark='DETAILS_MARKET'.$row->available.'-'.$lang->getTag().'.png';

$imgTag='<img src="'.$rout_thumb.$img.'" alt="'. str_replace('"',' ',$row->name) .'" width="'.$WidthThumbs.'" height="'.$HeightThumbs.'" />';

?>

-------
matttbm
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2415
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 26
What page 'default' do you use?
sigouil
New job => Less time :(
Platinum Boarder
Posts: 411
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: France Birthday: 12/31
The administrator has disabled public write access.
Sorry for my English. It is a Google translation.
 
#2416
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 0
Hi sigouil,

I use components/com_properties/views/templates/details.php and I can’t find the code to change in there. I can’t find it in any of the other details pages either.
matttbm
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2420
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 26
Your solution is in this post.
In 'default.php' 'details.php' you find the code from line 286.
sigouil
New job => Less time :(
Platinum Boarder
Posts: 411
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: France Birthday: 12/31
Last Edit: 2010/05/14 13:08 By sigouil.
The administrator has disabled public write access.
Sorry for my English. It is a Google translation.
 
#2423
Re:Show a "No Picture" image when no image is loaded 1 Year, 9 Months ago Karma: 0
Which default.php?
matttbm
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2450
Re:Show a "No Picture" image when no image is loaded 1 Year, 8 Months ago Karma: 0
Muchas Gracias por su ayuda... otro problema solucionado, solo quedaria pendiente para los modulos.. Carrusel y ultimas propiedades...

he inentado algunos codigos pero sin resultado...


mi chavo, esta es la solucion abres :

modules/mod_prop_carrousel/tmpl/default.php

busca en la line 39:

if($row->imagename!=NULL){ $img=$row->imagename;}else{$img='noimage.jpg';}

remplaza por

if($row->imagename!=NULL){ $img=$row->imagename;}else{$img='../noimage.jpg';}

el chiste es que le pongas los puntos y la diagonal "../" y que tengas en tu carpeta

images/properties/images/thumbs/noimage.jpg



lo mismo haces con el modulo de las ultimas propiedades!.

saludos!
d3digital
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1