VIP Users

(v21.09+)

A VIP status is an upgrade of the normal status of the user. It can only be achieved by applying a VIP CODE. VIP users appear in chat with an emoji icon before their name or a fancy animated name, and depending on the settings, with elevated permissions. The VIP status is enabled for a fixed amount of time, and is not permanent.

A VIP code can be applied from PANEL » SETTINGS - there is a box APPLY VIP CODE at the bottom of the panel. In case several different VIP codes are applied by one user, the one applied last is active. A previously applied non-expired VIP code becomes active when all VIP codes applied after it expire.


VIP codes

VIP codes can be created en masse - AdminCP » VIP » {VIP slot} or generated dynamically with a VIP code generator. VIP codes can be sold or provided freely if certain conditions are fulfilled. Once applied, a VIP code cannot be reused and stays in the database forever or until the corresponding VIP slot is deleted. A valid VIP code is base64_encoded, and consists of the following elements separated by dashes: a random string (10 chars), the ID of VIP slot, length in hours (max 99999 = 11.4 years), a security hash (sha256):

b64encode(RandStr10-VIPslotID-LengthInHours-sha256(RandStr10VIPslotIDLengthInHoursVipSalt))

The followng PHP file (PHP 7+) would create and display a valid VIP code if fed with the correct vipslotid, vipslotsalt and lengthinhours. vipslotid and vipslotsalt can be found in AdminCP » VIP » {VIP slot}.

vipcode_generator.php?vipslotid=32&vipslotsalt=XXXXXXXXXXXX&lengthinhours=72

<?php

if(!function_exists('random_int')){die('PHP7+ is required!');}
if(!isset($_GET['vipslotid']) || !is_numeric($_GET['vipslotid'])){die('Missing or invalid vipslotid!');}
if(!isset($_GET['vipslotsalt']) || strlen($_GET['vipslotsalt'])<10){die('Missing or invalid vipslotsalt!');}
if(!isset($_GET['lengthinhours']) || !is_numeric($_GET['lengthinhours'])){die('Missing or invalid lengthinhours!');}

// ---

function create_vip_code($vipslotid,$vipslotsalt,$lengthinhours){

// symbols to create the random string with
$chars='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

// the initial empty random string
$random_string='';

// a loop to get a 10-char random string
for($i=0;$i<10;$i++){
    $random_string.=$chars[random_int(0,strlen($chars)-1)];
}

// creating security hash and shortening it to 50 symbols
$viphash=substr(hash('sha256',$random_string.$vipslotid.$lengthinhours.$vipslotsalt),0,50);

// creating the VIP code
$vipcode=base64_encode($random_string.'-'.$vipslotid.'-'.$lengthinhours.'-'.$viphash);

// removing trailing '=' from the ready VIP code
$vipcode=str_replace('=','',$vipcode); 

return $vipcode;
}

// ---

echo create_vip_code($_GET['vipslotid'], $_GET['vipslotsalt'], $_GET['lengthinhours']);

?>

Elevating permissions

User groups can be linked to VIP slots. It is recommended not to put users in groups that are linked to VIP slots. VIP permissions are additive - a VIP user enters the chat with all the permissions of the linked group without losing permissions from their normal group. An example: a VIP user being normally a member of a group with permission D (moderator), and the linked VIP group has no permission D - they'll keep their moderator permission in chat.


VIP users with CSS animations

You can easily add CSS animations to the users that are members of groups linked to VIP slots. Remove the emoji assigned to the corresponding VIP slot - otherwise it will be animated as well. The CSS selectors are to be put in AdminCP » Additions » Custom CSS. The following CSS code assumes that your groups linked to VIP slots are with IDs 22, 23 and 24 and therefore take styling from the following CSS selectors: .g22{...} .g23{...} .g24{...}.


.g22{background:linear-gradient(to right,red,orange,yellow,green,cyan,blue,violet);color:transparent;background-clip:text;-webkit-background-clip:text;animation:anim22 2s ease-in-out infinite}
@keyframes anim22{
15%{background:linear-gradient(to right,orange,yellow,green,cyan,blue,violet,red);color:transparent;background-clip:text;-webkit-background-clip:text}
30%{background:linear-gradient(to right,yellow,green,cyan,blue,violet,red,orange);color:transparent;background-clip:text;-webkit-background-clip:text}
45%{background:linear-gradient(to right,green,cyan,blue,violet,red,orange,yellow);color:transparent;background-clip:text;-webkit-background-clip:text}
60%{background:linear-gradient(to right,cyan,blue,violet,red,orange,yellow,green);color:transparent;background-clip:text;-webkit-background-clip:text}
75%{background:linear-gradient(to right,blue,violet,red,orange,yellow,green,cyan);color:transparent;background-clip:text;-webkit-background-clip:text}
90%{background:linear-gradient(to right,violet,red,orange,yellow,green,cyan,blue);color:transparent;background-clip:text;-webkit-background-clip:text}}

.g23{background:linear-gradient(to bottom,#8BC34A,#8BC34A);color:transparent;background-clip:text;-webkit-background-clip:text;animation:anim23 1.6s linear infinite}
@keyframes anim23{
10%{background:linear-gradient(to bottom,white,#8BC34A,#8BC34A,#8BC34A,#8BC34A);color:transparent;background-clip:text;-webkit-background-clip:text}
14%{background:linear-gradient(to bottom,#8BC34A,white,#8BC34A,#8BC34A,#8BC34A);color:transparent;background-clip:text;-webkit-background-clip:text}
18%{background:linear-gradient(to bottom,#8BC34A,#8BC34A,white,#8BC34A,#8BC34A);color:transparent;background-clip:text;-webkit-background-clip:text}
22%{background:linear-gradient(to bottom,#8BC34A,#8BC34A,#8BC34A,white,#8BC34A);color:transparent;background-clip:text;-webkit-background-clip:text}
26%{background:linear-gradient(to bottom,#8BC34A,#8BC34A,#8BC34A,#8BC34A,white);color:transparent;background-clip:text;-webkit-background-clip:text}
30%{background:linear-gradient(to bottom,#8BC34A,#8BC34A);color:transparent;background-clip:text;-webkit-background-clip:text}}


.g24{background:linear-gradient(to right,#42A5F5,#42A5F5);color:transparent;background-clip:text;-webkit-background-clip:text;animation:anim24 2s linear infinite}
@keyframes anim24{
14%{background:linear-gradient(to right,yellow,#42A5F5,#42A5F5,#42A5F5);color:transparent;background-clip:text;-webkit-background-clip:text}
16%{background:linear-gradient(to right,#42A5F5,yellow,#42A5F5,#42A5F5);color:transparent;background-clip:text;-webkit-background-clip:text}
18%{background:linear-gradient(to right,#42A5F5,#42A5F5,yellow,#42A5F5);color:transparent;background-clip:text;-webkit-background-clip:text}
20%{background:linear-gradient(to right,#42A5F5,#42A5F5,#42A5F5,yellow);color:transparent;background-clip:text;-webkit-background-clip:text}
25%{background:linear-gradient(to right,#42A5F5,#42A5F5);color:transparent;background-clip:text;-webkit-background-clip:text}
30%{background:linear-gradient(to right,violet,#42A5F5,#42A5F5,#42A5F5);color:transparent;background-clip:text;-webkit-background-clip:text}
35%{background:linear-gradient(to right,#42A5F5,violet,#42A5F5,#42A5F5);color:transparent;background-clip:text;-webkit-background-clip:text}
40%{background:linear-gradient(to right,#42A5F5,#42A5F5,violet,#42A5F5);color:transparent;background-clip:text;-webkit-background-clip:text}
45%{background:linear-gradient(to right,#42A5F5,#42A5F5,#42A5F5,violet);color:transparent;background-clip:text;-webkit-background-clip:text}
45%{background:linear-gradient(to right,#42A5F5,#42A5F5);color:transparent;background-clip:text;-webkit-background-clip:text}
100%{background:linear-gradient(to right,#42A5F5,#42A5F5);color:transparent;background-clip:text;-webkit-background-clip:text}}

VIP in multiple channels

When you are running mutiple channels with a master channel, all VIP options are enabled in the master channel only. A VIP code can be applied from any channel PANEL » SETTINGS » APPLY VIP CODE and you can link groups from the secondary channels to the VIP slots of the master channel.


How to sell VIP codes

You can sell VIP codes by installing and using any online store software that is familiar to you or popular in your region. You can also generate mutiple VIP codes and sell them via online services such as MyCommerce, e-Junkie, Simple Goods.


VIP-SHOP

Alternatively, we provide a separate add-on called VIP-SHOP to sell VIP codes in real time using Stripe as a processor of credit cards, GooglePay and ApplePay. VIP-SHOP is NOT included in BlaB! WS/AX Pro and must be purchased separately. VIP-SHOP settings are fully integrated in the Admin CP of the chat.

More about VIP-SHOP

Page updated: 2022-10-05
 
Powered by BlaB! Pages