Jump to content

Chatroll Php Chat


TK0001

Recommended Posts

Hello Im using chatroll chat in iframe tags and it works as well.

Chatroll also has php application but i cant figure out howto make it work in my website. The code of Php Application

<?php
// Chatroll Single Sign-On (SSO) Parameters
$uid = 1;				   // Current user id
$uname = 'test';		    // Current user name
$ulink = 'http://example.com/profile/test';   // Current user profile URL (leave blank for none)
$upic = '';				 // Current user profile picture URL (leave blank for none)
$ismod = 0;				 // Is current user a moderator?
$sig = md5($uid . $uname . $ismod . 'dwcbbkhmrlldo28m');
$ssoParams = '&uid=' . $uid . "&uname=" . urlencode($uname) . "&ulink=" . urlencode($ulink) . "&upic=" . urlencode($upic) . "&ismod=" . $ismod . "&sig=" . $sig;
?>
<iframe width='450' height='350' src='http://chatroll.com/embed/chat/thy-crew?id=B0mMF3LTJ7V&platform=php<?= $ssoParams ?>&w=$0' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' allowtransparency='true'></iframe>

I just could not figure out what is the variables of $uname $ulink $upic

In the chatroll website they say:

To enable Single Sign-On (SSO) and integrate with your PHP application's user profile system:

(a) Assign correct values for the uid, uname, ulink and upic variables.

(B) Enable the Single Sign-On (SSO) feature from your Chatroll's settings page.

I could not get more support from them.

Best Regards

Link to comment
Share on other sites

  • 1 month later...
  • Members

Hi i hope i didnt saw it to late :)

I created a module for you so you can use it with phpvms

you can download it for here http://www.baggelis.com/chatroll.zip

step 1

edit chatroll.tpl and replace my html with yours at

<iframe width='450' height='350' src='http://chatroll.com/embed/chat/eglc?id=6NhhxB113LP&platform=php<?= $ssoParams ?>&w=$0' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' allowtransparency='true'></iframe>
<div style='font-size:0.9em;text-align:center;'><a href="http://chatroll.com/solutions/live-chat-software">PHP Live Chat Software</a></div>

step 2

save and just copy the chatroll folder into your modules folder and the tpl file into the templates folder that is located in /core/templates and make a link to http://www.yoursite....ex.php/chatroll and thats all

if you still need it tell me so i can add the functionality whoever is admin to be a moderator as well or if you need any help

Link to comment
Share on other sites

  • 4 years later...
  • 1 year later...
On 4/24/2013 at 3:19 AM, TK0001 said:

Hello Im using chatroll chat in iframe tags and it works as well.

Chatroll also has php application but i cant figure out howto make it work in my website. The code of Php Application

 


<?php
// Chatroll Single Sign-On (SSO) Parameters
$uid = 1;				   // Current user id
$uname = 'test';		    // Current user name
$ulink = 'http://example.com/profile/test';   // Current user profile URL (leave blank for none)
$upic = '';				 // Current user profile picture URL (leave blank for none)
$ismod = 0;				 // Is current user a moderator?
$sig = md5($uid . $uname . $ismod . 'dwcbbkhmrlldo28m');
$ssoParams = '&uid=' . $uid . "&uname=" . urlencode($uname) . "&ulink=" . urlencode($ulink) . "&upic=" . urlencode($upic) . "&ismod=" . $ismod . "&sig=" . $sig;
?>
<iframe width='450' height='350' src='http://chatroll.com/embed/chat/thy-crew?id=B0mMF3LTJ7V&platform=php<?= $ssoParams ?>&w=$0' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' allowtransparency='true'></iframe>

 

 

I just could not figure out what is the variables of $uname $ulink $upic

In the chatroll website they say:

To enable Single Sign-On (SSO) and integrate with your PHP application's user profile system:

(a) Assign correct values for the uid, uname, ulink and upic variables.

(B) Enable the Single Sign-On (SSO) feature from your Chatroll's settings page.

I could not get more support from them.

Best Regards

Hi everyone.
I integrated the following code with the related changes (code) and apparently the chat works.
If I click on the driver's profile, I am sent back to the chat site https://chatroll.com/ and not to the driver's profile.
Thanks for a possible reply

 

<? // Chatroll Single Sign-On (SSO) Parameters
 $userinfo= Auth::$userinfo;
 $uid = $userinfo->pilotid; // Current user id
 $uname = Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname; // Current user name
 $ulink = url('/profile/view/'.$userinfo->pilotid); // Current user profile URL (leave blank for none)
 $upic = PilotData::getPilotAvatar($pilotid); // Current user profile picture URL (leave blank for none)  
 if (Auth::$userinfo->pilotid==1) // Is current user a moderator?
     { $ismod = 1; }
 else  
     { $ismod = 0; }  
 $sig = md5($uid . $uname . $ismod . '0m9lz2hd44k2duyh');
 $ssoParams = '&uid=' . $uid . "&uname=" . urlencode($uname) . "&ulink=" . urlencode($ulink) . "&upic=" . urlencode($upic) . "&ismod=" . $ismod . "&sig=" . $sig;
?>

<iframe width='450' height='350' src='https://chatroll.com/embed/chat/virtual-airlines-chat?id=IhQNVCJBoPf&platform=php<?= $ssoParams ?>' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' allowtransparency='true'></iframe>

Edited by gio1961
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...