Mibew Messenger Community
General => Support => Topic started by: sottwell on May 07, 2015, 04:07:12 PM
-
Several years ago I installed this for a client, and was able to use the visitor's existing session to pre-load the visitor's name into the popup. The Javascript for the popup was in a block that is parsed by the CMS, so I was able to use something like this
{user.username}
which the CMS would parse to return the visitor's username.
I don't see any simple way of doing this now. Any suggestions on how to reproduce this type of integration?
-
First of all I assume that you use Mibew 2.0.0. If you don't you should update your installation.
You could pass custom user name and email from you CMS to Mibew thread using "name" and "email" GET params respectively. Take a look at Mibew button's code. You should replace
Mibew.ChatPopup.init({"id":"<unique button code>","url":"\/mibew\/chat?locale=en"
with
Mibew.ChatPopup.init({"id":"<unique button code>","url":"\/mibew\/chat?locale=en&name=<user name>&email=<email address>"
-
Of course! I remember now. Thank you. I knew it was something simple.
That client has long since taken their site in-house so I have no idea what they're doing for online support now. I'm working with the latest version at the moment.
-
For any MODX users out there, it looks like this:
<script type="text/javascript">Mibew.ChatPopup.init({
"id":"<unique button code>",
"url":"http:\/\/domain.com\/mibew\/index.php\/chat?locale=en&name=[[+modx.user.id:userinfo=`username`]]&email=[[+modx.user.id:userinfo=`email`]]",
...
</script>