vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   How to edit customfield for plugin (https://vborg.vbsupport.ru/showthread.php?t=233066)

almannai 01-14-2010 06:25 AM

How to edit customfield for plugin
 
Hi,

We used to do something like this in vb3.x
<hookname>profile_complete</hookname>

PHP Code:

$tempcustom '<p> Add extra line...</p>';
$tempcustom2 '<p> Add second extra line...</p>';
$customfields['other'] .= $tempcustom;
$customfields['other'] .= $tempcustom2 

But this is not working any more in VB4.

Any help is appreciated.

Regards,

Lynne 01-14-2010 02:24 PM

It would work if you then preregister the array $customfields for use in the template you are going to use them in.

Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide

almannai 01-14-2010 02:57 PM

Quote:

Originally Posted by Lynne (Post 1955548)
It would work if you then preregister the array $customfields for use in the template you are going to use them in.

Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide

Thank you Lynne for you reply

Can you please explain more?

In cellarius article he is talking about forumhome that we add our template to it I have no problem with that.

What i want to do is to add more options to user options and not in my template so the customfields array should be there in profile_copmlete or profile_start hook am realy :confused:

Regards,

Lynne 01-14-2010 05:00 PM

cellarius is just giving examples in his tutorial. If you need to use variable $my_variable in template USERCP_SHELL, then you would write:
PHP Code:

vB_Template::preRegister('USERCP_SHELL', array('my_variable' => $my_variable)); 


almannai 01-15-2010 02:33 PM

Thanks again Lynne

I will try it ..

Regards,


All times are GMT. The time now is 06:26 AM.

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.01000 seconds
  • Memory Usage 1,724KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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