The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am trying to modify the main forum page in a way that will allow me to display information from a custom field in the users profile on the main forum of the site.
This is from a random Modification that I have installed on the homepage, I need to be able to pull the bolded, underlined information to any page and I am not sure how to do this. I have gotten it working in the postbit template, but I can't seem to get it working on the homepage of the site seeing that the profile "fields" aren't present or being called anywhere on the page. Any assistance would be greatly appreciated. Code:
<vb:if condition="$show['mgc_cb_evo_username_column']"> <span class="{vb:raw fontclass}"> <vb:if condition="!$anonymous"> <vb:if condition="$show['mgc_cb_evo_pm_tabs']"> {vb:raw username_prefix}<a style="text-decoration: none" href="#" onclick="return mgc_cb_evo_open_pm_tab({vb:raw user.userid},'{vb:raw user.raw_username_secured}');">{vb:raw user.username}</a> <vb:else /> {vb:raw username.field5} <a style="text-decoration: none" href="{vb:raw vboptions.bburl}/member.php?{vb:raw session.sessionurl}u={vb:raw user.userid}">{vb:raw user.username}</a> </vb:if> <vb:else /> {vb:raw username_prefix}{vb:raw user.username} </vb:if> </span> </vb:if> |
#2
|
|||
|
|||
![]()
I think you should add a plugin in the proper place to query the values of those fields and register them in forumhome template so you can use them in it
|
#3
|
||||
|
||||
![]()
If you are wanting filed5 from the user viewing the page, then you need to use the variable bbuserinfo, not just userinfo.
user is also not a valid variable, and perhaps you want bbuserinfo there also. You will need to look at that modification and see exactly what variables it is you want to display and change the variable names to be appropriate for that page. |
#4
|
|||
|
|||
![]()
How would I go about adding the variable, to the forumhome Template? I think that is the best place to start..
|
#5
|
||||
|
||||
![]()
I thought you were saying that you added the code in the first post - that has the variables in it - {vb:raw bbuserinfo.field5}
|
#6
|
|||
|
|||
![]()
I did add that to the code, but it is not functioning.
It works in the postbit but it does not work on the homepage of the forum. This is difficult to explain. The forum homepage has no idea what {vb:raw bbuserinfo.field5} is or does, but postbit does, I need to know how to modify the forum home so that it knows where to locate the information that is stored in the database that corresponds to {vb:raw bbuserinfo.field5} |
#7
|
||||
|
||||
![]()
I just added {vb:raw bbuserinfo.field5} to my FORUMHOME template and it shows up fine. That variable should be available there and in most any template.
Your code in the first post is most likely not showing because you don't have $show['mgc_cb_evo_username_column'] or $anonymous or $show['mgc_cb_evo_pm_tabs'] defined. You will need to write a plugin to define those values if you plan to use them. That is something we cannot help you with out here, you would need to ask for help in the modification thread and hope someone can help. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|