RE: Re[2]: [PHP] Re: PHP CSS

2003-10-09 Thread esctoday.com | Wouter van Vliet
For compatibility among browsers, you might want to call a  

header('Content-type: text/css');

On top of the css-file-to-be.

Wouter
-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 09, 2003 2:03 AM
To: [EMAIL PROTECTED]
Subject: Re: Re[2]: [PHP] Re: PHP  CSS

On Wed, 8 Oct 2003 09:44:53 -0700, Raquel Rice raquel- 
[EMAIL PROTECTED] wrote:

 On Thu, 9 Oct 2003 02:00:20 +1000
 Tom Rogers [EMAIL PROTECTED] wrote:


 You don't need to call your style sheets .css they can be just as
 easily called.php and even have a querystring attached like
 subsite.php?user=fred

 That way just use php as normal and return a style sheet just as
 you would a html page.

 Thank you!  I think that is exactly what I needed!

Hello Raquel..

Browse your site with the included php file that generates the css, and
watch your web logs.  If the browser is requesting that file with a 
response status of 200 everytime, I would strongly suggest you fix that.


Curt.
-- 
sig-less

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[2]: [PHP] Re: PHP CSS

2003-10-08 Thread Tom Rogers
Hi,

Thursday, October 9, 2003, 1:37:57 AM, you wrote:
RR On Tue, 7 Oct 2003 23:22:02 -0700
RR Raquel Rice [EMAIL PROTECTED] wrote:

 On Tue, 7 Oct 2003 17:06:13 -0500
 erythros [EMAIL PROTECTED] wrote:
 
  you probably just want what everyone wants... a seperation of
  design from content.
  
  as for applying the variables to the style sheet it depends on
  what youre trying to do. what are the variables for? to request
  a specific css file? or are they to supplement the ccs file (ie:
  use value x for width of div), or are they to override the css
  file?
  
  i may have it wrong but what it sounds like is that you want to
  have a default css file then allow the user to make changes via
  the ini file. is this what youre after?
  
 
 Well, yes ... in a way.  The plan is to have a main site, where
 users can have a subsite off the main site.  I want to give the
 users the ability to customize, to an extent, their own subsite if
 they wish, while the main site retains the look I give it.
 
 --
 Raquel
 
 I am only one; but still I am one. I cannot do everything, but
 still I can do something; I will not refuse to do the something I
 can do.
   --Helen Keller
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

RR I might just add that I can accomplish this very easily using inline
RR style elements within HTML tags but, I'm wanting to separate out
RR the CSS.

RR --
RR Raquel
RR 
RR To behave with dignity is nothing less than to allow others freely
RR to be themselves.
RR   --Sol Chaneles

You don't need to call your style sheets .css they can be just as easily called
.php and even have a querystring attached like subsite.php?user=fred

That way just use php as normal and return a style sheet just as you would a
html page.
example

html
head
  link rel=stylesheet type=text/css href=styles/subsite.php?user=fred
/head
body
.
.
.
/body



subsite would have something like

?
$user = (isset($_GET['user']))? $_GET['user']: 'none';
$default_color = 'blue';
switch($user){
  case 'fred':
echo 'H1 {font-size: 18px; color: red;}';
break;
  case 'none':
echo 'H1 {font-size: 18px; color: '.$default_color.';}';
  break;
}


regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[2]: [PHP] Re: PHP CSS

2003-10-08 Thread Raquel Rice
On Thu, 9 Oct 2003 02:00:20 +1000
Tom Rogers [EMAIL PROTECTED] wrote:

 Hi,
 
 Thursday, October 9, 2003, 1:37:57 AM, you wrote:
  
  Well, yes ... in a way.  The plan is to have a main site, where
  users can have a subsite off the main site.  I want to give the
  users the ability to customize, to an extent, their own subsite
 if they wish, while the main site retains the look I give it.
  
  --
  Raquel
 
 RR I might just add that I can accomplish this very easily using
 RR inlinestyle elements within HTML tags but, I'm wanting to
 RR separate out the CSS.
 
 RR --
 RR Raquel
 
 You don't need to call your style sheets .css they can be just as
 easily called.php and even have a querystring attached like
 subsite.php?user=fred
 
 That way just use php as normal and return a style sheet just as
 you would a html page.

Thank you!  I think that is exactly what I needed!

--
Raquel

To behave with dignity is nothing less than to allow others freely
to be themselves.
  --Sol Chaneles

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[2]: [PHP] Re: PHP CSS

2003-10-08 Thread erythros

Tom Rogers [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 Thursday, October 9, 2003, 1:37:57 AM, you wrote:
 RR On Tue, 7 Oct 2003 23:22:02 -0700
 RR Raquel Rice [EMAIL PROTECTED] wrote:

  On Tue, 7 Oct 2003 17:06:13 -0500
  erythros [EMAIL PROTECTED] wrote:
 
   you probably just want what everyone wants... a seperation of
   design from content.
  
   as for applying the variables to the style sheet it depends on
   what youre trying to do. what are the variables for? to request
   a specific css file? or are they to supplement the ccs file (ie:
   use value x for width of div), or are they to override the css
   file?
  
   i may have it wrong but what it sounds like is that you want to
   have a default css file then allow the user to make changes via
   the ini file. is this what youre after?
  
 
  Well, yes ... in a way.  The plan is to have a main site, where
  users can have a subsite off the main site.  I want to give the
  users the ability to customize, to an extent, their own subsite if
  they wish, while the main site retains the look I give it.
 
  --
  Raquel
  
  I am only one; but still I am one. I cannot do everything, but
  still I can do something; I will not refuse to do the something I
  can do.
--Helen Keller
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 RR I might just add that I can accomplish this very easily using inline
 RR style elements within HTML tags but, I'm wanting to separate out
 RR the CSS.

 RR --
 RR Raquel
 RR 
 RR To behave with dignity is nothing less than to allow others freely
 RR to be themselves.
 RR   --Sol Chaneles

 You don't need to call your style sheets .css they can be just as easily
called
 .php and even have a querystring attached like subsite.php?user=fred

 That way just use php as normal and return a style sheet just as you would
a
 html page.
 example

 html
 head
   link rel=stylesheet type=text/css
href=styles/subsite.php?user=fred
 /head
 body
 .
 .
 .
 /body



 subsite would have something like

 ?
 $user = (isset($_GET['user']))? $_GET['user']: 'none';
 $default_color = 'blue';
 switch($user){
   case 'fred':
 echo 'H1 {font-size: 18px; color: red;}';
 break;
   case 'none':
 echo 'H1 {font-size: 18px; color: '.$default_color.';}';
   break;
 }


 regards,
 Tom

they way i understand it she'll want

the subsite to
?
 $user = (isset($_GET['user']))? $_GET['user']: 'none';
 $default_css = 'default.css';
 $user_css='user.css';
?

css files cascade so all you'll have to do is

head
   link rel=stylesheet type=text/css href=styles/default.css
   link rel=stylesheet type=text/css href=styles/ ? echo $user ?
.css
/head
and the users css file will only change what you allow in the user.css file.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[2]: [PHP] Re: PHP CSS

2003-10-08 Thread Curt Zirzow
On Wed, 8 Oct 2003 09:44:53 -0700, Raquel Rice raquel- 
[EMAIL PROTECTED] wrote:

On Thu, 9 Oct 2003 02:00:20 +1000
Tom Rogers [EMAIL PROTECTED] wrote:
You don't need to call your style sheets .css they can be just as
easily called.php and even have a querystring attached like
subsite.php?user=fred
That way just use php as normal and return a style sheet just as
you would a html page.
Thank you!  I think that is exactly what I needed!
Hello Raquel..

Browse your site with the included php file that generates the css, and
watch your web logs.  If the browser is requesting that file with a 
response status of 200 everytime, I would strongly suggest you fix that.

Curt.
--
sig-less
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php