Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Hj Ahmad Rasyid Hj Ismail on February 11, 2011, 09:32:48 AM

Title: MPITT - Move Poster Info To Top (VB Postbit Style)
Post by: Hj Ahmad Rasyid Hj Ismail on February 11, 2011, 09:32:48 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2924)

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. ;)

(https://www.simplemachines.org/community/index.php?action=dlattach;topic=421476.0;attach=233185;image)
(https://www.simplemachines.org/community/index.php?action=dlattach;topic=421476.0;attach=233187;image)
Title: Re: Curve VB Profile - User Information On Top In Post / Display Page
Post by: Matthew K. on February 14, 2011, 11:55:20 AM
Nice work ahrasis
Title: Re: Curve VB Profile - User Information On Top In Post / Display Page
Post by: trebul on February 15, 2011, 08:01:21 PM
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;
}
Title: Re: Curve VB Profile - User Information On Top In Post / Display Page
Post by: Hj Ahmad Rasyid Hj Ismail on April 10, 2011, 10:15:08 AM
A really nice adjustment. Will consider that changes in the future update.
Title: Re: Curve VB Profile - User Information On Top In Post / Display Page
Post by: anakmacan on June 09, 2011, 08:41:52 PM
Cool, im going to use this in m new forum (if i use smf 2 instead of 1.1.x).
Title: Re: Curve VB Profile - User Information On Top In Post / Display Page
Post by: mandi007 on July 02, 2011, 07:34:06 AM
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 .
Title: Re: Curve VB Profile - User Information On Top In Post / Display Page
Post by: trebul on July 19, 2011, 01:23:09 PM
Can you attach your index.css and the display.template.php I can try to take a look for you.
Title: Re: VB Styling - Poster Info on Top [Updated to 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail 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.
Title: Re: VB Styling - Poster Info on Top [Updated to 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail on July 31, 2011, 07:20:38 AM
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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: uninvited13th on August 15, 2011, 05:17:06 AM
how to have the icon?? in quote, modify, remove, etc..??
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail on August 15, 2011, 09:24:06 AM
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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: cosmicxxx on September 13, 2011, 06:56:16 AM
thanks trebul... really great adjustment
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: SuperZambezi on September 23, 2011, 03:27:33 AM
Looks great, but will there be an update for 2.0.1?

Thanks.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail on September 23, 2011, 04:28:29 PM
It should work just fine with 2.0.1. You can emulate using package manager or wait for the update.
Title: Help?
Post by: Mikirin on October 10, 2011, 08:10:48 PM
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 (http://www.simplemachines.org/community/index.php?topic=455449.msg3182446#msg3182446), 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?
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: InfoStrides on October 13, 2011, 06:45:27 AM
Good mod. I like it.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: meetdilip on October 14, 2011, 04:41:50 PM
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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: meetdilip on November 19, 2011, 10:07:53 AM
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
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: DecisiveGamer on November 29, 2011, 10:36:18 PM
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
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: LT07 on December 22, 2011, 11:02:11 AM
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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: fullmoonya on January 08, 2012, 11:48:12 AM
this is a nice mod but i have problem when viewing it on i.e. :( take a look at the image i attached below.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: fullmoonya on January 09, 2012, 09:10:50 AM
bump.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: fullmoonya on January 11, 2012, 12:35:27 AM
i hope this mod be updated and make this supported also in internet explorer.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: TheListener on January 11, 2012, 12:48:06 AM
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  ::)
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: fullmoonya on January 11, 2012, 02:42:35 AM
ok now. never mind the support thing. i fixed already fixed it by myself.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: 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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail on September 03, 2012, 12:56:00 AM
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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: xDrac on October 14, 2012, 01:56:50 PM
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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail on October 14, 2012, 01:59:54 PM
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".
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: xDrac on October 14, 2012, 02:18:48 PM
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?
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail 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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: 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 :/
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Matthew K. on October 16, 2012, 03:46:26 PM
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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: xDrac on October 17, 2012, 01:56:34 PM
Thanks :x So is there any news on this? :)
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail 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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: xDrac on October 19, 2012, 09:54:10 AM
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!
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail on October 19, 2012, 10:41:50 AM
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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: xDrac on October 19, 2012, 10:43:03 AM
Its based on Gearbox
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail on October 19, 2012, 10:44:02 AM
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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: xDrac on October 19, 2012, 10:44:44 AM
thanks a lot!
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: xDrac on October 22, 2012, 09:30:03 AM
How is it going?
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail on October 22, 2012, 07:40:54 PM
Sorry. I haven't touch the css files yet. I may only be able to look into it in a day or two.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: xDrac on October 22, 2012, 07:41:41 PM
Alright, thanks for the update :)
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: xDrac on October 27, 2012, 06:43:04 AM
Any progress?
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: Hj Ahmad Rasyid Hj Ismail on October 28, 2012, 10:50:31 PM
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.
Title: Re: Poster Info To Top [Updated only for 2.0 Gold]
Post by: xDrac on October 29, 2012, 03:12:53 AM
Alright, thanks for the update!
Title: Re: RePIAP: Reposition Poster Info Above Post (VB Style)
Post by: Hj Ahmad Rasyid Hj Ismail on July 14, 2014, 06:30:53 AM
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.
Title: Re: MPITT - Move Poster Info To Top (VB Postbit Style)
Post by: Hj Ahmad Rasyid Hj Ismail on July 14, 2014, 07:09:59 PM
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.
Title: Re: MPITT - Move Poster Info To Top (VB Postbit Style)
Post by: Hj Ahmad Rasyid Hj Ismail on August 05, 2014, 11:11:21 AM
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.
Title: Re: MPITT - Move Poster Info To Top (VB Postbit Style)
Post by: Realinfo on October 14, 2014, 02:43:32 AM
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
Title: Re: MPITT - Move Poster Info To Top (VB Postbit Style)
Post by: Hj Ahmad Rasyid Hj Ismail on October 14, 2014, 08:42:58 AM
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.
Title: Re: MPITT - Move Poster Info To Top (VB Postbit Style)
Post by: Burke ♞ Knight on March 13, 2015, 09:54:32 PM
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.
Title: Re: MPITT - Move Poster Info To Top (VB Postbit Style)
Post by: Hj Ahmad Rasyid Hj Ismail on March 20, 2015, 12:10:26 PM
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.
Title: Re: MPITT - Move Poster Info To Top (VB Postbit Style)
Post by: Josh4596 on April 08, 2015, 09:50:26 PM
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
Title: Re: MPITT - Move Poster Info To Top (VB Postbit Style)
Post by: Hj Ahmad Rasyid Hj Ismail on April 13, 2015, 07:35:37 AM
Only in two places. Display.template.php and index.css. The mod is straigth forward enough as I remember it.