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: theme is ignoring style.css  (Read 6817 times)

0 Members and 1 Guest are viewing this topic.

steve12ab

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
theme is ignoring style.css
« on: December 11, 2005, 04:31:02 am »

I'm trying to make my Gallery look like the theme I am using in the phpBB where the gallery resides.

I have been editing the files the the /theme/classic/ directory but no matter what changes I make to the style.css file when I upload the changes to the server and resfresh the page none of the changes take effect.

To make sure that I am not crazy I took the following steps:
-After backing up the style.css I deleted it from the server. Upon refreshing the gallery there were no visible changes and all the features worked fine.
-Again after backing up the style.css I uploded a file by the same name that was for a different theme and again there were no visible changes to the gallery after refreshing it.


Also note:
-When cycling through various themes that I have uploded from to the /theme/ directory from the theme option in the config page all the themes work and appear properly regardless of which one I choose. (Except of course the one I am editing which Is ignoring the style.css)



I am starting to think I am doing something wrong or I am totally missing something.

Why isnt the theme I select recognizing any of the changes I make to its corresponding style.css?


The gallery is imbedded into a page of my phpBB forum using imbeddedframe tags.
The page is located here: http://www.jadedsociety.net/modules.php?name=Content&pa=showpage&pid=7
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: theme is ignoring style.css
« Reply #1 on: December 11, 2005, 04:43:06 am »

Are you sure the link to the style sheet in template.html is the correct one?  When I set up a new theme based upon one of the default ones I forgot to modify the <LINK> tag and it was still pointing to the default theme's style.css.
Logged

steve12ab

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: theme is ignoring style.css
« Reply #2 on: December 11, 2005, 05:41:33 am »

Well I just looked into that and it looks ok to me.

Here is the template.html source:

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
<link rel="stylesheet" href="themes/classic/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
$Id: template.html,v 1.1 2004/06/11 09:20:08 tarique Exp $
-->
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="10" cellspacing="10" bgcolor="#669999">
<tr>
        <td valign="top" bordercolor="#FFFFFF" bgcolor="#003333" style="border: 1px solid;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                                <td><a href="index.php"><img src="themes/classic/images/site_logo.png" alt="" border="0" /><br /></a></td>
                                <td width="100%" align="center">
                                        <h1>{GAL_NAME}</h1>
                                        <h3>{GAL_DESCRIPTION}</h3><br />
                                        {MAIN_MENU}
                                </td>
                        </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                  <td align="center" valign="top">{LANGUAGE_SELECT_FLAGS}</td></tr>
                 <tr> <td align="center" valign="top">{LANGUAGE_SELECT_LIST}
                  {THEME_SELECT_LIST}</td>
                  </tr>
                </table>
                <img src="images/spacer.gif" width="1" height="15" /><br />
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center" valign="top">
                                        {ADMIN_MENU}
                                        {GALLERY}
                                </td>
                        </tr>
                </table>
                </td>
        </tr>
</table>
</body>
</html>

I didn't change the html pointers to style.css at all in the template.html. The only thing I changes in this file is the color options. They show when I publish the gallery just fine, but the style.css changes still fail to show up. Any other ideas?
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: theme is ignoring style.css
« Reply #3 on: December 11, 2005, 07:19:29 am »

I downloaded your style.css and put it on my gallery and it changed my gallery to look like yours (as expected).  The style.css URL is http://www.jadedsociety.net/gallery/themes/classic/style.css and I assume you are modifying the classic theme.  You could check this URL to make sure it matches what you upload (to make sure you're putting the file into the correct place).  It is recommended to avoid modifying the defaul themes and instead copy the closest theme to what you want to a new folder (named what you like) and modify that, but that's a separate issue.

Your file permissions on style.css are fine (since I can download the file), so I guess all that's left is CSS issues.  Maybe the changes you are applying are being cascaded away based on significance.  If you want to force a style element, you can place the tag "!important" on an element and that should  bump up that element into sight (in most cases).  For example:
Code: [Select]
color : Black !important;
I'm not sure what else to say.  Check the web URL and check your cascading rules.
Logged

steve12ab

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: theme is ignoring style.css
« Reply #4 on: December 11, 2005, 12:44:52 pm »

Ok that helps and it has led me to the problem.

But I still don't understand it.

I went to the stylesheet location @ http://www.jadedsociety.net/gallery/themes/classic/style.css.

I then went onto my ftp and downloaded the style.css at that spot on the server.

When I compared the two, they did not match?!?! How is that possible?!?!

The next thing I did was go back to the Firefox window where I was viewing http://www.jadedsociety.net/gallery/themes/classic/style.css and refreshed the page. All of a sudden all the value changes to the ones I had edited it to. The changes also took effect when I loaded the gallery.

When Coppermine draws my gallery, does it pull the style.css from cache? I think maybe that was the problem.


Anyway, now to begin the daunting task of figuring out what all those values are. Anyone have any pointers?
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: theme is ignoring style.css
« Reply #5 on: December 13, 2005, 02:36:56 am »

Coppermine doesn't cache style.css (or anything else), so it's not Coppermine's fault.  Firefox and most browsers cache web pages so you might have to refresh to see the new page.  In some cases, it might be necessary (or might be instructive) to clear out your browser's cache manually and try again.

Another thing that might have come up in your case is that some FTP clients won't overwrite files on the server by default.  Deleting the file first, like you mentioned, is a sure way to make sure the new file is really uploaded to the server.

To learn about style sheets, there are plenty of resources on the web.  I don't have any I use regularly, so I cannot recommend any particular one.  That's a separate question though and should go in a new thread if you want to ask for suggestions from people on this forum.

Have you solved your problem now?  (If so, we can mark this thread as "solved".)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: theme is ignoring style.css
« Reply #6 on: December 13, 2005, 08:24:56 am »

Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.