Customized Design and Code (like Frommel's site)

rhyme

Joined: 2005-01-12
Posts: 12
Posted: Wed, 2005-01-12 23:08

I really liked frommel's design but he never posted any source (said he would back in aug 04). So I decided to try and figure it out myself..

http://ledune.net/gallery-v2/

that's where i am so far...

So here's how it works for the curious -

The highlight images are made in photoshop, uploaded and hidden. The bigger images are also custom and uploaded and also hidden. The system selects them by getting the first image in the index (always that picture) but doesn't display them in the list because they are hidden.

There are a LOT of bugs - i did this in a few hours. If anyone has any comments, suggestions, or wants source, let me know.

 
jyoseph

Joined: 2005-01-14
Posts: 1
Posted: Fri, 2005-01-14 02:27

wow, that is awesome!

I just installed Gallery today. Not sure what all it entails to change the look and feel but, this looks great.

Very cool. I would love to do that but i think I need to read around a bit. How in depth was it to do this?

 
rhyme

Joined: 2005-01-12
Posts: 12
Posted: Fri, 2005-01-14 19:13

This was pretty custom... I had to edit the php code directly to do it. If you are starting off trying to customize, i'd suggest you try some of the simpler things first before tackling something this custom.

 
ashwanth

Joined: 2004-09-08
Posts: 3
Posted: Sat, 2005-01-15 20:28

Pretty Amazing....could you post a how to after your fully done....

 
rhyme

Joined: 2005-01-12
Posts: 12
Posted: Mon, 2005-01-17 05:17

I'll work on a howto this week.

 
rhyme

Joined: 2005-01-12
Posts: 12
Posted: Mon, 2005-01-17 17:42

Ok, so here's a bit on how it was done.

First, I grabbed the existing look and feel from frommel's site, as I was trying to mimick it as much as possible. I really can't explain how I did it from top to bottom because it's so hacked up - I really kludged it together. If you look around, you will see that there are quite a few bugs. I assume that anyone trying this would know how to use a css file and such and I wont waste time explaining how to insert it.

So without, getting into the line by line details, I'll describe it as follows -

Editing albums.php, the key here is to get the images to flip after 3 instances, so I interested the following code -

<?php if ($break >= 3) { ?>
</tr><tr>
<?php $break = 0 ?>

$break is defined as 0 at the beginning of the file and incremented with each picture. So, when $break = 3, the loop completes, and it inserts a <tr> which makes possible to have 3 images per line. The second piece is getting the highlights right. Edit an existing photo to be the right size using photoshop or similar. The easiest way to do this is to grab one highlight.jpg from the site and then using the dotted line tool (whatever its called) in photoshop, highlight the enire image and then drag teh mask to your image. Crop that way and re-save to a new file. Upload and set it as highlight. Also, edit your config.php to set the highlight size to 248. Dont forget to "hide" the highlight photo.

The view_album.php is also modified. The big thing here is to get the banner right.

<td colspan=9 class="bannercell" align="center">
<?php
$pathtotop = $gallery->album->getPhotoPath(1);
$photo = $gallery->album->getPhoto(1);
$thumbImage .= $path . " " . $photo->image->name . "." . "sized" . "." . $photo-
>image->type;
?>

So, what this code does is look for the first photo in the album. The photo should be sized correctly - so you have to take an existing photo you like and make it look like the widescreen 8:3 ratio you see on the page. Do this in photoshop, upload it, set to be the first photo, then hide it. This will make it the "super thumbnail" on the page. Remember: it must be the first photo in the list, so reorder to position 1! If you don't, you'll get the sized.jpg in there instead. In my nested albums you will see that happen because I haven't gotten around to making the photos in the nested albums - the choice is yours - I kind of like how the main albums have the super thumbnail and the sub albums show a the sized.jpg.

Finally you have to edit view_photo - just to use the css files and look the right way, otherwise, theres no real customization here.

In short, the easiest thing is to just ask me for source. So if anyone wants it, I'm happy to post it.

 
mnemonic

Joined: 2005-01-18
Posts: 1
Posted: Tue, 2005-01-18 03:02

yes please :) i would love to have a play with it.

 
rhyme

Joined: 2005-01-12
Posts: 12
Posted: Tue, 2005-01-18 18:14

Ok, here it is: http://ledune.net/download/

Few things to note:

1. The setup dir is empty. This is intentional. You dont want to use this to setup.
2. The config.php file is removed. Again, also intentional. You will need to copy yours.
3. Most importantly - DONT OVERWRITE YOUR EXISTING GALLERY FILES!!!
4. Some of the img src's and the like still point to frommel's site, I havent had the time to go through and edit the source to point to local urls. I will at some point.
5. USE AT YOUR OWN RISK!

Installation steps:

1. Create a new folder for this, call it whatever you want. Say gallery-v2/
2. unzip download.zip into gallery-v2/
3. Copy your existing config.php into gallery-v2/
4. Edit it o point to the new folder ($gallery->app->photoAlbumURL ) -- you can leave the album dir the same but be warned that I'm not responsible for anything that happens to your album if you use this system. Nothing bad should happen of course, but you never know. So if you are really worried, set up a new album directory to store some test photos in, use your existing gallery (see point #6) to upload some into it (you'll have to edit your existing gallery config.php) then set your old config.php (for your original gallery install) back to the right album dir. In short, use at your own risk.

5. edit your new config.php to have $gallery->app->highlight_size = "248"; in place of whatever was there.

6. DO NOT USE THIS SYSTEM TO ADMIN ANYTHING. I HAVENT TESTED ANY OF THE ADMIN FUNCTIONS AND 99% CHANCE THEY DONT WORK. USE YOUR EXISTING GALLERY URL FOR ADMIN FUNCTIONS.

7. Take an existing highlight.jpg from my site. Load it into photoshop. Highlight the image with the crop tool (or whatever its called). Load one of your full size images. Drag the mask into the new image, making a selection of the same size as the highlight you copied from my site. Crop your new image. Save it as highlight.jpg (or whatever). The image should be 248x78. Using your existing gallery admin pages, upload this into one of your folders. Set it as the highlight. You will now see
the "widescreen" type highlight in your first folder. Because all the other highlight images are different sizes, your screen may look a bit messed up until you do them all. If things look good, you can go ahead and hide the highlight by using hte hide function in the admin tools in your existing gallery.
8. For the larger images (nested folders like in here: http://66.92.128.100/gallery-v2/view_album.php?set_albumName=Remodel) repeat a similar process. Copy one of my images, select the image with the dotted line tool, drag the mask into a new image of your own (full size images work best) - then crop. You should now have an image thats 640x200. Save this image as top.jpg or whatever. Again, using your existing gallery admin pages, upload this image into the first folder in your system. Reorder the image to be the FIRST IMAGE in the list. It must be in position 1. You can hide it or not, up to you.
9. Repeat for all your folders and sub folders and you will have a completed site. You'll notice mine isn't yet done.

known bugs:

1. The image count is static at the bottom, haven't fixed it.
2. The page counter on the index isn't right - havent had time to fix it, its also static by mistake.
3. Navigation is a bit messed up because of the breadcrums at the top.
4. Forget admin functions, forget voting. Use your existing gallery to admin.
5. I havent figured out how to center some of these images.. (see http://66.92.128.100/gallery-v2//view_album.php?set_albumName=VegasThanksGiving) for an example. The tower is off to the left, I'd like it centered. I dont know why I cant seem to make it work.
6. The code is totally crap, I know. I really slapped this together to see if i could make it look cool. I kind of want to just go back and start over now that I know how it works, but I'm lazy.

Thats about it.

If you hack it up and make something cooler, please share your source!

-------------
USUAL DISCLAIMER APPLIES! USE AT YOUR OWN RISK. IM NOT RESPONSIBLE FOR WHAT YOU MESS UP ON YOUR GALLERY IN ANY WAY SHAPE OR FORM.

 
rhyme

Joined: 2005-01-12
Posts: 12
Posted: Tue, 2005-01-18 18:18
 
thenixhex311

Joined: 2005-01-25
Posts: 1
Posted: Tue, 2005-01-25 05:41

hey Rhyme... i really like how you did the layout for your gallery.

Im trying to replicate it to the best of my abilities, but im having issues. I did exactly what you said, changed what you did, and now im getting :

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/sillettd/public_html/gallery-v2/config.php:182) in /home/sillettd/public_html/gallery-v2/session.php on line 60

Your Gallery settings were configured with an older version of Gallery, and are out of date. Please re-run the Configuration Wizard!

and then it's downhill from there. I dont know what else to try to do to get this working. I love the layout and have tinkered around with mine to try and get something working...but i wont be satisfied until i get it looking like yours/frommels.

what version of gallery were you using? any other advice/help/updated source files you could do to help?

thanks a TON!

 
lukasf

Joined: 2005-01-26
Posts: 1
Posted: Wed, 2005-01-26 01:18

I must say you have come quite far. Really nice, I liked frommels site a lot before. And had some of the effects on my site to. Now I have changed it a lot. If anyone wants to know how i did it, just send me an pm.

http://www.lukasforssen.se

 
rhyme

Joined: 2005-01-12
Posts: 12
Posted: Wed, 2005-01-26 17:41

thenixhex, whatever page you are looking at when you get that message check your php file. Make sure there IS NO WHITESPACE (blanks or empty lines) at the top of the file. The very first line, with no spaces or anything else in front of it, should be "<?php"

If you can somehow give me access to your files (post them online?) I can try to fix it for you. Email me at

sometime.

Why dont you post the first few lines of the file that gives you that error?

My version of gallery is v1.4.3-pl1

 
zooloo

Joined: 2005-02-04
Posts: 10
Posted: Fri, 2005-02-04 03:53

Thank you for putting in the effort and making this available! This is a good first cut.

I tried to get it working with a test setup, but I'm having trouble with directory paths.

With my current setup (gallery 1.4.3-pl2), I have

something.com/gallery as the URL and
something.com/albums as the album directory

So when I installed your .zip, I created

something.com/g as the URL and
something.com/albums-new as the album dir

The good news is that I get the first page showing my 1 test album, with the first pic as the highlight.

Unfortunately that's as far as I can go. When I click on the top level album to look at the pics, I get a 404 error not found, because it tries to look for my albums under something.com/g instead of something.com/albums-new. I'm sure I've edited config.php with

$gallery->app->albumDir = "/path/foo/albumsnew";
$gallery->app->photoAlbumURL = "http://something.com/g";
$gallery->app->albumDirURL = "http://something.com/albumsnew";

Is there some assumption that albums have to be under the gallery install directory? I find it easier to upgrade by keeping them separate, hence the convention I use. If you think this is the case, I can try moving things around just to test.

Thanks for any help you can offer!

 
zooloo

Joined: 2005-02-04
Posts: 10
Posted: Fri, 2005-02-04 04:09

Ugh ... just 5 mins after posting this I found one possible solution ... I copied the .htaccess from my existing gallery install to the new one and modified the paths in it accordingly.

That has gotten me further along :D

Now to take this for a spin ...

 
zooloo

Joined: 2005-02-04
Posts: 10
Posted: Sat, 2005-02-05 17:44

I created a test album and it looks cool, but now I'm trying to use the slideshow functionality. Has anyone got this working?

I haven't used gallery a lot, and I don't know a lot about PHP/CSS so I'm not sure where to look. If you have any tips I'll try them ...

Thanks!

 
monkeyrig
monkeyrig's picture

Joined: 2005-02-11
Posts: 3
Posted: Fri, 2005-02-11 13:33

In a brief email exchange The owner told me that he'd changed the 'highlight' function of gallery to create this style of banner (big one for the current album, and a thumbnail of the same for the parent album). So, when he highlights a particular picture, it pops up the little javascript image manipulator and he marks the area of the picture that I want in the banner (1:3 ratio)

I tried to see if this was easy and didn't get very far - but then I don't know php.

I did ask if he was willing to share the source and got no response :(

Nice feature if you can get it to work.

Can anybody get to this site - It's timing ouut for me
http://ledune.net/gallery-v2/

Would love to look at the code.

Guy

 
zooloo

Joined: 2005-02-04
Posts: 10
Posted: Thu, 2005-02-17 03:09

Monkeyrig:

That's good to know ... would love to have that code as well 8-)

I can get to the URL above ( http://ledune.net/gallery-v2/ ), but it gives me a "404 not found". So the site is up, but perhaps someone is working on it and it's temporarily broken ?

 
monkeyrig
monkeyrig's picture

Joined: 2005-02-11
Posts: 3
Posted: Thu, 2005-02-17 09:50

If you go to http://ledune.net - it looks like it's a deskjet printer :-)

Think the server was very temporary :-(

 
zooloo

Joined: 2005-02-04
Posts: 10
Posted: Fri, 2005-02-18 03:35

Hehe ... that's funny.

Must be something wrong with the owner's firewall/NAT.

Now if you could put a digital camera on the internet and present a gallery, that would be cool, albeit inconvenient when you want to use it :)

 
sumwereinsilence

Joined: 2005-03-01
Posts: 3
Posted: Tue, 2005-03-01 03:33

ok i have Gallery 1.4.4-pl6 installed on folder /gallery an i just installed it an i havent posted pics or anything but i wanted to make it look like that one guys gallery so i downloaded the zip that we were supposed to an installed all that stuff to under the folder /gallery2 an i took my config.php file from /gallery an copied it to /gallery2 an my .htaccess file but wen i go to mysite.com/gallery2 this is all i get:

"If you've finished your configuration but you're still seeing this page, that's because for safety's sake we don't let you run Gallery in an insecure mode. You need to switch to secure mode before you can use it. Here's how:

Unix with shell access
% cd /path/to/your/gallery
% sh ./secure.sh

Unix with FTP access
ftp> chmod 644 .htaccess
ftp> chmod 644 config.php
ftp> chmod 400 setup

Windows
C:\> cd \path\to\your\gallery
C:\> secure.bat "

an all those chmod are right but it still isnt working for me is there some HUGE step that im missing here on what to do LOL???

THANKS in advance

DAvid

 
sumwereinsilence

Joined: 2005-03-01
Posts: 3
Posted: Wed, 2005-03-02 04:54

anyone?? :cry:

 
poiboy2

Joined: 2005-03-05
Posts: 1
Posted: Sat, 2005-03-05 02:22

yeah i'm having a similar problem. I went through the steps and all and have been getting this page:

http://www.moiha.com/tmp/

 
rhyme

Joined: 2005-01-12
Posts: 12
Posted: Mon, 2005-03-07 18:52

Sorry I've been out of town. The firewall got a bit messed up, hence you saw the printer page. It's back up now.

If you are still having problems, post here and I'll try to help.

For those of you with the "gallery not setup" issue, have you tried running the configuration wizard?

 
rhyme

Joined: 2005-01-12
Posts: 12
Posted: Mon, 2005-03-07 18:59

"In a brief email exchange The owner told me that he'd changed the 'highlight' function of gallery to create this style of banner (big one for the current album, and a thumbnail of the same for the parent album). So, when he highlights a particular picture, it pops up the little javascript image manipulator and he marks the area of the picture that I want in the banner (1:3 ratio) "

I think he must have misunderstood... This isn't how I do it.

Basically, the setup for a new folder is as follows:

1. Create a new folder in your original gallery directory using the regular method you do. You do this because the admin functions in gallery-v2 are probably totally busted.

2. Decide what photo you want to have as your main page thumbnail. In an editor (not some javascript thing) i.e. using Adobe or Paint Shop Pro, make a thumbnail of 248x78.

3. Upload that file using your regular gallery/ dir. Set it as the highlight image. Then hide the file.

4. To make the "big" highlight inside a directory, you basically do the same thing. Pick a photo, edit it in Adobe or whatever, make it 638x200 pixels and upload it. Now, set that photo as the FIRST PHOTO in the directory - i.e. reorder the list so that photo is the first photo in the sub dir. Then hide it.

 
sumwereinsilence

Joined: 2005-03-01
Posts: 3
Posted: Tue, 2005-03-08 02:27

like adding the setup files to the gallery we got from you? i tried that once an it wouldnt let me go cuz it said somin about diff versions or somin... i know om prly just really dumb and dont know how to do this. lol

DAvid :-?

 
minarets

Joined: 2005-05-02
Posts: 2
Posted: Mon, 2005-05-02 00:24

I'm getting the same error as the previous few users when trying to run ledune.net's Gallery-v2... I'm using a config.php file from a separate Gallery 1.4.4-pl6 install I have in another part of my site. I don't have access to an rc3 config.php file, which is what ledune's copy seems to be running from. This is the error I'm getting:

Gallery needs Reconfiguration

Your Gallery settings were configured with an older version of Gallery, and are out of date. Please re-run the Configuration Wizard! Here's how:

Unix with shell access
% cd /path/to/your/gallery
% sh ./configure.sh

Unix with FTP access
ftp> chmod 666 .htaccess
ftp> chmod 666 config.php
ftp> chmod 755 setup

Windows
C:\> cd \path\to\your\gallery
C:\> configure.bat

This comes after the first time I tried to run ledune's Gallery, when it told me it needed to be put into secure mode, and to change .htaccess and config.php to 644 and the setup folder to 700. So I got past that step, and am now receiving the error listed above.

It seems like the config.php file has changed from 1.4.4 rc3 to pl6, and that's why the Gallery won't start up, since (correct me if I'm wrong) the version that 'rhyme' posted is rc3. Would someone who has the http://ledune.net/gallery-v2/ version running properly be willing to share their config.php file so I can see if that's indeed the problem?

Also, how different is the .htaccess file from rc3 to pl6? Could that also be contributing to the problem?

Finally, wouldn't running the configuration wizard for pl6 create even more problems if the "gallery-v2" files from ledune.net are for rc3?

-min.

 
monkeyrig
monkeyrig's picture

Joined: 2005-02-11
Posts: 3
Posted: Mon, 2005-05-02 09:04
rhyme wrote:
"In a brief email exchange The owner told me that he'd changed the 'highlight' function of gallery to create this style of banner (big one for the current album, and a thumbnail of the same for the parent album). So, when he highlights a particular picture, it pops up the little javascript image manipulator and he marks the area of the picture that I want in the banner (1:3 ratio) "

I think he must have misunderstood... This isn't how I do it.

Sorry, I could have been clearer - this was how Frommel does it - which I think is really cool. But way beyond my php editing skills :-(

 
iliam

Joined: 2005-06-26
Posts: 2
Posted: Sun, 2005-06-26 20:54

Hi

I am about to start on the same path that others in this thread have ventured down for Gallery 1.5.

Are there any new developments I should know about?

Has anyone got a rc3 config.php and .htaccess available? I thought I would try to configure Rhyme's download.zip version but the setup dir is empty. I looked for an archive of old versions on sourceforge but only pl6 is there.

Regarding Cobus Theunissen's work, we should watch this project http://www.versity-cobalt.com/projects_xaerix.php. Also, congratulate him on the birth of his son this month.

cheers
Karen

 
frommel

Joined: 2006-01-03
Posts: 1
Posted: Tue, 2006-01-03 22:57

Many people have asked me how I customized my photo gallery to look the way it does. Especially the multi-column layout of my main album page. I have been loath to publish it, since I like having a unique site and I am also not keen on supporting it. But I decided to publish it in any case. You are receiving this email because you had indicated (through email to me or a comment on my site) that you would like to understand how I did it. These instructions are now posted on http://frommel.net/weblog/pivot/entry.php?id=349 along with the full source code of my Gallery 1.5 site.
DISCLAIMER:
The instructions are only guidelines and require php scripting knowledge, since you will be hacking into the Gallery code. It is probably not bug-free and I paid little attention to modifying features that I don't use (like the statistics pages, the comments features, or the voting features).
Regards
Cobus

 
calvary_rider
calvary_rider's picture

Joined: 2005-01-08
Posts: 5
Posted: Thu, 2006-04-27 01:00

Had to correct a small glitch in the albums.table.tpl file. As written it would create to many empty cells in the layout. Here's my fix:

} // if isRoot() close
} // for() loop

if (($end % 3) != 1) {
	$pixelImage = "<img src=\"" . getImagePath('pixel_trans.gif') . "\" width=\"250\" height=\"1\" alt=\"\">";
	for ($j = 0; $j <= ($end % 1); $j++) {
		echo '<td width=248 valign=top>'.$pixelImage.'</td>';
	}
	echo '</tr><tr>';
}

if (($end % 3) != 0) {
	$pixelImage = "<img src=\"" . getImagePath('pixel_trans.gif') . "\" width=\"250\" height=\"1\" alt=\"\">";
	for ($j = 0; $j <= ($end % 2); $j++) {
		echo '<td width=248 valign=top>'.$pixelImage.'</td>';
	}
	echo '</tr><tr>';
}

?>
<td colspan=3>

see a sample at www.calvary-riders.org/gallery

 
gad

Joined: 2006-05-25
Posts: 2
Posted: Thu, 2006-05-25 17:20

Could someone please post frommel's directions? I love his gallery layout & how he has a little text area for each album under the main pic for each album..

TIA

 
calvary_rider
calvary_rider's picture

Joined: 2005-01-08
Posts: 5
Posted: Wed, 2007-10-24 16:41

Here's a link to frommel's full directory files. He has made this available on his website:

http://frommel.net/weblog/images/gallery20050103.zip

I have found a glitch with logging in. Some times it will tell you that you have entered an invalid username or password when you haven't. If you leave the pop-up open and then click on an album from the gallery main page it will show that you have successfully logged in. However, If you close the pop-up before trying this...it will show that you have not logged in.

Anyone know why this happens?