FIND in /mkportal/lang/*/lang_chat.php:
?>ADD ABOVE:
$langmk['ch_selectnick'] = "Select Nick:"; $langmk['ch_username1'] = "Use"; $langmk['ch_username2'] = "as Nick:"; $langmk['ch_customnick'] = "Or Enter Custom Nick:"; $langmk['ch_enterchat'] = "Enter Chat";FIND in /mkportal/modules/chat/tpl_chat.php:
function view_chat($chat_server, $chat_port, $chat_channel) {
REPLACE WITH://function view_chat($chat_server, $chat_port, $chat_channel) {
function view_chat($chat_server, $chat_port, $chat_channel, $nick) { // Nick Hack
FIND: <param name="nick" value="{$mkportals->member['name']}" />
REPLACE WITH: <!--<param name="nick" value="{$mkportals->member['name']}" />-->
<!-- Nick Hack -->
<param name="nick" value="{$nick}" />
FIND in /mkportal/modules/chat/index.php (function mk_chat): switch($mkportals->input['op']) {
case 'refresh_list':
$this->refresh_list();
break;
default:
$this->run_chat();
break;
}
REPLACE WITH: // Nick Hack
switch($mkportals->input['op']) {
case 'refresh_list':
$this->refresh_list();
break;
case 'run_chat':
$this->run_chat();
break;
default:
$this->select_nick();
//$this->run_chat();
break;
}
// end Nick Hack
FIND: function run_chat() {
ADD ABOVE: function select_nick() {
global $mkportals, $DB, $mklib, $Skin;
$output =
<<<EOF
<tr>
<td>
<table cellspacing="0" width="100%" border="0">
<tr>
<td class="tdblock">{$mklib->lang['ch_welc']}</td>
</tr>
<tr>
<td valign="top" align="center" class="taburlo">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
EOF;
$output .= "
<form action="index.php?ind=chat&op=run_chat" name="editor" method="post" enctype="multipart/form-data">
<table width="100%" border="0">
<tr>
<td class="titadmin" style="border-top: 0" colspan="2">{$mklib->lang['ch_selectnick']}
</td>
</tr>
<tr>
<td width="15%" style="padding-top: 20px">{$mklib->lang['ch_username1']} <span class="mktxtcontr">{$mkportals->member['name']}</span> {$mklib->lang['ch_username2']}</td>
<td width="85%" style="padding-top: 20px"> </td>
</tr>
<tr>
<td valign="top" style="padding-top: 20px">{$mklib->lang['ch_customnick']}</td>
<td style="padding-top: 20px">
<input type="text" name="customnick" size="40" class="bgselect" />
</td>
</tr>
<tr>
<td style="padding-top: 20px"><input type="submit" value="{$mklib->lang['ch_enterchat']}" class="bgselect" /></td>
<td align="left"> </td>
</tr>
</table>
</form>
</td>
</tr>
";
$output .=
<<<EOF
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center"><a href="http://www.mkportal.it" target="_blank">MKPChat</a> ©2004-2005 - SelectNick by <a href="http://www.visiblesoul.net/" title="Visible Soul Website Design - Corpus Christi, Texas" target="_blank">visible soul</a></div>
</td>
</tr>
EOF;
$blocks .= $Skin->view_block("{$mklib->lang['ch_pagetitle']}", $output);
$mklib->printpage("0", "0", "{$mklib->lang['ch_pagetitle']}", $blocks);
}
FIND in (function run_chat):$nick = $mkportals->member['name'];REPLACE WITH:
// Nick Hack $nick = $mkportals->input['customnick']; if (!$nick || $nick == '') $nick = $mkportals->member['name']; // end Nick HackFIND:
$DB->query("UPDATE mkp_chat SET run_time='$run_time' WHERE id='$id' ");
REPLACE WITH: // Nick Hack
//$DB->query("UPDATE mkp_chat SET run_time='$run_time' WHERE id='$id' ");
$DB->query("UPDATE mkp_chat SET nick='$nick', run_time='$run_time' WHERE id='$id'");
// end Nick Hack
FIND:$output = $this->tpl->view_chat($chat_server, $chat_port, $chat_channel);REPLACE WITH:
//$output = $this->tpl->view_chat($chat_server, $chat_port, $chat_channel); $output = $this->tpl->view_chat($chat_server, $chat_port, $chat_channel, $nick); // Nick HackFIND in (function refresh_list):
$nick = $mkportals->member['name'];REPLACE WITH:
//$nick = $mkportals->member['name'];FIND:
$DB->query("select nick FROM mkp_chat WHERE id = '$id'");
ADD BELOW:// Nick Hack $row = $DB->fetch_row(); $nick = $row['nick']; // end Nick HackFIND:
$query="INSERT INTO mkp_chat(id, nick, run_time)VALUES('$id', '$nick', '$run_time')";
ADD ABOVE:$nick = $mkportals->member['name']; // Nick Hack














