General > Support
Session Integration
(1/1)
sottwell:
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
--- Code: ---{user.username}
--- End code ---
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?
Dmitriy Simushev:
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
--- Code: ---Mibew.ChatPopup.init({"id":"<unique button code>","url":"\/mibew\/chat?locale=en"
--- End code ---
with
--- Code: ---Mibew.ChatPopup.init({"id":"<unique button code>","url":"\/mibew\/chat?locale=en&name=<user name>&email=<email address>"
--- End code ---
sottwell:
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.
sottwell:
For any MODX users out there, it looks like this:
--- Code: ---<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>
--- End code ---
Navigation
[0] Message Index
Go to full version