MPITT - Move Poster Info To Top (VB Postbit Style)

Started by Hj Ahmad Rasyid Hj Ismail, February 11, 2011, 09:32:48 AM

Previous topic - Next topic

Hj Ahmad Rasyid Hj Ismail

Link to Mod

MPITT - Move Poster Info To Top (VB Postbit Style)

1. Please do your own backup though every installation is backed up automatically.
2. This mod will try to reposition poster info to above post in a post page.
3. Previously it was called VB Styling as VB used to have that style in its post page.
4. This mod's code has been cleaned and updated recently to accommodate interested users.
5. Once installed, you can turn this mod on in your forum after installation as follows:
    a. Go to Admin CP > Configurations > Miscellaneous
    b. Select / tick Reposition Poster Info Above Post.
    c. Save your configuration.
6. You may also turn it off if you don't like or decided to adjust its css and code accordingly.
7. You can test it in lower SMF 2.0 version too as it should work just fine. ;)


Thank you for using it.


Yours friendly,
Abu Fahim Ismail.

BSD License. Feel free to modify accordingly but keep author's link if it is in there somewhere. ;)




trebul

Thank you very much for this mod. I made a few adjustments of my own. If you want to know how to do it I'll try my best to explain.

Once this mod is applied the following edits can be made.

In the Display.template.php

Find and cut

<div class="poster">
<ul class="reset smalltext">';

//Show there location
if (!empty($message['member']['location']))
echo '
<li class="postcount">', $txt['location'], ': ', $message['member']['location'], '</li>';

//Show date registered
echo  '
<li class="postcount">', $txt['date_registered'], ':  ', timeformat($message['member']['registered_timestamp'] ,'%b %Y'), '</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>';

// 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>';



Paste after the following

<div class="posterrr">
<ul class="reset smalltext">';


Find

<div class="poster">
<ul class="reset smalltext">';

//Show there location


Delete

<div class="poster">
<ul class="reset smalltext">';



Find

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




Delete

</ul>
</div>



Find

// Since we know this person isn't a guest, you *can* message them.
if ($context['can_send_pm'])
echo '
<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>';
echo '
</li>';
}

echo '
</ul>
</div>


Replace the last div with

</div>';


In the themes index.css

Find

.poster
{
   margin: 0 0.2em 0.5em 0;
   float: left;
   text-align: center;
}


Remove

text-align: center;

Find

.postarea div.flow_hidden
{
/*   width: 100%; */
border-top: 1px #ccc dashed;
border-bottom: 1px #ccc dashed;
padding: 0 5px 0 0;
}


Replace with

.postarea div.flow_hidden
{
/*   width: 100%; */
border-top: 1px #ccc solid;
border-bottom: 1px #ccc solid;
padding: 0 5px 0 0;
}


Find

.posterlr
{
   margin: 0.2em 0 0.5em 0;
   vertical-align: bottom;
   float: left;
   width: 30%;
}
.posterrr
{
   margin: 0 0.2em 0.5em 0;
   float: right;
   text-align: right;
   width: 30%;
}


Replace with

.posterlr
{
   margin: 0.2em 0 0.5em 0;
   vertical-align: bottom;
   float: left;
   width: 60%;
}
.posterrr
{
   margin: 0 0.2em 0.5em 0;
   float: right;
   text-align: right;
}

      Love talking about pets?
      Visit a friendly pet forum!

      Looking for tips to running a forum?
      Trebul's community guide


         

Hj Ahmad Rasyid Hj Ismail

A really nice adjustment. Will consider that changes in the future update.

anakmacan

Cool, im going to use this in m new forum (if i use smf 2 instead of 1.1.x).

mandi007

please any one help me i have made the adjustment as trebul said ----------- everything is fine as trebul said but one thing is the avatar is not showing in wright place .so please help to correct it. i have attached the look after the change is made please help me to correct it.

the avatar has gone to opposite side .

trebul

Can you attach your index.css and the display.template.php I can try to take a look for you.

      Love talking about pets?
      Visit a friendly pet forum!

      Looking for tips to running a forum?
      Trebul's community guide


         

Hj Ahmad Rasyid Hj Ismail

I have it updated to make it compatible with 2.0 Gold. However, I have played around with its css/styling but haven't update the current mod yet. I'll package it soon, hopefully before tonight.

Hj Ahmad Rasyid Hj Ismail

Quote from: ahrasis on July 30, 2011, 06:26:39 AM
I have it updated to make it compatible with 2.0 Gold. However, I have played around with its css/styling but haven't update the current mod yet. I'll package it soon, hopefully before tonight.
It's done. A new better look for this mod. I am uploading it now. I hope you all like it.

uninvited13th

how to have the icon?? in quote, modify, remove, etc..??

Hj Ahmad Rasyid Hj Ismail

If you need to have the icon back, find in index.css:

ul.quickbuttons a:hover
{
color: #a70;
}

Replace it with:

ul.quickbuttons a:hover
{
color: #a70;
}
ul.quickbuttons li.quote_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 0;
}
ul.quickbuttons li.remove_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -30px;
}
ul.quickbuttons li.modify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -60px;
}
ul.quickbuttons li.approve_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -90px;
}
ul.quickbuttons li.restore_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -120px;
}
ul.quickbuttons li.split_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -150px;
}
ul.quickbuttons li.reply_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -180px;
}
ul.quickbuttons li.reply_all_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -180px;
}
ul.quickbuttons li.notify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
}

You need some adjustment to make it back inline.

Note: This mod is currently being updated for better css styling.

cosmicxxx


SuperZambezi

Looks great, but will there be an update for 2.0.1?

Thanks.

Hj Ahmad Rasyid Hj Ismail

It should work just fine with 2.0.1. You can emulate using package manager or wait for the update.

Mikirin

#14
I have an issue with the avatars, is it possible to make them any taller without that dumb resize?
I also tried trebul's adjustments, but it looks no different, is it my theme?
Thank you.

Edit: I'm also attempting this, and since I plan on using themes not based on Curve I'm worried that this mod will not work. Is there a way to just edit the template to my desired effect?


meetdilip

Thanks for this great mod. I wish to change the user bar to top as I use a side bar for latest posts in my forum.  But can we have provision for user to select the user info bar position ? Currently it is a global setting and someone who wish a different position than default may feel uneasy.

meetdilip

I discovered , that inline edit on my site is not working,

i did some digging and found that this was due to the installation of this mod  -  Poster info on top

I am using a custom theme, so i had to do the installation manually, i must  have messed up some thing while editing because when i used the non modified display.template.php , the inline edit works, but not with the modified one.

i am attaching both, kindly help me find the messed up codes in the template. ( Modified one needs fixing )

FYI,
Running SMV 2.0.1 with Royal flush theme

DecisiveGamer

#18
Would it be possible to have this updated for SMF 2.0.1? That would be grand, and I'd really appreciate it.

EIDT:
No? Of course not! :D

LT07

please please please please please please please please please please fix this mod to work on 2.0.1

I've searched everywhere for a way to make user profiles appear above the posts instead of on the left, I've seen your forum and that's exactly how I want mine to work, I can't change my forum back to 2.0 because of other modifications I'm using.

Advertisement: