The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
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:
|