MyBB Community Forums

Full Version: Help Coding Postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to add the user stars, user title, and the group pics onto the postbit template but am having a hard time.

This is how it looks on my forums:

[Image: capture2br.jpg]

Here is the code to my postbit:

{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
<tr>
<td class="tcat" colspan="2">
<span style="float: right;">
{$post['posturl']}
</span>
{$post['postdate']} {$post['posttime']}
</td>
</tr>

	<tr>
		<td class="postbit" rowspan="2" width="200px" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
		<div class="postbit_name">{$post['onlinestatus']}{$post['profilelink']}<br />
		<span style="float: right;">{$post['userstars']}</span><span class="postbit_usertitle">{$post['usertitle']}</span></div>
		<span class="smalltext">
			{$post['usertitle']}<br />
			{$post['userstars']}
			{$post['groupimage']}
			{$post['useravatar']}<br />
			{$post['user_details']}
		</span>
	</td>
	<td class="trow1" valign="top">
		<table width="100%">
			<tr><td><span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
			<br />
			<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
				{$post['message']}
			</div>
			{$post['attachments']}
			{$post['signature']}
			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
				{$post['iplogged']}
			</div>
		</td></tr>
	</table>
</td>
</tr>
<tr>
	<td class="trow2" style="vertical-align: middle; height: 10px;">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr valign="bottom">
				<td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}</span></td>
				<td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
			</tr>
		</table>
	</td>
</tr>
</table>
The correct template is "postbit_author_user". You've to add the following three variables there;
{$post['usertitle']}<br />
{$post['userstars']}
{$post['groupimage']}
Thanks it worked Smile

Is there anyway to get the user title and group image above the avatar?
You've to change the location of {$post['groupimage']} and {$post['usertitle']} above the {$post['avatar']} in "postbit" template Wink
Hmm, but it is already above it in postbit... I think :\

Isnt it above it in the code above ^ or am I just confused?
Yes it is, it should be fine then.