Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-04-19 15:18:29

whintersby
Member
Registered: 2006-03-31
Posts: 10

Newbie Question - CSS files served as .php - any way to change?

Hi there,

This is my first textpattern installation, so I’m probably walking into all the same holes you’ve pulled many a person from already, so for that I apologise. I checked all the FAQs, etc but couldn’t find anything relating to this.

Basically my CSS files are served as:

< link rel=“stylesheet” href=“http://www.my website.com/textpattern/*css.php?s=default*” media=“screen” >

This means I am unable to run it through the W3C’s CSS validator as it says “No style sheet found”. I’ve looked around other textpattern powered sites and all their CSS files seem to be linked to in the generic way (directly to a .css file) so am wondering how I go about this?

I know I could simply upload a .css file manually and use that but wondered if it could still be possible whilst holding within textpattern?

I hope this makes sense and that someone can help – any help would be most appreciated.

Thanks

Offline

#2 2006-04-19 15:33:07

ricetxp
Member
From: London, UK
Registered: 2005-05-24
Posts: 89
Website

Re: Newbie Question - CSS files served as .php - any way to change?

You may have missed off the closing tag. It should read:
<link rel="stylesheet" href="http://www.mywebsite.com/textpattern/css.php?s=default" type="text/css" media="screen" />

Offline

#3 2006-04-19 16:30:45

whintersby
Member
Registered: 2006-03-31
Posts: 10

Re: Newbie Question - CSS files served as .php - any way to change?

No – that was just me not knowing how to make code appear on this forum and messing around with ascii characters.

I just forgot to add on the closing slash… ;o)

Anyone have any ideas?

Offline

#4 2006-04-19 16:38:23

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Newbie Question - CSS files served as .php - any way to change?

When I enter the url of my CSS-link http://www.my website.com/textpattern/css.php?s=default into the validator, the validator doesn’t cmplain and shows me a list of specific errors.

Can you provide a link to your site, so that we can test?

Offline

#5 2006-04-19 16:39:52

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Newbie Question - CSS files served as .php - any way to change?

This means I am unable to run it through the W3C’s CSS validator as it says “No style sheet found”.

That shouldn’t be. I solely use css.php for my site and others, and can validate the CSS just fine. How are you trying to validate it?

Offline

#6 2006-04-19 19:59:14

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Newbie Question - CSS files served as .php - any way to change?

Jigsaw validation works for me, allthough my CSS won’t validate.(And I’m not much interested soon) It will sometimes generate an internal error,
have you tried to play around with the options provided ?
I’d not recommend to port your CSS to another location outside the backend, because it will cause directory path mismatch(unstyled), if in individual article mode.

regards marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#7 2006-04-20 09:08:40

whintersby
Member
Registered: 2006-03-31
Posts: 10

Re: Newbie Question - CSS files served as .php - any way to change?

Hi again,

I guess the problem is two-fold for me in the way I validate my CSS.

I have the Firefox Developer Toolbar which you can automatically select to validate your CSS from. If using the CSS Validator manualyt I also usually just enter the URL to the PAGE which uses the CSS rather than to the .css file itself.

If I add the full string to the CSS then the validation does work.

However, does anyone know how people using textpattern manage to have their CSS files pointing directly to a .css file instead of .php? (or will they have simply added the CSS file manually?)

One example of this is:

http://hicksdesign.co.uk/journal/

Last edited by whintersby (2006-04-20 09:09:18)

Offline

#8 2006-04-20 09:29:32

whintersby
Member
Registered: 2006-03-31
Posts: 10

Re: Newbie Question - CSS files served as .php - any way to change?

Scratch my last post – I contacted the designer in question and he confirmed that he simply uploads the CSS file separately as he prefers to work on his CSS offline rather than with the TxP editor.

Thanks anyway!

Offline

#9 2006-04-20 10:40:51

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Newbie Question - CSS files served as .php - any way to change?

See this post,
there could be other solutions as well, but that’s the only one so far.

regards

Last edited by marios (2006-04-20 10:41:11)


⌃ ⇧ < ⌃ ⇧ >

Offline

#10 2006-04-20 12:11:54

alexburr
Member
From: Rochester, NY
Registered: 2006-02-20
Posts: 14
Website

Re: Newbie Question - CSS files served as .php - any way to change?

Personally, I just include a link to an external stylesheet in the <head> section of my page templates, and edit that.

Last edited by alexburr (2006-04-20 12:12:53)

Offline

#11 2006-04-20 18:38:53

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Newbie Question - CSS files served as .php - any way to change?

alexburr wrote:

Personally, I just include a link to an external stylesheet in the <head> section of my page templates, and edit that.

What happens if you have clean URL’s enabled and go in individual artilce mode, even referencing the files with a relative path(AFAIK, was not recommended) the reference would get lost from what I had tested out on pre 4.02 releases,are your style sheets referenced ?

As a workaround yes, use some output forms with conditionals in your header tag, does resurrect this probably as well

May be it could work with some rewrite rules, but I’m not sure,
Personally I just prefer to leave them at the backend.

regards, marios

Last edited by marios (2006-04-20 18:42:49)


⌃ ⇧ < ⌃ ⇧ >

Offline

#12 2006-04-24 02:36:35

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Newbie Question - CSS files served as .php - any way to change?

If you have large CSS file(s), the page loads faster if it uses a plain, non-php file (.css). All you do is upload your CSS files via FTP (or even through TXP), and link to them (“/files/example.css”). I don’t know why you would use forms to output your CSS, if that’s what you mean Marios. I give each page a body id (using txp:if_section in my template), so I don’t need to load new or different stylesheets for each section (EX: body#section_one #content { display: “in-your-face”; } ).

Offline

Board footer

Powered by FluxBB