How to make an album cover?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
landex
Forum Members
Forum Members
Posts: 93
Joined: Sun Feb 10, 2008 4:02 pm

How to make an album cover?

Post by landex »

Hello to all!
Can you please tell me how to make a conclusion on the pages of the site the cover of a particular album?
Now, if you make {Gallery dir = 'album_name /name}
then the page dumps all the contents of this album, which is not really necessary or correct.
How to do? I read the manual supplied with this module, but I did not find such information in it.

Ver. cms 1.12.2
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: How to make an album cover?

Post by DIGI3 »

There's probably a few ways to do it, but one would be moving the gallery one level lower, creating a parent containing just the one gallery. When you call the module, you'd specify the parent gallery, and the thumbnail would be the child gallery's cover image.
Not getting the answer you need? CMSMS support options
landex
Forum Members
Forum Members
Posts: 93
Joined: Sun Feb 10, 2008 4:02 pm

Re: How to make an album cover?

Post by landex »

I probably didn't quite clearly express my thoughts.
This is what the gallery looks like now
Gallery_root
| _____ gallery1
| _____ galllery2
| _____ gallery3
etc
| _____ gallery999

I need selectively from more than 100 albums to bring on the site page 5,6, and 25 album - but only their cover, if the user needs it, he will go to the right album and get acquainted with the photos.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: How to make an album cover?

Post by DIGI3 »

From what I can see of the available variables, there's not a simple way. I can think of a few convoluted template and Smarty tricks, but it might be easiest with a UDT to get it right from the database.
Not getting the answer you need? CMSMS support options
landex
Forum Members
Forum Members
Posts: 93
Joined: Sun Feb 10, 2008 4:02 pm

Re: How to make an album cover?

Post by landex »

Yes .. I also looked at the documentation and did not find anything intelligible ...
Sorry, you have to postpone the idea to the table ..
PS I'm not good at programming at the level that you said, but there are no simpler ways ..
DIGI3 wrote:From what I can see of the available variables, there's not a simple way. I can think of a few convoluted template and Smarty tricks, but it might be easiest with a UDT to get it right from the database.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3483
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: How to make an album cover?

Post by velden »

I think you should read this:
viewtopic.php?p=312793#p312793

It's a rather old post of mine and I should now do things a little different but the basics are what you need:

From one Gallery template make a call to the gallery module using the sub gallery directory. In my example you will find me hiding the unneeded images, however for the sake of efficiency, I would just not include them at all.

It might also be possible to set a specific image as the cover of its album. Then you need to change the code of the template to find that image.

Удачи! :)
Post Reply

Return to “Modules/Add-Ons”