New feature: room search
In chatadmin, under config->design, you can now enable the quick room search feature that allows to quickly search and find a room by name by typing the first letters of the room.
You can now set the status of an user as offline after N seconds of inactivity (idle) in your chatadmin config : timeoutOffline (put 0 if you don’t need that feature)
If user leaves the inactivity, he retries his former status.
You can also disconnect an user after N seconds of inactivity in your chatadmin config: timeoutLogout (put 0 if you don’t need that feature)
in : chatadmin / config / users management
Roles can now enter a chat contest. A contest is simply when a chatter votes for another chatter.
A chatter can only vote once for another chat. He awards him 1 point.
You can enable a contest in the “roles” chat admin and reset the votes in your chatadmin panel as well.
When a vote is sent, a notification is sent to both users.
In your chatadmin, you also have the TOP 10 votes.
Possible scenario : your website runs a dating site where you can free users (role = guest) and paid users (role = user).
Of course free guest users cannot access all features that a paid user has.
Ex: a guest user cannot request a private chat.
We have 2 ways to solve that:
The pro of this second solution, is to incite the user to become a paid user on your site.
How to enable this second solution : go to your /chatadmin panel as usually and choose the “trial version chat messages”
If you specify the Url to be rediercted, the user will be redirected to that url, after he shows the message: this url will be probably the “purchase” or “register” page on your website.
2 new Tools available in /chatadmin/security to fight against flooding the chat
Maximum number of characters an user can send per message.
Default is 512.
When user tries to send a longer message, message is cropped to N-1 chars
Maximum number of RETURN character in a chat message.
Default value is 8
When users inserts more than N RETURN characters, messages is cropped.
When a new user enters an adult room, you can choose 3 actions.
These actions are defined in the security panel
You can :
The case “Hide the room if user is minor of 18”, implies you know the age of the user. We added the “age” on the registration panel.
If you use JWT to inject your data, then you can use that extra field:
birthyear
to add the year of birth of the user
ex: birthyear:1995
You can also use
seenByAdultOnly
that means that this member will be seen only by adults (if seenByAdultOnly=1)
For better readability and clarity we renamed:
“Send quick message” to “Mention”
and we remove the # and @ in texts and add clearly the avatar and the action of the user:
You clearly see now the avatar of the user you are sending a mention or a private text
You can however style use the shortcuts # and @ to autocomplete the user
# is for private message
@ is for mention.
This change also corrects the user of users that were containing some [SPACE] character inside their usernames.
Let suppose you want to join room id : 1620
(you can find out your room id in your chatadmin)
https://html5-chat.com/chat/54/?startRoom=1620

so for room : 1620, you just need to add
'startRoom'=>1620
So for instance your JSON will be:
$json = json_encode(array('username'=>'myUsername', 'password'=>'myChatAccountPassword', 'gender'=>'male', 'role'=>'user', 'image'=>base64_encode('https://html5-chat.com/img/malecostume.svg'), 'profile'=>'https://monsite.com/profile/myUserername', 'startRoom'=>1620));
PHP social is a cool social “facebook” like script. It is not free but has a moderated price of 49$.
We suppose we want to get a chat page in full screen, auto loggedon and called “chat”.
(You need to be registered and loggedon on netswing.fr to test it)
ex: https://www.netswing.fr/chat
Step1 : edit .htaccess and add this line
RewriteRule ^chat/?$ index.php?a=chat [NC]
Step2 : edit config.php and add
'chat' => 'chat',
Step3: download this script: chat , unzip it and edit it and change the 2 lines: webmasterid and password
$webmasterid = xxx; $password = 'xxxx';
Step4: FTP upload chat.php to /sources folder
Step5: Test that your chat works fine on https://www.netswing.fr/chat
Here is the source of chat.php
<?php
function PageMain() {
/*
* Change these 2 parameters and put your webmasterid and your chat password here
*/
$webmasterid = 'xxxxx'; // your webmasterid number
$password = 'yyyyy'; // your chat password
//
global $TMPL, $LNG, $CONF, $db, $user, $settings, $plugins;
if(!isset($user) || !isset($user['idu']) ) {
header("Location: ".$CONF['url']."/index.php?a=welcome");
}
$json = json_encode(array('id'=>$user['idu'], 'username'=>$user['username'], 'image'=>$CONF['url'].permalink('/thumb.php?t=a&w=112&h=112&src='.$user['image']),
'gender'=>($user['gender'] == 1) ? 'male' : 'female', 'role'=>'user', 'profile'=>$CONF['url']. '/profile/'.$user['username'], 'password'=>$password));
$encoded = file_get_contents("https://jwt.html5-chat.com/protect/".base64_encode($json));
ob_start();?>
<script src="https://jwt.html5-chat.com/script/<?=$webmasterid?>/<?=$encoded?>"></script>
<?php
$script = ob_get_clean();
echo $script;
exit;
}