The Wise One
10-20-2005, 01:01 AM
im trying to get the users signature to show in the user control panel (usercp.php) below the subscriptions and reputation tables. i created a plugin using the usercp_start hook with the following code (taken from member.php):
if ($userinfo['signature'])
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$userinfo['signature'] = $bbcode_parser->parse($userinfo['signature'], 0, true);
$show['signature'] = true;
}
else
{
$show['signature'] = false;
}
i then edited the USERCP template with the following code (taken from the memberinfo template):
<!-- ####### MEMBER'S SIGNATURE IN USER CP ####### -->
<if condition="$show['signature']">
<!-- signature row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">$vbphrase[signature]</td>
</tr>
<tr>
<td class="alt1" title="$vbphrase[signature]">$userinfo[signature]</td>
</tr>
</table>
<!-- / signature row -->
<br />
</if>
<!-- ##### END MEMBER'S SIGNATURE IN USER CP ###### -->
this combination results in nothing displayed in the usercp page. ive tried changing $show['signature'] to $bbuserinfo['signature'] and $userinfo[signature] to $bbuserinfo[signature] in the USERCP template code. this got the signature to show, but bbcode wont parse. can anyone tell me what im doing wrong?
TIA
if ($userinfo['signature'])
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$userinfo['signature'] = $bbcode_parser->parse($userinfo['signature'], 0, true);
$show['signature'] = true;
}
else
{
$show['signature'] = false;
}
i then edited the USERCP template with the following code (taken from the memberinfo template):
<!-- ####### MEMBER'S SIGNATURE IN USER CP ####### -->
<if condition="$show['signature']">
<!-- signature row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">$vbphrase[signature]</td>
</tr>
<tr>
<td class="alt1" title="$vbphrase[signature]">$userinfo[signature]</td>
</tr>
</table>
<!-- / signature row -->
<br />
</if>
<!-- ##### END MEMBER'S SIGNATURE IN USER CP ###### -->
this combination results in nothing displayed in the usercp page. ive tried changing $show['signature'] to $bbuserinfo['signature'] and $userinfo[signature] to $bbuserinfo[signature] in the USERCP template code. this got the signature to show, but bbcode wont parse. can anyone tell me what im doing wrong?
TIA