vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   prefix url if store CSS as a file (https://vborg.vbsupport.ru/showthread.php?t=97273)

MrNase 09-30-2005 10:00 PM

prefix url if store CSS as a file
 
It's basically the same as https://vborg.vbsupport.ru/showthrea...light=css+path :)

Open adminfunctions_template.php.

Find:
Code:

$cssfilename = 'clientscript/vbulletin_css/style-' . substr(md5(microtime()), 8, 8) . '-' . str_pad($styleid, 5, '0', STR_PAD_LEFT) . '.css';

if ($vbulletin->options['storecssasfile'] AND write_css_file($cssfilename, $css))
{
$QUERY[] = "css = '" . $vbulletin->db->escape_string("<link rel=\"stylesheet\" type=\"text/css\" href=\"$cssfilename\" id=\"vbulletin_css\" />") . "'";
}

and replace it with:
Code:

                        $cssfilename = 'clientscript/vbulletin_css/style-' . substr(md5(microtime()), 8, 8) . '-' . str_pad($styleid, 5, '0', STR_PAD_LEFT) . '.css';
                        $cssfilepath = $vbulletin->options['bburl'].'/'.$cssfilename;
                       
                        if ($vbulletin->options['storecssasfile'] AND write_css_file($cssfilename, $css))
                        {
                                $QUERY[] = "css = '" . $vbulletin->db->escape_string("<link rel=\"stylesheet\" type=\"text/css\" href=\"$cssfilepath\" id=\"vbulletin_css\" />") . "'";
                        }

Now, and that's the most important step, you have to rebuild your styles!

Have fun and click install ;)

Jenta 10-01-2005 01:15 PM

cool
hacks can go outside the root now :)
no need for it yet but im sure i will one day

Bad Bunny 10-01-2005 01:51 PM

Quote:

Originally Posted by Jenta
cool
hacks can go outside the root now :)
no need for it yet but im sure i will one day

I could have sworn I was asking how to do this. lol

Anyway, thanks. ;)

Zachery 10-01-2005 05:48 PM

Actually.. you are doing this alot differntly.. why not just do it dynamicly?

MrNase 10-01-2005 05:52 PM

Hum.. sorry? :)

Zachery 10-01-2005 05:57 PM

{shrugs} just updated mine to use a plugin ;)
https://vborg.vbsupport.ru/showthrea...618#post783618 No nasty hacking required.

kall 10-01-2005 09:06 PM

Quote:

Originally Posted by Zachery
{shrugs} just updated mine to use a plugin ;)
https://vborg.vbsupport.ru/showthrea...618#post783618 No nasty hacking required.

Which I have been doing since the 3.5 Beta series. :D


All times are GMT. The time now is 05:18 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01188 seconds
  • Memory Usage 1,723KB
  • 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_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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