The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Cutom Field on Custom Page??
How do I access a users selection from a custom field on a custom page.
Currently I have tried $auinfo[field7] $userinfo[field7] which brings up nothing and $bbuserinfo[field7] which brings up my selection when I want to see their selection. Any help? Thanks |
#2
|
||||
|
||||
Are you sure field 7 is the correct field number? What does your template look like? What is the query you are using to get this users info? Did you make sure to JOIN with the userfield table?
|
#3
|
|||
|
|||
1) yes 7 is the correct number.
2) My template is the following. ACTIVITY HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> $headinclude <title>$vboptions[bbtitle] - Activity Statistics</title> </head> <body$onload> $header $navbar <div align="center"> <form action="activity.php" method="get"> <strong>Choose another timeframe:</strong><br /> <select name="m">$mbits</select> <select name="y">$ybits</select> <input type="submit" name="submit" value="Go" /> </form> </div> <br /> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat" colspan="6"> Activity Statistics for $monthliteral </td> </tr> <tbody> <tr> <td class="thead">Rank</td> <td class="thead">Username</td> <td class="thead">Current Package</td> <td class="thead">Posts This Month</td> <td class="thead">Posts Required</td> <td class="thead">Action Needed?</td> </tr> $userbits </tbody> </table> $footer </body> </html> HTML Code:
<tr> <td class="alt1">$c</td> <td class="alt2"><a href="member.php?$session[sessionurl]u=$auinfo[userid]">$auinfo[username]</a> <td class="alt1">$auinfo[field5]</td> <td class="alt2">$auinfo[total]</td> <td class="alt2">30</td> <if condition="is_member_of($bbuserinfo, 5, 6, 7)"> <if condition="$auinfo[total] == 30"> <td class="alt1">No Action Required</td> <else /> <td class="alt1"><font color="#FF0000"><b>Action Required</b></font></td> </if></if> </tr> PHP Code:
Thanks in advance, C |
#4
|
||||
|
||||
You have only queried to get the userid and username. Nowhere in your query have you grabbed the fields from the userfield table. You can't use them in your template if never grabbed them in your query. You'll need to do another JOIN to the userfield in your $getusers query in order to have them available to you.
|
#5
|
|||
|
|||
I am not very familiar with mysql so could you tell me what that query would be and where I would put it please?
|
#6
|
|||
|
|||
If you change your SQL query to this...
PHP Code:
|
#7
|
|||
|
|||
That gave me the following database error
Quote:
|
#8
|
||||
|
||||
Find:
Code:
AND p.userid = f.userid Code:
AND p.postuserid = f.userid |
#9
|
|||
|
|||
New error now:-
Quote:
|
#10
|
||||
|
||||
Actually. "p.userid" should be correct. Have you set a table prefix in your config.php?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|