OS Property support center

only 1st image in Print page

More
11 years 3 weeks ago - 11 years 3 weeks ago #44419 by ricky
only 1st image in Print page was created by ricky
Hi Dam,
need your help for insert only 1 photo (the 1st) in the print page.

I've found the file /components/com_osproperty/helpers/layouts/propertyprint.php, but i don't understand how set photos count.

Thank you in advance.

See you
Ricky

P.S.- OSProperty 2.6.2 version
Last edit: 11 years 3 weeks ago by ricky.

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

More
11 years 3 weeks ago #44420 by Mr. Dam
Replied by Mr. Dam on topic only 1st image in Print page
Hi,
In that file, please find
for($i=0;$i<count($photos);$i++){
$j++;
$photo = $photos[$i];
?>
<td width="50%" style="border:0px !important;">
<div style="display:block;padding:3px;border:0px;" id="div_<?php echo $i?>">
<table class="admintable" style="border:0px !important;">
<tr style="border:0px !important;">
<td style="border:0px !important;">
<?php
if($photo->image != ""){
OSPHelper::showPropertyPhoto($photo->image,'medium',$row->id,'width: 160px;','img-rounded img-polaroid','');
}
?>
</td>
</tr>
<tr style="border:0px !important;">
<td style="background-color:#efefef;border:0px !important;"">
<?php echo $photo->image_desc?>
</td>
</tr>
</table>
</div>
</td>
<?php
if($j == 2){
echo '</tr><tr style="border:0px !important;">';
$j = 0;
}
}

and replace by

for($i=0;$i<1;$i++){
$j++;
$photo = $photos[$i];
?>
<td width="50%" style="border:0px !important;">
<div style="display:block;padding:3px;border:0px;" id="div_<?php echo $i?>">
<table class="admintable" style="border:0px !important;">
<tr style="border:0px !important;">
<td style="border:0px !important;">
<?php
if($photo->image != ""){
OSPHelper::showPropertyPhoto($photo->image,'medium',$row->id,'width: 160px;','img-rounded img-polaroid','');
}
?>
</td>
</tr>
<tr style="border:0px !important;">
<td style="background-color:#efefef;border:0px !important;"">
<?php echo $photo->image_desc?>
</td>
</tr>
</table>
</div>
</td>
<?php
if($j == 2){
echo '</tr><tr style="border:0px !important;">';
$j = 0;
}
}

It will show one image of properties instead of showing all pictures
Thanks
Dam
The following user(s) said Thank You: ricky

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

More
11 years 3 weeks ago #44421 by ricky
Replied by ricky on topic only 1st image in Print page
It works well!
Many thanks Dam, great support everytime.

Thank you so much.

Bye
Ricky

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

More
11 years 3 weeks ago #44424 by ricky
Replied by ricky on topic only 1st image in Print page
Excuse me Dam,
Which is the file for modify print layout from back-end?

thank you
Ricky

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

More
11 years 3 weeks ago #44432 by Mr. Dam
Replied by Mr. Dam on topic only 1st image in Print page
Hi,
The printing layout at back-end is defined in file:
administrator > components > com_osproperty > property.html.php
function:
printProperties
Thanks
Dam

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

Moderators: Mr. DamNguyen Phu Quan