Giter Site home page Giter Site logo

danwin / le-chat-php Goto Github PK

View Code? Open in Web Editor NEW
262.0 31.0 96.0 2.52 MB

A PHP Chat based on LE CHAT

Home Page: https://danwin1210.de/chat/

License: GNU General Public License v3.0

PHP 99.61% CSS 0.27% Shell 0.12%
tor php chat hidden-services hidden-service tor-hidden-services php-chat hacktoberfest

le-chat-php's Introduction

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 The original perl LE CHAT script by Lucky Eddie can be downloaded at this github fork. If you add your own cool features or have a feature request, please tell me and I will add them, if I like them. Please also let me know about any bugs you find in the code, so I can fix them. Now a piece of information about the origin of the name "LE CHAT" copied from the original script: The "LE" in the name you can take as "Lucky Eddie", or since the script was meant to be lean and easy on server resources, as "Light Edition". It may even be the French word for "the" if you prefer. Translated from French to English, "le chat" means: "the cat".

Features:

  • Optimized for Tor
  • No JavaScript needed
  • Cookies supported, but not needed
  • Captcha
  • Multiple languages
  • Members and guests
  • Waiting room for guests
  • Moderatoral approval of new guests
  • Public, member, moderator and admin only chats
  • Private messages
  • Multi-line messages
  • Change font, colour and refresh rate in profile settings
  • Autologout when inactive for some time
  • Image embedding
  • Notes for admins and moderators
  • Clone the chat to have multiple tabs
  • Kick chatters
  • Clean selected messages
  • Clean the whole room
  • Plain text message filter
  • Regex message filter
  • And more

Installation Instructions:

You'll need to have php with intl, gettext, pdo, pcre, mbstring 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
  • a memcached server and the memcached extension and change the configuration 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 libsodium extension (PHP >= 7.2) 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 Now you can create the Superadmin account. With this account you can administer the chat and add new members and set the guest access. As soon as you are done with the setup, all necessary database tables will be created and the chat can be used. Note: If you updated the script, please visit http://(server)/(script-name).php?action=setup again, to make sure, that any database changes are applied and no errors occur.

Translating:

Translations are managed in Weblate. If you prefer manually submitting translations, the script update-translations.sh can be used to update the language template and translation files from source. It will generate the file locale/le-chat-php.pot which you can then use as basis to create a new language file in YOUR_LANG_CODE/LC_MESSAGES/le-chat-php.po and edit it with a translation program, such as Poedit. Once you are done, you can open a pull request, or email me, to include the translation.

Regex:

Yes, the chat supports regular expression filtering of messages. As regex tends to be difficult for most people, I decided to give it an extra section here. Regex is very powerful and can be used to filter messages that contain certain expressions and replace them with something else. It can be used e.g. to turn BB Code into html, so it is possible to use BB Code in the chat to format messages. To do this, use this Regex-Match \[(u|b)\](.*?)\[\/\1\] and this Regex-Replace <$1>$2</$1> and your text will be [b]bold[/b] or [u]underlined[/u]. You can also use smilies by using this Regex-Match (?-i::(cry|eek|lol|sad|smile|surprised|wink):) and this Regex-Replace <img src="/pictures/$1.gif" alt=":$1:"> And now if you enter :smile: an image with the smiley will be loaded from your server at /pictures/smile.gif. The following should be escaped by putting \ in front of it, if you are trying to match one of these characters / \ ^ . $ | ( ) [ ] * + ? { } ,. I used / as delimiter, so you will have to escape that, too. The only options I used is i to make the regex case insensitive. If you want to test your regex, before applying you can use this site and enter your Regex and Replacement there and click on preg_replace. If you never used regex before, check out this starting guide to begin with regular expressions.

le-chat-php's People

Contributors

danwin avatar egeforreal avatar fadkeabhi avatar finnboy94 avatar infoabcd avatar takecmd avatar vitich avatar weblate avatar wolf128058 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

le-chat-php's Issues

Chat rooms

Let admins define a static number of rooms and add an option to allow dynamic room creation by users for group chatsfixed number

Unable to install

I have included my DB, using wamp before I move over to a pi, I put in the DB settings and set it to 0(default), it soon as I go to active=setup it shows the admin password section, and just empties the out put soon as I add anything, so I look in the DB, its not written anything to the DB at all.

No errors at all its just not doing it, this is the version 1.23.1

From what I can see in the code I not seeing any of the setup section it just jumps to admin login.

PHP Version: 5.6.25
Server Software: Apache/2.4.23 (Win64) PHP/5.6.25 - Port defined for Apache: 80
Loaded Extensions :
apache2handler
bcmath
bz2
calendar
com_dotnet
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
odbc
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
wddx
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib
MySQL Version: 5.7.14

Bots

Add bot users that will react to certain commands

Re-implement permission system

Move away from static guest, member, mod, admin system and allow to dynamically create groups to manage permissions much more granularly.

Smarter session expiration handling

When the session is about to expire, server could send the page update to user for last time with note of session expiry and no auto-refresh after that.

failed to login admin?

MySQL Version: 5.6.30
PHP Version: 5.6.22
i am running server is raspberry pi(OS raspbian)

nickname is: "jingjinghack"
password is: "opsb990.."
2016-11-13 14-28-51
2016-11-13 14-31-54

Bug: Session Cookies are not validated across multiple clients

The chat does not validate session cookies across multiple clients when the client is a guest username. This effectively allows a user to control a guest user's account without the user being authenticated, and thus allows "eavesdropping" and arbitrary control of a guest user's account. This was executed as a proof of concept at https://chat.danwin1210.me/ by specifying a guest username that is already logged in at the login prompt.

Staff log

Keep track of staff actions to identify who did what in case there is a bad actor

Plis Help ME

Hello, how can I put to the side of the chat the list of connected users

/me messages and [permissions] display

When using the /me styling for messages defined on lines 2906-2908, it ignores the chosen recipient field when determining display. It properly maintains chosen view permissions, on who actually sees it, which is most important; but could lead to confusion when it does not also carry the msgsendmod or similar message permission variable before it in the view frame. With PMs the handling would be more complicated, since it normally displays the recipient name after the sender name. But for [M] [S] or [A] messages, there would be no problem with displaying those variables before the /me message. It seems like it could be done by adapting the code from lines 2867-2882.
I do not run a copy of your chat to test this change on at this time, but hope my description was clear enough to understand the issue I mention and see a way to fix it.
thank you

le chat on hostingsystem

Hi, i cannot install le chat on Daniels hosting, so the setup action cannot find the mysql table.
All logins and users are correct,

Moderation view

Add an option to turn the default message view into an extended view for ease of moderating, without having to go through the admin panel each time.

Error Setting Up

I keep editing the configuration for the database then do chat.php?action=setup and nothing happens. Is there like a video I can see to set this up. Nothing works, only a blank page pops up.

kick-vote

Multiple guests or members vote to kick after reaching a given percentage of consensus

Global ignore

Mute a spammer for everyone but them, so the spammer doesn't notice he was silenced.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.