Snippets for phpBB3
-
dmzx
- Founder

-
Status:
Offline
- User theme: Dark
- Posts: 6365
- Joined: Jan 13th, '14, 20:45
Postby dmzx » Apr 5th, '14, 08:10
Post
by dmzx »
MChat Avatar Hover
by Sniper_E
Open ./mchat.php
Find This may be a partial find and not the whole line Code: Select all
$mchat_avatar = $row['user_avatar'] ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 40 : (40 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 40 : (40 / $row['user_avatar_width']) * $row['user_avatar_height']) : '';
Add after Add these lines on a new blank line after the preceding line(s) to find Code: Select all
$mchat_full_avatar = get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']);
Find
(4) times and After add line (4) times in mchat.php file....
Find This may be a partial find and not the whole line Code: Select all
'MCHAT_USER_AVATAR' => $mchat_avatar,
Add after Add these lines on a new blank line after the preceding line(s) to find Code: Select all
'MCHAT_USER_FULL_AVATAR' => $mchat_full_avatar,
Find
(4) times and After add line (4) times in mchat.php file....
Open ./styles/prosilver/template/mchat_avatars.html
Find This may be a partial find and not the whole line Code: Select all
<div class="mChatAvatars"><!-- IF mchatrow.U_VIEWPROFILE --><a href="{mchatrow.U_VIEWPROFILE}" title="{L_READ_PROFILE}"><!-- ENDIF --><!-- IF mchatrow.MCHAT_USER_AVATAR -->{mchatrow.MCHAT_USER_AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" width="40px;" height="40px;" alt="" /><!-- ENDIF --><!-- IF mchatrow.U_VIEWPROFILE --></a><!-- ENDIF -->
In line add after Code: Select all
<span>{mchatrow.MCHAT_USER_FULL_AVATAR}</span>
Open ./styles/prosilver/theme/mchat.css
Find This may be a partial find and not the whole line Code: Select all
.mChatAvatars {
float: left;
padding-right: 5px;
}
Add after Add these lines on a new blank line after the preceding line(s) to find Code: Select all
.mChatAvatars span {
left: 0px;
display: none;
color: #FFF;
text-decoration: none;
}
.mChatAvatars span img {
border-width: 0;
}
div.mChatAvatars:hover span {
position: absolute;
display: block;
left: 80px;
padding: 3px 3px 0;
background-color: #FFFFFF;
border: 1px solid #11A3EA;
}
Refresh templates and theme, refresh browser
-
clight77
- Donator

-
Status:
Offline
- User theme: Dark
- Posts: 499
- Joined: Sep 24th, '15, 14:23
Postby clight77 » Oct 2nd, '15, 20:37
Post
by clight77 »
Cool :)
Is there a way to make the chat message on hover enlarge ?
Thanks :)
Not a biggy by the way just wondering...
-
Helios
- Users

-
Status:
Offline
- User theme: Dark
- Posts: 14
- Joined: Sep 27th, '15, 22:27
Postby Helios » Oct 3rd, '15, 17:44
Post
by Helios »
Sorry,my file mchat.php don't is the same why
this items are missing
Last edited by Helios on Oct 3rd, '15, 17:44, edited 1 time in total.
-
martin
- Admin

-
Status:
Offline
- User theme: Dark
- Posts: 5060
- Joined: Apr 6th, '14, 14:12
Postby martin » Oct 3rd, '15, 18:32
Post
by martin »
What mchat version you using ?
-
Helios
- Users

-
Status:
Offline
- User theme: Dark
- Posts: 14
- Joined: Sep 27th, '15, 22:27
Postby Helios » Oct 3rd, '15, 22:24
Post
by Helios »
martin wrote:what mchat version you using ?
the newest version 0.1.4 and this are missing
Open ./mchat.php
Find This may be a partial find and not the whole line
Code: Select all
$mchat_avatar = $row['user_avatar'] ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 40 : (40 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 40 : (40 / $row['user_avatar_width']) * $row['user_avatar_height']) : '';
Add after Add these lines on a new blank line after the preceding line(s) to find
Code: Select all
$mchat_full_avatar = get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']);
Find (4) times and After add line (4) times in mchat.php file....
Find This may be a partial find and not the whole line
Code: Select all
'MCHAT_USER_AVATAR' => $mchat_avatar,
Add after Add these lines on a new blank line after the preceding line(s) to find
Code: Select all
'MCHAT_USER_FULL_AVATAR' => $mchat_full_avatar,
sorry, this is for phpbb3 not 3.1
Last edited by Helios on Oct 4th, '15, 18:51, edited 3 times in total.
-
Sniper_E
- VIP

-
Status:
Offline
- User theme: Dark
- Posts: 1151
- Joined: Oct 14th, '14, 17:01
Postby Sniper_E » Nov 24th, '15, 20:39
Post
by Sniper_E »
Helios wrote:sorry, this is for phpbb3 not 3.1
mChat 0.1.7 Avatar Hover - phpBB 3.1*
Open: ext/dmzx/mchat/core/render_helper.php
Find This may be a partial find and not the whole line Code: Select all
$mchat_avatar = $row['user_avatar'] ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 40 : (40 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 40 : (40 / $row['user_avatar_width']) * $row['user_avatar_height']) : '';
Add after Add these lines on a new blank line after the preceding line(s) to find Code: Select all
$mchat_full_avatar = get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']);
Find
(4) times and After add line (4) times in render_helper.php file....
Find This may be a partial find and not the whole line Code: Select all
'MCHAT_USER_AVATAR' => $mchat_avatar,
Add after Add these lines on a new blank line after the preceding line(s) to find Code: Select all
'MCHAT_USER_FULL_AVATAR' => $mchat_full_avatar,
Find
(4) times and After add line (4) times in mchat.php file....
Open: ext/dmz/mchat/styles/prosilver/template/mchat_avatars.html
Find This may be a partial find and not the whole line Code: Select all
<div class="mChatAvatars"><!-- IF mchatrow.U_VIEWPROFILE --><a href="{mchatrow.U_VIEWPROFILE}" title="{L_READ_PROFILE}"><!-- ENDIF --><!-- IF mchatrow.MCHAT_USER_AVATAR -->{mchatrow.MCHAT_USER_AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" width="40px;" height="40px;" alt="" /><!-- ENDIF --><!-- IF mchatrow.U_VIEWPROFILE --></a><!-- ENDIF -->
In line add after Code: Select all
<span><!-- IF mchatrow.MCHAT_USER_FULL_AVATAR -->{mchatrow.MCHAT_USER_FULL_AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF --></span>
Open: ext/dmz/mchat/styles/prosilver/theme/mchat.css
Find This may be a partial find and not the whole line Code: Select all
.mChatAvatars {
float: left;
padding-right: 5px;
}
Add after Add these lines on a new blank line after the preceding line(s) to find Code: Select all
.mChatAvatars span {
left: 0px;
display: none;
color: #FFF;
text-decoration: none;
}
.mChatAvatars span img {
border-width: 0;
}
div.mChatAvatars:hover span {
position: absolute;
display: block;
left: 80px;
padding: 3px 3px 0;
background-color: #FFFFFF;
border: 1px solid #11A3EA;
}
Clear cache in ACP, refresh browser.
Last edited by Sniper_E on Nov 24th, '15, 20:41, edited 1 time in total.
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™