Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs In directory usw-pr-cvs1:/tmp/cvs-serv3139/chat/lib/index_libs Modified Files: misc.lib.js main_index.lib.php3 do_enter_js_work.lib.php3 do_enter_frameset.lib.php3 Added Files: help_and_smilies_popups.lib.js Log Message: Updated to the new 'input' frame --- NEW FILE --- // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | License: GNU/GPL - http://www.gnu.org/copyleft/gpl.html | // +--------------------------------------------------------------------------+ // | Defines the position of the help and the smilies popups then launches | // | them. | // | | // | This library is called by the 'chat/lib/index_libs/main_index.lib.php3' | // | script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <te...@ph...> | // +--------------------------------------------------------------------------+ // // $Id: help_and_smilies_popups.lib.js,v 1.1 2001/04/30 22:44:58 loic1 Exp $ // // Defines the position of the help and the smilies popups then launches them. // var jsMouseX = 0; var jsMouseY = 0; var jsHelpPopupWin = null; var jsSmiliesPopupWin = null; if (typeof(Image) != 'undefined') // 'Image' is a js1.1 object { var jsImgHelpOff = new Image(15,15); jsImgHelpOff.src = jsChatPath + 'images/help_off.gif'; var jsImgHelpOn = new Image(15,15); jsImgHelpOn.src = jsChatPath + 'images/help_on.gif'; var jsImgSmiliesOff = new Image(15,15); jsImgSmiliesOff.src = jsChatPath + 'images/smilies_off.gif'; var jsImgSmiliesOn = new Image(15,15); jsImgSmiliesOn.src = jsChatPath + 'images/smilies_on.gif'; } /** * Sets the position of the popup * * @param object event type (used under NS4+) * * @access public */ function pmcDisplayLocation(e) { if (jsIsVersion4) { if (jsIsIE4) e = window.frames['input'].window.event; jsMouseX = e.screenX; jsMouseY = e.screenY; } return; } // end of the function 'pmcDisplayLocation()' /** * Launches the help popup * * @param integer a value depending on the text direction * * @acess public */ function pmcHelpPopup(leftOffset) { if (typeof(jsHelpPopupWin) != 'undefined' && jsHelpPopupWin && !jsHelpPopupWin.closed) { if (jsIsJs11) jsHelpPopupWin.focus(); } else { var scrTop = jsMouseY - 430; var scrLeft = jsMouseX - leftOffset; var scrPos = 'top=' + scrTop + ',screenY=' + scrTop + ',left=' + scrLeft + ',screenX=' + scrLeft + ','; jsHelpPopupWin = window.open('help_popup.' + jsPhpExt + '?' + jsPopusUrlQuery, 'help_popup', scrPos + 'width=600,height=350,scrollbars=yes,resizable=yes'); } } // end of the function 'pmcHelpPopup()' /** * Launches the smilies popup * * @param integer a value depending on the text direction * @param string the language to use * * @acess public */ function pmcSmiliesPopup(leftOffset, theLanguage) { if (typeof(jsSmiliesPopupWin) != 'undefined' && jsSmiliesPopupWin && !jsSmiliesPopupWin.closed) { if (jsIsJs11) jsSmiliesPopupWin.focus(); } else { var scrTop = jsMouseY - 430; var scrLeft = jsMouseX - leftOffset; var scrPos = 'top=' + scrTop + ',screenY=' + scrTop + ',left=' + scrLeft + ',screenX=' + scrLeft + ','; jsSmiliesPopupWin = window.open('smilies_popup.' + jsPhpExt + '?' + jsPopusUrlQuery, 'smilies_popup', scrPos + 'width=600,height=350,scrollbars=yes,resizable=yes'); } } // end of the function 'pmcSmiliesPopup()' Index: misc.lib.js =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/misc.lib.js,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** misc.lib.js 2001/04/20 19:54:13 1.11 --- misc.lib.js 2001/04/30 22:44:58 1.12 *************** *** 41,52 **** // 1. Ensures the form at the input frame exists ! if (typeof(window.frames['input']) == 'undefined') { return null; } - else if (typeof(window.frames['input'].window.document.forms['inputForm']) == 'undefined') - { - return null; - } else { --- 41,50 ---- // 1. Ensures the form at the input frame exists ! if (typeof(window.frames['input']) == 'undefined' ! || typeof(window.frames['input'].window.document) == 'undefined' ! || typeof(window.frames['input'].window.document.forms['inputForm']) == 'undefined') { return null; } else { *************** *** 184,187 **** --- 182,187 ---- if (typeof(jsHelpPopupWin) != 'undefined' && jsHelpPopupWin && !jsHelpPopupWin.closed) jsHelpPopupWin.close(); + if (typeof(jsSmiliesPopupWin) != 'undefined' && jsSmiliesPopupWin && !jsSmiliesPopupWin.closed) + jsSmiliesPopupWin.close(); if (typeof(jsIgnoredPopupWin) != 'undefined' && jsIgnoredPopupWin && !jsIgnoredPopupWin.closed) { Index: main_index.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/main_index.lib.php3,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** main_index.lib.php3 2001/04/29 08:16:26 1.26 --- main_index.lib.php3 2001/04/30 22:44:58 1.27 *************** *** 581,593 **** // Displays the message about currently chatting users ! if ($dbLink->query("SELECT DISTINCT u.username FROM " . C_USR_TBL . " u, " . C_MSG_TBL . " m WHERE u.room = m.room AND m.type = 1")) ! { ! $chattingCnt = $dbLink->numRows(); ! $usersPopupLink = ' <a href="' . _CHAT_PATH . 'users_popup_low.' . C_EXTENSION . '?' . dbSessionSID('GET') .'" target="users_popup_' . md5(C_CHAT_URL) . '" class="chatLink" onclick="pmcUsersPopup(\'' . md5(C_CHAT_URL) . '\'); return false">'; ! $usersPopupLink .= $chattingCnt . ' '; ! $usersPopupLink .= ($chattingCnt > 1) ? L_USERS : L_USER; ! $usersPopupLink .= '</a>'; ! echo("\t\t\t" . L_CUR_1 . $usersPopupLink . ' '. L_CUR_2 . "\n"); ! } ?> </span> --- 581,592 ---- // Displays the message about currently chatting users ! $dbLink->query("SELECT COUNT(*) FROM " . C_USR_TBL); ! list($chattingCnt) = $dbLink->nextRecord(); ! $dbLink->cleanResults(); ! $usersPopupLink = ' <a href="' . _CHAT_PATH . 'users_popup_low.' . C_EXTENSION . '?' . dbSessionSID('GET') .'" target="users_popup_' . md5(C_CHAT_URL) . '" class="chatLink" onclick="pmcUsersPopup(\'' . md5(C_CHAT_URL) . '\'); return false">'; ! $usersPopupLink .= (($chattingCnt) ? $chattingCnt : 0) . ' '; ! $usersPopupLink .= ($chattingCnt > 1) ? L_USERS : L_USER; ! $usersPopupLink .= '</a>'; ! echo("\t\t\t" . L_CUR_1 . $usersPopupLink . ' '. L_CUR_2 . "\n"); ?> </span> *************** *** 613,617 **** <input type="hidden" name="isJsValidated" value="0" /> ! <table border="0" cellpadding="3" class="chatTable"> <tr class="chatCell"> <td align="center" class="chatCell"> --- 612,616 ---- <input type="hidden" name="isJsValidated" value="0" /> ! <table border="0" cellpadding="3" class="chatTable" style="margin-bottom: 3px"> <tr class="chatCell"> <td align="center" class="chatCell"> *************** *** 625,629 **** <!-- Flags to choose the translation --> <tr class="chatCell"> ! <td colspan="2" align="center" class="chatCell"> <span class="chatFlags"> <?php --- 624,628 ---- <!-- Flags to choose the translation --> <tr class="chatCell"> ! <td colspan="2" align="center" class="chatCell" nowrap="nowrap"> <span class="chatFlags"> <?php Index: do_enter_js_work.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/do_enter_js_work.lib.php3,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** do_enter_js_work.lib.php3 2001/04/28 20:19:03 1.8 --- do_enter_js_work.lib.php3 2001/04/30 22:44:58 1.9 *************** *** 44,48 **** var jsIgnoredPopupWin = null; var jsInputForm = null; ! var jsUrlQueryForHelp = 'lang=<?php echo($dbSessionVars['lang']); ?>' + jsQueryArgSeparator + 'jsVersion=<?php echo($jsVersion); ?>'; var jsInvalidCommandMsg = '<?php echo(pmcSlashSingleQuotes(L_BAD_CMD)); ?>'; var jsCharset = '<?php echo(L_CHARSET); ?>'; --- 44,48 ---- var jsIgnoredPopupWin = null; var jsInputForm = null; ! var jsPopusUrlQuery = 'lang=<?php echo($dbSessionVars['lang']); ?>' + jsQueryArgSeparator + 'jsVersion=<?php echo($jsVersion); ?>'; var jsInvalidCommandMsg = '<?php echo(pmcSlashSingleQuotes(L_BAD_CMD)); ?>'; var jsCharset = '<?php echo(L_CHARSET); ?>'; *************** *** 87,97 **** </script> - <!-- Gets the library that allows to display and modify the color picker --> <script src="<?php echo(_CHAT_PATH); ?>lib/index_libs/msg_colors.lib.js" type="text/javascript" language="javascript1.1"></script> - ! <!-- Gets the library that allows to launch the help popup --> ! <script src="<?php echo(_CHAT_PATH); ?>lib/index_libs/help_popup.lib.js" type="text/javascript" language="javascript"></script> <!-- Gets the library that allows to briefly validate commands and messages --> --- 87,95 ---- </script> <!-- Gets the library that allows to display and modify the color picker --> <script src="<?php echo(_CHAT_PATH); ?>lib/index_libs/msg_colors.lib.js" type="text/javascript" language="javascript1.1"></script> ! <!-- Gets the library that allows to launch the help and the smilies popups --> ! <script src="<?php echo(_CHAT_PATH); ?>lib/index_libs/help_and_smilies_popups.lib.js" type="text/javascript" language="javascript"></script> <!-- Gets the library that allows to briefly validate commands and messages --> Index: do_enter_frameset.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/do_enter_frameset.lib.php3,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** do_enter_frameset.lib.php3 2001/04/28 20:19:03 1.8 --- do_enter_frameset.lib.php3 2001/04/30 22:44:58 1.9 *************** *** 26,30 **** /** ! * Defines some URLs */ // The url to be used as a fix for the Netscape resize bug --- 26,30 ---- /** ! * Defines some variables */ // The url to be used as a fix for the Netscape resize bug *************** *** 33,36 **** --- 33,38 ---- . $pmcQueryArgSeparator . 'exitMessage=0' . $pmcQueryArgSeparator . 'reloading=nsResize'; + // The height of the input frame + $inputHeight = L_FONT_SIZE * 6.2; *************** *** 46,50 **** <!-- Visible framesets --> <frameset cols="*,130" frameborder="0" border="0" framespacing="0"> ! <frameset rows="*,50" frameborder="0" border="0" framespacing="0"> <frame src="<?php echo(_CHAT_PATH); ?>blank.htm" name="messages" frameborder="0" border="0" framespacing="0" marginwidth="3" marginheight="3" /> <frame src="<?php echo(_CHAT_PATH); ?>input.<?php echo(C_EXTENSION . '?' . dbSessionSID('GET')); ?>" name="input" frameborder="0" border="0" framespacing="0" marginwidth=0 marginheight=0 scrolling="no" noresize="noresize" /> --- 48,52 ---- <!-- Visible framesets --> <frameset cols="*,130" frameborder="0" border="0" framespacing="0"> ! <frameset rows="*,<?php echo($inputHeight); ?>" frameborder="0" border="0" framespacing="0"> <frame src="<?php echo(_CHAT_PATH); ?>blank.htm" name="messages" frameborder="0" border="0" framespacing="0" marginwidth="3" marginheight="3" /> <frame src="<?php echo(_CHAT_PATH); ?>input.<?php echo(C_EXTENSION . '?' . dbSessionSID('GET')); ?>" name="input" frameborder="0" border="0" framespacing="0" marginwidth=0 marginheight=0 scrolling="no" noresize="noresize" /> *************** *** 71,75 **** ?> <frameset cols="*,130" frameborder="0" border="0" framespacing="0" onResize="if (jsIsNS4) window.location = '<?php echo($nsResizeUrl); ?>';"> ! <frameset rows="*,50" border=0> <frame src="<?php echo(_CHAT_PATH); ?>messages_low.<?php echo(C_EXTENSION . '?' . dbSessionSID('GET')); ?>" name="messages" marginwidth=3 marginheight=3 /> <frame src="<?php echo(_CHAT_PATH); ?>input.<?php echo(C_EXTENSION . '?' . dbSessionSID('GET')); ?>" name="input" marginwidth=0 marginheight=0 scrolling="no" noresize="noresize" /> --- 73,77 ---- ?> <frameset cols="*,130" frameborder="0" border="0" framespacing="0" onResize="if (jsIsNS4) window.location = '<?php echo($nsResizeUrl); ?>';"> ! <frameset rows="*,<?php echo($inputHeight); ?>" border=0> <frame src="<?php echo(_CHAT_PATH); ?>messages_low.<?php echo(C_EXTENSION . '?' . dbSessionSID('GET')); ?>" name="messages" marginwidth=3 marginheight=3 /> <frame src="<?php echo(_CHAT_PATH); ?>input.<?php echo(C_EXTENSION . '?' . dbSessionSID('GET')); ?>" name="input" marginwidth=0 marginheight=0 scrolling="no" noresize="noresize" /> |