I'm just curious if registering the navbar is always necessary if you're creating a template for your own vB page, and if so, should the first post be updated to illustrate this?
And where the hell is the documentation on things like this:
Quote:
Originally Posted by Boofo
Try this in the parse_templates hook:
Code:
require_once(DIR . '/includes/class_template_parser.php');
$parser = new vB_TemplateParser('<div id="toplinks" class="toplinks">');
$parser->dom_doc = new vB_DomDocument($parser->fetch_dom_compatible());
$find = trim($parser->_parse_nodes($parser->dom_doc->childNodes()));
$parser = new vB_TemplateParser('<div style="float:right; margin: 5px -12px 5px 10px;">{vb:raw mycode}</div>');
$parser->dom_doc = new vB_DomDocument($parser->fetch_dom_compatible());
$replace = trim($parser->_parse_nodes($parser->dom_doc->childNodes()));
$vbulletin->templatecache['header'] = str_replace($find, $find . $replace, $vbulletin->templatecache['header']);
unset($find, $replace);
|
Or do you have to go through all the various files yourself to learn all of the functions and hope you stumble on what you're looking for?