The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Quick question from a half about vB newb.
Does anyone know how I can "call" or "post" a custom profile field in one of the profile module like Mini Stats. I tried just adding Code:
$post[field24] Problem is, I can create that custom field's own profile module by setting it too public, etc., but then it also shows up in the About Me tab and I don't want to display the info twice. Would like to have this custom field in a module somewhere without having it printed in the About Me. Putting it in the Mini Stats module was the best thing I could come up with since I'm a newb and have limitations as far as editing goes. Thank you for any input. |
|
#2
|
||||
|
||||
|
You cannot use $post in the profile template. Use $prepared instead.
|
|
#3
|
|||
|
|||
|
Quote:
How would I call a custom user field though. I tried adding: Code:
$prepared[field24] |
|
#4
|
||||
|
||||
|
Could you post the template that you have now?
|
|
#5
|
|||
|
|||
|
Ok, here's my memberinfo_block_ministats template where I'm trying to calling the custom field data too:
Code:
<div class="alt1 block_row">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="100%">
<dl class="smallfont list_no_decoration profilefield_list">
<if condition="$prepared['birthday']">
<dt class="shade">$vbphrase[birth_date]</dt>
<dd>$prepared[birthday] <if condition="$prepared['age']">($prepared[age])</if></dd>
<else /><if condition="$prepared['age']">
<dt class="shade">$vbphrase[age]</dt>
<dd>$prepared[age]</dd>
</if></if>
<dt class="shade">$vbphrase[join_date]</dt>
<dd>$prepared[joindate]</dd>
<dt class="shade">$vbphrase[total_posts]</dt>
<dd>$prepared[posts]</dd>
$template_hook[profile_ministats_list]
</dl>
</td>
<if condition="$prepared['avatarurl']">
<td><img src="$prepared[avatarurl]" alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar]</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /></td>
</if>
</tr>
</table>
</div>
<div class="alt2 smallfont block_row block_footer"><a href="#stats" onclick="return vB_TabCtrls['profile_tabs'].switch_tab('stats')">$vbphrase[show_all_statistics]</a></div>
Code:
$prepared[field24] Thanks for your help. |
|
#6
|
||||
|
||||
|
Where did you add it?
|
|
#7
|
|||
|
|||
|
Sorry. Thanks again for all your help.
Code:
<div class="alt1 block_row">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="100%">
<dl class="smallfont list_no_decoration profilefield_list">
<if condition="$prepared['birthday']">
<dt class="shade">$vbphrase[birth_date]</dt>
<dd>$prepared[birthday] <if condition="$prepared['age']">($prepared[age])</if></dd>
<else /><if condition="$prepared['age']">
<dt class="shade">$vbphrase[age]</dt>
<dd>$prepared[age]</dd>
</if></if>
<dt class="shade">$vbphrase[join_date]</dt>
<dd>$prepared[joindate]</dd>
<dt class="shade">$vbphrase[total_posts]</dt>
<dd>$prepared[posts]</dd>
<dd>$prepared[field24]</dd>
$template_hook[profile_ministats_list]
</dl>
</td>
<if condition="$prepared['avatarurl']">
<td><img src="$prepared[avatarurl]" alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar]</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /></td>
</if>
</tr>
</table>
</div>
<div class="alt2 smallfont block_row block_footer"><a href="#stats" onclick="return vB_TabCtrls['profile_tabs'].switch_tab('stats')">$vbphrase[show_all_statistics]</a></div>
|
|
#8
|
||||
|
||||
|
Are you sure you added it to the correct style?
|
|
#9
|
|||
|
|||
|
Ya, I mean I'm adding it to my default style. I even tried adding it to my "Test" style which is the vB default one and still no luck...
|
|
#10
|
||||
|
||||
|
Try:
Code:
$userinfo[field24] |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|