I would like to change the way how css is served. But I stumbled upon the {stylesheet} parameter located at headerinclude template.
How can I modify the path of css?
I would like to serve it from a cookieless domain.
Thank you.
Add in your headerinclude:
<link type="text/css" rel="stylesheet" href="http://some.url/somestyle.css" />
Sorry if I did not make myself clear. The {stylesheet} variable defines all css: general, modcp, forumdisplay, showthred etc.
I would like to change the way that variable calls all the stylesheets.
Eg: at index it normally calls for [forum_url]/general.css. But I would like it to call the css like this [external_url]/general.css.
I have searched thru the template files but had no luck.
I have stated you the simple method.
If you wanna load the css files externally, just copy all your css codes in .css files, host somewhere else, delete all the css codes in your MyBB css pages in ACP (or simply remove the variable {stylesheets} from headerinclude) and then link your external css files in headerinclude as I stated in first post.
The solution you provided is not logical nor efficient.
I don't want to modify the way mybb is calling for css files.
Am apologizing but your solution is redundant.
I'm making a wild guess but I think the solution to my problem is related to modify some core files that rely on the {stylesheet} variable.
Support your statement: 'not logical', 'not efficient', 'redundant'.
At runtime that variable just gets converted similar to the links I've stated. Only difference is some css are page specific. If you do that way all css will load everytime. You can even make the stylesheet loading exactly as happens using jQuery + regex.
Your understanding doesn't change the fact. It is basic web logic to include css in HTML no matter what MyBB does in background.
I have fixed the problem in my way:
=> headerinclude: removed {stylesheets}
=> I inlined usercp.css, modcp.css, showthread.css and star_ratings.css in their proper templetes
=> minified and gzipped global.css
=> added a function to call the css at headerinclude: <link href='link to my css file' type='text/css' rel='stylesheet' />
My single problem is now: where to find the template that is called by the variable {$folderlist} ?
^ Private Messaging Templates --> private_archive | private_empty | private_folders
Thanks for posting mate but I need to modify the way {$folderlist} is calling things.
Look:
I would like to load that 4 images from a cookieless domain.