making coppermine "fit" - window sizing making coppermine "fit" - window sizing
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

making coppermine "fit" - window sizing

Started by FoxRocks, May 30, 2008, 08:28:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FoxRocks

Hello,

I'm currently integrating coppermine into my website but I'm having a bit of a problem getting it to fit. What I mean by that is I've got it in a <div> which is sized to 552px wide but some windows are still breaking this rule. Overall the main page fits well but some don't. Let me give you an example. When you view an album it shows all the thumbnails and then when you click on a thumbnail it brings you to a filmstrip. Well that filmstrip is going bigger then 552px. I did set the max width in the config settings to 90% and it works good for most windows, but not all. Another set of windows that don't fit are the windows that display when switching from user to admin mode, the ones where you have to click "continue". I hope I've made sense. I attached a screenshot to give you a better idea. I did do some searching on the forums but I couldn't find anything...maybe I wasn't using the correct search terms.

Thank you for your time,

~FOX~

steveeh131047

Can you post a link to the gallery - it would help.

FoxRocks

hi steveeh,

here is the link: Photo Gallery. The more I've been thinking about this the more I wonder if I just chose the wrong template.

FOX

Hein Traag

First things first, you need to update to 1.4.18 asap. You are using <!--Coppermine Photo Gallery 1.4.16 (stable)--> at the moment which is outdated and unsecure.

I wonder if people ever read the News: http://forum.coppermine-gallery.net/index.php/topic,51882.0.html

FoxRocks

Dang, I didn't even notice that! Thank you for bringing that to my attention.

~FOX~

FoxRocks


steveeh131047

Fox,

The problem with the "overhang" on your LogIn page is that the table containing the login form has a fixed width of 600px; changing this to 500px, or making it a relative value such as 80%, tidies everything up nicely.

Unfortunately, I don't know cpg well enough to know where this bit of code is being generated - I can't see anything in theme.php that is doing it. Perhaps others more familiar with the "inner workings" will point you in the right direction.

Steve

just_some_guy

The piece of code you want to change is in login.php; where starttable() is declared.

Change

starttable('-1', $lang_login_php['enter_login_pswd'], 2);

To

starttable('600px', $lang_login_php['enter_login_pswd'], 2);

You can adjust '600px' to a value of your choice, like stevee suggested you could add a relative value if you wanted.

Should fix it nicely.
Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

steveeh131047

Fox,

I'm not sure what theme you are using, but take a close look in yourtheme/theme.php for the bit of code that just_some_guy is referring to. It may be you can change it there, rather than hack the core CPG files, which is always a nightmare when you come to upgrade.

Steve

just_some_guy

#9
The starttable() function is used throughout CPG to create tables, the actual function is "made" in theme.php, however it is referenced to accross the coppermine files. So each table is created independently where it is needed, in this case it is created to hold the login form.

FoxRocks, it depends what you are wanting to do, is this issue only occurring on login.php? or are the tables spanning out on other pages too? There is a config option - "Width of the table for file display (pixels or %) " you could use this to change the width of the table in other places. By changing this value you would change the size of the table on the login form too and across coppermine. However, if the issue is only on login.php just change the value in login.php. Where the width value in the function is declared as '-1' it tells coppermine to use the value you set in the config as the width of the table, this is what value it is using to create your login box. By changing it to another value it will override the predefined value you have in the database to a new value, in this case '600px'.
Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums