If you want to enable the Instant Messenger for certain users (e.g. paid/premium users) the following examples might be usefull for you.
If only premium users should be allowed to start a chat, then you can prevent non-premium users to start from chatting by hiding the chatbar (chatbar→hideAll:true) and hide the list of all online users in the instant messenger (im→hide[“searchMenu”]).
For NON-Premium (paid) users, use this implementation code:
<script type="text/javascript"> var TOKSTA_CONFIG = { app_id: "your-application-id", user_id: "the-user-id", user_hash: "the-user-hash", user_data: "the-user-data", generated: "current-unix-timestamp", //Example 1 adjustments chatbar: { hideAll:true }, im: { hide["searchMenu"] } //---- }; </script>
If you want your free users to sign up for a paying (premium) account in order to be able to chat with your premium users you can redirect them if they click on a chat invitation. This is a very good oportunity to generate new premium users and thus increase your revenues
We will hide the chatbar for all free users like we did in Example 1 and if a chat invitation will be accepted (chatbar→on_accept) the user will be redirected to the premium-upgrade page (in this example: http://www.your-domain.com/premium-signup.php).
You can also increase the conversion by passing the some data of the user who started the chat (on_accept→from_user_id, on_accept→from_user_data) and as a result show an individual sign up page.
Use this code for all free users:
<script type="text/javascript"> var TOKSTA_CONFIG = { app_id: "your-application-id", user_id: "the-user-id", user_hash: "the-user-hash", user_data: "the-user-data", generated: "current-unix-timestamp", //Example 2 adjustments chatbar: { hideAll:true on_accept: function (from_user_id, from_user_data) { self.location.href = "http://www.your-domain.com/premium-signup.php"; } }, im: { hide["searchMenu"] } //---- }; </script>
If only premium users should be allowed to chat to each other, simply only implement the stickapps.com implementation code for premium users.