If I view an album as a registered user I see the album description text above the images within the album, however a guest user sees it the other way round, i.e. the images at the top and the album description text underneath.

I know this is a small issue and barely even a bug, but could someone please point me to the piece of code which determines the order of how the album is presented so I might make it the same for all users. I've looked but I can't work it out myself.

Comments

eastcn’s picture

You try to amend this document: photos_albumview.tpl.php

NeilPorter’s picture

Thanks for your reply. However, photos_albumview.tpl.php appears to control the way the albums are viewed in preview like /photos/album (where you see the album cover etc.). I was talking about when you are actually viewing the node itself like /content/my-first-album.

Which template controls the order of album description and images for logged in and guest users when they are viewing the node itself? As far as I can tell it gets printed like this:-

print $content

Within the main theme module's page.tpl.php file.

So I imagine it can only be changed in the way the content was built from the photo's module at a lower level than template?

NeilPorter’s picture

OK to put it another way, is there a way to make the album of photos appear ABOVE the album description when viewing the album. At the moment (apart from guest users) the default is the album description text above the photos.

I've looked in photos.module around line 149 in the photos_nodeapi function where the case 'view': is defined and it seems to me that it's around there where things get set up... is that true? I'm having great problems in following the code.

NeilPorter’s picture

Status: Active » Fixed

I think I've found out where the 'problem' is. Within photos.module around line 209 in the nodeapi function there is the line:-

'#weight' => 0,

If I change that to:-

'#weight' => -1,

Then for both logged in users and guest users the photos appear at the top and the description text underneath. If I change it to 1 then it goes the other way around. Not sure why being logged in affects it but there you go, it did for me!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.