-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge chatserver.php and update chat code
- Loading branch information
Showing
5 changed files
with
47 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,37 @@ | ||
<?php | ||
/** | ||
* Akasia Template | ||
* | ||
* Copyright (C) 2015 Eddy Subratha ([email protected]) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
* | ||
*/ | ||
/** | ||
* Template for Backend | ||
* | ||
* Copyright (C) 2015 Arie Nugraha ([email protected]) | ||
* Create by Eddy Subratha ([email protected]) | ||
* | ||
* Slims 8 (Akasia) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
// Need to modified script to adaptive new theme | ||
include 'function.php'; | ||
// Need to modified script to adaptive new theme | ||
include 'function.php'; | ||
?> | ||
<!-- ===================================================================== | ||
___ __ ____ __ __ ___ __ _ _ __ ___ ____ __ | ||
/ __)( ) (_ _)( \/ )/ __) /__\ ( )/ ) /__\ / __)(_ _) /__\ | ||
\__ \ )(__ _)(_ ) ( \__ \ /(__)\ ) ( /(__)\ \__ \ _)(_ /(__)\ | ||
(___/(____)(____)(_/\/\_)(___/ (__)(__)(_)\_)(__)(__)(___/(____)(__)(__) | ||
|
||
By Eddy Subratha ([email protected]) | ||
|
||
========================================================================== --> | ||
|
||
<!DOCTYPE html> | ||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | ||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | ||
|
@@ -125,7 +124,7 @@ | |
<?php | ||
// Chat | ||
// ============================================= | ||
if($sysconf['chat_system']['enabled']) : ?> | ||
if($sysconf['chat_system']['enabled'] && $sysconf['chat_system']['librarian']) : ?> | ||
<aside class="s-chat s-maximize"> | ||
<a href="#" id="pchat-hide" class="s-chat-header"><?php echo __('Chat With Members'); ?></a> | ||
<div class="s-chat-content"> | ||
|
@@ -137,7 +136,7 @@ | |
</aside> | ||
|
||
<script> | ||
$.get('../chat_server.php', {}, function(){}); | ||
$.get('../chatserver.php', {}, function(){}); | ||
var Server; | ||
function log( text ) { | ||
$log = $('#log'); | ||
|
@@ -153,7 +152,7 @@ function send( text ) { | |
|
||
$(document).ready(function() { | ||
log('Connecting...'); | ||
Server = new FancyWebSocket("ws://<?php echo $sysconf['chat_system']['host'].':'.$sysconf['chat_system']['port']; ?>"); | ||
Server = new FancyWebSocket('ws://<?php echo $sysconf['chat_system']['server'] ?>:<?php echo $sysconf['chat_system']['server_port'] ?>'); | ||
$('#message').keypress(function(e) { | ||
if ( e.keyCode == 13 && this.value ) { | ||
log( 'You: ' + this.value ); | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters