2 colums on the main page
Bukken
Joined: 2003-09-16
Posts: 14 |
Posted: Wed, 2004-09-22 14:20 |
I've searched the forum for a way to get 2 colums on the main page in stead of just one, but didn't find anything.... Bukken |
|
Posts: 13451
Hei, bkn!
Have a look at http://gallery.menalto.com/node/21358
Posts: 14
Thanks for the link h0bbel, but it's not quite what I was looking for. It's seems that this mod adds 2-3 columns to the sub-albums and not the main page. I want something like that on the main page, as I won't be using sub-albums on my gallery as there is no need for it.
I'm able to create 2 colums on the main page, but as you can see from the image it don't work the way I want it
Any help would be great...
Posts: 27300
bukken,
H0bbel asked me to give you a hand...It looks like you are most of the way there.
a 2-column mod has been done before but for a much older version I am sure that you have searched for those and had no luck in implementing them.
But here is a example I think you are looking for:
http://www.fractalfairy.com/~feusers/themes/gallery/
and the discution about how to do it:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=4945&start=0&postdays=0&postorder=asc&highlight=
If you get stuck post your code and a example and We will try to help out.
Dave
Posts: 14
floridave
Thanks for the info and links, looks like there is a solution to my question in them. I'll try this out and let you and h0bbel know how it goes.
Once again thanks.
Posts: 13451
bukken, you seem to be doing good
Posts: 225
Anyone got any updated code for 1.4.4pl2? Not having much luck with this
Posts: 14
I mostly followed this link that floridave pasted: http://gallery.menalto.com/index.php?na ... highlight=
Also do check your PM
Posts: 4
Hate to bump a REALLY old topic, but I could not get this to work on my gallery v1.4.4-pl2, and the post above mine...the link dosent work.
Wondering if anybody would be kind enough to share how it is now accomplished, or if gallery 2 supports more colums on the main albums page...etc. Whatever it takes to get it changed from the default one on top of the other.
-Ray
Posts: 27300
MelRayUS, All I did was follow the steps in this thread: http://gallery.menalto.com/node/5114
attached is albums.php for version 1.4.4pl4 that will have 2 columns
you will have to rename it to albums.php
if you want to change it to 3 columns change
to
updated for 1.5:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=139070#139070
Posts: 53
Qestion.
How do we get the info under the picture insead of to the right. It seems to save alot of space if it's under the picture. Thx
Posts: 27300
two column with title and description under image.
you will have to keep the images the same height as it will look out of place. Not extensively tested with descriptions of varring lengths.
Updated for 1.5:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=139070#139070
Dave
Posts: 4
Thanks Floridave - Just what I was looking for..
Posts: 34
Hi, I've used the above - thanks Floridave. Would you be able to tell me how to centre the text beneath the highlights. Currently they are too far left and look kinda odd.
Thanks in anticipation
Posts: 27300
jassyjas,
not tested but look for
<td align="<?php echo $left ?>" valign="top" class="albumdesc">
and change to<td align="center" valign="top" class="albumdesc">
Why the echo $left you ask? Well it is used for languages that are read right to left.
Dave
Posts: 34
Thanks for the response. I cannot find this Code though. I'm looking in the Album.txt file posted above in this thread right?
Any further help much appreciated.
Thanks
Posts: 27300
jassyjas,
I hope you are talking about the title of the album.....
and add a align="center" to the table tag.
If this is not what you want then post back with a url and location if you cant figure it out on your own. You might have to play with the classes in your css as well.
Dave
Posts: 34
Perfect!
Thank you
Posts: 7
I guess I'm the one that is stupid
I can't get it done, so that the colums are equal size. Can anyone help me ??
My gallery is at: www.chano.dk
Posts: 7
Anyone ???
Posts: 27300
Chanosfar,
The rendering of tables is dependent on the cells content. The table above has a cell peramiter of <td nowrap class="title">.
If you have a title that is long then the cell will be bigger than adjacent cells. The text in the cell will not wrap because of the 'nowrap'. You can remove the 'nowrap'and see if it helps. The other option is to give some of the tables and cells absolude width values.
or (if using the second albums.php (text below)) look for
and give it value like 25%. But then your images might be out for size.
Dave
Posts: 7
Okay thanks Dave, I can't get it work so that they are equal But I'm not that good at php, so.........
Posts: 27300
So What? This is HTML and tables not php. Can you give me a url and tell me what you changed. Do you want all cells the same width? the image cells as well as the title/discription cell?
Dave
Posts: 7
LOL ok thanks Dave
www.chano.dk
the cells right to the thumbnails I would like same size
Posts: 1
I have done the two-colums mod sucsessfully. And changed the rows so as they're equal. But there's one thing that I really felt in love with. And that is the skin used above in the first post.
http://wralgyr.org/images/gallery.jpg
Where can I get this skin? I really loved the simplity and the colours..
Anyone??
Posts: 9
I have modified the main page to display 1, 2, or 3 columns.
The 3 column_*.inc files go in the gallery root.
There are 2 patches, 1 for albums.php and another for setup/config_data.inc
You then can select from the configuration wizard the number of columns to display - (under the Main Gallery page tab).
Paul
Posts: 9
The patch was written for 1.4.4-pl4
Posts: 7
Thx a lot pmona - I'll try that
Posts: 7
The 2 patches - what do I do with them ?
I can't figure out
Posts: 6
Can anyone edit this albums php of mine to do this as I know little of php?
Posts: 9
Steps I would do:
# cd /location/of/gallery
# tar zxvf /path/to/columns_patch.tar.gz
# cp albums.php albums.php.orig
# cp setup/config_data.inc setup/config_data.inc.orig
# patch -p1 < albums.patch
# cd setup
# patch -p1 < config_data.inc.patch
After that you can then use the Gallery configuration wizard and select the number of columns you want for the main page.
good luck
~paul
Posts: 7
I'm a little fuzzy here. When I tried to apply the patch, I got the following error:
Would it make any difference what the file paths are? Also, my albums.php has been modified with a couple of lines of code. Would that make a difference?
Posts: 9
My apologies, I should have tested the patch before posting. I just re uploaded the file. Grab it again and see if it works for you.
I just ran it and aside from the missing header error it worked fine.
[root@crossfire gallery]# patch -p1 < albums.patch
missing header for unified diff at line 3 of patch
patching file albums.php
[root@crossfire setup]# patch -p1 < ../config_data.inc.patch
missing header for unified diff at line 3 of patch
patching file config_data.inc
[root@crossfire setup]#
I un tar'd the file to my gallery directory first.
~paul
Posts: 7
Thanks for the help pmona. The new version works fine. For some reason the tables are not correct, and the text goes off the page to the right in Firefox. The tables are broken somewhere, but that may be because I am embedded in PHPNuke.
I took a look at your first albums.php (albums.php V1.4.4pl4 2 column mod) in a prior post in this thread. That one works perfectly in IE, but still runs off the screen to the right on Firefox, but the tables look as they are supposed to. They just don't wrap with the page.
Any ideas on how to fix this in Firefox. I can't really post the web site here because it has several Adult images in the gallery. (Be happy to PM it to you if you want.)
EDIT: Let me rephrase this. The only time it runs off the screen is when I am in god mode. If I am logged on as a regular user, it looks fine. Something I missed somewhere?
Posts: 7
I don't get it, sorry
But thanks for trying anyway.....
Posts: 9
I see the same thing in IE6. I never worried about it while logged in since I only cared about what others would see. (no one else has logins).
Posts: 23
This patch can make a four column display Gallery? or better is there a way to display x number of albums in the main page of the gallery??
THX
Posts: 9
The patch only does 1 to 3 columns, but you can easily modify it to do more.
Posts: 23
OK, I will apply the patch and look at the code you made. Thx Pmona! 8)
Update:
Basically for what I read and understand what are you doing in the column_*.inc files is to copy two or three times the same code depending on the number of columns you wish to display. Isn't? :D
Posts: 23
Using this quote I fixed my problem, displaying the root albums in 4 columns.
Fixed. instead of:
I use:
Works fine for me on IE6 and Firefox.
Posts: 19
I've tried the 2 column with title and desc under image.
But I found that they are not aligned correctly.
Can you help? Many Thanks.
My URL: http://gallery.chuenhk.com
Sorry for the Chinese webpage
Posts: 27300
Like I said "Not extensively tested with descriptions of varring lengths."
One could look at the code and hardcode a height to the row I guess. Or force the descriptions the same height.
Dave
Posts: 23
If you try to make the same size of thumbs you will fix that issue. So I could suggest if you try the square thumbs that rich made (works for 1.4.4-pl6 and below) http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=17627
Hope it helps!
Posts: 19
Thanks. Any hint I can fix the height or the thumbnail area height?
Posts: 3236
Open "albums.php" and find the table that deals with this and set its "height=" tag?
Posts: 19
I got it! Many Thanks.
Posts: 9
I have updated to 1.5 and updated my patches as well. I also included an additional patch if you are using the embedded movie mod.
As before, this will allow you to configure the gallery main page to display 1, 2, or 3 columns. Configuration is set in the setup wizard.
These patches are intended to be run against the original gallery files (not the updated config_data.inc if you are using embedded movie)
Paul
Posts: 4
Here I go again. Bumping an old topic for the same purpose. I upgraded from 1.4 to 1.5.4 last week and am unable to implement a 2 column layout on the main page. The code above is not in the new albums.php. I have tried adding it to no avail. Any ideas now? I also tried the attached patch files to no avail. It seems this is more difficult than last time.
The link to updated for 1.5: is broken, it takes me to the news section and I can not find any reference to multi column layout help in that section. Help!
Posts: 11
Anyone have an answer?
Posts: 7
I think this is worthy of a bump, as well. A multi-column gallery frontpage is exactly what I've been looking for to help remove some of that painful white space.