profile

How to add link to profile ?

profileYou can easily add a link to your user profile (when you have that feature in your existing website)  in html5chat by adding the profile parameter into the JWT connection.

For that you need to define the url link that leads to your profile and pass that into the profile parameter

ex: ‘profile’=>’https://www.mysite.com/user/myUsername’

Step 1: you create an array of your user such as:

$json = json_encode(array('username'=>'myUsername', 'profile'=>'http://www.mysite.com/user/myUsername',  'password'=>'myPassword', 'gender'=>'male', 'role'=>'user', 'avatar'=>'https://html5-chat.com/img/malecostume.svg'));

Step 2 : you encode it using the html5 JWT online service

$encoded = file_get_contents("https://html5-chat.com/protect/".base64_encode($json));

Step 3 : you inject that encoded string into your JS script

<script src="https://html5-chat.com/script/xxxxx/<?=$encoded?>"></script>

where xxxxx is your webmasterid parameter.

And that’s ALL !

 

 

3 thoughts to “How to add link to profile ?”

  1. After I initially commented I seem to have clicked
    the -Notify me when new comments are added- checkbox and from
    now on whenever a comment is added I receive 4
    emails with the same comment. Is there a way you can remove me from that service?
    Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.