Advanced search  

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]

Pages: [1]   Go Down

Author Topic: making coppermine "fit" - window sizing  (Read 4273 times)

0 Members and 1 Guest are viewing this topic.

FoxRocks

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
making coppermine "fit" - window sizing
« on: May 30, 2008, 08:28:57 am »

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~
Logged

steveeh131047

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Posts: 217
Re: making coppermine "fit" - window sizing
« Reply #1 on: May 30, 2008, 10:39:13 am »

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

FoxRocks

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: making coppermine "fit" - window sizing
« Reply #2 on: May 30, 2008, 04:07:40 pm »

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
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: making coppermine "fit" - window sizing
« Reply #3 on: May 30, 2008, 04:23:21 pm »

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
Logged

FoxRocks

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: making coppermine "fit" - window sizing
« Reply #4 on: May 30, 2008, 05:14:25 pm »

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

~FOX~
Logged

FoxRocks

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: making coppermine "fit" - window sizing
« Reply #5 on: May 30, 2008, 06:00:32 pm »

It's updated now, thanks again!

~FOX~
Logged

steveeh131047

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Posts: 217
Re: making coppermine "fit" - window sizing
« Reply #6 on: May 31, 2008, 10:15:53 am »

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
Logged

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: making coppermine "fit" - window sizing
« Reply #7 on: May 31, 2008, 10:20:39 am »

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

Change

Code: [Select]
starttable('-1', $lang_login_php['enter_login_pswd'], 2);
To

Code: [Select]
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.
 
Logged
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

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Posts: 217
Re: making coppermine "fit" - window sizing
« Reply #8 on: May 31, 2008, 10:47:21 am »

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
Logged

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: making coppermine "fit" - window sizing
« Reply #9 on: May 31, 2008, 11:12:47 am »

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'.
« Last Edit: May 31, 2008, 12:04:10 pm by just_some_guy »
Logged
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
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.