Compare commits

...

10 Commits

Author SHA1 Message Date
f2c6d9fb95 Fixed a typo 2016-04-13 21:38:20 +02:00
8749eb0982 Fix language parameter overwrite 2016-04-13 20:08:20 +02:00
1c74441bb4 Better message routing and fixed handling of links with special characters 2016-04-13 20:01:26 +02:00
d4ef35e8ac Add better fatal error handling 2016-04-12 22:19:22 +02:00
0092abe964 Add option to let guests register themselves 2016-04-12 20:12:34 +02:00
333983a2c3 Fix guestaccess selection in setup 2016-04-11 16:20:28 +02:00
fd807ff5ff Add fallback option for moderator approval 2016-04-11 16:05:20 +02:00
bc3bb8e3a4 Attempt to create database when there is no connection 2016-04-11 16:05:07 +02:00
e181af4df5 Move some more settings to the database and add CSS to limit list of chatters hight 2016-04-11 16:02:27 +02:00
a22ffd83fd Several optimizations
Use constants for configuration
Simplify extreme captcha code generation
Add language setting to profile
Add checks for required extensions
2016-04-10 15:52:19 +02:00
11 changed files with 791 additions and 646 deletions

View File

@ -1,3 +1,20 @@
Version 1.16.1 - Apr. 13, 2016
Fixed a typo
Version 1.16 - Apr. 13, 2016
Use constants for configuration
Simplify extreme captcha code generation
Add language setting to profile
Add checks for required extensions
Move some more settings to the database
Add CSS to limit list of chatters hight
Attempt to create database when there is no connection
Add fallback option for moderator approval
Fix guestaccess selection in setup
Add option to let guests register themselves
Add better fatal error handling
Fixed handling of links with special characters
Version 1.15.3 - Mar. 6, 2016
Allow using html tags in linkfilter without breaking dereferrer or image embed
Added French translation

30
README
View File

@ -1,21 +1,3 @@
LE CHAT-PHP - a PHP Chat based on LE CHAT
Copyright (C) 2015-2016 Daniel Winzen <d@winzen4.de>
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, see <http://www.gnu.org/licenses/>.
GENERAL INFORMATION:
This is a PHP Chat based on LE CHAT v.1.14. An up-to-date copy of this script can be downloaded at https://github.com/DanWin/le-chat-php
@ -53,9 +35,15 @@ And more
INSTALLATION INSTRUCTIONS:
You'll need to have mysql, php and a web-server installed. For the captcha feature, you also need php5-gd.
If you want to make the script even faster, install a memcached server and php5-memcached and change the configuaration to use memcached. This will lessen the database load.
When you have everything installed, you'll have to create a database and a user for the chat in mysql.
You'll need to have php with pdo, pcre and date extension and a web-server installed.
You will also need the pdo_sqlite, pdo_mysql or pdo_pgsql extension, depending on which database you choose.
Optionally, you can install:
- the gd extension for the captcha feature
- the json extension for save/restore and a JavaScript helper for clients with enabled JavaScript.
- a memcached server and the memcached extension and change the configuaration to use memcached. This will lessen the database load a bit.
- a MySQL or PostgreSQL server to use as an external database instead of SQLite
- the openssl extension for encryption of messages and notes in the database
When you have everything installed and use MySQL or PostgreSQL, you'll have to create a database and a user for the chat.
Then edit the configuration at the bottom of the script to reflect the appropriate database settings and to modify the chat settings the way you like them.
Then copy the script to your web-server directory and call the script in your browser with a parameter like this:
http://(server)/(script-name).php?action=setup

View File

@ -38,9 +38,15 @@ Features:
Installation Instructions:
--------------------------
You'll need to have mysql, php and a web-server installed. For the captcha feature, you also need php5-gd.
If you want to make the script even faster, install a memcached server and php5-memcached and change the configuaration to use memcached. This will lessen the database load.
When you have everything installed, you'll have to create a database and a user for the chat in mysql.
You'll need to have php with pdo, pcre and date extension and a web-server installed.
You will also need the pdo_sqlite, pdo_mysql or pdo_pgsql extension, depending on which database you choose.
Optionally, you can install:
- the gd extension for the captcha feature
- the json extension for save/restore and a JavaScript helper for clients with enabled JavaScript.
- a memcached server and the memcached extension and change the configuaration to use memcached. This will lessen the database load a bit.
- a MySQL or PostgreSQL server to use as an external database instead of SQLite
- the openssl extension for encryption of messages and notes in the database
When you have everything installed and use MySQL or PostgreSQL, you'll have to create a database and a user for the chat.
Then edit the configuration at the bottom of the script to reflect the appropriate database settings and to modify the chat settings the way you like them.
Then copy the script to your web-server directory and call the script in your browser with a parameter like this:
http://(server)/(script-name).php?action=setup

1326
chat.php

File diff suppressed because it is too large Load Diff

View File

@ -180,7 +180,7 @@ $T=array(
'choosecol' => 'Gast, such dir eine Farbe aus:',
'randomcol' => 'Zufällige Farbe',
'enter' => 'Chat beitreten',
'error' => 'Fehler:',
'error' => 'Fehler',
'members' => 'Mitglieder',
'guests' => 'Gäste',
'approveguests' => '%d neue Gäste zum Hereinlassen',
@ -254,6 +254,7 @@ $T=array(
'captchatime' => 'Captcha-Ablaufzeit (Sekunden)',
'messageexpire' => 'Nachrichten-Ablaufzeit (Minuten)',
'messagelimit' => 'Nachrichtenlimit (öffentliche)',
'keeplimit' => 'So viele Male zusätzliche Nachrichten behalten (PMs und Mitgliederchat)',
'maxmessage' => 'Maximale Nachrichenlänge',
'confirm' => 'Bist du sicher?',
'yes' => 'Ja',
@ -311,6 +312,22 @@ $T=array(
'changenickname' => 'Nickname ändern',
'newnickname' => 'Neuer Nickname:',
'nicknametaken' => 'Nickname ist bereits vergeben',
'nopass' => 'Ungültiges Passwort (Mindestens %d Zeichen), Nickname nicht geändert'
'nopass' => 'Ungültiges Passwort (Mindestens %d Zeichen), Nickname nicht geändert',
'gdextrequired' => 'Für diese Funktion wird die gd Erweiterung von PHP benötigt. Bitte installieren Sie diese zuerst.',
'memcachedextrequired' => 'Die memcached Erweiterung von PHP wird benötigt, um die Cache-Funktion zu benutzen. Bitte installieren Sie diese zuerst oder setzen Sie die memcached Einstellung zurück auf false.',
'opensslextrequired' => 'Die openssl Erweiterung von PHP wird benötigt, um die Verschlüsselungs-Funktion zu benutzen. Bitte installieren Sie diese zuerst oder setzen Sie die encrypted Einstellung zurück auf false.',
'pdo_mysqlextrequired' => 'Die pdo_mysql Erweiterung von PHP wird für den ausgewählten Datenbanktreiber benötigt. Bitte installieren Sie diese zuerst.',
'pdo_pgsqlextrequired' => 'Die pdo_pgsql Erweiterung von PHP wird für den ausgewählten Datenbanktreiber benötigt. Bitte installieren Sie diese zuerst.',
'pdo_sqliteextrequired' => 'Die pdo_sqlite Erweiterung von PHP wird für den ausgewählten Datenbanktreiber benötigt. Bitte installieren Sie diese zuerst.',
'jsonextrequired' => 'Für diese Funktion wird die json Erweiterung von PHP benötigt. Bitte installieren Sie diese zuerst.',
'sendmail' => 'E-Mail bei neuer Nachricht senden',
'mailsender' => 'E-Mail mit dieser Adresse versenden',
'mailreceiver' => 'E-Mail and diese Adresse senden',
'modfallback' => 'Auf Warteraum rückgreifen, falls kein Moderator anwesend ist, um Gäste hereinzulassen',
'regpass' => 'Zum registrieren<br>Passwort wiederholen<br>(optional)',
'guestreg' => 'Gäste sich selbst registrieren lassen',
'asmember' => 'Als Mitglied',
'assuguest' => 'Als Anwerber',
'fatalerror' => 'Fataler Fehler'
);
?>

View File

@ -180,7 +180,7 @@ $I=array(
'choosecol' => 'Guests, choose a colour:',
'randomcol' => 'Random Colour',
'enter' => 'Enter Chat',
'error' => 'Error:',
'error' => 'Error',
'members' => 'Members',
'guests' => 'Guests',
'approveguests' => '%d new guests to approve',
@ -254,6 +254,7 @@ $I=array(
'captchatime' => 'Captcha timeout (seconds)',
'messageexpire' => 'Message timeout (minutes)',
'messagelimit' => 'Message limit (public)',
'keeplimit' => 'Keep this times additional messages (PMs and Member chat)',
'maxmessage' => 'Maximal message length',
'confirm' => 'Are you sure?',
'yes' => 'Yes',
@ -311,6 +312,22 @@ $I=array(
'changenickname' => 'Change nickname',
'newnickname' => 'New nickname:',
'nicknametaken' => 'Nickname is already taken',
'nopass' => 'Invalid password (At least %d characters), not changing nickname'
'nopass' => 'Invalid password (At least %d characters), not changing nickname',
'gdextrequired' => 'The gd extension of PHP is required for this feature. Please install it first.',
'memcachedextrequired' => 'The memcached extension of PHP is required for the caching feature. Please install it first or set the memcached setting back to false.',
'opensslextrequired' => 'The openssl extension of PHP is required for the encryption feature. Please install it first or set the encrypted setting back to false.',
'pdo_mysqlextrequired' => 'The pdo_mysql extension of PHP is required for the selected database driver. Please install it first.',
'pdo_pgsqlextrequired' => 'The pdo_pgsql extension of PHP is required for the selected database driver. Please install it first.',
'pdo_sqliteextrequired' => 'The pdo_sqlite extension of PHP is required for the selected database driver. Please install it first.',
'jsonextrequired' => 'The json extension of PHP is required for this feature. Please install it first.',
'sendmail' => 'Send mail on new public message',
'mailsender' => 'Send mail using this address',
'mailreceiver' => 'Send mail to this address',
'modfallback' => 'Fallback to waiting room, if no moderator is present to approve guests',
'regpass' => 'Repeat password<br>to register<br>(optional)',
'guestreg' => 'Let guests register themselves',
'asmember' => 'As member',
'assuguest' => 'As applicant',
'fatalerror' => 'Fatal error'
);
?>

View File

@ -180,7 +180,7 @@ $T=array(
'choosecol' => 'Invitado, elegí un color:',
'randomcol' => 'Color al azar',
'enter' => 'Entrar a la sala',
'error' => 'Error:',
'error' => 'Error',
'members' => 'Miembros',
'guests' => 'Invitados',
'approveguests' => '%d nuevos invitados para aprobar',

View File

@ -180,7 +180,7 @@ $T=array(
'choosecol' => 'Invitado, elija un color:',
'randomcol' => 'Color al azar',
'enter' => 'Ingresar a la sala',
'error' => 'Error:',
'error' => 'Error',
'members' => 'Miembros',
'guests' => 'Invitados',
'approveguests' => '%d nuevos invitados para aprobar',

View File

@ -180,7 +180,7 @@ $T=array(
'choosecol' => 'Invité, choisir une couleur:',
'randomcol' => 'Couleur aléatoire',
'enter' => 'Entrer',
'error' => 'Erreur:',
'error' => 'Erreur',
'members' => 'Membres',
'guests' => 'Invités',
'approveguests' => '%d nouveaux invités à approuver',

View File

@ -180,7 +180,7 @@ $T=array(
'choosecol' => 'Silahkan pilih warna:',
'randomcol' => 'Warna acak',
'enter' => 'Masuk obrolan',
'error' => 'Kesalahan:',
'error' => 'Kesalahan',
'members' => 'Anggota',
'guests' => 'Tamu',
'approveguests' => '%d tamu baru untuk disetujui',

View File

@ -180,7 +180,7 @@ $T=array(
'choosecol' => 'Гости выбирают цвет:',
'randomcol' => 'Случайный цвет',
'enter' => 'Войти в чат',
'error' => 'Ошибка:',
'error' => 'Ошибка',
'members' => 'Зарегистрированные',
'guests' => 'Гости',
'approveguests' => '%d новые гости для одобрения',