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.

fullmoonya

this is a nice mod but i have problem when viewing it on i.e. :( take a look at the image i attached below.
do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

fullmoonya

do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

fullmoonya

i hope this mod be updated and make this supported also in internet explorer.
do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

TheListener

The mod should work just fine on 2.0.2

Use the mod emulation link in my signature.

As for asking the mods author to make it work on IE  ::)

fullmoonya

ok now. never mind the support thing. i fixed already fixed it by myself.
do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

LT07

WARNING

Installed this on 2.0.2 using emulation for 2.0
Default curve is fine, my other themes are trashed.
There is no uninstall available.

Hj Ahmad Rasyid Hj Ismail

Quote from: LT07 on January 18, 2012, 04:41:07 AM
WARNING

Installed this on 2.0.2 using emulation for 2.0
Default curve is fine, my other themes are trashed.
There is no uninstall available.

This mod is only meant for the default curve theme. Other than that theme, manual modifications are needed.

xDrac

I use a custom theme, however it doesn't seem to be working on any theme actually.
It fails a lot of tests when I emulate it to work.
I want this to work on my custom theme, I use SMF 2.0.2.
Lineage 3 Forum
Official Lineage3 Online Forums

Hj Ahmad Rasyid Hj Ismail

Since this mod only affects Display.template.php and index.css, kindly give me the name of the theme and provide me with the files.

A link to your site will be good, if you don't mind.

By the way, I will only help to install this mod for your custom theme but will not make it the same as you like. What you want if specific might need some special "care & attention".

xDrac

Hm, well these http://lineage3-online.com/index.php are my forums.
I use an edited version of Gearbox (doesnt have a display.template though)
What would I need to edit and where and which files do you need from me?
Do you happen to have either MSN or Skype?
Lineage 3 Forum
Official Lineage3 Online Forums

Hj Ahmad Rasyid Hj Ismail

#30
Copy Display.template.php from default to that theme folder. You can use SMF to parse what code to be changed in that file. You can also post a copy of Display.template.php here and index.css for both the default and your preferred theme.

Be reminded that this is a free service and do not expect it to be done quickly.

xDrac

Quote from: No More Mr Nice Sully on October 15, 2012, 11:16:07 PM
Copy Display.template.php from default to that theme folder. You can use SMF to parse what code to be changed in that file. You can also post a copy of Display.template.php here and index.css for both the default and your preferred theme.

Be reminded that this is a free service and do not expect it to be done quickly.
I took the time and added the files you asked for as an attachment, thank you very much for helping I very very much appreciate it since I lack the proper skill to do these things myself :/
Lineage 3 Forum
Official Lineage3 Online Forums

Matthew K.

Quote from: xDrac on October 16, 2012, 11:29:04 AM
Quote from: No More Mr Nice Sully on October 15, 2012, 11:16:07 PM
Copy Display.template.php from default to that theme folder. You can use SMF to parse what code to be changed in that file. You can also post a copy of Display.template.php here and index.css for both the default and your preferred theme.

Be reminded that this is a free service and do not expect it to be done quickly.
I took the time and added the files you asked for as an attachment, thank you very much for helping I very very much appreciate it since I lack the proper skill to do these things myself :/

Removed duplicate post for you.

xDrac

Lineage 3 Forum
Official Lineage3 Online Forums

Hj Ahmad Rasyid Hj Ismail

I am working on it on my free time. I have finished with modifying your Display.template.php file but not with your index.css files. Unfortunately, I will be busy until next week. Sorry for any inconveniences.

xDrac

Quote from: No More Mr Nice Sully on October 18, 2012, 02:07:14 AM
I am working on it on my free time. I have finished with modifying your Display.template.php file but not with your index.css files. Unfortunately, I will be busy until next week. Sorry for any inconveniences.

Alright, thank you!
Lineage 3 Forum
Official Lineage3 Online Forums

Hj Ahmad Rasyid Hj Ismail

As a note, it will be a little bit difficult for me to get it right on your custom theme. Can you provide me with its name so I can have a test before on my localhost?

I am also in the process of upgrading this mode so that user can have a choice whether to enable it or not at anytime. Most probably it will not be user personal settings (via their profile) but admin settings.

If there is any request, I will try to make available for both.

xDrac

Lineage 3 Forum
Official Lineage3 Online Forums

Hj Ahmad Rasyid Hj Ismail

Alright. I'll take a note on that. I will update you with the latest development soonest I get my hand into the files again.

xDrac

Lineage 3 Forum
Official Lineage3 Online Forums

xDrac

Lineage 3 Forum
Official Lineage3 Online Forums

Hj Ahmad Rasyid Hj Ismail

Sorry. I haven't touch the css files yet. I may only be able to look into it in a day or two.

xDrac

Lineage 3 Forum
Official Lineage3 Online Forums

xDrac

Lineage 3 Forum
Official Lineage3 Online Forums

Hj Ahmad Rasyid Hj Ismail

I will be doing the testing today and hopefully can post the modified files soon. Thank you for waiting. I hope you are not in a hurry. I will keep you updated soonest I finished this.

xDrac

Lineage 3 Forum
Official Lineage3 Online Forums

Hj Ahmad Rasyid Hj Ismail

Updated. A cleaner (but not so clean code). User can now choose to turn it off and on after its installation. BSD License added. You may help to make it a better mod.

Hj Ahmad Rasyid Hj Ismail

#47
Upgraded to version 1.2.1 eliminating all html errors (as for now). Code however need to beautify to work hand in hand with other mods.

Hj Ahmad Rasyid Hj Ismail

To do list:
1. Move user avatar layout from right to left.
2. Allow user to choose this layout instead of just forum admin.
3. Support for Quick Reply Reposition mod.

Realinfo

Is it possible that for mobile user this MOD get activated and for desktop user default style

As for mobile user we need to give more post area

Hj Ahmad Rasyid Hj Ismail

Not really. The best way to support mobile user is via using css media query tricks. Of course, minor modifications need to be done with display template as well.

I am trying to create a mod that can do responsive theme here: http://www.simplemachines.org/community/index.php?topic=528524.0 but I don't get any feedback or support. So I guess I'll be dropping most of my ideas. You can refer to that post and its link on how to do the trick.

You can also try the attached mod as well. It is not yet approved and it is different from this one, so use with care.

Burke ♞ Knight

ahrasis, how would we resize the avatar just for in the posts?
I tried this mod on a site, and the avatar is set too big for it, but messes things up, if I shrink them down in avatar settings.

Hj Ahmad Rasyid Hj Ismail

There is another mod of mine that deals with avatar in various places. You can use that one as this mod does not actually change the avatar default size, uploaded, link or otherwise.

Josh4596

Could you tell me where to look to change the way mod displays things? using the attached picture for reference I'd like to get rid of that blue bar or change it with the green bar from the current theme and I'd like to attempt to move the avatar/posts all the way to the left with the name & star icons to the right of the avatar. I can try to make these changes myself but have no idea where to look

Hj Ahmad Rasyid Hj Ismail

Only in two places. Display.template.php and index.css. The mod is straigth forward enough as I remember it.

Advertisement: