fixed up chat some more

This commit is contained in:
genuineparts 2025-06-19 21:07:36 +02:00
parent 425350d402
commit 9bab32d2ae
18 changed files with 1204 additions and 180 deletions

View file

@ -94,7 +94,7 @@ class chat extends module{
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
// führe die Aktion aus und gebe die Daten an den Browser weiter
// führe die Aktion aus und gebe die Daten an den Browser weiterChanged VCall name back
$fh=curl_exec($ch);
//var_dump(curl_getinfo($ch));
@ -493,7 +493,7 @@ function xmeta(){
function repmeta(){
global $yacsid,$config;
$meta.="<script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?ver=1213232\"></script>
<link type=\"text/css\" href=\"/themes/austria/base/jquery-ui-1.9.2.custom.css?ver=1238732\" rel=\"Stylesheet\" />
<link type=\"text/css\" href=\"/themes/funchat/base/jquery-ui-1.9.2.custom.css?ver=1238732\" rel=\"Stylesheet\" />
<script src=\"//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js?ver=123324732\"></script>
<script>
$(function() {
@ -554,7 +554,7 @@ function inmeta2(){
else return true;
}
</script>';
$meta.='<script type="text/javascript" src="/modules/chat/chat_ws.js?id=432113132"></script>';
$meta.='<script type="text/javascript" src="/modules/chat/js/chat_ws.js?id=432113132"></script>';
/* $meta.='<script type="text/javascript">
function play() {
notice();
@ -646,7 +646,8 @@ function inmeta2(){
$('#chatlog').append('Error! Please check your browsers console for the error message.');
window.onbeforeunload = null;
if(as!=false){
$('#chatlog').slimscroll({ scrollBy : '5000px' });
var target = $('#chatlog');
target.animate({ scrollTop: target.height()}, 500 );
}
}
socket.onclose = function(){
@ -654,7 +655,8 @@ function inmeta2(){
$('#chatlog').append('Disconnected!');
window.onbeforeunload = null;
if(as!=false){
$('#chatlog').slimscroll({ scrollBy : '5000px' });
var target = $('#chatlog');
target.animate({ scrollTop: target.height()}, 500 );
}
}
@ -662,7 +664,8 @@ function inmeta2(){
$('#chatlog').append('Disconnected with error: '+exception+'!');
window.onbeforeunload = null;
if(as!=false){
$('#chatlog').slimscroll({ scrollBy : '5000px' });
var target = $('#chatlog');
target.animate({ scrollTop: target.height()}, 500 );
}
console.log(exception);
}
@ -717,7 +720,7 @@ function inmeta2(){
}
function reportwindow(name){
$('#repwindow').html('<div id=\"'+name+'_report\" title=\"'+name+'\"><div id=\"'+name+'_report_text\" style=\"height:70%; width:95%; text-align:left; overflow:hidden;\"><div id=\"'+name+'_report_input\"><textarea id=\"'+name+'_report_input_text\" autocomplete=\"off\" spellcheck=\"true\" style=\"width:95%; height:166px; padding:none;\"/></div></div>');
$('#repwindow').html('<div id=\"'+name+'_report\" title=\"'+name+'\"><div id=\"'+name+'_report_text\" style=\"height:70%; width:95%; text-align:left; overflow-y:auto;\"><div id=\"'+name+'_report_input\"><textarea id=\"'+name+'_report_input_text\" autocomplete=\"off\" spellcheck=\"true\" style=\"width:95%; height:166px; padding:none;\"/></div></div>');
var obj = $('#'+name+'_report');
obj.dialog({ autoOpen: false, maxWidth: 600, maxHeight: 530, height: 300, minHeight: 250, title: 'Report '+name });
$('#'+name+'_report_input_text').keydown(function(event) {
@ -740,22 +743,16 @@ function inmeta2(){
if(youfirst==null)youfirst = false;
if(inittext != \"\" && inittext != undefined){
if(!youfirst){
$('#whispers').append('<div id=\"'+name+'_whisper\" title=\"'+name+'\"><div id=\"'+name+'_whisper_text\" style=\"height:70%; width:95%; text-align:left; overflow:hidden;\"><span style=\"color: #000000;\">'+name+': '+inittext+'</span><br /></div><div id=\"'+name+'_whisper_input\"><textarea id=\"'+name+'_whisper_input_text\" autocomplete=\"off\" spellcheck=\"true\" style=\"width:95%; min-height:30px; height:30px; padding: 6px 15px; margin:none;\"/></div></div>');
$('#whispers').append('<div id=\"'+name+'_whisper\" title=\"'+name+'\"><div id=\"'+name+'_whisper_text\" style=\"height:70%; width:95%; text-align:left; overflow-y:auto;\"><span style=\"color: #000000;\">'+name+': '+inittext+'</span><br /></div><div id=\"'+name+'_whisper_input\"><textarea id=\"'+name+'_whisper_input_text\" autocomplete=\"off\" spellcheck=\"true\" style=\"width:95%; min-height:30px; height:30px; padding: 6px 15px; margin:none;\"/></div></div>');
}else{
$('#whispers').append('<div id=\"'+name+'_whisper\" title=\"'+name+'\"><div id=\"'+name+'_whisper_text\" style=\"height:70%; width:95%; text-align:left; overflow:hidden;\"><span style=\"color: #585858;\">Du: '+inittext+'</span><br /></div><div id=\"'+name+'_whisper_input\"><textarea id=\"'+name+'_whisper_input_text\" autocomplete=\"off\" spellcheck=\"true\" style=\"width:95%; min-height:30px; height:30px; padding: 6px 15px; margin:none;\"/></div></div>');
$('#whispers').append('<div id=\"'+name+'_whisper\" title=\"'+name+'\"><div id=\"'+name+'_whisper_text\" style=\"height:70%; width:95%; text-align:left; overflow-y:auto;\"><span style=\"color: #585858;\">Du: '+inittext+'</span><br /></div><div id=\"'+name+'_whisper_input\"><textarea id=\"'+name+'_whisper_input_text\" autocomplete=\"off\" spellcheck=\"true\" style=\"width:95%; min-height:30px; height:30px; padding: 6px 15px; margin:none;\"/></div></div>');
}
}else{
$('#whispers').append('<div id=\"'+name+'_whisper\" title=\"'+name+'\"><div id=\"'+name+'_whisper_text\" style=\"height:70%; width:95%; text-align:left; overflow:hidden;\"></div><div id=\"'+name+'_whisper_input\"><textarea id=\"'+name+'_whisper_input_text\" autocomplete=\"off\" spellcheck=\"true\" style=\"width:95%; min-height:30px; height:30px; padding: 6px 15px; margin:none;\"/></div></div>');
$('#whispers').append('<div id=\"'+name+'_whisper\" title=\"'+name+'\"><div id=\"'+name+'_whisper_text\" style=\"height:70%; width:95%; text-align:left; overflow-y:auto;\"></div><div id=\"'+name+'_whisper_input\"><textarea id=\"'+name+'_whisper_input_text\" autocomplete=\"off\" spellcheck=\"true\" style=\"width:95%; min-height:30px; height:30px; padding: 6px 15px; margin:none;\"/></div></div>');
}
var obj = $('#'+name+'_whisper');
obj.dialog({ autoOpen: false, maxWidth: 600, maxHeight: 530, height: 300, minHeight: 250 });
$('#'+name+'_whisper_text').slimscroll({
color: '#00f',
size: '10px',
width: '95%',
height: '88%',
start: 'bottom'
});
obj.dialog({ autoOpen: false, maxWidth: 600, maxHeight: 530, width: 400, height: 300, minHeight: 250 });
$('#'+name+'_whisper_input_text').keydown(function(event) {
if (event.keyCode != null) kCode = event.keyCode;
else if (event.which != null) kCode = event.which;
@ -789,11 +786,10 @@ function inmeta2(){
$('#notchan').html(noticename[ncounter]);
}
</script>
<link type=\"text/css\" href=\"".$config["path"]."/themes/austria/base/jquery-ui-1.9.2.custom.css?ver=1238732\" rel=\"Stylesheet\" />
<link type=\"text/css\" href=\"".$config["path"]."/themes/austria/jquery.rightClickMenu.css?ver=12328732\" rel=\"Stylesheet\" />
<link type=\"text/css\" href=\"".$config["path"]."/themes/funchat/base/jquery-ui-1.9.2.custom.css?ver=1238732\" rel=\"Stylesheet\" />
<link type=\"text/css\" href=\"".$config["path"]."/themes/funchat/jquery.rightClickMenu.css?ver=12328732\" rel=\"Stylesheet\" />
<script src=\"//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js?ver=123324732\"></script>
<script type=\"text/javascript\" src=\"/modules/chat/js/jquery.rightClickMenu-1.0.js?ver=17843\"></script>
<script type=\"text/javascript\" src=\"/modules/chat/js/jquery.slimscroll.min.js?ver=1786172643\"></script>
<script type=\"text/javascript\">
var startcol;
@ -869,7 +865,8 @@ function inmeta2(){
$('#'+whispt[1]+'_whisper_text').append('<span style=\"color: #585858;\">Du: '+whispt[2]+'</span><br />');
$('#'+whispt[1]+'_whisper').dialog('open');
$('#'+whispt[1]+'_whisper').dialog('moveToTop');
$('#'+whispt[1]+'_whisper_text').slimscroll({ scrollBy: '500px' });
var wtarget = $('#'+whisp[1]+'_whisper_text');
$('#'+whisp[1]+'_whisper_text').animate({ scrollTop: wtarget.height()}, 500 );
}else{
create_whisper(whispt[1],whispt[2],true);
}
@ -880,7 +877,8 @@ function inmeta2(){
$('#'+whisp[1]+'_whisper_text').append('<span style=\"color: #000000;\">'+whisp[1]+': '+whisp[2]+'</span><br />');
$('#'+whisp[1]+'_whisper').dialog('open');
$('#'+whisp[1]+'_whisper').dialog('moveToTop');
$('#'+whisp[1]+'_whisper_text').slimscroll({ scrollBy: '500px' });
var wtarget = $('#'+whisp[1]+'_whisper_text');
$('#'+whisp[1]+'_whisper_text').animate({ scrollTop: wtarget.height()}, 500 );
}else{
create_whisper(whisp[1],whisp[2]);
}
@ -896,7 +894,8 @@ function inmeta2(){
}
$('#chatlog').append(msg);
if(as!=false){
$('#chatlog').slimscroll({ scrollBy: '5000px' });
var target = $('#chatlog');
target.animate({ scrollTop: target.height()}, 500 );
}
}//End message()