Compare commits

...

13 Commits

11 changed files with 949 additions and 783 deletions

View File

@ -1,3 +1,27 @@
Version 1.16.3 - Apr. 14, 2016
Fix warning on redirection of links without a scheme
Version 1.16.2 - Apr. 14, 2016
Add CSS classes and move more css to the database
Allow extreme captcha to be solved in both directions
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

1614
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 новые гости для одобрения',