Page 1 of 1
random_image in Album. {SOLVED!} {Added a NEW FEATURE!}
Posted: Fri Mar 02, 2007 2:45 pm
by holybuzz
Does anyone know if there is a way to use Album's random_image action so that it will use Album's default template (which is now greybox)? I want to use the image in a narrow right column (therefore a small image), and I'd like it so that the image can be viewed at a larger size in the greybox popup viewer.
Right now I am using the albums='x' parameter to display all the thumbnails in one of my smaller albums. But I'd really like to use a random image. Being able to display two or three random images would be a real bonus. Yes, I'm greedy.
Here's the page:
http://cvid.org/index.php?page=contact
I'm using Lanai 1.0.4 and Album 0.8.2
Thanks.
K
Re: random_image in Album. Can it be a greybox thumbnail?
Posted: Fri Mar 02, 2007 7:59 pm
by Elijah Lofgren
Looks like you got it working? (changing the template?)
Re: random_image in Album. Can it be a greybox thumbnail?
Posted: Fri Mar 02, 2007 8:09 pm
by holybuzz
Elijah,
First off, thanks a million for all your work on the CMS modules. They are amazing. (They have to be if yahoos like me can make 'em work.)
Now, despite what I said in my last sentence, Nope. I can get the random image, but I can't get it to display with my Album stylesheet.
If I use:
{cms_module module='album' action='random_image'}
I get a random image but no default stylesheet styling. And, therefore, no greybox.
However, if I use:
{cms_module module='album' albums='1'}
my default stylsheet is working.
Any ideas?
Keith
Re: random_image in Album. Can it be a greybox thumbnail?
Posted: Fri Mar 02, 2007 11:30 pm
by Elijah Lofgren
Mission accomplished:
http://viewsvn.cmsmadesimple.org/viewsv ... w=rev
1. Download the updated tag here:
http://viewsvn.cmsmadesimple.org/viewsv ... iew=markup
Replace your current modules/Album/action.random_image.php with it.
2. Download this file and put it in your modules/Album/templates/db/ folder:
http://viewsvn.cmsmadesimple.org/viewsv ... iew=markup
3. Have a great weekend and let me know if you run into any problems with Album.
Later,
Elijah
Re: random_image in Album. Can it be a greybox thumbnail?
Posted: Sat Mar 03, 2007 12:31 am
by holybuzz
Elijah,
WooHoo!

It works!
Thanks a million!
Because I couldn't code my way out of a wet paper bag, I promise to do a multi-screenshot, page-by-page, menu-by-menu walkthrough of an Album install as a way of saying thanks. I'll let you know when it's ready.
Keith
Here's the page:
http://cvid.org/index.php?page=contact
Now all I have to do is dress up the page (and the rest of the site) to make it worthy of Album and CMSMS in general.
K
Re: random_image in Album. Can it be a greybox thumbnail?
Posted: Sat Mar 03, 2007 12:36 am
by Elijah Lofgren
Glad it worked!
holybuzz wrote:
Because I couldn't code my way out of a wet paper bag, I promise to do a multi-screenshot, page-by-page, menu-by-menu walkthrough of an Album install as a way of saying thanks. I'll the you know when it's ready.
Wow, cool! That'd make a wonderful addition to the wiki!

Re: random_image in Album. Can it be a greybox thumbnail? {SOLVED!}
Posted: Sat Mar 03, 2007 9:45 am
by RonnyK
K.,
how do you get the image to appear transparant over the site. I'm running 0.8.2 and get it on a page but not so nicely put over the site.
Ronny
Re: random_image in Album. Can it be a greybox thumbnail? {SOLVED!}
Posted: Sat Mar 03, 2007 12:48 pm
by holybuzz
The transaprency is done in the javascript and css inside the stylesheet. You don't have to do anything with it.
Elijah used "greybox," a pic viewer developed by orangoo
http://orangoo.com/labs/GreyBox/. If things aren't working (thumbnails with no styling that don't show up in greybox), it's most likely because you haven't attached the "Album Template Stylesheet" stylesheet to the page template that has the random image. You have to attach the "Album Template Stylesheet" to
every page that you want to use the greybox viewer.
Go to Layout » Templates, then look for the page template that has the random_image action. Click the little yellow css icon at the far right. On the next page, look for "Album Template Stylesheet" in the list. Attach it to your template. Check the page.
It should work.
If the thumbnail is styled but not styled like those on my site, it might be because you have chosen a different album template as your default template. Got to Content » Photo Albums. Look in the "Template" column. If the albums are using something other than the "defaut" template, click on the current template. Change it to "default". To make the "default" template your default template, click the "Options" tab in that same window and change it on the next page.
And if none of this works, I didn't understand your question and/or I don't know what I'm talking about.
BTW, this is the first bit of help I've tried to provide anyone on this site. I'm a newbie. So use this advice with extreme caution.
K
Re: random_image in Album. Can it be a greybox thumbnail? {SOLVED!}
Posted: Sat Mar 03, 2007 2:51 pm
by RonnyK
Thanks for the reply. I checked your remarks and they confirmed that my setup whas similar to yours, but still no succes in the transparancy. I then checked the installed template of the album and noticed that the "js" is installed in a directory under the Album-directory. I checked the rights of the directory and the were 751 instead of 755. After changing the rights, everything worked as exprected. So again, thanks for confirming that my setup was correct, otherwise I would have spent a lot of time in searching what caused m pictures to be displayed as a single picture.
Find the path below under which the directory greybox holds its javascripts. Setting the rights to 755 for all files in the directory greybox, makes it work. There is also a directory for lightbox, so changing that rights, might switch its behaviour as well.
modules/Album/templates/db
Ronny
Re: random_image in Album. Can it be a greybox thumbnail? {SOLVED!}
Posted: Sat Mar 03, 2007 3:20 pm
by holybuzz
Did you install via the xml file? And if so, could this have caused the problem?
http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Extensions/Modules
But whatever it was, I'm glad that you solved it.
Keith
Re: random_image in Album. Can it be a greybox thumbnail?
Posted: Mon Jul 23, 2007 7:12 am
by liudaz
Hello
I can't get any of these links to work. Maybe there is another way to get those files Elijah had put on the internet?
Thanks.
Re: random_image in Album. {SOLVED!} {Added a NEW FEATURE!}
Posted: Tue Jul 24, 2007 3:25 pm
by Elijah Lofgren
ViewSVN is back up for now (Ted said it was getting hammered).
Here is a copy of the files in case:
http://www.elijahlofgren.com/uploads/cm ... _image.txt
http://www.elijahlofgren.com/uploads/cm ... ge.tpl.txt
Hope this helps,
Elijah