The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
![]()
Note: my last outstanding question is at the bottom. Thanks!
I've implemented a versioning system throughout my global templates (outside of vbulletin). Basically, it's a combination of a php snippet that adds a unique value to the filename based on the last-modified time and an .htaccess rewrite to ignore the extra characters. This guarantees that the browser will always load the latest version of css and javascript files. You can read about this really creative and easy-to-implement process here. I've created (and activated) the following plugin in global_start. Can anyone tell why it's not outputting anything? Code:
function autoVer($url){ $path = pathinfo($url); $ver = '.'.filemtime('/home/yadayada/public_html/'.$url).'.'; echo $path['dirname'].'/'.str_replace('.', $ver, $path['basename']); } $bannercss = autoVer('/css/banner.css'); Edit: I'm getting the 'Cannot redeclare autover() in /home/yadayada/public_html/scripts/autoVer.php' error which makes no sense. Another Update: apparently vB uses a function called autover(). So I changed it to myAutoVer and that error went away. Still, nothing is outputting. Any ideas? Yet Another Update: The problem may be with my hook. I was using global_start and putting the $bannercss variable in the headinclude template. This outputs nothing. If I select the init hook, then it outputs the correct text but right at the top of the page rather than where the variable is employed. What hook should I be using? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|