Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: Hj Ahmad Rasyid Hj Ismail on August 04, 2011, 08:26:36 PM

Title: Float Post Around Poster Info Using CSS
Post by: Hj Ahmad Rasyid Hj Ismail on August 04, 2011, 08:26:36 PM
Hiya All,

In response to another new request here (http://www.simplemachines.org/community/index.php?topic=445110.0), I making this a tip or trick so that others can benefit from it, if they want to  :P. As titled, this is for floating the post (inner section) to surround poster info column in post page. I think may be he wants a wider space for the content (if the post is long enough). See picture for better idea(s).

(https://www.simplemachines.org/community/index.php?action=dlattach;topic=445250.0;attach=183888;image)

This is mainly css re-styling, so as "usual",  (lol  ;D I am starting to like this) open your index.css file.

1. Find:
/* Posts and personal messages displayed throughout the forum. */
.post, .personalmessage
{
overflow: auto;
line-height: 1.4em;
padding: 0.1em 0;
}

Change that too:
/* Posts and personal messages displayed throughout the forum. */
.post, .personalmessage
{
/* overflow: auto; */
line-height: 1.4em;
padding: 0.1em 0;
}


2. Find:
.postarea, .moderatorbar
{
margin: 0 0 0 16em;
}
.postarea div.flow_hidden
{
width: 100%;
}

.moderatorbar
{
clear: right;
}

And change this to:
.postarea, .moderatorbar
{
/* margin: 0 0 0 16em; */
}
.postarea div.flow_hidden
{
/* width: 100%; */
margin-right: 1em;
padding-bottom: 1em;
border-bottom: 1px solid #99a;
}

.moderatorbar
{
padding-left: 1.2em;
clear: right;
}


3. Find:
.inner
{
padding: 1em 1em 2px 0;
margin: 0 1em 0 0;
border-top: 1px solid #99a;
}

And change that to:
.inner
{
padding: 1em 1em 2px 0;
margin: 0 1em 0 1.2em;
/* border-top: 1px solid #99a; */
}


That's it. Good luck and best wishes to you testers.
Title: Re: Float Post Around Poster Info Using CSS
Post by: icasm on August 04, 2011, 08:36:13 PM
Easy to modify and understand. Thanks again!
Title: Re: Float Post Around Poster Info Using CSS
Post by: Hj Ahmad Rasyid Hj Ismail on August 04, 2011, 08:38:30 PM
No problem. I hope it works well for you.
Title: Re: Float Post Around Poster Info Using CSS
Post by: Ricky. on August 05, 2011, 02:52:29 AM
Nice work and improvement.
Title: Re: Float Post Around Poster Info Using CSS
Post by: MrGrumpy on August 05, 2011, 10:39:45 AM
Not trying to hijack this thread but this is a variation on ahrasis's version of this change to the post area but this way edits Display.template.php to move the user info into the post area but under the post title, again resulting from the conversation ahrasis linked. This is a little more complicated than ahrasis's version but achieves a different look.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi1115.photobucket.com%2Falbums%2Fk542%2Fandyzthingz2010%2Fpost2.jpg&hash=69a3a09e5fc81bb73f6a658517078e525c9289d2)

Find and COPY


// Show information about the poster of this message.
echo '
<div class="poster">
<h4>';

// Show online and offline buttons?
if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
echo '
', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', '<img src="', $message['member']['online']['image_href'], '" alt="', $message['member']['online']['text'], '" />', $context['can_send_pm'] ? '</a>' : '';

// Show a link to the member's profile.
echo '
', $message['member']['link'], '
</h4>
<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';

// Show the member's custom title, if they have one.
if (!empty($message['member']['title']))
echo '
<li class="title">', $message['member']['title'], '</li>';

// Show the member's primary group (like 'Administrator') if they have one.
if (!empty($message['member']['group']))
echo '
<li class="membergroup">', $message['member']['group'], '</li>';

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="postgroup">', $message['member']['post_group'], '</li>';
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<li class="avatar">
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
', $message['member']['avatar']['image'], '
</a>
</li>';

// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';

// Is karma display enabled?  Total or +/-?
if ($modSettings['karmaMode'] == '1')
echo '
<li class="karma">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
elseif ($modSettings['karmaMode'] == '2')
echo '
<li class="karma">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<li class="karma_allow">
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
</li>';

// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
echo '
<li class="gender">', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';

// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
<li class="blurb">', $message['member']['blurb'], '</li>';

// Any custom fields to show as icons?
if (!empty($message['member']['custom_fields']))
{
$shown = false;
foreach ($message['member']['custom_fields'] as $custom)
{
if ($custom['placement'] != 1 || empty($custom['value']))
continue;
if (empty($shown))
{
$shown = true;
echo '
<li class="im_icons">
<ul>';
}
echo '
<li>', $custom['value'], '</li>';
}
if ($shown)
echo '
</ul>
</li>';
}

// This shows the popular messaging icons.
if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
echo '
<li class="im_icons">
<ul>
', !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
', !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
', !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
', !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
</ul>
</li>';

// Show the profile, website, email address, and personal message buttons.
if ($settings['show_profile_buttons'])
{
echo '
<li class="profile">
<ul>';
// Don't show the profile button if you're not allowed to view the profile.
if ($message['member']['can_view_profile'])
echo '
<li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" />' : $txt['view_profile']), '</a></li>';

// Don't show an icon if they haven't specified a website.
if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
echo '
<li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $message['member']['website']['title'] . '" />' : $txt['www']), '</a></li>';

// Don't show the email address if they want it hidden.
if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
echo '
<li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';

// Since we know this person isn't a guest, you *can* message them.
if ($context['can_send_pm'])
echo '
<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';

echo '
</ul>
</li>';
}

// Any custom fields for standard placement?
if (!empty($message['member']['custom_fields']))
{
foreach ($message['member']['custom_fields'] as $custom)
if (empty($custom['placement']) || empty($custom['value']))
echo '
<li class="custom">', $custom['title'], ': ', $custom['value'], '</li>';
}

// Are we showing the warning status?
if ($message['member']['can_see_warning'])
echo '
<li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<img src="', $settings['images_url'], '/warning_', $message['member']['warning_status'], '.gif" alt="', $txt['user_warn_' . $message['member']['warning_status']], '" />', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
}
// Otherwise, show the guest's email.
elseif (!empty($message['member']['email']) && in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
echo '
<li class="email"><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';

// Done with the information about the poster... on to the post itself.
echo '
</ul>
</div>


Once copied Replace with


echo'


Then find

// Show the post itself, finally!
echo '
<div class="post">';


And add after that the code you copied above.
Then add after the closing div (last line of that section of code)

';


Now open index.css and find


.poster
{
float: left;
width: 15em;
}
.postarea, .moderatorbar
{
margin: 0 0 0 16em;
}



Replace with

.poster
{
float: left;
width: 13em;
padding: 5px;
border: 1px solid #9999AA;
margin: 10px 20px 0 0;
text-align: center;
border-radius: 6px;
}
.postarea, .moderatorbar
{
margin: 0 0 0 1em;
}


If you want the post profile on the right

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi1115.photobucket.com%2Falbums%2Fk542%2Fandyzthingz2010%2Fpost5.jpg&hash=764a2d4e503c9aa80bd3f9985561b798634c4479)

Replace the .poster code for the 1 below, this floats it to the right and adjusts the margins to align it correctly on the right hand side.


.poster
{
float: right;
width: 13em;
padding: 5px;
border: 1px solid #9999AA;
margin: 10px 10px 0 20px;
text-align: center;
border-radius: 6px;
}


And to move the "Author" title on the titlebar to the right above the post profile

Find

#forumposts h3 span#author
{
margin: 0 7.7em 0 0;
}


Replace with


#forumposts h3 span#author
{
margin: 0 4em 0 0;
float: right;
}



Obviously if you want things aligned/positioned slightly different adjust the margins to suit your needs.
Although this edits a template file this shouldn't cause a problem with mods that edit the post profile as the whole post profile code has just been moved and not edited.
The rounded corners uses  CSS3 border-radius that isn't supported in older browsers so will give square corners in for example IE7/IE8
Title: Re: Float Post Around Poster Info Using CSS
Post by: Hj Ahmad Rasyid Hj Ismail on August 05, 2011, 10:47:40 AM
Thanks Ricky.

And great job MrGrumpy. I like it... :D
Title: Re: Float Post Around Poster Info Using CSS
Post by: MrGrumpy on August 05, 2011, 10:57:31 AM
Quote from: ahrasis on August 05, 2011, 10:47:40 AM
And great job MrGrumpy. I like it... :D

Thanx
Title: Re: Float Post Around Poster Info Using CSS
Post by: Ricky. on August 06, 2011, 08:10:11 AM
Nice work mcgrumpy..looks cool !
Title: Re: Float Post Around Poster Info Using CSS
Post by: Hj Ahmad Rasyid Hj Ismail on August 06, 2011, 06:35:14 PM
Agreed with Ricky. Nice add up / update MrGrumpy. It looks nicer on the right side. But will be better if the Author column on the top is removed.
Title: Re: Float Post Around Poster Info Using CSS
Post by: MrGrumpy on August 06, 2011, 06:48:42 PM
oooops forgot bout that, i'll fix that tomorrow


ETA - code updated, author column moved to right rather than just deleting it.
Title: Re: Float Post Around Poster Info Using CSS
Post by: [unplugged] on August 07, 2011, 11:15:12 AM
Very nice work! It really makes the post flow better.

One thing I noticed while testing this was that if a guest (or a member whose account had been removed) has posts, the container for their poster info gets reduced to the point of looking out of place as seen here:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg836.imageshack.us%2Fimg836%2F9192%2Fguestwithoutminheight.png&hash=0537dc4bb7424bd731c0981c70e5252776d92666) (http://imageshack.us/photo/my-images/836/guestwithoutminheight.png/)

This can be remedied quite easily by adding a minimum height to the container which results in:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg263.imageshack.us%2Fimg263%2F5293%2Fguestwithminheight.png&hash=b0f9237a8e598507607bbdac6d57fd50c9bdcd9d) (http://imageshack.us/photo/my-images/263/guestwithminheight.png/)

The minimum height will make the container appear more like the others:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg829.imageshack.us%2Fimg829%2F89%2Fdefaultview.png&hash=c51616c0f9efc19696bc76fbefa8959da6f1db89) (http://imageshack.us/photo/my-images/829/defaultview.png/)

To do this, open index.css and (once again) find:
.poster
{


and add after it:
min-height: 160px;

The height can, of course, be adjusted to personal taste.




EDIT:

Also, to better align the container, the margin for the .poster class should be margin: 25px 20px 0 15px; resulting in:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg641.imageshack.us%2Fimg641%2F166%2Fdefaultviewaligned.png&hash=fb6ab5570151f0846771f0e2e6f2b4ad2c45106f) (http://imageshack.us/photo/my-images/641/defaultviewaligned.png/)


Now the top and left side of the container line up with the wrapped text.
Title: Re: Float Post Around Poster Info Using CSS
Post by: Hj Ahmad Rasyid Hj Ismail on August 07, 2011, 11:29:48 AM
Good improvement MrGrumpy. Nice add up too SunKing. Keep it up guys. Forum users are expecting more selection of display / post page rather than the usual "boring" one.  :P If you know what I mean   ;D
Title: Re: Float Post Around Poster Info Using CSS
Post by: MrGrumpy on August 07, 2011, 01:00:38 PM
Quote from: ahrasis on August 07, 2011, 11:29:48 AM
Forum users are expecting more selection of display / post page rather than the usual "boring" one.  :P If you know what I mean   ;D

Moving the poster profile will save on space, especially for fixed width forums/themes and there won't be dead space under the poster profile on longer posts.
Title: Re: Float Post Around Poster Info Using CSS
Post by: Hj Ahmad Rasyid Hj Ismail on August 07, 2011, 07:10:09 PM
Indeed it does MrGrumpy. I can't think of a better way but to incorporate them into my Xenforo Like Display / Post Page for 2.0 (http://www.simplemachines.org/community/index.php?topic=443064.0) [WIP Mod].
Title: Re: Float Post Around Poster Info Using CSS
Post by: MrGrumpy on August 07, 2011, 07:37:15 PM
I've been meaning to implement it in themes before now but hadn't got around to looking at the code but will use it in future especially in my fixed width themes, never have liked the way forums had the poster profile separate from the post content, always seemed disjointed to me

(but then I moan about a lot of stuff with forums lol)
Title: Re: Float Post Around Poster Info Using CSS
Post by: ascaland on August 07, 2011, 11:34:13 PM
Definitely a neat idea, im going to use this. Thanks guys.
Title: Re: Float Post Around Poster Info Using CSS
Post by: AussieBill on August 07, 2011, 11:35:45 PM
The poster, postarea and moderatorbar classes are also used in PersonalMessage.template.php, so that needs a bit of fixing too.
Title: Re: Float Post Around Poster Info Using CSS
Post by: Hj Ahmad Rasyid Hj Ismail on August 08, 2011, 12:14:26 AM
So far, they'll look the same AussieBill.
Title: Re: Float Post Around Poster Info Using CSS
Post by: AussieBill on August 08, 2011, 03:21:00 AM
Ah, OK then. Must have been something I did ::)
Title: Re: Float Post Around Poster Info Using CSS
Post by: trenchteam on August 10, 2011, 04:05:39 AM
I started a post here: http://www.simplemachines.org/community/index.php?topic=445939.0

I was led here to this post. I was interested Mr. Grumpy in creating organizing my display profile similar to the ones you use in your themes?
Title: Re: Float Post Around Poster Info Using CSS
Post by: Kindred on August 10, 2011, 11:21:48 AM
I like this...    I am going to suggest that we steal this for the next SMF release. :P
Title: Re: Float Post Around Poster Info Using CSS
Post by: Hj Ahmad Rasyid Hj Ismail on August 13, 2011, 06:32:36 AM
Just a note for MrGrumpy, I followed your step by step above (http://www.simplemachines.org/community/index.php?topic=445250.msg3127879#msg3127879) but cannot achieve the shown result. Are there any missing steps?

EDITED: I try on a fresh forum and it works. Might have been jumbled up with other mods.
Title: Re: Float Post Around Poster Info Using CSS
Post by: DragoN_PT on August 15, 2011, 08:52:57 PM
Nice tip.

I used the MrGrumpy code and steps and then added the SunKing tips. Now i get an error when i try to open an topic..

The error is in this line:

if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])


Any help?
Title: Re: Float Post Around Poster Info Using CSS
Post by: [unplugged] on August 16, 2011, 12:07:45 AM
What exactly is the error you are receiving?
Title: Re: Float Post Around Poster Info Using CSS
Post by: DragoN_PT on August 16, 2011, 12:35:10 AM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg811.imageshack.us%2Fimg811%2F3728%2Funled1ic.png&hash=249d0510cb0c31b6ef0b73039a48214228507237)


Its in portuguese but maybe u can see what u want. If u need any translation just ask and i will do it.
Title: Re: Float Post Around Poster Info Using CSS
Post by: [unplugged] on August 16, 2011, 12:40:39 AM
Now that I think about it, it would be easier if you could just attach the file. :D

It may be something as simple as just needing the ; at the end of the line above if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
But if you attach the file, I can better check it.
Title: Re: Float Post Around Poster Info Using CSS
Post by: DragoN_PT on August 16, 2011, 12:53:22 AM
Ok, here is the file.

http://www.4shared.com/file/gLFWgDQg/Displaytemplate.html

Cant attach file here.  :(
Title: Re: Float Post Around Poster Info Using CSS
Post by: [unplugged] on August 16, 2011, 01:00:20 AM
Just above that line you had this:echo '
</ul>
</div>;
which is missing the single quote '

It should be echo '
</ul>
</div>';


Always the little things...lol

And what happened to the attachments option???? It has mysteriously vanished...
Title: Re: Float Post Around Poster Info Using CSS
Post by: DragoN_PT on August 16, 2011, 01:07:04 AM
Quote from: SunKing on August 16, 2011, 01:00:20 AM
Always the little things...lol
I had to look into the code 3 or 4 times to get the error..  :P
Quote from: SunKing on August 16, 2011, 01:00:20 AM
And what happened to the attachments option???? It has mysteriously vanished...
Maybe some mod i installed or any previous edit.. Im only starting to mess with the scripts. But is something important? And if soo, can u fix it?
Title: Re: Float Post Around Poster Info Using CSS
Post by: [unplugged] on August 16, 2011, 01:07:59 AM
The attachment issue is something here at SMF. Nothing I can fix. ;)
Title: Re: Float Post Around Poster Info Using CSS
Post by: DragoN_PT on August 16, 2011, 01:13:52 AM
w00t   :P
Lol.. fail.. ma bad  8)

Ty for all the help.
Title: Re: Float Post Around Poster Info Using CSS
Post by: Hj Ahmad Rasyid Hj Ismail on September 13, 2012, 05:32:18 AM
@DragoN_SAMP, since this is old, I hope you have resolved your problem. The OP only modifies the css file. If you modify the Display.template.php as suggested by others here, may be you should try to do it again step by step.
Title: Re: Float Post Around Poster Info Using CSS
Post by: shadav on July 11, 2020, 12:00:13 AM
thanks for this btw :)

going off of MrGrumpy's edits you'll need to also edit PersonalMessage.template.php

find, copy, and remove
<div class="poster">
<a id="msg', $message['id'], '"></a>
<h4>';

// Show online and offline buttons?
if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
echo '
<img src="', $message['member']['online']['image_href'], '" alt="', $message['member']['online']['text'], '" />';

echo '
', $message['member']['link'], '
</h4>
<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';

// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
echo '
<li class="title">', $message['member']['title'], '</li>';

// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
<li class="membergroup">', $message['member']['group'], '</li>';

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="postgroup">', $message['member']['post_group'], '</li>';
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<li class="avatar">
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
', $message['member']['avatar']['image'], '
</a>
</li>';

// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';

// Is karma display enabled?  Total or +/-?
if ($modSettings['karmaMode'] == '1')
echo '
<li class="karma">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
elseif ($modSettings['karmaMode'] == '2')
echo '
<li class="karma">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<li class="karma_allow">
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';f=', $context['folder'], ';start=', $context['start'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pm=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a> <a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';f=', $context['folder'], ';start=', $context['start'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pm=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
</li>';

// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
echo '
<li class="gender">', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';

// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
<li class="blurb">', $message['member']['blurb'], '</li>';

// Any custom fields to show as icons?
if (!empty($message['member']['custom_fields']))
{
$shown = false;
foreach ($message['member']['custom_fields'] as $custom)
{
if ($custom['placement'] != 1 || empty($custom['value']))
continue;
if (empty($shown))
{
$shown = true;
echo '
<li class="im_icons">
<ul>';
}
echo '
<li>', $custom['value'], '</li>';
}
if ($shown)
echo '
</ul>
</li>';
}

// This shows the popular messaging icons.
if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
echo '
<li class="im_icons">
<ul>', !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ? '
<li>' . $message['member']['icq']['link'] . '</li>' : '', !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ? '
<li>' . $message['member']['msn']['link'] . '</li>' : '', !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ? '
<li>' . $message['member']['aim']['link'] . '</li>' : '', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '
<li>' . $message['member']['yim']['link'] . '</li>' : '', '
</ul>
</li>';

// Show the profile, website, email address, and personal message buttons.
if ($settings['show_profile_buttons'])
{
echo '
<li class="profile">
<ul>';

// Show the profile button
echo '
<li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" />' : $txt['view_profile']), '</a></li>';

// Don't show an icon if they haven't specified a website.
if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
echo '
<li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $message['member']['website']['title'] . '" />' : $txt['www']), '</a></li>';

// Don't show the email address if they want it hidden.
if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
echo '
<li><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $message['member']['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';

// Since we know this person isn't a guest, you *can* message them.
if ($context['can_send_pm'])
echo '
<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';

echo '
</ul>
</li>';
}

// Any custom fields for standard placement?
if (!empty($message['member']['custom_fields']))
{
foreach ($message['member']['custom_fields'] as $custom)
if (empty($custom['placement']) || empty($custom['value']))
echo '
<li class="custom">', $custom['title'], ': ', $custom['value'], '</li>';
}

// Are we showing the warning status?
if ($message['member']['can_see_warning'])
echo '
<li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<img src="', $settings['images_url'], '/warning_', $message['member']['warning_status'], '.gif" alt="', $txt['user_warn_' . $message['member']['warning_status']], '" />', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
}

// Done with the information about the poster... on to the post itself.
echo '
</ul>
</div>

find
<div class="post">
and add after the code you copied above

now to fix the report to admin "button"
find and remove
<div class="smalltext reportlinks">
', (!empty($modSettings['enableReportPM']) && $context['folder'] != 'sent' ? '<div class="righttext"><a href="' . $scripturl . '?action=pm;sa=report;l=' . $context['current_label_id'] . ';pmsg=' . $message['id'] . '">' . $txt['pm_report_to_admin'] . '</a></div>' : '');

echo '
</div>

find
<div class="moderatorbar">
</div>

replace
<div class="moderatorbar">
<div class="smalltext reportlinks">
', (!empty($modSettings['enableReportPM']) && $context['folder'] != 'sent' ? '<div class="righttext"><a href="' . $scripturl . '?action=pm;sa=report;l=' . $context['current_label_id'] . ';pmsg=' . $message['id'] . '">' . $txt['pm_report_to_admin'] . '</a></div>' : '');

echo '
</div>
</div>