Width problem with editpics.php Width problem with editpics.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Width problem with editpics.php

Started by Plaroma, September 02, 2008, 09:05:09 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Plaroma

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

Joachim Müller

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

Plaroma

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

Joachim Müller

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<style>into<style type="text/css">.
Your custom theme basically is rainy_day with changed colors, so I could not see any problems with it.

Plaroma

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

Plaroma

Joachim Müller

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.

Plaroma

#6
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]

Joachim Müller

#7
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/////////////////////////////////////////////////////////////////
//                                                             //
// 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]

Plaroma

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

Joachim Müller

#9
Quote from: Plaroma on September 05, 2008, 04:56:40 AMSorry 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.

Quote from: Plaroma 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?
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.

Quote from: Plaroma on September 05, 2008, 04:56:40 AMSecond, 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:
QuoteIt 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.


Plaroma

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

Plaroma

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

Joachim Müller

Did as you suggested, although this thread became useless by that step. Not sure why you made me do this...