PDA

View Full Version : How do I change the standard image size for a selected listings box ?



Pete Young
September 20, 2014, 03:30 PM
I know that I would need to add some code to the common css for the box number but I am unsure exactly what code to place to edit the standard image size from 120 * 90 to a larger size, and what the code should look like ?

Viktor
September 22, 2014, 04:16 AM
Hello Pete,

I don't know exactly what line you should change in css. If you give me your site and show me box where you want to change size probably I can find line in css where can you change size for images.

Pete Young
October 10, 2014, 01:11 AM
Hello All, at this stage we are unable to find an answer to this puzzle,

Currently I have the code to center the listing and text that is added to the common css as below

#listing_box_268 > li.item {
display: inline-block;
text-align: center;
width: 90%;
}

But I am unable to work out how to edit the size of those images, I do not want to edit the standard sizes in the admin panel as those are correct, just need to add some code to edit the size for the selected listing box similar to the above.

If any one can help it would be appreciated.
Thanks

Curtis
October 10, 2014, 03:19 AM
Hello All, at this stage we are unable to find an answer to this puzzle,

Currently I have the code to center the listing and text that is added to the common css as below

#listing_box_268 > li.item {
display: inline-block;
text-align: center;
width: 90%;
}

But I am unable to work out how to edit the size of those images, I do not want to edit the standard sizes in the admin panel as those are correct, just need to add some code to edit the size for the selected listing box similar to the above.

If any one can help it would be appreciated.
Thanks

You can try make following changes in the Listing Box plugin:
1. open file /listings_box/listings_box.block.tpl
2. if you use the Default type of display mode that change row (~20)


<img alt="{$featured_listing.listing_title}" title="{$featured_listing.listing_title}" src="{if empty($featured_listing.Main_photo)}{$rlTplBase}im g/no-picture.jpg{else}{$smarty.const.RL_URL_HOME}files/{$featured_listing.Main_photo}{/if}" style="width: {$config.pg_upload_thumbnail_width}px;height: {$config.pg_upload_thumbnail_height}px;" />


3. replace to follow (set the width: 200px for ex.):


<img alt="{$featured_listing.listing_title}" title="{$featured_listing.listing_title}" src="{if empty($featured_listing.Main_photo)}{$rlTplBase}im g/no-picture.jpg{else}{$smarty.const.RL_URL_HOME}files/{$featured_listing.Main_photo}{/if}" style="width: 200px; height: auto;" />


If you use some of responsive templates that you nee make same changes in the /blocks/featured_item.tpl file.

Pete Young
October 10, 2014, 04:43 AM
Brilliant Curtis, wish we could add the like option to this forum

+ 1 from me thankyou and aslo to Viktor for his help

Chris Brown
October 10, 2014, 06:45 AM
Might try this myself as I changed image sizes in admin which effected listing box sizes and need them back down to 120px width. Hopefully this will work as been trying to figure a solution out :)

Pete Young
October 10, 2014, 08:54 AM
Yes Chris all works well, just use the listing box for edited sizes and the carousel option to keep the original sizes / any problems yell out.

Chris Brown
October 10, 2014, 01:45 PM
Just an addition to this: My case i increased image upload size in admin from 120px to 130px which in effect altered my listing carousel from displaying 4 listings to 3 (as images were now bigger.

Now i liked having 4 listings show and to do this i changed:

In plugins/listing_carousel/carousel.listing.tpl
Find:


<img alt="{$featured_listing.listing_title}" title="{$featured_listing.listing_title}" src="{if empty($featured_listing.Main_photo)}{$rlTplBase}im g/no-picture.jpg{else}{$smarty.const.RL_URL_HOME}files/{$featured_listing.Main_photo}{/if}" style="width: {$config.pg_upload_thumbnail_width}px;height: {$config.pg_upload_thumbnail_height}px;" />


Change to:


<img alt="{$featured_listing.listing_title}" title="{$featured_listing.listing_title}" src="{if empty($featured_listing.Main_photo)}{$rlTplBase}im g/no-picture.jpg{else}{$smarty.const.RL_URL_HOME}files/{$featured_listing.Main_photo}{/if}" style="width: 120px; height: auto;" />


This worked but still displayed 3, but noticed the field section used the same width principal of the upload size so had to also change this:

Same file as above find:


<li class="{if $available_field == 1}first{/if}{if $item.Key == 'price' && $tpl_settings.featured_price_tag} price_tag{/if}{if $item.Key == 'sale_rent' && $tpl_settings.featured_price_tag} sale-rent {if $item.value == $lang.$phrase_sale}type-sale{else}type-rent{/if}{/if}" id="flf_{$featured_listing.ID}_{$item.Key}" {if $listing_types.$type.Photo}style="width: {$config.pg_upload_thumbnail_width+4}px;"{/if}>


to


<li class="{if $available_field == 1}first{/if}{if $item.Key == 'price' && $tpl_settings.featured_price_tag} price_tag{/if}{if $item.Key == 'sale_rent' && $tpl_settings.featured_price_tag} sale-rent {if $item.value == $lang.$phrase_sale}type-sale{else}type-rent{/if}{/if}" id="flf_{$featured_listing.ID}_{$item.Key}" {if $listing_types.$type.Photo}style="width: 124px; height: auto;"{/if}>


Note: If yu notice in the code you are reomving in this second bit there is a +4, so add 4px to the size of the image that you stated in the first code change.

Hope that make sense. And it worked :D