snap2000
Full Member
Consistently Inconsistent
Posts: 113
|
Post by snap2000 on Jul 11, 2007 8:27:40 GMT
You can modify the stylesheet fine in the admin panel, it's just not the stylesheet that's being used on your site. You can delete everything in the textbox, and if you go to username.cmsbox.co.uk/stylesheet.css, it still has the default styles. Yeah... help, please?
|
|
|
Post by Ron on Jul 11, 2007 19:15:59 GMT
You can modify the stylesheet fine in the admin panel, it's just not the stylesheet that's being used on your site. You can delete everything in the textbox, and if you go to username.cmsbox.co.uk/stylesheet.css, it still has the default styles. Yeah... help, please? There are actually two stylesheets being loaded, a global theme file and the local stylesheet file. The global CSS file for the theme is loaded to give basic structure and positioning, the local CSS file located at the URL you gave is used to specify colors, background images, fonts, etc for each individual CMSBox. This setup was used to try to make it easier to style the website for those that aren't familiar with CSS. Rather than having all of the code used for positioning and similar things, the local file just gives the code for visual styling. This doesn't mean that positioning elements and advanced CSS cannot be used at the local level. You can modify any element or property that is addressed in the global file by just redeclaring it in your local stylesheet. Because the local stylesheet is loaded after the global one, any property you add should modify that being set in the global file. As for deleting everything and still having the default style, I wasn't able to do that myself. When you delete everything from the textarea it will bring up an error asking you to put in some styles. If you put in a few spaces though, it'll let you save a blank stylesheet.
|
|
snap2000
Full Member
Consistently Inconsistent
Posts: 113
|
Post by snap2000 on Jul 11, 2007 20:37:57 GMT
I understand all that. It turns out my problem came from the css file being cached. No matter what I did to the styles, the cached (default) version was loaded. Is there any way you can modify the cache settings, at least on the page that says "Your style settings have been saved successfully." so that the stylesheet cache is deleted/revalidated?
|
|
|
Post by Ron on Jul 11, 2007 20:50:36 GMT
I'll look into it, but you're always going to have to refresh the page or load a different page because the stylesheet is already loaded by the time you get that message.
I'll see what I can do about the cached version, but at the moment there's nothing on my end changing the default cache settings.
|
|
snap2000
Full Member
Consistently Inconsistent
Posts: 113
|
Post by snap2000 on Jul 11, 2007 21:04:08 GMT
What do you mean? You could handle the cache settings server-side, and the confirmation page is a $_POSTed page, not from AJAX, so the stylesheet wouldn't still be loaded from the modify page, no?
|
|
|
Post by Ron on Jul 12, 2007 2:19:58 GMT
What do you mean? You could handle the cache settings server-side, and the confirmation page is a $_POSTed page, not from AJAX, so the stylesheet wouldn't still be loaded from the modify page, no? What I mean is, by the time the modify page is instructed to process the form and make the changes to the stylesheet file, the client has already been served the older stylesheet.
|
|
snap2000
Full Member
Consistently Inconsistent
Posts: 113
|
Post by snap2000 on Jul 12, 2007 3:37:17 GMT
What do you mean? You could handle the cache settings server-side, and the confirmation page is a $_POSTed page, not from AJAX, so the stylesheet wouldn't still be loaded from the modify page, no? What I mean is, by the time the modify page is instructed to process the form and make the changes to the stylesheet file, the client has already been served the older stylesheet. You mean you print out the page before you make the changes? Well, I still think it'd be useful because PB used to be the same about changes. I'd just have a window open with the main page and one with the admin panel, and I'd just refresh the main page each time I save the changes... of course, I'd hate to have to clear the cache everytime...
|
|
|
Post by Ron on Jul 12, 2007 3:40:37 GMT
Right, the stylesheet is called before the changes are made, so apache sends the file before it is modified.
I've been testing a bit with the page and at first it was using the cached version until I hit F5 or hit a link to change the page. Later tries though, the modify page was instantly loading the new changes. Seems to be inconsistent.
|
|
snap2000
Full Member
Consistently Inconsistent
Posts: 113
|
Post by snap2000 on Jul 12, 2007 3:53:21 GMT
Gah. This is why I couldn't imagine being a professional web designer. Nothing makes sense anymore. EDIT: Well, now it's updating for me on refresh. If this behavior continues, I'll be satisfied.
|
|
|
Post by Ron on Jul 12, 2007 4:07:54 GMT
Yeah, it would be nice if it stayed that way. I'll keep looking into it from time to time, I didn't do anything to change its behavior so we'll have to wait and see if it wants to stays
|
|