Hi,
I have a forum named Post4VPS Forum at Post4VPS.com
I have installed Square theme there and i have seen a good feature in MybbPro theme
which shows total PMs and Unread PMs when we move our cursor near Private Messages
but Square theme lack this feature
I wants to have That feature in square theme also,then it would look something like this
So anyone knows how can I do that ?
Hello HMR
here is the code you need to add in your header_welcomeblock_member
{$lang->welcome_pms} {$lang->welcome_pms_usage}
it ll show like Unread #, Total #
Hope it is the thing you are looking for
Yeah but its not seems likely to be like what I said
Its looking like this
I only give you code but you need to modify the stylesheet yourself.
Fine here is the full working code you need to insert
in square.css
.userpmlist {
display: inline;
position: relative;
}
.userpmlist:hover:after{
background: #333;
background: rgba(0,0,0,.8);
border-radius: 5px;
bottom: 26px;
color: #fff;
content: attr(title);
left: 20%;
padding: 5px 15px;
position: absolute;
z-index: 98;
width: 120px;
}
.userpmlist:hover:before{
border: solid;
border-color: #333 transparent;
border-width: 6px 6px 0 6px;
bottom: 20px;
content: "";
left: 50%;
position: absolute;
z-index: 99;
}
in header_welcomeblock_member modify it like below
<a href="{$mybb->settings['bburl']}/private.php" title="{$lang->welcome_pms_usage}" class="userpmlist"><i original-title="" class="fa fa-envelope fa-fw"></i> {$lang->welcome_pms}</a>
I dont have square theme so it may be different in your theme's templates. Please let me know if it is working.
it was going good but after some time i started seeing it like this
This variable will show you the number of unread pms
{$mybb->user['pms_unread']}
I am not sure where this goes in the square theme so have a look and if you can't figure it out pm me an admin account and I will add it for you
Try:
<a href="{$mybb->settings['bburl']}/private.php" title="{$lang->welcome_pms_usage}" class="userpmlist"><i original-title="" class="fa fa-envelope fa-fw"></i> {$lang->welcome_pms} {$mybb->user['pms_unread']}</a>
what u said,Its result is this
which is still not same as what i had asked
Sorry I misread this. Isn't that what you have now how you want it?
I posted different because same style sheet as other boards, not good idea but if you still want same as the above picture i ll try to make it same like that
Here is that just update the style sheet and see if it is working.
.userpmlist {
display: inline;
position: relative;
}
.userpmlist:hover:after{
background: #333;
background: rgba(0,0,0,.8);
border-radius: 5px;
color: #fff;
content: attr(datauserspm);
padding: 3px;
position: absolute;
top: -5px;
left: 45px;
width: 138px;
z-index: 100;
}
.userpmlist:hover:before{
content:'';
display:block;
width:0;
height:1;
position:absolute;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
border-right:8px solid black;
left:38px;
top:.9px;
}
I optimized it to match with your theme and updated header_welcomeblock_members as below
<a href="{$mybb->settings['bburl']}/private.php" datauserspm="{$lang->welcome_pms_usage}" title="" class="userpmlist"><i original-title="" class="fa fa-envelope fa-fw"></i> {$lang->welcome_pms}</a>
I just founded a bug by using title="{$lang->welcome_pms_usage}" as it ill show a default title box after two seconds of hover so is used datauserspm for that and now it is working perfectly.
and the result of what u have given is this
still not fixed