Quote:
Originally Posted by tbworld
I have not tested it and I wrote the code pretty verbose so you get the concept. When I get a chance I will rewrite it. I am trying to help quite a few people right now so excuse my brevity.
By your request this is suppose to store a unique "additionalcss(id).css to your main bbs url. Different styles can require different additionalcss files. if you do not need that then all you really need to do is append a new file to the bottom of your <head>
code.
Code:
// Header Hook: parse_templates
$nw_cssbegin = '<link rel="stylesheet" type="text/css" href="';
$nw_cssend = '" ' . '/>';
// additionalcss_00011.css = styleid 11
$nw_cssfile = 'additionalcss_' . str_pad($style['styleid'], 5, '0', STR_PAD_LEFT) . '.css';
$nw_csspath = $vbulletin->options['bburl'] . '/';
$nw_cssout = $nw_cssbegin . $nw_csspath . $nw_cssfile . $nw_cssend;
$template_hook['headinclude_bottom_css'] .= $nw_cssout;
Again... its just to view the concept, there is no reason to use all those variables. There is nothing unique about this plugin code.
|
Thanks for the code,
I used it as new plugin using parse_templates, but didn't work... possibly there is something missing!!!
I did it like this:
PHP Code:
// Header Hook: parse_templates
$nw_cssbegin = '<link rel="stylesheet" type="text/css" href="http://stat.mydomain.com/style.css';
$nw_cssend = '" ' . '/>';
// additionalcss_00011.css = styleid 11
$nw_cssfile = 'additionalcss_' . str_pad($style['styleid'], 5, '0', STR_PAD_LEFT) . '.css';
$nw_csspath = $vbulletin->options['bburl'] . '/';
$nw_cssout = $nw_cssbegin . $nw_csspath . $nw_cssfile . $nw_cssend;
$template_hook['headinclude_bottom_css'] .= $nw_cssout;
The style I use is id=5 and I don't know what else I have to do...
I changed
Code:
$template_hook['headinclude_bottom_css']
to
Code:
$template_hook['headinclude_css']
for testing purposes, but nothing worked so far.
also, the whole external link on page html doesn't show...
any idea??
Thanks,