View Full Version : Store CSS Stylesheets as Files?
dfc005
02-10-2009, 04:22 AM
This doesn't seem to work on my forum. If I set it to yes, I still see the CSS being output in the source.
Any ideas why that's the case?
Ted S
02-10-2009, 04:29 AM
Generally this issue is caused when vBulletin can't write to the css folder; try chmoding it to 0777 and then toggle the setting off (view a page) then back on.
dfc005
02-10-2009, 07:03 AM
Genius! That worked perfectly. Now how can I include this CSS on a page outside of vB? I assume the naming standard for it is somewhat dynamic etc.
Voltar
02-10-2009, 08:12 AM
The permissions depend on what sapi you're using with PHP also. If you're using CGI or FastCGI, you can tighten permissions down a bit more to 755. If you're using PHP as a dso (mod_php) you'll need to use 777 (and should look into another sapi for the security).
As for including the styles on another page if you include global.php and use vBulletin to power your other pages (home page for the forums, custom portal, whatever) it would be taken care of for you. If you just want to link to the CSS, I'm honestly not sure how you would accomplish that, as yes, the stylesheets are dynamic and the names change from what I've noticed on my forums.
dfc005
02-10-2009, 08:21 AM
So you can't call a template or function etc to find out the name of the CSS? I include global.php on all pages.
Voltar
02-10-2009, 08:23 AM
So you can't call a template or function etc to find out the name of the CSS? I include global.php on all pages.
Do you create your pages something like this?
https://vborg.vbsupport.ru/showthread.php?t=62164
You should be able to grab the stylesheet locations from $headinclude
dfc005
02-10-2009, 09:10 AM
Dang, never thought of that! That's a great idea. So close to getting this working now. Only problem is that some of my pages aren't in the root directory so the CSS link doesn't work.
So close!
Voltar
02-10-2009, 09:33 AM
Dang, never thought of that! That's a great idea. So close to getting this working now. Only problem is that some of my pages aren't in the root directory so the CSS link doesn't work.
So close!
My first thought would be to make a symlink, but that's a kludge. My second though it is using str_replace on either $headinclude or $output, but I'm thinking there is a better way.
A quick search gave me this thread (https://vborg.vbsupport.ru/showthread.php?t=64085&highlight=absolute+stylesheet) which led to this (https://vborg.vbsupport.ru/showthread.php?t=63520). Then, I saw a plugin (https://vborg.vbsupport.ru/showthread.php?t=97298) at the bottom of the thread. Hope that helps some.
dfc005
02-10-2009, 09:42 AM
Bingo! That works a charm.
Cheers for that mate, phew! Have fixed about 6 things today which have been bugging me for days.
Voltar
02-10-2009, 10:06 AM
No problem, glad to help.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.