PDA

View Full Version : Editing Profile "Modules"


Cledus James
01-26-2009, 04:21 PM
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
$post[field24]
to the memberinfo_block_ministats template but that doesn't work. Wondering how I can get a custom field to show up in there. Help?

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.

Dismounted
01-27-2009, 04:45 AM
You cannot use $post in the profile template. Use $prepared instead.

Cledus James
01-27-2009, 04:10 PM
You cannot use $post in the profile template. Use $prepared instead.

First let me say, thank you for the response.

How would I call a custom user field though. I tried adding:

$prepared[field24]

with no luck.

Dismounted
01-28-2009, 05:57 AM
Could you post the template that you have now?

Cledus James
01-30-2009, 09:40 PM
Ok, here's my memberinfo_block_ministats template where I'm trying to calling the custom field data too:

<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>

Tried adding:
$prepared[field24]
to different places within the template with no luck.


Thanks for your help.

Dismounted
01-31-2009, 02:46 AM
Where did you add it?

Cledus James
02-02-2009, 01:51 PM
Sorry. Thanks again for all your help.

<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>

Dismounted
02-03-2009, 05:26 AM
Are you sure you added it to the correct style?

Cledus James
02-03-2009, 02:05 PM
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...:(

Dismounted
02-04-2009, 07:13 AM
Try:
$userinfo[field24]

Cledus James
02-06-2009, 01:11 PM
Try:
$userinfo[field24]

Well that did "work" but it displayed something else. The output was 130, which I have no idea what that is, lol.

Anyother ideas?

Lynne
02-06-2009, 01:55 PM
I used $userinfo[fieldx] in memberinfo_block_ministats and it worked just fine. Are you sure you are using the correct field number?

Cledus James
02-09-2009, 04:14 PM
I used $userinfo[fieldx] in memberinfo_block_ministats and it worked just fine. Are you sure you are using the correct field number?


Ya you're right, I'm stupid...had the wrong field. Worked great! Thanks for all your help!