MyBB Community Forums

Full Version: Colour background of postbits
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

As you know, post one goes under "trow1" and post 2 goes under "trow2"... and so on alternatively.

Now my threadlist has the alternative colours which I want, but I dont want it to do the same for the actual posts. Does this make sense? I want the colours to be the same for the posts...
Umm. Alright, I'm sure it can be done. So let me take a look at my forum and see. I'm sure you can take the "even" posts and just name them trow1.

So try that and if that doesn't work, let me know and I'll take a deep look
You've to edit postbit and postbit_classic template and Change trow1 and trow2 to which ever style you would like to use.
Well I was looking into those templates thinking the same lines as you both... but I can't see trow1 or trow2 lol
Can you please paste the entire code of both these mentioned templates ?
Thanks.
Go to postbit_classic and find the first "<td class="{$altbg}"" and change "{$altbg}" to trow1 or trow2.

Boom! That will work! Smile
POSTBIT CLASSIC

$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="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><acenter;">
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
		<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br
					<center>{$post['useravatar']}<br />
		<span class="smalltext">
			{$post['usertitle']}<br
{$post['profilelink']}<if $post['fid3'] != "" then>&nbsp;<img src="{$mybb->settings['bburl']}/images/{$post['fid3']}.png" /></if><br />
			{$post['userstars']}
			{$post['groupimage']}
			{$post['useravatar']}<br
<if $post['usertitle'] != "" then>
{$post['usertitle']}<br />
			{$post['user_details']}
</if>
<span class="smalltext"><font color="#666666">{$post['fid10']}<if $post['fid1'] != "" then> from {$post['fid1']}</if></font>
		</span>
	</td>
	<td class="{$altbg}" valign="top">
		<table width="100%">
			<tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
			<br />			<tr><td>{$post['posturl']}
			<div id="pid_{$post['pid']}" class="post_body">
				{$post['message']}style="padding: 5px 0 5px 0;">
				<br>{$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="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>middle;"></td>
	<td class="{$altbg}" style="vertical-align: middle;">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr valign="bottom">
				<td                                <td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}</span></td>style="{$post['tyl_display']}" id="tyl_{$post['pid']}">{$post['thankyoulike_data']}</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>align="right">{$post['button_tyl']}{$post['button_edit']}{$post['button_report']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']} <if $GLOBALS['mybb']->user['usergroup'] == 4 || $GLOBALS['mybb']->user['usergroup'] == 3 then><input type="checkbox" class="checkbox" name="inlinemod_{$post['pid']}" id="inlinemod_{$post['pid']}" value="1" style="vertical-align: middle;" {$inlinecheck}  /></if></td>
			</tr>
		</table>
	</td>
</tr>
</table>

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="{$altbg}" width="15%" valign="top" style="white-space: text-align: center;">
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
					<center>{$post['useravatar']}<br />
{$post['profilelink']}<br />
<if $post['usertitle'] != "" then>
{$post['usertitle']}
</if><br />
<span class="smalltext"><font color="#666666">{$post['fid10']} from {$post['fid1']}</font>
		</span>
	</td>
	<td class="{$altbg}" valign="top">
		<table width="100%">
			<tr><td>{$post['posturl']}
			<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="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
	<td class="{$altbg}" style="vertical-align: middle;">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr valign="bottom">
				<td align="left" ><span class="smalltext">{$post['button_rep']}</span></td>
				<td align="right">{$post['button_tyl']}{$post['button_edit']}{$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>

Thank you both for looking into this, got it changed and it worked.
Try to change as per suggested the post above by sparkks
Glad to know I could help. Please change the prefix to "Solved". If you need anything else, please make a new thread or PM me! Smile