Help - Search - Members - Calendar
Full Version: Mt4 Thumbnails (constraining To Equal Height & Width)
Movable Type Community Forum > Using Movable Type > Entries and Archives
johnstefan
Hi, I have justed upgraded to MT4 and am taking this opportunity to refresh my blog. The Recent Assets module is interesting as I would like to have all my most recent images displayed down the righthand side of my blog. BUT I am not pleased about the way MT4 resizes the images into thumbnails, as it seems landscapes are cropped to 70x70, but portraits look like the are 50x70, thus giving a mix match of square/rectangles which is not too pretty. sad.gif

1. Is there a way to constain the thumbnails generated so that they are all sqaure?

2. Is it possible the have the thumbnails link to the blog they are featured in?

Thanks for any help offered.

John S.
danwolfgang
I'm not aware of any way within MT to create square thumbnails. If memory serves, the base_theme.css just has the height and width of the image forced to 70 x 70px. In other words, you can use CSS to square-up the images.

No way to display the link of entry to asset. sad.gif
tkeating70
I believe this is exactly what you are looking for:

Related Entries with Images & Recent Assets Linked to Entries
shenews
I do a Recent Photos module on our blogs (example) that makes all the thumbnails 120 pixels wide. This gets a little funky when the original images are very long and narrow, or shallow and wide, but it usually works pretty well.

If your images all start square, they'd end up square, but I'd hate to distort horizontals and verticals to that shape.

Here's what does it:

CODE
<mt:IfNonZero tag="AssetCount">
<mt:Assets type="image" lastn="3"><br />
<mt:AssetsHeader>
<div class="widget-content">
</mt:AssetsHeader>
<ul style="padding:0; margin:8px 0;>
<li style="padding:0; margin:8px 0; list-style-type: none; align: left; border: 2px; "><a class="asset-image" href="<$mt:AssetURL$>"><img src="<$mt:AssetThumbnailURL width="120"$>" class="asset-img-thumb" alt="<$mt:AssetLabel$>" title="<$mt:AssetLabel$>" /></a></li>
<mt:AssetsFooter>
</ul>
</div>
</mt:AssetsFooter>
</mt:Assets>
</mt:IfNonZero>
<mt:If tag="AssetCount" gt="5"><a href="<$MTBlogUrl$>photos.html"><em>More...</em></a></mt:If>

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.