Helpful Information
 
 
Category: vB4 Programming Discussions
Can someone help me

Can someone help me
i try to update on mode for vb4 but i have a probleme
in vb 3.8 i have this :

eval('$mytemplate .= "' . fetch_template('mytemplate') . '";');


i convert like this
$templater = vB_Template::Create('mytemplate');
$templater->register('mytemplate', $mytemplate);
$mytemplate = $templater->render();
and in the template in vb3.8 i have this

$mytemplate

replace by this in vb4

{vb:var mytemplate}


but when i look in my post the template are not call just see {vb:var mytemplate}

could you tell me what is wrong
sorry for my bad english

and in the template in vb3.8 i have this
What is the name of that template?

Also, are you putting that php code in a plugin or in a custom PHP file?

lolo², post your full php code to let us help :)

the code is this for ed2k mod http://www.vbulletin.org/forum/showthread.php?t=126481
**edit: code removed**

and the template code
**edit: code removed**

--------------- Added 16 Nov 2009 at 06:51 ---------------

the php code with modification

**edit: code removed**

Haven't read the whole source code. But...
To convert
eval('$ed2kbit .= "' . fetch_template('ed2kbit') . '";');


to be 4.0 compatible, use this:
(you need to explicitly register all the variables you intend to use inside a template. for example: $totalper)
$templateBit = vB_Template::create('ed2kbit');

$templateBit->register('totalper', $totalper);
$templateBit->register('some_var_for_ed2kbit', $somevar);

$ed2kbit .= $templateBit->render();

thanks i' try this

On a principle note: Does the author of the mod give you permission to repost the whole code of his product here? I wouldn't like this to happen with my mods.

I've removed the code from post 4. You may NOT repost code without the permission of the author. Please do not do so in the future.

Sorry i dont want attribute me the code just want upgrade i dont want distribute this code without the accord of author
Sorry










privacy (GDPR)