PDA

View Full Version : Can someone help me


lolo?
11-16-2009, 11:36 AM
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

Shadab
11-16-2009, 12:08 PM
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?

Almotmaiz.Net
11-16-2009, 12:23 PM
lolo?, post your full php code to let us help :)

lolo?
11-16-2009, 12:43 PM
the code is this for ed2k mod https://vborg.vbsupport.ru/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**

Shadab
11-16-2009, 01:04 PM
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();

lolo?
11-16-2009, 01:55 PM
thanks i' try this

cellarius
11-17-2009, 09:56 AM
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.

Lynne
11-17-2009, 02:46 PM
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.

lolo?
11-18-2009, 05:40 AM
Sorry i dont want attribute me the code just want upgrade i dont want distribute this code without the accord of author
Sorry