The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[vB5] User Profile Fields in the postbit templates
Using your User Profile Fields on your site This article is written with the assumption that you have already created your own User Profile Fields in the User Profile Field Manager. If you need help with this, you may read about it in the manual here - http://www.vbulletin.com/docs/html/profile For the Purposes of this article, I will be referring to "fieldx" as the name of your profile field. Your real name will be found in the User Profile Manager in the "Name" column - field1, field2, etc. First thing to do is figure out which fields you want to add to your postbit. Go to your Admincp > User Profile Fields > User Profile Field Manager and note both the Field Name (field1, field2, etc) and the Category the field is in (see image 1). The Profile Fields are listed under their Category Title on this page. It should either be "(Uncategorized)" or have some other category listed. To then get the Category ID, go to User Profile Field Categories, click to Edit the category you want the ID of, and it will be listed at the top - id x (see image 2). Uncategorized Categories have no Category ID. Image 1:So, now that you have a list of field ids and category ids, you can now easily add them to your postbit. First make sure your hook system is active (it is turned off by default). Go to Admincp > Settings > Products/Hook System > Enable/Disable Hook System > Yes. Now, go to Admincp > Products & Hooks > Manage Hooks and click the link that says "[Add New Hook]". In that new hook, set the following: Hook is Active: YesNow go to Admincp > Styles & Templates > Style Manager > Add New Template and on that page, set the following: Title: conversation_fieldsFor each field you want shown, you will need to add this code under that line: Replace the X in "FieldX" (three times) with the fieldid and, if your field is in a Category other than Uncategoried, then replace "default" with "categoryY_title" where Y is the category id. So, for instance, say I have the following I want to add: Name CategoryThen my template would look like this: That's it! If running 5.1.0, there is a code fix to apply here. Quote:
|
#42
|
||||
|
||||
I would suggest reading the thread and trying the suggestions users have posted already regarding that error.
|
#43
|
|||
|
|||
Lynne, Here is my code:
{vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}} <vb:if condition="$userInfo['field6']"><li><label>{vbhrase field6_title}:</label> <span>{vb:raw userInfo.customFields.default.field6_title.val}</span></li></vb:if> It is working perfectly to show TEXT put in the field. I would like to put a URL in the field and have the word Feedback linked to that URL. Can you help. This seems like I should be able to do it easy peasy... and my mind is drawing a blank. TY TY --------------- Added [DATE]1393213800[/DATE] at [TIME]1393213800[/TIME] --------------- LYNNE! You ROCK! Ok, I figured it out! I was also able to add a second value after the link! *YAY* *YAY* PHP Code:
we will have to manually update these values, but until there is a mod, this will work. Muddling through! Thanks again LYNNE for your help! |
#44
|
||||
|
||||
I'm glad you got it working.
|
#45
|
|||
|
|||
Tried this on a 5.0.5 and it broke the board !
"There is a serious error and the page cannot be rendered" Deleted hook Disabled hook system, board still not functioning |
#46
|
||||
|
||||
Not sure exactly what you did, but this is only a hook and it seems strange that it would cause that sort of error. You can go into debug mode and see what the real error is. Also, don't forget to Clear System Cache after doing something.
|
#47
|
|||
|
|||
Quote:
I tried the same in 5.1.0, and the same thing happened, eventually gave up on it, is there an easier way to add these fields to the postbit ? |
#48
|
||||
|
||||
Why don't you post screen shots of *exactly* what you did.
|
#49
|
|||
|
|||
I'm confident I followed your instructions correctly, I'm hesitant to go through the process again, in case I "break" the forum again.
You would think there would be an easier way to incorporate fields into postbit. |
#50
|
|||
|
|||
BTW this link:
http://www.vbulletin.com/docs/html/profile gives a "Page not found" response --------------- Added [DATE]1398260380[/DATE] at [TIME]1398260380[/TIME] --------------- Attempted this again, followed the instructions to the letter. Exactly the same result. There is a serious error and the page cannot be rendered Would advise that users of 5.0.5 and 5.1.0 do not use this until a fix is posted. |
#51
|
||||
|
||||
Please see this thread - http://www.vbulletin.com/forum/forum...profile-fields
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|