Thread: Embedded chat
View Single Post
  #192  
Old 02-21-2003, 09:27 PM
bryan kazdan's Avatar
bryan kazdan bryan kazdan is offline
 
Join Date: Jan 2003
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I took a different approach to popping up a chat window for my users. And it seems to actually work quite well.
So here is what I did:

1) Disabled Log Off Button:
SigmaChat Control Panel - Look & Feel - Options - Logout Button

2) Disabled Float Dock Button
SigmaChat Control Panel - Look & Feel ? Options - Float/Dock Button

3) Use ?Minimal? Display Option
SigmaChat Control Panel - Look & Feel ? Layout - Minimal Layout

4) Disabled "/NICK" command


5) Used the following ?applet code?
PHP Code:
<applet codebase="http://client.sigmachat.com/current/"
code="Client.class" archive="scclient_en.zip" width=550 height=350>
<
param name="room" value="XXXXX">
<
param name="cabbase" value="scclient_en.cab">
<
param name="USERNAME" value="$username">
<
param name="AUTOLOGIN" value="yes">
<
param name="lopt" value="s+t+a+c+h+d+l-">
<
param name="urllist" value="false">
<
param name="subroom" value="false">
</
applet
6) Since I wanted a separate chat page to welcome my users to the chat, I then duplicated "Chat.php" and made a "Chat2.php" file

7) I set the "Chat2.php" file to call 2 new templates "chat2" and "chatbit2"

8) I set "chat2" to be a basic HTML file that would NOT call my header and footer

9) I set "chatbit2" to have my applet code in it

10) I then set up a javascript in "chatbit" to call the "chat2.php" into a named window

PHP Code:
<script language="javascript">
function 
ANYNAME_open(){
window.open("chat2.php","WINDOW_NAME","height=400,width=600,left=80,top=80");
}
</
script>
    
<
a href="javascript:ANYNAME_open()">Click Here to Start Chatting!</a
--------------------------------


Why it works for me:

a) The new window is named, therefore all calls to my chat room will always open it in the same window, so the user can log in and out of the chat room ONLY in that window so when they reclick to open the window, it will just autolog them back into that window. ("_BLANK" should create a new window, which would cause a security problem)

b) Users can browse the forum while chatting at the same time (since they are in different windows)


--------------------------------

Faults:
* Pressing "Ctrl+N" will still open the window and will log off one user.
* Using a second browser (such as Netscape while using IE) will have the same effect (2 windows open at same time).
* A user technically could just type in "Chat2.php" and load the page 2 times in 2 windows (if they knew to do this)

--------------------------------

Why I am posting this. Because it is slightly different than what I have read and I thought maybe it would add to the creativity of new versions of this hack.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01202 seconds
  • Memory Usage 1,782KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete