vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Store CSS Stylesheets as Files? (https://vborg.vbsupport.ru/showthread.php?t=204848)

dfc005 02-10-2009 04:22 AM

Store CSS Stylesheets as Files?
 
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

Quote:

Originally Posted by dfc005 (Post 1739527)
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

Quote:

Originally Posted by dfc005 (Post 1739572)
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 which led to this. Then, I saw a plugin 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.


All times are GMT. The time now is 12:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01882 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete