Sorry , forgot post it, this is the plugin that create the template.
Name:
Slider AnimeDB
Quote:
$templater = vB_Template::create('ct_animedb_slider');
$templatevalues['ct_animedb_slider'] = $templater->render();
vB_Template: reRegister('header', $templatevalues);
|
I'm reading this article: https://vborg.vbsupport.ru/showthread.php?t=228078 and i figured how to register a var, like this:
$templater->register('my_var', $my_var);
But i really dont understood where i need to register them and if this can solve my problem.
So i have 2 templates and 2 plugins.
1 Plugin) Called "
Slider AnimeDB" Make and Register the template "
"
Plugin Code:
Quote:
$templater = vB_Template::create('ct_animedb_slider');
$templatevalues['ct_animedb_slider'] = $templater->render();
vB_Template: reRegister('header', $templatevalues);
|
2 Plugin) Called "
Anidb Items" got information from DB and put it into a variable "anidbItems"
Plugin code:
Quote:
$aniTMP = "";
while($row_sl = mysql_fetch_array($result_sl)){
$aniTMP .= '<a href="http://www.xxxx.com.ar/descargadirecta/ver.php?cod='.$row_sl['xxx'].'" target="_blank">';
$aniTMP .= '<img src="'.$row_sl['xxx'].'" border="0"></a>';
$aniTMP .= '<a href="http://www.xxxx.com.ar/descargadirecta/ver.php?cod='.$row_sl['xxx'].'" target="_blank">';
$aniTMP .= $row_sl['xxx'].'</a>';
$aniTMP .= $row_sl['xxx'];
}
$myarray=array();
$myarray['anidbItems']= $aniTMP;
vB_Template: reRegister('ct_animedb_slider', $myarray);
|
1 template) Called "
ct_animedb_slider" this template is included in Vbulletin's
header template and display "anidbItems" var, by the moment the code just:
2 template) Vbulletin header tempalte, i posted in the first post.. so here i include de ct_animedb_slider template for show it.
Ok, i dont understand where i need to register the Var "ct_animedb_slider" and i dont know if is correct that i'm doing, srry this new plugin system is really confuse for me.
Thanks for your time!