{"id":49,"date":"2017-07-29T09:01:14","date_gmt":"2017-07-29T09:01:14","guid":{"rendered":"https:\/\/html5-chat.com\/blog\/?p=49"},"modified":"2017-07-29T09:01:14","modified_gmt":"2017-07-29T09:01:14","slug":"display-info-about-user-in-the-chat-how-to-do-that","status":"publish","type":"post","link":"https:\/\/html5-chat.com\/blog\/display-info-about-user-in-the-chat-how-to-do-that\/","title":{"rendered":"Display info about user in the chat: how to do that ?"},"content":{"rendered":"<p>We recently added new feature: display info about user inside the chat.<\/p>\n<p>Go to your <a href=\"https:\/\/html5-chat.com\/chatadmin\">admin panel <\/a>and choose chat config-&gt;users management.<\/p>\n<p>Then enter the script you want to be executed when right click on user inside the text input <strong>&#8220;Add context menu &#8216;userInfo'&#8221;<\/strong><\/p>\n<p>ex: enter there<\/p>\n<blockquote><p>bootbox.alert(&#8216;Custom javascript about &lt;b&gt;{username}&lt;\/b&gt;&lt;br&gt;You can redirect to your own script or url with parameter: username&#8217;);<\/p><\/blockquote>\n<p>when user right click on an user, it will show the context menu &#8220;user Info&#8221;. If user clicks on that item, the javascript bootbox.alert(..) will be executed.<\/p>\n<p>&nbsp;<\/p>\n<p>Notice that you have a dynamic field called\u00a0{username} where you get the username. This is useful to make an ajax call and retrieve data about the user or open an url such as userInfo.php?username=username<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We recently added new feature: display info about user inside the chat. Go to your admin panel and choose chat config-&gt;users management. Then enter the script you want to be executed when right click on user inside the text input &#8220;Add context menu &#8216;userInfo&#8217;&#8221; ex: enter there bootbox.alert(&#8216;Custom javascript about &lt;b&gt;{username}&lt;\/b&gt;&lt;br&gt;You can redirect to your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/comments?post=49"}],"version-history":[{"count":3,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":52,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/49\/revisions\/52"}],"wp:attachment":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/media?parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/categories?post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/tags?post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}