Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2009, 11:36 AM
lolo? lolo? is offline
 
Join Date: Jun 2005
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 11-16-2009, 12:08 PM
Shadab's Avatar
Shadab Shadab is offline
 
Join Date: Apr 2007
Location: Bhopal
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #3  
Old 11-16-2009, 12:23 PM
Almotmaiz.Net Almotmaiz.Net is offline
 
Join Date: Jan 2005
Location: U.A.E, Sharjah
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lolo?, post your full php code to let us help
Reply With Quote
  #4  
Old 11-16-2009, 12:43 PM
lolo? lolo? is offline
 
Join Date: Jun 2005
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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**
Reply With Quote
  #5  
Old 11-16-2009, 01:04 PM
Shadab's Avatar
Shadab Shadab is offline
 
Join Date: Apr 2007
Location: Bhopal
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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(); 
Reply With Quote
  #6  
Old 11-16-2009, 01:55 PM
lolo? lolo? is offline
 
Join Date: Jun 2005
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks i' try this
Reply With Quote
  #7  
Old 11-17-2009, 09:56 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 11-17-2009, 02:46 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 11-18-2009, 05:40 AM
lolo? lolo? is offline
 
Join Date: Jun 2005
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06578 seconds
  • Memory Usage 2,249KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete