The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to fetch data from thread table in threadbit template
i make a new filed in thread table on database , and i want fetch data from this filed and show it threadbit template .
i use Quote:
hook : parse_templates code : Code:
global $db ,$vbulletin ,$foruminfo,$threadinfo; $template = '<ul class="threadstats td"><li align="center">{vb:raw thread.city}</li></ul>'; require_once(DIR . '/includes/class_template_parser.php'); $parser = new vB_TemplateParser('<!-- threadstats -->'); $parser->dom_doc = new vB_DomDocument($parser->fetch_dom_compatible()); $find = trim($parser->_parse_nodes($parser->dom_doc->childNodes())); $parser = new vB_TemplateParser($template); $parser->dom_doc = new vB_DomDocument($parser->fetch_dom_compatible()); $replace = trim($parser->_parse_nodes($parser->dom_doc->childNodes())); $vbulletin->templatecache['threadbit'] = str_replace($find, $replace.$find, $vbulletin->templatecache['threadbit']); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|