The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Pulling info from a profile field
Hi peeps
I have just created a new profile field and now i would like to pull the information from the said field..... I would like to add this information into a new page (Logican's web template) Please can someone advise as to how to do this.... I have tried this Code:
<if condition="$post['field24']"><div>$vbphrase[referral]: $post[field24]</div></if> Again i tried this and got another parse error Code:
<if condition="$post[field24] != ''"><div class="smallfont"> Also is there away that the profile field information can show which member it pulled the info from please? Something like this Bashy-----------------[field24] member---------------[field24] nother member--------[field24] get the idea? |
#2
|
|||
|
|||
You nailed it both times. There must be errant characters in your template.
The var is going to contain the custom field info from the posting member. |
#3
|
|||
|
|||
Well actually i tried them both in the postbit and thats where i got the errors for the code.....
|
#4
|
|||
|
|||
We can be sure of one thing here, what you showed us will work.
However, I think your problem is in code in the template we here can't see. Perhaps you are causing a nesting problem? |
#5
|
|||
|
|||
Ok lets try a differant way...
Can it be used in a html page or does it have to be a full php page? Ok...this is what i have, nothing shows apart from Code:
How did you find us : Code:
<table width='100%'><tr> <td class="panelsurround" align="center" > <div class="panel"> <div style="width:100%" align="$stylevar[left]"> How did you find us : <if condition="$bbuserinfo[field29] != ''">$vbphrase[referral]:<div class="smallfont"></if> </div></div> </td> </tr> </table> EDIT: Right...The code Code:
<if condition="$post['field29']"><div>$vbphrase[referral]: $post[field29]</div></if> Code:
<table width='100%'><tr> <td class="panelsurround" align="center" > <div class="panel"> <div style="width:100%" align="$stylevar[left]"> How did you find us : <if condition="$bbuserinfo['field29']"><div>$vbphrase[referral] $post[field29]</div></if> </div></div> </td> </tr> </table> Also in the post bit (just for testing the code) it aint pulling the username. Have i mentioned i want to compile a list of all members and show [fieldX] along with thier name? |
#6
|
|||
|
|||
Can you link me to the page or the hack you got the code from? I don't understand what's going on ie. what user id is being used for the custom fields info and where ya get it.
|
#7
|
|||
|
|||
The code is made up from a template within logicans web templates...
It was just something to use to base this on is all... See it working here its the How did you find us? in the postbit Although this will be removed once i sort the list out that main code i want working in the template is Code:
<if condition="$bbuserinfo['field29']"><div>$vbphrase[referral] $post[field29]</div></if> I think for what im wanting the $bbuserinfo is not the right variable as i want to create a list of ALL members that have filled [fieldx] showing [fieldx] like this Bashy-----------------[field24] member---------------[field24] nother member--------[field24] |
#8
|
|||
|
|||
You'll have to query all users from db with non-empty specified profile field and iterate through printing the code.
|
#9
|
|||
|
|||
Dam...that means nothing to me
Can someone ellaborate please, Perhaps peterska2 knows a little more? Quote:
|
#10
|
|||
|
|||
You will need to include a query on the userfields table to get this to work on other pages (it would work on memberlist, postbit, and memberinfo only otherwise). However, to include the query will require some PHP coding, so I'm not really the person to ask. The HTML that you have is spot on, and that's my field of knowledge, not PHP.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|