The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
customized fields
Hello,
I apologize if this is a repeated question. I created a customized field for users' profile so the users will be able to specify their gender. "This field will then appear on the "Options" page of the User CP," as stated in the CP documentation. My question is where does this field exactly reside? I mean I was trying to use this field in a conditional statement in another template [happened to be "postbit_onlinestatus" template] so I can display different status icons based on the user's gender. So generally, how can I use those customized fields in any template I want? Thanks |
#2
|
||||
|
||||
It should show in User CP > Edit Options
As for using it in the postbit template, it should be $post['fieldx'] where x is the field id from the Profile Field Manager. |
#3
|
|||
|
|||
Thanks Lynne for your help.
What I meant by "reside" is from programming prospective. Meaning I do not want to access it in the postbit template; instead, I want to access those fields in any template. In my case, I want to access it in the "postbit_onlinestatus" template. I tried to use it like this : $post[fieldx] but it did not work. any help thanks |
#4
|
||||
|
||||
You should *always* take a look at the template you are try to add to or modify and see what variable name is being used there. In this case, they are using $user instead of $post. You should also aways look at the code in the php files that is parsed prior to the template being rendered so you can see what variables are available for use. You will need to see if that field is available for use in that template. So, do a search for "postbit_onlinestatus" in the files and see where the template is being rendered. (From doing a quick search, I think it is OK to use that field, but you may need to follow the function backwards.)
|
#5
|
|||
|
|||
That was so helpful. It is working now; thanks a lot!
I used $user instead of $post. Quote:
Another question please, I made a new template to do a similar job as the "postbit_onlinestatus" template but to handle smaller status icons. However, I do not know ho to refer to this new template in the "postbit" template or any other template. Would please explain to me how to call a custom template from others. I am not sure though if calling the template is the proper way or is the way how it works because in the case of postbit_onlinestatus template we are not calling the template name. The call from the postbit template is $post[onlinestatus]. So does "onlinestatus" refer to the a variable or a template? Sorry for bothering you with all of my questions. I am a new user and I need your help. Thanks |
#6
|
||||
|
||||
You need to search in the whole upload folder, not just the includes folder. If you did, you'd find it rendered in functions_bigthree.php (which does happen to be in the includes folder, so I don't know why it didn't show up when you searched).
There are articles on how to call custom templates over in the articles forums. You should check out those forums. If you look up where the template is evaled, you'll see it's in a function and the results of that function are assigned to $post[onlinestatus]. |
#7
|
|||
|
|||
I did the search through windows 7. I might have done it on the wrong way.
I opened the file functions_bigthree.php and yes I found it. And it is only rendering the template "postbit_onlinestatus" so I am not sure if I can use another template to check the online status through it. PHP Code:
I might come with other questions when needed if you do not mind. Thanks a lot |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|