CSS Template woes

Anything related to Silkroad Online Forums. Report problems and bugs, or ask questions. Discuss latest features and additions.
Post Reply
User avatar
Ryoko
Site Owner
Posts: 6390
Joined: Fri Dec 30, 2005 8:32 pm
Quick Reply: Yes
Location: Off Topic
Contact:

CSS Template woes

Post by Ryoko »

Maybe XiJiouKan or another can shed some light.

The CSS is currently included in the code of EVERY page.

I beleive I can reduce a third of the page coding by placing it into a CSS template, of course. Then it stays in your internet cache, reducing load and bandwidth.

The CSS uses {cute} variables driven by the forum, so you cant just copy paste.

I copied the final CSS from the 'source' of the forum page.

But when I link it into a file, a lot of CSS is lost.

So I am at an impass. Can't seem to figgure out why its doing that.

User avatar
XiJiouKan
Common Member
Posts: 184
Joined: Thu Jan 12, 2006 4:19 am
Quick Reply: Yes
Location: xian

Post by XiJiouKan »

I'm not sure what you mean by '{cute}' variables, but here's a quick overview of linking separate css templates to pages (Just to be sure we're on the same page).

All the css code goes into a file "whatever.css". To integrate it into the page, you use a <LINK REL=stylesheet HREF="whatever.css" TYPE="text/css">. Then, in the whatever.css, there is no <style type="text/css"></style> in the file. (The browser should insert the tags automatically)

I think the problem may lay in what the {cute} variables are, but I don't know what you mean.
Image
[ShadowHawk] - Just a guildmate anymore =/
|[ Tiger Girl - 2 || Ureuchi - 0 || Isyutareu - 0 || m1 - 6 || Noob 2*+ - Lost count :twisted: ]|

User avatar
Ryoko
Site Owner
Posts: 6390
Joined: Fri Dec 30, 2005 8:32 pm
Quick Reply: Yes
Location: Off Topic
Contact:

Post by Ryoko »

The forum is template driven. Header, subheader, bodies, footer, etc.

They are not 'pure' html files.

When you want to use a variable, the name is {variable}.

Thus ALL css items are {variable} color, height, width, etc.

When the forum calls a template, it processes them. Same for loops. It has tags you use to make it loop.

My other sites have style sheets; I linked it in correctly but some info is lost.

Clueless.

User avatar
XiJiouKan
Common Member
Posts: 184
Joined: Thu Jan 12, 2006 4:19 am
Quick Reply: Yes
Location: xian

Post by XiJiouKan »

From what I just got from your last post, the PHP processes and makes dynamic changes to the css based on the content.

If what I understand is true, then it isn't possible to take out all the css and move it to a file.

What could be done in that case is to take out the css that needs processing, (body) and make the headers, footers, subheaders static.

Using the <link rel=..... method only acts like an #include [I forgot the php term for includes, I'm forced to code in ASP VBscript because the school i work for won't let me install a php module. Still eating crow. *sigh* :( ]
Image
[ShadowHawk] - Just a guildmate anymore =/
|[ Tiger Girl - 2 || Ureuchi - 0 || Isyutareu - 0 || m1 - 6 || Noob 2*+ - Lost count :twisted: ]|

User avatar
Ryoko
Site Owner
Posts: 6390
Joined: Fri Dec 30, 2005 8:32 pm
Quick Reply: Yes
Location: Off Topic
Contact:

Post by Ryoko »

Exactly

Its dynamic based on the forum setting variables.

Thats why I went to View --> Source and copied the final output instead

But no luck yet.

User avatar
Ryoko
Site Owner
Posts: 6390
Joined: Fri Dec 30, 2005 8:32 pm
Quick Reply: Yes
Location: Off Topic
Contact:

Post by Ryoko »

I think I got it to work!

It was the @import statement for IE/Mozilla only

User avatar
XiJiouKan
Common Member
Posts: 184
Joined: Thu Jan 12, 2006 4:19 am
Quick Reply: Yes
Location: xian

Post by XiJiouKan »

Good! I'm glad.

I've never heard of @import. (But then again, I know more about ASP than PHP.) (PHP is next on the list of languages to learn.)

Let me know how it works out.
Image
[ShadowHawk] - Just a guildmate anymore =/
|[ Tiger Girl - 2 || Ureuchi - 0 || Isyutareu - 0 || m1 - 6 || Noob 2*+ - Lost count :twisted: ]|

User avatar
Ryoko
Site Owner
Posts: 6390
Joined: Fri Dec 30, 2005 8:32 pm
Quick Reply: Yes
Location: Off Topic
Contact:

Post by Ryoko »

It appears it is a CSS statement :D

And first time I ran into it as well.

Post Reply

Return to “Site Discussion”