Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2015-02-20 12:30:11

zaid.ilink
Member
Registered: 2015-02-20
Posts: 11

Unable to pass additional variables to online visitors list

I have tried this link https://livehelperchat.com/how-to-pass- … -302a.html but unable to achive that.

Do I have to do any configuration at admin side ?

Offline

#2 2015-02-20 12:31:10

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Unable to pass additional variables to online visitors list

No configuration,

Required, i tried myself this morning and all worked.

Offline

#3 2015-02-25 13:47:42

visconti
Member
Registered: 2015-02-25
Posts: 8

Re: Unable to pass additional variables to online visitors list

Hiya Remdex,

i'm trying it as well, and it's not working 100% here. The Visitor browse information tab is showing the additional information tab, but it has no content.

I'll get you some screens:

1424872038_screen_1.jpg
1424872016_screen_2.jpg
1424874635_screen_3.jpg

any idea what's wrong? I am making use of memcached

Last edited by visconti (2015-02-25 14:30:41)

Offline

#4 2015-02-25 14:54:51

visconti
Member
Registered: 2015-02-25
Posts: 8

Re: Unable to pass additional variables to online visitors list

Seems there's something wrong with the JSON_PRETTY_PRINT

if i change the echo'ing line in online_users_info.tpl.php from
<?php echo htmlspecialchars(json_encode(json_decode($online_user->online_attr),JSON_PRETTY_PRINT));?>

to

<?php echo $online_user->online_attr;?>


i'm getting the following echo:

1424876083_screen_4.jpg

Offline

#5 2015-02-25 15:18:22

visconti
Member
Registered: 2015-02-25
Posts: 8

Re: Unable to pass additional variables to online visitors list

getting there... almost tongue

i now have the following code in online_user_info.tpl.php

[== php ==]
<pre>
<ul class="list-unstyled">
<?php 
foreach (json_decode($online_user->online_attr) as $custom_attribute) {
    echo "<li>".$custom_attribute."</li>";
}
?>
</ul>
</pre>

echoing the values perfectly! however.. now i'm missing the values like: email, phone and username

Offline

#6 2015-02-25 15:50:15

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Unable to pass additional variables to online visitors list

Perhaps you have to old version which does not support JSON_PRETTY_PRINT
Because in my enviroment after

[== PHP ==]
<?php echo htmlspecialchars(json_encode(json_decode($online_user->online_attr),JSON_PRETTY_PRINT));?>

I get something like
1424879402_pretyprint.png

So in any case, all works here.

Offline

#7 2015-02-25 15:56:16

visconti
Member
Registered: 2015-02-25
Posts: 8

Re: Unable to pass additional variables to online visitors list

strange, maybe a server setting or so, running the latest instance of LHC.

Cheers for the confirmation though ;-)

Offline

Board footer