CMS Made Simple Forums
https://forum.cmsmadesimple.org/

How to make an album cover?
https://forum.cmsmadesimple.org/viewtopic.php?f=7&t=79713
Page 1 of 1

Author:  landex [ Sat Dec 29, 2018 5:33 pm ]
Post subject:  How to make an album cover?

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

Author:  DIGI3 [ Sat Dec 29, 2018 7:10 pm ]
Post subject:  Re: How to make an album cover?

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.

Author:  landex [ Sat Dec 29, 2018 7:39 pm ]
Post subject:  Re: How to make an album cover?

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.

Author:  DIGI3 [ Sat Dec 29, 2018 7:57 pm ]
Post subject:  Re: How to make an album cover?

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.

Author:  landex [ Sat Dec 29, 2018 8:01 pm ]
Post subject:  Re: How to make an album cover?

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.

Author:  velden [ Sat Jan 05, 2019 9:14 pm ]
Post subject:  Re: How to make an album cover?

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.

Удачи! :)

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/