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.


Gallery thumbnail display and ordering

Login / Search

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

Well-settled

I am trying to upload and display my images in a certain way that when first visiting them that they are displayed per month order.
Basically the images are winners of votes in the forums for the fave photo for that month, so they ideally want to go in month order.

The galleries default seems to show for the "newest first", so what I did after reading the tutorial was to do a mass import of the images into this gallery, and try to set some sort of ordering system of the file names for it to follow this default setting for them to show in the order I require
.
I used A,B,C,D etc which in my zip.file it followed this and following the newest first default.
I think it should work, but after adding them, the layout still seems to be off, and they are not quite in the correct order.
So either the ordering system has not been followed on upload or something else, maybe the thumbnail sizes?

I read this post here

View topic: Gallery Has Gaps - ocPortal.com

But I guess this was for a previous version as that file is slightly different now.
Am I doing something wrong here, should I be resizing these images before uploading maybe

In this attachment you can see how I have ordered them, but you can see after G the ordering is not being followed at all


Thanks Mark
Back to the top
 
Posted
Rating:
#97402
Avatar

Hi,

The poor layout surprises me. I think you have a smaller thumbnail size here, but the v9 default theme's galleries.css file contains:

Code

{$,Our standard ocPortal-wide thumbnail image size is defined by the thumb_width option}
{$SET,gallery_thumb_size,{$CONFIG_OPTION,thumb_width}px}
{$,However actually lets make them smaller custom sizes for the gallery and let CSS scale-down the larger thumbnail images}
{$SET,gallery_thumb_size,175px}
{$,That is not the most efficient approach - which would be to use the Tempcode THUMBNAIL symbol in the GALLERY_IMAGE/GALLERY_VIDEO templates to generate idealised thumbnails and tie them into the HTML - but that is fiddly and messy, requires more thought and planning by the web designer}
{$,Or, of course we could use the standard thumbnail size, or change the standard thumbnail size, but that would affect other systems which may want the larger thumbnails}

...

.img_thumb_wrap {
   /* Essentially adds padding around thumbnails; the thumbnails are sized to fit a box as tightly as possible, but unused space is not stored inside the images themselves */
   width: {$GET,gallery_thumb_size};
   height: {$GET,gallery_thumb_size};
   text-align: center;
   vertical-align: middle;
   display: table-cell;
}
making it look like this:


Maybe you installed a theme or customised this?


As for ordering, I'll check this out.


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
 
Important!
Posted
Rating:
#97403
Avatar

Automated fix message

kenno said

I am trying to upload and display my images in a certain way that when first visiting them that they are displayed per month order.
Basically the images are winners of votes in the forums for the fave photo for that month, so they ideally want to go in month order.

The galleries default seems to show for the "newest first", so what I did after reading the tutorial was to do a mass import of the images into this gallery, and try to set some sort of ordering system of the file names for it to follow this default setting for them to show in the order I require
.
I used A,B,C,D etc which in my zip.file it followed this and following the newest first default.
I think it should work, but after adding them, the layout still seems to be off, and they are not quite in the correct order.
So either the ordering system has not been followed on upload or something else, maybe the thumbnail sizes?

I read this post here

View topic: Gallery Has Gaps - ocPortal.com

But I guess this was for a previous version as that file is slightly different now.
Am I doing something wrong here, should I be resizing these images before uploading maybe

In this attachment you can see how I have ordered them, but you can see after G the ordering is not being followed at all


Thanks Mark
This issue has been filed on the tracker as issue #1251, with a fix.


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.
Important!
 
Posted
Rating:
#97404
Avatar

Important note – you talked about alphabetical ordering. Ordering must be numeric.

E.g. example00.jpg, example01.jpg, example02.jpg

There's no way we can autodetect intent with alphabetical order because we can't distinguish it from what may actually be part of the normal filename (e.g. e, x, a, m, p, l, e, above).


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:
#97405
Avatar

Well-settled

Thanks again for the quick response.
I will make one of them mental notes regarding the numerical ordering, I thought it might be ok, just as there was no other name to the file other then the one letter each, point noted though.

I will apply the fix and try again with the upload, is there an easier way of either moving these already uploaded images around, or either mass deleting them to start again.

Your right about the layout, this seems to be somehow theme related which is scaling down the thumbnails, as looking at the same gallery when switching back the theme to the default it looks fine

Back to the top
 
Posted
Rating:
#97406
Avatar

Well-settled

Yes it was the themes galleries.css file which had been altered.
I changed some aspects of this back more towards the defaults theme and the layout is much better


Back to the top
 
Posted
Rating:
#97407
Avatar

Community saint

Chris Graham said

Important note – you talked about alphabetical ordering. Ordering must be numeric.

E.g. example00.jpg, example01.jpg, example02.jpg

There's no way we can autodetect intent with alphabetical order because we can't distinguish it from what may actually be part of the normal filename (e.g. e, x, a, m, p, l, e, above).

What exactly are you autodetecting Chris? Are you basing the sort order purely on the numbers in the file name?

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#97409
Avatar

Good question :). I think the key thing you're missing is that the gallery import wasn't really designed to do sorting, it's just we added this on – so we are conservative about deciding whether there really is a sort order there. We strip anything numeric out, and if we find everything is then the same, we then do a sort.


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:
#97411
Avatar

Community saint

I see what you are trying to do but it strikes me as quite awkward to manage, especially the fact that the sort order is fixed/determined by the gallery importer.

The gallery details are stored in the db, so shouldn't they be managed by db sorting?

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#97412
Avatar

There's currently no way to configure the default sort order. If you sorted by URL it would do it in the way you'd expect, and that is covered by:
0000094: 'max' options - ocPortal feature tracker
And expected to drop in v10.


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:
#97413
Avatar

Community saint

I see, Thanks for clearing that up Chris :thumbs:

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: