mchat addons,display avatars,smilie scroll box,who ..

Guides & Snippets for phpBB3. Try the Snippets here and share Your own Snippets
There is no support here! Only Read Access!
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 848
Joined: 05 Mar 2010, 01:10
BBCodes: 2000
Favourite BBCode: p**n tube
Favourite MOD: Non of Stokers

mchat addons,display avatars,smilie scroll box,who ..

Post by Steve »

is chating to the right of the chat box.
mchat version 1.2.17
Display users avatar in the chat.
[spoiler]
RMcGirr83 » 11 Jan 2010, 02:15 wrote:
OPEN

mchat.php
find:

Code: Select all

include($phpbb_root_path . 'includes/functions_mchat.' . $phpEx);
add after:

Code: Select all

//  avatar
if (!function_exists('get_user_avatar'))
    {    
        include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
    }
FIND

Code: Select all

$sql = 'SELECT m.*, u.username, u.user_colour
IN LINE FIND

Code: Select all

u.user_colour
IN LINE AFTER ADD

Code: Select all

, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height
FIND

Code: Select all

'MCHAT_MESSAGE_ID'		=> $row['message_id'],
AFTER ADD

Code: Select all

					'MCHAT_USER_AVATAR'		=> ($row['user_avatar']) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 25 : (25 / $row['user_avatar_width']) * $row['user_avatar_height']) : '',
FIND

Code: Select all

$sql = 'SELECT m.*, u.username, u.user_colour
IN LINE FIND

Code: Select all

u.user_colour
IN LINE AFTER ADD

Code: Select all

, u.user_id as userid, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height
FIND

Code: Select all

'MCHAT_MESSAGE_ID' 		=> $row['message_id'],
AFTER ADD

Code: Select all

'MCHAT_USER_AVATAR'      => ($row['user_avatar']) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 25 : (25 / $row['user_avatar_width']) * $row['user_avatar_height']) : '',
				'MCHAT_PADDING'			=> !empty($row['user_avatar']) ? ($row['user_avatar_width'] > $row['user_avatar_height'] ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width']) : '',
FIND

Code: Select all

		$sql = 'SELECT m.*, u.username, u.user_colour, u.user_id as userid
IN LINE FIND

Code: Select all

userid
IN LINE AFTER ADD

Code: Select all

, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height
FIND

Code: Select all

'MCHAT_MESSAGE_ID' 		=> $row['message_id'],
AFTER ADD

Code: Select all

					'MCHAT_USER_AVATAR'		=> ($row['user_avatar']) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 25 : (25 / $row['user_avatar_width']) * $row['user_avatar_height']) : '',
FIND

Code: Select all

			$sql = 'SELECT m.*, u.username, u.user_colour
IN LINE FIND

Code: Select all

u.user_colour
IN LINE AFTER ADD

Code: Select all

, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height
FIND

Code: Select all

					'MCHAT_MESSAGE_ID'		=> $row['message_id'],
AFTER ADD

Code: Select all

					'MCHAT_USER_AVATAR'		=> ($row['user_avatar']) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 25 : (25 / $row['user_avatar_width']) * $row['user_avatar_height']) : '',
You can change the value 25 : (25 to bigger if you wish to display a larger avatar.
Open mchat/mchat_prosilver.css
find:

Code: Select all

div.mChatBG2 {
	background-color: #FFFFFF;
	padding: 5px 5px 5px 15px;
	border-bottom: 1px dotted #DDDDDD;
	overflow: hidden;
}
add after:

Code: Select all

.chat_profile {
    float:left;
    border-right: solid 1px gray;
    text-align: center;
    margin-right: 5px;
    padding-right: 3px;
}
Open mchat/mchat_subsilver2.css
find:

Code: Select all

div.mChatBG2 {
	background-color: #FFFFFF;
	padding: 5px 5px 5px 15px;
	border-bottom: 1px dotted #DDDDDD;
	overflow: hidden;
}
add after:

Code: Select all

.chat_profile {
    float:left;
    border-right: solid 1px gray;
    text-align: center;
    margin-right: 5px;
    padding-right: 3px;
}
Open styles/prosilver/template/mchat_body.html
find:

Code: Select all

<!-- BEGIN mchatrow -->
<div id="mess{mchatrow.MCHAT_MESSAGE_ID}" class="mChatBG{mchatrow.MCHAT_CLASS} mChatHover"><span style="float:left;">{mchatrow.MCHAT_USERNAME_FULL}<!-- IF not MCHAT_ARCHIVE_MODE and MCHAT_ADD_MESSAGE --><!-- IF MCHAT_ALLOW_BBCODES --><!-- IF mchatrow.MCHAT_USERNAME_COLOR --> <a href="javascript://" onclick="insert_text('[b][color={mchatrow.MCHAT_USERNAME_COLOR}]{mchatrow.MCHAT_USERNAME}[/color][/b], ', false);">|<b style="color: {mchatrow.MCHAT_USERNAME_COLOR}">X</b>|</a><!-- ELSE --> <a href="javascript://" onclick="insert_text('[b]{mchatrow.MCHAT_USERNAME}[/b], ', false);">|<b>X</b>|</a><!-- ENDIF --><!-- ELSE --> <a href="javascript://" onclick="insert_text('{mchatrow.MCHAT_USERNAME}, ', false);">|X|</a><!-- ENDIF --><!-- ENDIF --> - {mchatrow.MCHAT_TIME}</span><span style="float:right;"><!-- IF MCHAT_ALLOW_IP --><b>{L_MCHAT_IP}</b> <a href="{mchatrow.MCHAT_U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{mchatrow.MCHAT_USER_IP}</a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_BAN --> <a href="{mchatrow.MCHAT_U_BAN}"><img src="{ROOT_PATH}mchat/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" style="vertical-align: middle;" /></a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_EDIT --> <a href="javascript://" onclick="mChat.edit('{mchatrow.MCHAT_MESSAGE_ID}');"><img src="{ROOT_PATH}mchat/edit.gif" alt="{L_MCHAT_EDIT}" title="{L_MCHAT_EDIT}" style="vertical-align: middle;" /></a><!-- ENDIF --><input type="hidden" id="edit{mchatrow.MCHAT_MESSAGE_ID}" value="{mchatrow.MCHAT_MESSAGE_EDIT}" /><!-- IF mchatrow.MCHAT_ALLOW_DEL --> <a href="javascript://" onclick="mChat.del('{mchatrow.MCHAT_MESSAGE_ID}');"><img src="{ROOT_PATH}mchat/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" style="vertical-align: middle;" /></a><!-- ENDIF --></span><br /><div style="padding: 3px; font-size:12px;">{mchatrow.MCHAT_MESSAGE}</div></div>
<!-- END mchatrow -->
replace with:

Code: Select all

<!-- BEGIN mchatrow -->
<div id="mess{mchatrow.MCHAT_MESSAGE_ID}" class="mChatBG{mchatrow.MCHAT_CLASS} mChatHover"><span class="chat_profile"><!-- IF USER_AVATAR -->{mchatrow.MCHAT_USER_AVATAR} <!-- ENDIF --><br />{mchatrow.MCHAT_USERNAME_FULL}<!-- IF not MCHAT_ARCHIVE_MODE and MCHAT_ADD_MESSAGE --><!-- IF MCHAT_ALLOW_BBCODES --><!-- IF mchatrow.MCHAT_USERNAME_COLOR --> <a href="javascript://" onclick="insert_text('[b][color={mchatrow.MCHAT_USERNAME_COLOR}]{mchatrow.MCHAT_USERNAME}[/color][/b], ', false);">|<b style="color: {mchatrow.MCHAT_USERNAME_COLOR}">X</b>|</a><!-- ELSE --> <a href="javascript://" onclick="insert_text('[b]{mchatrow.MCHAT_USERNAME}[/b], ', false);">|<b>X</b>|</a><!-- ENDIF --><!-- ELSE --> <a href="javascript://" onclick="insert_text('{mchatrow.MCHAT_USERNAME}, ', false);">|X|</a><!-- ENDIF --><!-- ENDIF --> <br /> {mchatrow.MCHAT_TIME}</span><span style="float:right;"><!-- IF MCHAT_ALLOW_IP --><b>{L_MCHAT_IP}</b> <a href="{mchatrow.MCHAT_U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{mchatrow.MCHAT_USER_IP}</a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_BAN --> <a href="{mchatrow.MCHAT_U_BAN}"><img src="{ROOT_PATH}mchat/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" style="vertical-align: middle;" /></a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_EDIT --> <a href="javascript://" onclick="mChat.edit('{mchatrow.MCHAT_MESSAGE_ID}');"><img src="{ROOT_PATH}mchat/edit.gif" alt="{L_MCHAT_EDIT}" title="{L_MCHAT_EDIT}" style="vertical-align: middle;" /></a><!-- ENDIF --><input type="hidden" id="edit{mchatrow.MCHAT_MESSAGE_ID}" value="{mchatrow.MCHAT_MESSAGE_EDIT}" /><!-- IF mchatrow.MCHAT_ALLOW_DEL --> <a href="javascript://" onclick="mChat.del('{mchatrow.MCHAT_MESSAGE_ID}');"><img src="{ROOT_PATH}mchat/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" style="vertical-align: middle;" /></a><!-- ENDIF --></span><br /><div style="padding: 3px;font-size:12px;">{mchatrow.MCHAT_MESSAGE}</div></div>
<!-- END mchatrow -->
Refresh the template in admin control panel for prosilver.

Open styles/subsilver2/template/mchat_body.html
find:

Code: Select all

<!-- BEGIN mchatrow -->
<div id="mess{mchatrow.MCHAT_MESSAGE_ID}" class="mChatBG{mchatrow.MCHAT_CLASS} mChatHover"><span style="float:left;">{mchatrow.MCHAT_USERNAME_FULL}<!-- IF not MCHAT_ARCHIVE_MODE and MCHAT_ADD_MESSAGE --><!-- IF MCHAT_ALLOW_BBCODES --><!-- IF mchatrow.MCHAT_USERNAME_COLOR --> <a href="javascript://" onclick="insert_text('[b][color={mchatrow.MCHAT_USERNAME_COLOR}]{mchatrow.MCHAT_USERNAME}[/color][/b], ', false);">|<b style="color: {mchatrow.MCHAT_USERNAME_COLOR}">X</b>|</a><!-- ELSE --> <a href="javascript://" onclick="insert_text('[b]{mchatrow.MCHAT_USERNAME}[/b], ', false);">|<b>X</b>|</a><!-- ENDIF --><!-- ELSE --> <a href="javascript://" onclick="insert_text('{mchatrow.MCHAT_USERNAME}, ', false);">|X|</a><!-- ENDIF --><!-- ENDIF --> - {mchatrow.MCHAT_TIME}</span><span style="float:right;"><!-- IF MCHAT_ALLOW_IP --><b>{L_MCHAT_IP}</b> <a href="{mchatrow.MCHAT_U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{mchatrow.MCHAT_USER_IP}</a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_BAN --> <a href="{mchatrow.MCHAT_U_BAN}"><img src="{ROOT_PATH}mchat/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" style="vertical-align: middle;" /></a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_EDIT --> <a href="javascript://" onclick="mChat.edit('{mchatrow.MCHAT_MESSAGE_ID}');"><img src="{ROOT_PATH}mchat/edit.gif" alt="{L_MCHAT_EDIT}" title="{L_MCHAT_EDIT}" style="vertical-align: middle;" /></a><!-- ENDIF --><input type="hidden" id="edit{mchatrow.MCHAT_MESSAGE_ID}" value="{mchatrow.MCHAT_MESSAGE_EDIT}" /><!-- IF mchatrow.MCHAT_ALLOW_DEL --> <a href="javascript://" onclick="mChat.del('{mchatrow.MCHAT_MESSAGE_ID}');"><img src="{ROOT_PATH}mchat/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" style="vertical-align: middle;" /></a><!-- ENDIF --></span><br /><div style="padding: 3px; font-size:12px;">{mchatrow.MCHAT_MESSAGE}</div></div>
<!-- END mchatrow -->
replace with:

Code: Select all

<!-- BEGIN mchatrow -->
<div id="mess{mchatrow.MCHAT_MESSAGE_ID}" class="mChatBG{mchatrow.MCHAT_CLASS} mChatHover"><span class="chat_profile"><!-- IF USER_AVATAR -->{mchatrow.MCHAT_USER_AVATAR} <!-- ENDIF --><br />{mchatrow.MCHAT_USERNAME_FULL}<!-- IF not MCHAT_ARCHIVE_MODE and MCHAT_ADD_MESSAGE --><!-- IF MCHAT_ALLOW_BBCODES --><!-- IF mchatrow.MCHAT_USERNAME_COLOR --> <a href="javascript://" onclick="insert_text('[b][color={mchatrow.MCHAT_USERNAME_COLOR}]{mchatrow.MCHAT_USERNAME}[/color][/b], ', false);">|<b style="color: {mchatrow.MCHAT_USERNAME_COLOR}">X</b>|</a><!-- ELSE --> <a href="javascript://" onclick="insert_text('[b]{mchatrow.MCHAT_USERNAME}[/b], ', false);">|<b>X</b>|</a><!-- ENDIF --><!-- ELSE --> <a href="javascript://" onclick="insert_text('{mchatrow.MCHAT_USERNAME}, ', false);">|X|</a><!-- ENDIF --><!-- ENDIF --> <br /> {mchatrow.MCHAT_TIME}</span><span style="float:right;"><!-- IF MCHAT_ALLOW_IP --><b>{L_MCHAT_IP}</b> <a href="{mchatrow.MCHAT_U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{mchatrow.MCHAT_USER_IP}</a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_BAN --> <a href="{mchatrow.MCHAT_U_BAN}"><img src="{ROOT_PATH}mchat/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" style="vertical-align: middle;" /></a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_EDIT --> <a href="javascript://" onclick="mChat.edit('{mchatrow.MCHAT_MESSAGE_ID}');"><img src="{ROOT_PATH}mchat/edit.gif" alt="{L_MCHAT_EDIT}" title="{L_MCHAT_EDIT}" style="vertical-align: middle;" /></a><!-- ENDIF --><input type="hidden" id="edit{mchatrow.MCHAT_MESSAGE_ID}" value="{mchatrow.MCHAT_MESSAGE_EDIT}" /><!-- IF mchatrow.MCHAT_ALLOW_DEL --> <a href="javascript://" onclick="mChat.del('{mchatrow.MCHAT_MESSAGE_ID}');"><img src="{ROOT_PATH}mchat/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" style="vertical-align: middle;" /></a><!-- ENDIF --></span><br /><div style="padding: 3px;font-size:12px;">{mchatrow.MCHAT_MESSAGE}</div></div>
<!-- END mchatrow -->
Refresh the template in admin control panel for subsilver2.[/spoiler]
pic:
proava.png
subava.png
Who is chatting at the right side of the chat box,only works on the custom page.
[spoiler]Open styles/prosilver/template/mchat_body.html
find:

Code: Select all

            <div class="postbody mChatBodyFix">
add after:

Code: Select all

	<!-- IF MCHAT_CUSTOM_PAGE -->
<table width="100%" >
   <tr>
       <td>
	<!-- ENDIF -->   
find:

Code: Select all

<div style="text-align:center;">{L_MCHAT_COPYRIGHT}</div>
add after:

Code: Select all

<!-- IF MCHAT_CUSTOM_PAGE and MCHAT_CUSTOM_PAGE_WHOIS -->
</td>
<td style="width: 20%; border-left: solid 1px black;padding:2px;" valign="top">
<h3>{L_WHO_IS_CHATTING}</h3>
<div id="mChatStats" style="display:block"><p>{MCHAT_TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN}) 
<br />{MCHAT_LOGGED_IN_USER_LIST}</p></div>
<p><span id="mChatRefresh">{MCHAT_WHOIS_REFRESH_EXPLAIN}</span><span id="mChatRefreshN" style="display: none;">{L_WHO_IS_REFRESHING}</span>
<!-- IF LEGEND --><br /><em>{L_LEGEND}:<br /> {LEGEND}</em><!-- ENDIF --></p>
</td></tr></table>
<!-- ENDIF -->
find and delete:

Code: Select all

<!-- IF MCHAT_CUSTOM_PAGE and MCHAT_CUSTOM_PAGE_WHOIS -->
<h3>{L_WHO_IS_CHATTING}</h3>
<div id="mChatStats" style="display:block"><p>{MCHAT_TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN}) <br />{MCHAT_LOGGED_IN_USER_LIST}</p></div>
<p><span id="mChatRefresh">{MCHAT_WHOIS_REFRESH_EXPLAIN}</span><span id="mChatRefreshN" style="display: none;">{L_WHO_IS_REFRESHING}</span>
<!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
<!-- ENDIF -->
[/spoiler]
pic:
whischatp.png
Subsilver2 later i have the html sorted but messed the if statements up so not displaying online ....
pic:
subwho.PNG
Smilies in a scroll box handy if you have 100,s of smilies allowed on the posting page.

[spoiler]Open styles/prosilver/template/mchat_body.html
find:

Code: Select all

<!-- BEGIN mchatsmilerow -->
<a href="javascript://" onclick="insert_text('{mchatsmilerow.MCHAT_SMILE_CODE}', true);"><img src="{mchatsmilerow.MCHAT_SMILE_IMG}" width="{mchatsmilerow.MCHAT_SMILE_WIDTH}" height="{mchatsmilerow.MCHAT_SMILE_HEIGHT}" alt="{mchatsmilerow.MCHAT_SMILE_CODE}" title="{mchatsmilerow.MCHAT_SMILE_EMOTION}" /></a>
<!-- END mchatsmilerow -->
replace with:

Code: Select all

<div style="width:100%; height:80px;border: solid 1px gray; overflow:auto;">
<!-- BEGIN mchatsmilerow -->
<a href="javascript://" onclick="insert_text('{mchatsmilerow.MCHAT_SMILE_CODE}', true);"><img src="{mchatsmilerow.MCHAT_SMILE_IMG}" width="{mchatsmilerow.MCHAT_SMILE_WIDTH}" height="{mchatsmilerow.MCHAT_SMILE_HEIGHT}" alt="{mchatsmilerow.MCHAT_SMILE_CODE}" title="{mchatsmilerow.MCHAT_SMILE_EMOTION}" /></a>
<!-- END mchatsmilerow -->
</div>
Refresh template for prosilver.

Open styles/subsilver2/template/mchat_body.html

find:

Code: Select all

<!-- BEGIN mchatsmilerow -->
<a href="javascript://" onclick="insert_text('{mchatsmilerow.MCHAT_SMILE_CODE}', true);"><img src="{mchatsmilerow.MCHAT_SMILE_IMG}" width="{mchatsmilerow.MCHAT_SMILE_WIDTH}" height="{mchatsmilerow.MCHAT_SMILE_HEIGHT}" alt="{mchatsmilerow.MCHAT_SMILE_CODE}" title="{mchatsmilerow.MCHAT_SMILE_EMOTION}" /></a>
<!-- END mchatsmilerow -->
replace with:

Code: Select all

<div style="width:100%; height:80px;border: solid 1px gray; overflow:auto;">
<!-- BEGIN mchatsmilerow -->
<a href="javascript://" onclick="insert_text('{mchatsmilerow.MCHAT_SMILE_CODE}', true);"><img src="{mchatsmilerow.MCHAT_SMILE_IMG}" width="{mchatsmilerow.MCHAT_SMILE_WIDTH}" height="{mchatsmilerow.MCHAT_SMILE_HEIGHT}" alt="{mchatsmilerow.MCHAT_SMILE_CODE}" title="{mchatsmilerow.MCHAT_SMILE_EMOTION}" /></a>
<!-- END mchatsmilerow -->
</div>
Refresh template for subsilver2.[/spoiler]
scroll boxp.png
subscroll.PNG
Steve wrote: 14 Nov 2024, 16:45 It's happy bastard day!
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: mchat addons,display avatars,smilie scroll box,who ..

Post by Stoker »

Nice Steve :thumb:
What about resized avatars? Maybe max 40*40?
Board rules! No PM support
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: mchat addons,display avatars,smilie scroll box,who ..

Post by Stoker »

I have just testet the avatar addon.
It displays viewers Avatar and not the users avatar.
Board rules! No PM support
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 848
Joined: 05 Mar 2010, 01:10
BBCodes: 2000
Favourite BBCode: p**n tube
Favourite MOD: Non of Stokers

Re: mchat addons,display avatars,smilie scroll box,who ..

Post by Steve »

does it, hmm ill have a look at it ....
[edit]its fixed[/edit]
Steve wrote: 14 Nov 2024, 16:45 It's happy bastard day!
User avatar
Bullseye
BBCoder IV
BBCoder IV
Posts: 153
Joined: 02 Apr 2010, 20:49
Location: England

Re: mchat addons,display avatars,smilie scroll box,who ..

Post by Bullseye »

Will this work on the version I'm running?

Code: Select all

* @package mChat PHP Code
* @version 1.3.7 26.10.2009
The reason I ask is because, I can't find the piece of code that needs to be edited in mchat.php :(
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 848
Joined: 05 Mar 2010, 01:10
BBCodes: 2000
Favourite BBCode: p**n tube
Favourite MOD: Non of Stokers

Re: mchat addons,display avatars,smilie scroll box,who ..

Post by Steve »

yes it will. try a smaller find with your notepad++ .
Steve wrote: 14 Nov 2024, 16:45 It's happy bastard day!
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: mchat addons,display avatars,smilie scroll box,who ..

Post by cisco007 »

i am getting this error which is in the last edit to the mchat.php file

Code: Select all

Fatal error: Call to undefined function get_user_avatar() 
on the index page i don't get the error, but on the custom page i do!
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 848
Joined: 05 Mar 2010, 01:10
BBCodes: 2000
Favourite BBCode: p**n tube
Favourite MOD: Non of Stokers

Re: mchat addons,display avatars,smilie scroll box,who ..

Post by Steve »

do you have this code in the mchat.php?

Code: Select all

//  avatar
if (!function_exists('get_user_avatar'))
    {    
        include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
    }
well if not ,you need to add it ,sorry about that 1st post updated.
Steve wrote: 14 Nov 2024, 16:45 It's happy bastard day!
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: mchat addons,display avatars,smilie scroll box,who ..

Post by cisco007 »

great that worked, but they only show on the index page not on the custom page, not a big deal for me though!
DJ Danni
BBCoder II
BBCoder II
Posts: 31
Joined: 24 Aug 2010, 17:54

Re: mchat addons,display avatars,smilie scroll box,who ..

Post by DJ Danni »

Who is chatting at the right side of the chat box,only works on the custom page.
[spoiler]Open styles/prosilver/template/mchat_body.html
find:

Code: Select all

            <div class="postbody mChatBodyFix">
add after:

Code: Select all

	<!-- IF MCHAT_CUSTOM_PAGE -->
<table width="100%" >
   <tr>
       <td>
	<!-- ENDIF -->   
find:

Code: Select all

<div style="text-align:center;">{L_MCHAT_COPYRIGHT}</div>
add after:

Code: Select all

<!-- IF MCHAT_CUSTOM_PAGE and MCHAT_CUSTOM_PAGE_WHOIS -->
</td>
<td style="width: 20%; border-left: solid 1px black;padding:2px;" valign="top">
<h3>{L_WHO_IS_CHATTING}</h3>
<div id="mChatStats" style="display:block"><p>{MCHAT_TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN}) 
<br />{MCHAT_LOGGED_IN_USER_LIST}</p></div>
<p><span id="mChatRefresh">{MCHAT_WHOIS_REFRESH_EXPLAIN}</span><span id="mChatRefreshN" style="display: none;">{L_WHO_IS_REFRESHING}</span>
<!-- IF LEGEND --><br /><em>{L_LEGEND}:<br /> {LEGEND}</em><!-- ENDIF --></p>
</td></tr></table>
<!-- ENDIF -->
find and delete:

Code: Select all

<!-- IF MCHAT_CUSTOM_PAGE and MCHAT_CUSTOM_PAGE_WHOIS -->
<h3>{L_WHO_IS_CHATTING}</h3>
<div id="mChatStats" style="display:block"><p>{MCHAT_TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN}) <br />{MCHAT_LOGGED_IN_USER_LIST}</p></div>
<p><span id="mChatRefresh">{MCHAT_WHOIS_REFRESH_EXPLAIN}</span><span id="mChatRefreshN" style="display: none;">{L_WHO_IS_REFRESHING}</span>
<!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
<!-- ENDIF -->
[/spoiler]
Is it possabole t5o do this also on the Index Chat?
Last edited by DJ Danni on 29 Aug 2010, 21:25, edited 1 time in total.
Locked