random_image in Album. {SOLVED!} {Added a NEW FEATURE!}

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
holybuzz

random_image in Album. {SOLVED!} {Added a NEW FEATURE!}

Post 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
Last edited by holybuzz on Sat Mar 03, 2007 3:21 pm, edited 1 time in total.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: random_image in Album. Can it be a greybox thumbnail?

Post by Elijah Lofgren »

Looks like you got it working? (changing the template?)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
holybuzz

Re: random_image in Album. Can it be a greybox thumbnail?

Post 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
Last edited by holybuzz on Fri Mar 02, 2007 8:52 pm, edited 1 time in total.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: random_image in Album. Can it be a greybox thumbnail?

Post 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
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
holybuzz

Re: random_image in Album. Can it be a greybox thumbnail?

Post 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
Last edited by holybuzz on Sat Mar 03, 2007 12:49 pm, edited 1 time in total.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: random_image in Album. Can it be a greybox thumbnail?

Post 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! :)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: random_image in Album. Can it be a greybox thumbnail? {SOLVED!}

Post 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
holybuzz

Re: random_image in Album. Can it be a greybox thumbnail? {SOLVED!}

Post 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
Last edited by holybuzz on Sat Mar 03, 2007 1:00 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: random_image in Album. Can it be a greybox thumbnail? {SOLVED!}

Post 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
holybuzz

Re: random_image in Album. Can it be a greybox thumbnail? {SOLVED!}

Post 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
liudaz

Re: random_image in Album. Can it be a greybox thumbnail?

Post 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.

Elijah Lofgren wrote: 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
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: random_image in Album. {SOLVED!} {Added a NEW FEATURE!}

Post 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
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Locked

Return to “CMSMS Core”