User:Ethan: Difference between revisions

From xat wiki
No edit summary
No edit summary
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{power-box
__NOTOC__
|power=size|heading=
SetScroller is a feature aimed at advanced users who want to set the chat scroller automatically from their server. e.g. showing tweets, displaying now/next on their radio station.
Resize Smilies
 
To use it, you will need your chat's '''id''' and '''pw''', which can be found in  your chat's Extra features link.
 
==Usage==
 
You can use the API manually via a web page here: http://xat.com/web_gear/chat/SetScroller.php
 
'''Example''':
{{pre|<nowiki>http://xat.com/web_gear/chat/SetScroller.php?Message=Hello%20all!&id=12345&pw=1234567890</nowiki>}}
Or you can access the API using a programming language.
 
'''Example of how to access the API in PHP''':
{{pre|<nowiki>
$message = "Hello all!"
$id = 12345;
$pw = 1234567890;
 
$url = "http://xat.com/web_gear/chat/SetScroller.php?Message=".urlencode($message)."&id={$id}&pw={$pw}";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
$content = curl_exec ($ch);
print "$content\n";
curl_close ($ch);
</nowiki>
}}
}}
{{img|image=http://i.imgur.com/1iS9haM.gif|description=A demonstrating gif}}
This power allows you to change the size of smilies and will allow you to make the smiley increase/decrease to a custom size with a custom time limit.
*'''Note''': This power might cause you lag. If this is the case, please see [[Macros]].


== Usage ==
'''Notes''':
The format on using this power is: (smile#size#wABCDE) where ABCDE are numbers 1-9
 
*A = Size 1 (modified size)
*You are limited to 1 update every minute.
*B = Size 2 (size it changes to from size 1)
 
*C = Time it takes to reach size 1
*The above uses the GET HTTP method, POST will also work.
*D = Time it takes to reach size 2
 
*E = It delays when the animation starts (1-9 seconds)
*If you reset your chat you will need to update your software to go to the new ID and PW. If you change your group password you'll need to update to use the new pass.
B to E are optional. '''e.g''' If you leave out B, C, D and E it will stay at one size max size only. Including B, but not C, D and E will make the smiley increase and decrease in size and use the default time to do so.
Default time setting = 8

Revision as of 12:35, 4 September 2016

SetScroller is a feature aimed at advanced users who want to set the chat scroller automatically from their server. e.g. showing tweets, displaying now/next on their radio station.

To use it, you will need your chat's id and pw, which can be found in your chat's Extra features link.

Usage

You can use the API manually via a web page here: http://xat.com/web_gear/chat/SetScroller.php

Example:

http://xat.com/web_gear/chat/SetScroller.php?Message=Hello%20all!&id=12345&pw=1234567890

Or you can access the API using a programming language.

Example of how to access the API in PHP:

$message = "Hello all!"
$id = 12345;
$pw = 1234567890;

$url = "http://xat.com/web_gear/chat/SetScroller.php?Message=".urlencode($message)."&id={$id}&pw={$pw}";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
$content = curl_exec ($ch);
print "$content\n";
curl_close ($ch);

Notes:

  • You are limited to 1 update every minute.
  • The above uses the GET HTTP method, POST will also work.
  • If you reset your chat you will need to update your software to go to the new ID and PW. If you change your group password you'll need to update to use the new pass.