Vertical thumbnails oversized - User Gallery Plugin

Creating and modifying plugins.
Post Reply
Joberg
Regular
Posts: 7
Joined: Tue Jan 23, 2007 10:12 pm

Vertical thumbnails oversized - User Gallery Plugin

Post by Joberg »

Hello,

i've tried to figure out this problem on my own, but it seems to be a deadlock situation. On my blog i use the User Gallery Plugin (the one showing the medialibrary) with the thumbnail-page setup in the options. General size of my thumbs is 150 px (in the genral prefs of the blog). For horizontal slides, this works fine, but for the vertical ones the plugin keeps the width and adjusts the hights, so that the thumbs look really bad. I've played around with the plugin settings, but couldn't obtain a result where he simply applies the thumbs 'as they are'. I've posted a link to my page here:


http://jobaztag.free.fr/index.php?seren ... hotos/Ayo/

Any help is highly appreciated.
Thanks in advance
Johannes :?:
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

The easiest way for you to play with this is to edit the plugin_usergallery.tpl file that comes with the plugin. It should be under the plugins/serendipity_usergallery directory.

You can move that file into the directory of the template you are using so that it will not be overwritten by future releases of the plugin. The plugin will check the current template for the file before it uses the default.

If you search for

Code: Select all

style="width: 100%;"
you will find the line that controls the image display. If you just remove that whole style option it will prevent the images from all being scaled to the same width.

I haven't found a good way to deal with images of mixed heights. You can see on my page (http://www.theledge.net/pages/gallery.html) that I scale my thumbnails larger than they need to be and then just let the width: 100% setting stand. But I'm sure there are better ways.

Also, the images do have a class="gallery_thumb" anchor, so you could potentially make changes to your templates css file to control how the images display. Unfortunately, css is not my strong suit, so I can't help you much there.

And if anyone has any suggestions on how to clean up the tpl to display the thumbnails better I'd love to hear them!
Joberg
Regular
Posts: 7
Joined: Tue Jan 23, 2007 10:12 pm

Post by Joberg »

Hi Matthew,

thanks for the tip. This works for me. While i was tinkering about with the settings i've obtained exactly that result, but i had to use the Media Library view, which i don't like ;)

Thanks again,

Johannes
Post Reply