vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Can someone help me (https://vborg.vbsupport.ru/showthread.php?t=228094)

lolo? 11-16-2009 11:36 AM

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 :
PHP Code:

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

i convert like this
PHP Code:

$templater vB_Template::Create('mytemplate');
$templater->register('mytemplate'$mytemplate);
$mytemplate $templater->render(); 

and in the template in vb3.8 i have this
PHP Code:

$mytemplate 

replace by this in vb4
PHP Code:

{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

Quote:

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
PHP Code:

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)
PHP Code:

$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


All times are GMT. The time now is 06:56 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01188 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete