I've created a template that will display a custom profile field ($userinfo[field5]) inside of an html table inside of the postbit. Although, I only want this html table to show up in a user?s post if they've entered information in this custom profile field (Under update profile). In the postbit I have the following html (With a lil php):
Code:
<table bgcolor="{tablebordercolor}" width="80%" border="0" cellspacing="1" cellpadding="2"><tr>
$post[gamertag]
</tr></table>
I have a template named postbit_gamertag:
Code:
<td bgcolor="#bbd89a" align="center" valign="middle"><smallfont><b>Gamertag</b></smallfont></td>
</tr>
<tr>
<td bgcolor="$post[backcolor]" align="center" height="15"><smallfont>$post[field5]</smallfont></td>
And finally I've edited member.php with the following code (I did declare the template in the $templatesused statement but left that out for simplicity):
PHP Code:
if ($userinfo[field5]!="") {
eval("\$userinfo[gamertag] = \"".gettemplate("postbit_gamertag")."\";");
} else {
$userinfo[field5]="";
}
My problem is, none of this works. I?m fairly new to php so cut me a little slack. I really have tried to work this out but am at a loss. If someone could help me out I would appreciate it. Plus I could learn something.
Thanks in advance.