Update of /cvsroot/phpmychat/phpMyChat-0.15/chat
In directory usw-pr-cvs1:/tmp/cvs-serv28407/chat
Modified Files:
input.php3
Log Message:
Rewrote and improve the work to set the message box size
Index: input.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** input.php3 2001/06/10 14:56:06 1.39
--- input.php3 2001/06/16 10:20:14 1.40
***************
*** 248,254 ****
}
! // Define the message box size
! // = (frame width - margins - send button size) / column width
! $msgBoxSize = floor(($dbSessionVars['winWidth'] - 130 - 10 - ((strlen(L_OK) + 7) * $dbSessionVars['colWidth'])) / $dbSessionVars['colWidth']);
// The urls for the help and the smilies popups
--- 248,254 ----
}
! // Define the message box default size
! // = (frame width / column width) - (send button size + proxy of margins)
! $msgBoxSize = floor((800 - 130) / $dbSessionVars['colWidth']) - (strlen(L_OK) + 2);
// The urls for the help and the smilies popups
***************
*** 330,334 ****
</head>
! <body class="frame"<?php if (!$isPopup) echo(' onload="window.parent.pmcSetMsgBoxFocus()"'); ?>>
<form name="inputForm" action="<?php echo($action); ?>" method="post" autocomplete="off" target="<?php echo($target); ?>" onsubmit="return window.parent.pmcValidateInputForm()">
<table border="0" cellpadding="0" cellspacing="0">
--- 330,334 ----
</head>
! <body class="frame"<?php if (!$isPopup) echo(' onload="window.parent.pmcSetMsgBoxFocus()"'); ?> onresize="if (typeof(document.layers) == 'undefined') window.parent.pmcMsgBoxSize(<?php echo($msgBoxSize . ', ' . $dbSessionVars['colWidth'] . ', ' . strlen(L_OK)); ?>, true)">
<form name="inputForm" action="<?php echo($action); ?>" method="post" autocomplete="off" target="<?php echo($target); ?>" onsubmit="return window.parent.pmcValidateInputForm()">
<table border="0" cellpadding="0" cellspacing="0">
***************
*** 349,353 ****
--- 349,362 ----
<!-- Message box -->
+ <script type="text/javascript" language="javascript1.2">
+ <!--
+ // Define the size of the message box and display it
+ jsMsgBoxSize = window.parent.pmcMsgBoxSize(<?php echo($msgBoxSize . ', ' . $dbSessionVars['colWidth'] . ', ' . strlen(L_OK)); ?>, false);
+ document.writeln('<input type="text" name="message" size="' + jsMsgBoxSize + '" maxlength="299" value="<?php echo(str_replace('/', '\\/', addslashes($msgValue))); ?>" \/>');
+ // -->
+ </script>
+ <noscript>
<input type="text" name="message" size="<?php echo($msgBoxSize); ?>" maxlength="299" value="<?php echo($msgValue); ?>" />
+ </noscript>
|