View Full Version : prefix url if store CSS as a file
Zachery
04-05-2004, 10:00 PM
open global.php
find
define('STYLEID', $style['styleid']);
add under
if ($vboptions['storecssasfile'])
{
$style['css'] = str_replace('clientscript', "$vboptions[bburl]/clientscript", $style['css']);
}
save and close global.php
Yes, im stil using it on my RC4 with no problems, i made a change,
Arsenik
04-06-2004, 03:14 AM
Exactly what i was looking for!
Saddly it didnt work :ermm: It does not seem to be making the change. Are you using this your self?
Zachery
04-06-2004, 03:46 AM
YEs im still using it on my RC4, i changed it abit, see if it works now
Kentaurus
04-06-2004, 04:07 AM
open global.php
find
define('STYLEID', $style['styleid']);
add under
if ($vboptions['storecssasfile'])
{
$style['css'] = str_replace('clientscript', "$vboptions[abspath]/clientscript", $style['css']);
}
save and close global.php
Yes, im stil using it on my RC4 with no problems, i made a change,
Sorry... what is this useful for?
Zachery
04-06-2004, 04:20 AM
Ive had a few users request it for varius reasons at vBulletin.com :) <shurgs> developing self made appications that use the template system?
burnz
04-06-2004, 01:29 PM
$vboptions[bburl] is better that $vboptions[abspath]
Zachery
04-06-2004, 03:41 PM
$vboptions[bburl] is better that $vboptions[abspath]
Really? thats what Kier gave me :P
burnz
04-06-2004, 04:06 PM
if you have install any hack that installed in a different directory it might not work bcoz of the file location...
if you use the full url, it will work on any hack that u installed.. :D
buro9
04-06-2004, 07:31 PM
if you have install any hack that installed in a different directory it might not work bcoz of the file location...
if you use the full url, it will work on any hack that u installed.. :D
I was trying to figure out why this hadn't been an issue for me... and then I stumbled upon this in the HTML:
<base href="http://www.bowlie.com/forum/" />
:)
Arsenik
04-06-2004, 10:03 PM
Perfect! It now works :nervous: Thanks Zachery.
gmarik
04-08-2004, 05:40 PM
cool, can I change the whole .css file name as well to a normal one? for ecample zachery2.css
Zachery
04-08-2004, 07:15 PM
Eh, that would require further modifcation, the system saves it as
style-(time*var)-id.css
chris frolic
05-04-2004, 03:58 AM
beautiful. Was having some difficulties with my Photopost install and this cleared up my problems.
Boofo
05-13-2004, 03:56 PM
Excellent work, Zach. I was looking for this exact thing. ;)
Zachery
07-30-2004, 06:08 AM
Excellent work, Zach. I was looking for this exact thing. ;)
Anyone still using this?
sabret00the
07-30-2004, 06:21 AM
didn't even know this existed, great work zach :D
has anyone tested this with the community bulletin?
Zachery
07-30-2004, 08:33 AM
didn't even know this existed, great work zach :D
has anyone tested this with the community bulletin?
It has been sitting down in the depths for abit now, i had almost forgot that i had released this small bit. :)
sabret00the
07-30-2004, 10:09 AM
now you got me wondering what other goodies i've missed :p
EnriqueHavoc
07-30-2004, 09:18 PM
I still dont understand exactly what this does, could anyone give a clearer description of where, how and why you would use this?
Zachery
07-31-2004, 01:15 AM
I still dont understand exactly what this does, could anyone give a clearer description of where, how and why you would use this?
When you enable CSS as a file in vBulletin, it uses a realitive path instead of a full path.
This ensure that no matter what directory your hack may be in, the CSS will be correct.
sabret00the
07-31-2004, 02:35 AM
I still dont understand exactly what this does, could anyone give a clearer description of where, how and why you would use this?
to explain, basically it's like this, when certain spiders index your site, they only do so many lines of your pages source code, saving your css as files cuts down on the space thus allowing for more of your site to get indexed and deemed as relevant. but if you got the comm bull mod installed this will allow you to have html enabled.
SaN-DeeP
07-31-2004, 07:29 AM
Installed this mod,
but lot of members started facing problems after installation and i had to remove those codes.
Check attachments -> my background etc. (default vbulletin skin all disappeared ) i am using vb 3.0.3
Zachery
07-31-2004, 09:04 AM
Installed this mod,
but lot of members started facing problems after installation and i had to remove those codes.
Check attachments -> my background etc. (default vbulletin skin all disappeared ) i am using vb 3.0.3
Do you have the correct board url sandy?
sabret00the
08-02-2004, 12:49 PM
you should change the ref of abspath to bburl :)
Oblivion Knight
08-02-2004, 01:16 PM
Installed for the sheer hell of it.. ;)
SnitchSeeker
09-18-2004, 06:02 AM
This is very good.
Not sure exactly why I would need it though.
Are you suggesting we can the vb headers for plug-ins like 4images?
If so, is there a tutorial/hack for doing that as well? Because I can't figure out how I would use this or if I need it.
My board is only one part of my site, and the entire thing is meant to be fully integrated with vb, so I will likely need this. Just help explain to me how I use it or why it is necessary.
Thanks!
Zachery
09-18-2004, 12:36 PM
This is very good.
Not sure exactly why I would need it though.
Are you suggesting we can the vb headers for plug-ins like 4images?
If so, is there a tutorial/hack for doing that as well? Because I can't figure out how I would use this or if I need it.
My board is only one part of my site, and the entire thing is meant to be fully integrated with vb, so I will likely need this. Just help explain to me how I use it or why it is necessary.
Thanks!
We can what?
This allows you simply get a full url for your css file which is helpfull when your writing your own code for more files that are intergrated outside of vBulletin directory
SnitchSeeker
09-20-2004, 12:06 PM
We can what?
Oops! I typed that a bit fast. It should have read "Are you suggesting we can use the vb header to integrate 4images, etc"
SnitchSeeker
10-14-2004, 10:43 AM
I installed the hack and am using it for my 4images gallery and some custom pages.
The problem I have is that each time I make a change to the style, the URL also changes. So I have to go into each page that links to the style, and edit them one-by-one!
Is there any way to... well, to do a dynamic check for a style id? That way you could also have the pages that use this show the page in the style your users have selected.
MrNase
01-02-2005, 01:52 PM
It's line 284 in vB 3.0.4's global.php :)
HuangA
02-19-2005, 03:53 PM
* HuangA clicks install
Thanks :)
This works fine in 3.5.0b3 as well. ;)
(Well, I took the if out and just use it.)
Nick0r
04-07-2006, 02:39 PM
Would be nice to make a plugin of this?
Zachery
04-09-2006, 05:21 AM
Too bad vbulletin 3.0 doesn't support plugins ;)
Nick0r
04-09-2006, 06:53 AM
Yea what about a 3.5 plugin for it ;)
Zachery
04-09-2006, 06:55 AM
sigh, try searching or my profile in the future https://vborg.vbsupport.ru/showthread.php?t=97298
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.