I've searched the entire forum (yep, all 50+ pages) to see if anyone has done this before, but no juice :sad:
I'm not talking about the 2 column mod, or just displaying the main page like the subalbums. I saw a bunch of other people ask for this but no one has yet implemented it, I think.
Does anyone know of a way to display the gallery front page with more than the default "1" column (1 column = highlight+description+subalbums)??
Maybe change the highlight to a thumbnail image (like the subalbums) and the description and subalbums columns just squeezed together to make room for another column?
The front page stays the same but have 2 columns of the images, descriptions and subalbums.
Can anyone help, please?
Posts: 9
nobody knows??
:cry:
Posts: 1301
Other than the fixes you've already found, I don't think that anyone has come up with a mod for this.
I re-arranged my front page so that the sub-albums actually are listed under the description, but I can see that if there were too many sub-albums I'd have to find a way to make them wrap up to a second column. But so far this works for me because I don't intend to include too many sub-albums within any one main album.
I know a little of what would be required (I hacked slooze to do something similar, but it had less code to sort thru) - but this would require a lot more work. Maybe that's why nobody has tackled it so far?
:???:
Gaile
Posts: 7
Hi there, new gallery user here! :D
I customised the look of my gallery install to have a similar look on my up and coming site... is this what you meant? see the url:
http://photos.flamingfeather.com/
(pardon the texts and stuff, it's still quite under construction...)
if this is what you meant, perhaps i can help you? it's not a lot of work... but will require editing of albums.php... it's a mathematical check so that it can decide whether to print a new table row or not. :D
Posts: 107
Yes, I'd like to know how you accomplished this... I've tried to edit albums.php but always wound up with a second column that looked exactly like the first...
Babs
Posts: 7
Ok, I hope I can illustrate this properly...
Now the thing is, I haven't tested this yet for those that display sub-albums on this view... I actually removed some code that involved displaying the subalbums. These are the steps I undertook:
**STEP ONE**
Look for this piece of code:
Add at the beginning:
<tr valign="top">
so the above piece of code will look like this:
**STEP TWO**
Because I didn't like the horizontal code dividing each album, I removed this piece of code:
Also had to remove this </tr>: (just look for "End Text Cell" to find the correct one)
**STEP THREE**
Look for this piece of code:
Add at the beginning:
<?php if (round($i/2,0) <= ($i/2)) { ?>
</tr><tr valign="top">
<?php } ?>
And insert at the line before the closing table tag:
</tr>
So it looks like this:
Gah, and that's it... I think. I hope it works for you?
Posts: 7
Erp... it might look like a lot of work, maybe I can attach a modified version of the default albums.php (1.4-pl1) instead, if really needed. :D
Posts: 1301
Hi qactuar
I tried to look at your site, but it seems to be down at present (10:30am, PDT).
One question for you (or maybe several questions once I actually see your site...) - In the Gallery configuration you tell Gallery how many albums you want displayed per page. Does your hack take that into consideration and then divide the albums up accordingly into two columns or handle it differently? (inquiring minds want to know)!
I think the sub-albums code being removed might be a problem for a few people, but perhaps someone else will see a workaround there to get your modification working with sub-albums included.
Nice to see some new faces sharing their ideas!
Gaile
Posts: 7
Hi PixelPoet!
The site is up now, I think. :D
Anyway, it doesn't really matter to the code how many albums you've configured for display... basically what it does is for every even numbered album number, it writes the closing and opening table row.
The "album number" I refer to is the $i value in this portion of the code:
for ($i = $start; $i <= $end; $i++)So, if for example, you have 4 albums already, instead of displaying something like this by default:
album 1
album 2
album 3
album 4
It gets arranged to display like this:
album 1 album 2
album 3 album 4
I hope I cleared that up a abit. :D And yeah, it would be cool if someone could mod it for displaying the subalbum column also, although I suppose you could also display the subalbums under the description instead (like you did, I think?). :D
Posts: 7
Hmm actually re-looking at the code now, the actual code for displaying the subalbums is still there. I only removed, so far, the pixel-thin line or something like that. :D So if you had subalbums, it would still display, but I guess it would look really tight if displayed as a third and sixth column.
Posts: 7
Hello! it's me again... just wondering if anyone's tried my mod and if it works for you...
i think, for the subalbums thing (i didn't remove the code to display them), you can also apply a mod that displays it under the description of each album (same as what pixel poet uses?).
ideas, anyone?
Posts: 5
Tried it and it seemed to work like a charm. Two split columns there and it looked great!!!! :D But, after refreshing and checking it out again, I get this
Trying to figure out what caused it now.....
Posts: 7
Oh?? :o I wonder what's causing it... have you found out? I hope it isn't the mods... :-? I haven't encountered this error on my end, but maybe it's because there's something that I'm not testing out. Hmm...
Posts: 107
Works great! Only thing I'm going to have to do is make the thumbnails smaller, otherwise it looks way to cluttery...
http://www.fractalfairy.com/~feusers/themes/gallery/
Another thing, this didn't work until I removed the code for the line between the image cells...
Babs
Posts: 3
I tried it and it works like charm on the original modification that was posted.
Posts: 3
The mod described in this thread is awesome and works great for creating two columns on the front gallery page. Huge thanks to qactuar for taking the time to explain it.
I have tried to modify it to make three columns, but am having problems.
I have limited my gallery to displaying 12 albums per page and would like them to be displayed as:
album 1 album 2 album 3
album 4 ablum 5 album 6
... etc.
I have modified the code to put the album descriptions under the thumnails for the albums so things don't get too cluttered.
I then tried to modify the equation used in this hack to determine the number of columns per row, but am having a problem.
The hack relies on this step:
<?php if (round($i/2,0) <= ($i/2)) { ?> </tr><tr valign="top"> <?php } ?>Since I would like to have three columns on my front page, I tried the following:
<?php if (round($i/3,0) <= ($i/3)) { ?> </tr><tr valign="top"> <?php } ?>which gives me the following layout:
Row with one item
Row with two items
Row with one item
Row with two items
... etc.
So then I started playing around with the equation and when I tried this, I almost got what I want:
<?php if (round($i/3,0)+0.01 <= ($i/3)) { ?> </tr><tr valign="top"> <?php } ?>which gives the layout:
Row with one item
Row with three items
Row with three items
Row with three items
... rest of rows have three items
I'm not a programmer, so I don't really know what I'm doing. Adding the (+0.01) to the equation was a stab in the dark. Is there anyone who understands this well enough to tell me how I can modify the statement to get only rows with three items?
The gallery I'm trying to do this with is here: http://lightmatter.net
I turned on the border of the main layout table to make it easier to see where each table data cell is placed.
If you anyone can offer suggestions, I'd really appreciate it!
Thanks.
Posts: 2
Two columns and the "simple031" skin from http://pownuke.com/galleryskins/samples/downloads/simple was a good start, but I'm trying to achieve something like http://www.smugmug.com
I'm guessing this is entirely possible, but for the css less-than-novice, I thought I would first ask if it has already been done.
Posts: 22888
pyknosis,
I will try to look at this tomorrow or the next day. Don't give up.
Dave
Posts: 3
Hi, floridave. Thanks for offering to help. I hope you'll be able to figure it out! :D
Posts: 22888
pyknosis,
I don't have all you code but you can try this and see if it fits the bill.
<?php echo "<table border = 1>"; $numPhotos = 11; for ($i=1; $i <= $numPhotos; $i++) { if ($i %3 ==1){ echo "<tr>\n"; } echo "<td>\n"; echo "the a href goes here "; echo " the image goes here "; echo "close a href <br>"; echo "the caption or title "; echo $i; // take out this echo echo "</td>"; if ($i %3 == 0){ echo "</tr>\n"; }} echo "</table>"; ?>Just save this as a test.php and see if this is what you like. Change the $numPhotos to see if it does what you want.
I did not read the whole thread, so I don't have the rest of the code and variables you are using but you should be able to plug them into where I have text. I don't know what you will need above all of this like the $numPhotos will the total of all the albums. You will have to add some HTML formating or CSS to get what you want.
Good luck and I like the new layout on your site. Perhaps when you are finished you can post the whole albums.php file?
Dave
Posts: 3
Thanks for the suggestion, Dave. I couldn't quite figure out how to apply your code, but looking at it made me think of a way to solve the problem.
I figured out that there was only a problem when $i=1. I'm not sure why that is, exactly, but to deal with it, I used the following and it works! (I'm sure there's a more logical way to do this, and if anyone sees it, please post your suggestion.)
<?php if ((round($i/3,0) > (($i/3)-0.01)) and (round($i/3,0) <= ($i/3))) { ?> </tr><tr valign="top"> <?php } ?>I'll come back and post the albums.php file later. I'll need to clean it up and write an explanation, because I currently just have a bunch of stuff in the original file commented out to get the layout I want.
Posts: 6
I have followed the whole process and it's working!
The problem is that I have to make the thumbnails smaller. I'm going in its subalbum properties and reduce the thumbnails size but it doesn't change why???
Or maybe, if i modified the code to put the album descriptions under the thumnails for the albums ... will it be ok???
How can i do that?
Posts: 22888
Did you "rebuild thumbs" after you made the changes?
Posts: 1
i tried to make 2 columns but i dont couldnt take out the info on the side
if anybody can help i'd greatly appreciate it
i would like it to look more like this gallery http://www.lightmatter.net/gallery/albums.php
Posts: 22888
jrlcla, http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=139070#139070