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: Width problem with editpics.php  (Read 7390 times)

0 Members and 1 Guest are viewing this topic.

Plaroma

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Width problem with editpics.php
« on: September 02, 2008, 09:05:09 am »

We have made an installation for a client and as part of that changed the Coppermine design with one matching the rest of the site. Everything is fine except for one page, editpics.php

We've set the width of the site to 960px, but on editpics.php the main body uses full width (i.e. 100% of the screen, not browser window size). Had a quick look as to what might be causing this, but can't find anything.

Oh, it works fine on Firefox (of course ;) ), just IE is messing up (both 6 and 7)

Any ideas/fixes would be appreciated.

Plaroma
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Width problem with editpics.php
« Reply #1 on: September 03, 2008, 09:01:36 am »

A link to the gallery you refer to might help...
Logged

Plaroma

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Width problem with editpics.php
« Reply #2 on: September 03, 2008, 11:29:57 am »

Didn't think it mattered as the problem is in the admin area, but no problem with a link.

The gallery is here: http://www.chefpla.com/gallery/

Plaroma
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Width problem with editpics.php
« Reply #3 on: September 03, 2008, 04:22:27 pm »

Try moving the inline styles into the stylesheet. The invalid <style>-tag might cause IE to act up. If you don't want to move it to the stylesheet, at least change
Code: [Select]
<style>into
Code: [Select]
<style type="text/css">.
Your custom theme basically is rainy_day with changed colors, so I could not see any problems with it.
Logged

Plaroma

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Width problem with editpics.php
« Reply #4 on: September 04, 2008, 05:15:32 am »

You are right about the theme, but unfortunately the changes you suggested didn't make any difference.

Plaroma
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Width problem with editpics.php
« Reply #5 on: September 04, 2008, 07:30:22 am »

Please zip the entire custom theme folder and attach it to your posting (using "additional options" when composing your message). Post as well what other changes (except changing the theme) you have made, i.e. changes to coppermine's core code.
You also need to upgrade - you're running cpg1.4.18, while the most recent stable release currently is cpg1.4.19.
Logged

Plaroma

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Width problem with editpics.php
« Reply #6 on: September 04, 2008, 10:32:56 am »

Attached to this post. Only other files that were changed were displayimage.php and themes.inc.php (both included in the ZIP file), just search for MH references.

Plaroma


[Edit GauGau] Removed attachment as per request [/Edit]
« Last Edit: September 05, 2008, 07:23:24 pm by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Width problem with editpics.php
« Reply #7 on: September 04, 2008, 11:10:50 am »

You've made several mistakes:
First of all, never edit include/themes.in.php. Everything that can be accomplished by editing that file can be accomplished as well by editing themes/yourtheme/theme.php. That's why there is a big fat warning in include/themes.inc.php that reads
Code: [Select]
/////////////////////////////////////////////////////////////////
//                                                             //
// Do not edit this file.                                      //
// If you need to customize your theme,                        //
// edit themes/yourtheme/theme.php instead !!!                 //
// Take a look at the sample theme (themes/sample/theme.php)   //
// to get an idea what to copy into your custom theme.         //
// Really, don't edit this file! We mean it!                   //
//                                                             //
/////////////////////////////////////////////////////////////////
We haven't put that warning there (and into the docs as well) just for fun! I integrated all your edits into your theme.php (see attachment). Undo your edits to include/themes.inc.php and upload a vanilla file from the package instead!
Some of your edits look bizare to me, but if that's how you want coppermine to act, you're welcome - it's your party.

Second: always rename your custom theme as suggested in the docs. I renamed your theme from rainy_day to rainy_day_custom. Use that and reflect your change in coppermine's config.

Third: you're including another file that you failed to attach, so I can not really test everything. You do this to inject some Google ads, which is not a bright idea. Google ads are just plain HTML/JavaScript/CSS - you shouldn't have gone through the effort to do this using PHP - it only makes this bound to break. Anyway, if you want me to look into this any further, provide the missing file as well.

[Edit GauGau] Removed attachment as per request [/Edit]
« Last Edit: September 05, 2008, 07:23:57 pm by Joachim Müller »
Logged

Plaroma

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Width problem with editpics.php
« Reply #8 on: September 05, 2008, 04:56:40 am »

Thanks for taking the time to look into this, but why the angry undertone of the post?

Second, why do I have to rename the theme? I fail to see the relevance of that.

Sorry about the missing include file. Reason I didn't include it is because that file calls a bunch of stuff in our custom backend and I cannot give you all the files to that.
I did run a test after commenting out that code and there was no change, so for testing purposes you can just remove all the lines dealing with the Google Ads.

Reason it was done this way is because the customer wanted the option to change the GoogleAd code himself without having to change files on the server.

Plaroma
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Width problem with editpics.php
« Reply #9 on: September 05, 2008, 10:20:33 am »

Sorry about the missing include file. Reason I didn't include it is because that file calls a bunch of stuff in our custom backend and I cannot give you all the files to that.
Without being able to use the include I can hardly judge how much space your google ads eat up, so I can't really advise anything.

Thanks for taking the time to look into this, but why the angry undertone of the post?
Because you made several mistakes that could easily have been avoided by reading the docs we provide. Especially if you're a pro you should know better...
Board rules (you agreed to respect them when signing up) say that you're only allowed to post here after having read the docs. You obviously failed to do so.  I provide support most eagerly if I can see that a user really has tried hard before asking. I couldn't see that level of effort from you.
Additionally, you picked a bad theme to customize the colors in the first place: you have to re-do all the graphics, changing the colors there. This resulted in not-so-nicely looking pixelation (you would have had to vectorize the graphics, then apply the changes using proper anti-aliasing, then convert back to bitmaps and finally chopping the resulting bitmap into tiny bits). In my opinion your customization took a lot of work, but the result doesn't look nice due to the pixelation.
Including the file /home/chefpla/public_html/admin/common.inc.php twice (in page header and page footer) is not bright neither, and the object oriented approach breaks the theme entirely if the include (which is just meant to serve some ads) goes down. This is not robust design. Google ads are just plain HTML and JavaScript anyway, so I can see little point in not adding just that into template.html instead of doing complicated stuff with includes.

Second, why do I have to rename the theme? I fail to see the relevance of that.
This is being explained in the docs as well:
Quote
It is strongly recommended to rename your custom theme as suggested above, even if you only plan to accomplish minor changes to a default theme that coppermine comes with. The reason is quite simple: when upgrading at a later stage, you will not run into issues (e.g. accidentally overwrite your customized theme with an updated default theme).
This is particularly important as you say that you're applying the customization for a client - that person won't be aware of your changes to a core theme and will almost certainly accidentally overwrite the customization when applying the next maintenance release (and there is almost certainly a "next release", because development doesn't halt). See what I mean: you haven't read the docs... ::) Do it now - it contains loads of important information.

« Last Edit: September 05, 2008, 10:28:40 am by Joachim Müller »
Logged

Plaroma

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Width problem with editpics.php
« Reply #10 on: September 05, 2008, 10:38:12 am »

The Google ads are standard 468x60 ads. Seeing that they display perfectly fine on every other page, I seriously doubt they are the problem.

I think it's best that I refrain from commenting on the other stuff

Plaroma
Logged

Plaroma

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Width problem with editpics.php
« Reply #11 on: September 05, 2008, 11:32:24 am »

BTW, I don't seem to be able to so myself, so would you mind deleting the attachments posted so far in this thread?

Plaroma
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Width problem with editpics.php
« Reply #12 on: September 05, 2008, 07:24:54 pm »

Did as you suggested, although this thread became useless by that step. Not sure why you made me do this...
Logged
Pages: [1]   Go Up
 

Page created in 0.037 seconds with 20 queries.