Jump to content

IPS - ip.board


chat5html

16,787 views

 Share

This method is compatible with any version of IP.board

If you use ip.board, I'll teach you how to add a page for your chat application

  • First create a block

1123570692_annotely_image(1).png.60937ec11dd7a915f6c9df5c958e00c2.png

  • Choose these settings

Cattura.PNG

  • Inside enter all this code you see below

 

$_id_account = \IPS\Member::loggedIn()->member_id;
$name = \IPS\Member::loggedIn()->name;
$member_id = \IPS\Member::loggedIn()->member_id;
$gender = \IPS\Member::loggedIn()->profileFields()["core_pfieldgroups_3"]["core_pfield_2"];


 // POST VARIABILI
$id_code_pass = ''; // insert id token
$id_room = '3';     // insert id room
$sesso = $gender;        // insert gender - 1 man or 2 female, the INTEGRATION of this variable needs support, contact us
$role = 'user';   // insert role - create group roole - admin - moderator - deejay ecc
$anni_ = '23';        // insert age - create field group
$get_profile = '/index.php?/profile/'.$member_id.'-'.$name.'/'; // insert link profile

// user guest - use group ospite
if(empty($member_id)){
 $role = 'ospite';
}

$json = json_encode(array(
 'password'=>$id_code_pass,
 'id_account'=> $_id_account,
 'username'=> $name,
 'gender'=> $sesso,
 'role'=> $role,
 'birthyear'=> $anni_,
 'profile_link'=> "$get_profile",
 'immage_user'=> 'https://www.html5-videochat.com/homepage/img/logo_a.png',
 'room_id'=> $id_room
));
$encoded = file_get_contents("https://html5-videochat.com/applications/chat_webcam_personale/crypt.php/?code_crypt=".base64_encode($json));


echo <<<HTML
 <iframe id="iframeChat"  width="100%" height="100%" src="https://www.html5-videochat.com/index.php?/chat/$encoded" allowfullscreen="" allow="geolocation; microphone; camera; allowfullscreen; autoplay;" ></iframe>
HTML;

 

  • get the block id

1850434826_annotely_image(2).png.ca3518e3311f928d7880e1f77535020e.png

  • Create a page, to insert your chat;

500518413_annotely_image(3).png.4704f778e9f672f0103b255688e6cb7e.png

  • Use these settings

Cattura.PNG.4a2d0ad9be75ccb1574fc54e1e173469.PNG

  • Enter block id, created earlier
Quote

{block="blocco-index-chat"}

 

Create gender user

Go to profile fields

annotely_image.thumb.png.aea79f4e96b955faf4aa9d6f56e2ae03.png

Click on create new, I name the field gender

click the + button

1207926444_annotely_image(1).thumb.png.eb3b37baadcda00e25b00ac82ab7a5e3.png

Use these example parameter

Cattura.PNG.81b37b31b3cc5027cc0b2a38df513558.PNG 

 

At this point go to the created page and you will see your active chat, contact us to find any difficulties, we will give you support

 

 Share

0 Comments


Recommended Comments

There are no comments to display.

×
×
  • Create New...