View Full Version : How to edit customfield for plugin
almannai
01-14-2010, 06:25 AM
Hi,
We used to do something like this in vb3.x
<hookname>profile_complete</hookname>
$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 (https://vborg.vbsupport.ru/showthread.php?t=228078)
almannai
01-14-2010, 02:57 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 (https://vborg.vbsupport.ru/showthread.php?t=228078)
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:
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,
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.