HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Improving auto-thumbnailer

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#74207 (In Topic #15453)
Avatar

Community saint

The gallery auto-thumbnailer does a good job of scaling images so that the long dimension does not exceed the value specified in Admin->Configuration->Feature options:Images:Thumbnail width (which should be relabeled as Thumbnail long dimension). However, it does not normalize the size of the final image so that they will display properly on a grid (when not using the flow-mode interface). The thumbnailer should create a transparent matte sized value x value (using the long dimension) and then center the image on that matte. This would assure that the grid interface for galleries is tidy and is a good experience for the user.

Bob
Back to the top
 
Posted
Rating:
#74209
Avatar

You can do that in templates using the THUMBNAIL symbol. It gives you very extensive control. This is important that we have implemented inside templates, because it allows different parts of the site to have different kinds of thumbnails.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#74222
Avatar

Community saint

Cool. I can see where that would be an advantage.

Bob
Back to the top
 
Posted
Rating:
#74234
Avatar

Community saint

So am I even close in looking at this bit of code in GALLERY_IMAGE.tpl:

Code

<div class="gallery_regular_thumb" onmouseout="if (typeof window.deactivateTooltip!='undefined') deactivateTooltip(this,event);" onmousemove="if (typeof window.activateTooltip!='undefined') repositionTooltip(this,event);" onmouseover="if (typeof window.activateTooltip!='undefined') activateTooltip(this,event,'{$GET^;*,TOOLTIP}','auto',null,null,false,true);">
   <a href="{VIEW_URL*}">{$TRIM,{THUMB}}</a>

I read through the Tempcode stuff and I think I understand it: type=pad, where=both (or maybe blank).

Thanks for any help.

Bob
Back to the top
 
Posted
Rating:
#74237
Avatar

Chris W posted a lot of details on using it somewhere around here.
Some of the themes use it in some places.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#74240
Avatar

Community saint

Thanks for the clue. I'll hunt it down.

Bob

EDIT: In case anyone else is interested in this, the thread is View topic: Gallery customization: thumbnail size (width / height) - ocPortal


Last edit: by BobS
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: