How to display one photo in album preview instead of four photos

Hello

 

I want to display only one photo of album preview instead of four photos can any body help me out of this.

 

Thanks

Quote · 18 Jan 2011

Hey, that would be cool.  I always did think it looks ugly to have it split into four, especially if there is only one, two or three photos.

Anyone know how this could be changed?

No Signature at this time.
Quote · 18 Jan 2011

I found it. Here is way

Need to modify the below file

templates/base/scripts/BxBaseSearchResultSharedMedia.php

Around line number 534

search for the below code

if (count($aPics) > 0) {
$sSpacer = $this->oTemplate->getIconUrl('spacer.gif');
foreach ($aPics as $aValue) {

$aUnits[] = array(
'bx_if:exist' => array(
'condition' => (int)$aValue['id_object'] > 0,
'content' => array(
'unit' => $this->getAlbumCoverUrl($aValue),
'spacer' => $sSpacer
)
),
);


}
$aUnit['bx_repeat:units'] = $aUnits;
}

and replace it will this

if (count($aPics) > 0) {
$sSpacer = $this->oTemplate->getIconUrl('spacer.gif');
$i=1;
foreach ($aPics as $aValue) {
if($i==1)
{

$aUnits[] = array(
'bx_if:exist' => array(
'condition' => (int)$aValue['id_object'] > 0,
'content' => array(
'unit' => $this->getAlbumCoverUrl($aValue),
'spacer' => $sSpacer
)
),
);

$i++;
}
}
$aUnit['bx_repeat:units'] = $aUnits;
}

Always take a back of your file before making any changes

Thanks

Quote · 19 Jan 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.