Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-08-21 12:42:23

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

images aspect ratio: unchanged

i’m using dru_random_image for displaying images. all images are in different sizes. i want all of them to display in 150px width without loosing a correct aspect ratio. how to achieve that?

Offline

#2 2008-08-21 13:18:56

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: images aspect ratio: unchanged

width: 150px; height : auto;

Edit: Ah, dam, the plugin! But you can apply classes to the image with smd_random_banner

Last edited by uli (2008-08-21 13:34:08)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2008-08-22 10:30:31

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: images aspect ratio: unchanged

uli wrote:

width: 150px; height : auto;

for IE 6.0 not helping

Edit: Ah, dam, the plugin! But you can apply classes to the image with smd_random_banner

i’ll try it

Offline

#4 2008-08-22 12:44:55

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: images aspect ratio: unchanged

uli wrote:

width: 150px; height : auto;
Edit: Ah, dam, the plugin! But you can apply classes to the image with smd_random_banner

i tried it. best random image plugin. lots of options. but still, it doesn’t solve the IE 6.0 correct aspect ratio issue. height:auto; doesn’t have effect to it :(

Offline

#5 2008-08-22 13:15:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: images aspect ratio: unchanged

Gallex

Glad you like the plugin. I thought just setting one of the dimensions allowed the other to grow or shrink accordingly, i.e. width:150px;? At least in most browsers…


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2008-08-22 13:36:18

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: images aspect ratio: unchanged

Bloke wrote:

Glad you like the plugin. I thought just setting one of the dimensions allowed the other to grow or shrink accordingly, i.e. width:150px;? At least in most browsers…

yes, in most but unfortunately not in IE 6.0

Offline

#7 2008-08-24 09:22:34

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: images aspect ratio: unchanged

Bloke wrote:

Gallex

Glad you like the plugin. I thought just setting one of the dimensions allowed the other to grow or shrink accordingly, i.e. width:150px;? At least in most browsers…

Stef, how hard is to add this attribute popup=“1” to your plugin? what you think?

Offline

#8 2008-08-24 09:29:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: images aspect ratio: unchanged

Gallex wrote:

Stef, how hard is to add this attribute popup=“1” to your plugin?

Does target="some_page" not do what you want? If not, can you elaborate please cos ‘popup’ is a tad generic. Popup to where and do what when it gets there?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#9 2008-08-24 11:57:07

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: images aspect ratio: unchanged

Does target="some_page" not do what you want? If not, can you elaborate please cos ‘popup’ is a tad generic. Popup to where and do what when it gets there?

opens the big image when i use thumbnails

Offline

#10 2008-08-24 13:11:23

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: images aspect ratio: unchanged

Gallex

Let’s back up a second. smd_random_banner is for displaying one or more random images from categories, and optionally link them to a URL. It is aimed at people who want to put up web banners or “advertise” other parts of their site to visitors (sort of “while you’re here, why not check out…”)

If your aim is to popup one or more images from a thumbnail then this is not the plugin for you. I suggest:

  • upm_image for more powerful image display which can handle popups fairly easily
  • rss_thumbpop which just does popups or javascript onclick/rollovers (very well, not sure about sizing though)
  • smd_slimbox which uses a lightbox effect or (optionally) something similar to show galleries of images
  • smd_gallery which is the bigger brother of slimbox and can make virtually any type of image display you can imagine from thumbnails

Although the last two are for galleries, there is nothing to stop you requesting a single image (limit="1") and choosing it randomly from a category (sort="random"). Depending on your requirements they may be overkill, so I would suggest checking out the first two to begin with.

Last edited by Bloke (2008-08-24 13:12:20)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#11 2008-08-25 11:50:48

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: images aspect ratio: unchanged

Bloke wrote:

If your aim is to popup one or more images from a thumbnail then this is not the plugin for you. I suggest:

  • upm_image for more powerful image display which can handle popups fairly easily
  • rss_thumbpop which just does popups or javascript onclick/rollovers (very well, not sure about sizing though)
  • smd_slimbox which uses a lightbox effect or (optionally) something similar to show galleries of images
  • smd_gallery which is the bigger brother of slimbox and can make virtually any type of image display you can imagine from thumbnails
    Although the last two are for galleries, there is nothing to stop you requesting a single image (limit="1") and choosing it randomly from a category (sort="random"). Depending on your requirements they may be overkill, so I would suggest checking out the first two to begin with.

i don’t see sort and category attributes in up_image plugin…

Offline

#12 2008-08-25 20:12:24

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: images aspect ratio: unchanged

Gallex wrote:

i don’t see sort and category attributes in up_image plugin…

Ok, maybe not. I dunno cos I never used it but I remember seeing it could do image galleries so just assumed it had a category option. Sorry for the bogus info if it doesn’t. The other three do though :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB