Page 1 of 1
Where does OC get image size for a banner?
Posted: Tue Jul 03, 2012 5:41 am
by rokcarl
If I upload a file top-banner-1.jpg for a banner (under System -> Design -> Banners), OC creates top-banner-1-980x280.jpg, so it's 980px wide. I've searched the database and the whole code for 980 and I've found it in the CSS. Does OC get this number from CSS?! This sounds weird.
So where does it get it and how can I change it?
Re: Where does OC get image size for a banner?
Posted: Tue Jul 03, 2012 5:48 am
by Avvici
In your admin:
EXTENSIONS>MODULES>SLIDESHOW
AND
EXTENSIONS>MODULES>BANNER
Re: Where does OC get image size for a banner?
Posted: Tue Jul 03, 2012 6:05 am
by rokcarl
Great, it's there. But how did I not find it in the DB?! That's so weird.
Re: Where does OC get image size for a banner?
Posted: Tue Jul 03, 2012 6:18 am
by Avvici
Images go through a re-size procedure and are placed in Cache. The only reference you will find to the specified width and height is in the 'setting' table which will be in the form of a serialized string:
Example:
Slideshow String:
Code: Select all
a:1:{i:0;a:7:{s:9:"banner_id";s:2:"10";s:5:"width";s:4:"980";s:6:"height";s:3:"280";s:9:"layout_id";s:1:"1";s:8:"position";s:11:"content_top";s:6:"status";s:1:"1";s:10:"sort_order";s:1:"1";}}
Re: Where does OC get image size for a banner?
Posted: Fri Jul 06, 2012 8:05 pm
by rokcarl
I guess my search in the project ignored this file (probably has some non-text extension or no extension at all). Thanks for the answer