Special codes

From xat wiki

xat allows the use of BBCode-esque formatting to allow you to easily embed popular services on your profile or chat group.

Use a special codes generator for ease of producing special codes.

Note:

  • Both HTTP and HTTPS (SSL) websites are supported.
  • All sizes work with percentages, e.g: [chat:45%:35%:chat id:chat name].

Embedding a Chat

To embed a chat group, you will need to know the chat's ID and name. You can use this tool to help you.

  • [chat:width:height:chat id:chat name]

For example, http://xat.com/xat_Test chat ID is 5, and its name is xat_Test. This means the code will look like this:

  • [chat:728:486:5:xat_test]

Embedding a YouTube video

To embed YouTube videos, you need to copy the video ID from the URL and put it in place of video id.

  • [youtube:width:height:video id:options]

For example, if https://www.youtube.com/watch?v=Qyclqo_AV2M was your desired video, Qyclqo_AV2M would be the video ID and to use this video on chats and profiles, you will need to use the following code:

  • [youtube:200:200:Qyclqo_AV2M:8]

In the example above, no options were set but you can use the following:

  • autoplay=1
  • Due to YouTube policy, not all videos will auto-play automatically for all users.
  • loop=1

An example with options set:

  • [youtube:200:200:Qyclqo_AV2M:autoplay=1&loop=1]

Note: If you want to make the video invisible, set the height and width values to 1.

  • [youtube:1:1:Qyclqo_AV2M:autoplay=1&loop=1]

You can also force different video resolutions:

  • [youtube:1:1:Qyclqo_AV2M:autoplay=1&loop=1&vq=hd1080]

The options are, in ascending quality: vq=hd720, vq=hd1080, vq=hd1440, vq=hd2160.

In addition, you can use YouTube playlists. For example, if https://www.youtube.com/playlist?list=PLmo4pBukfRoN8SB5RKvfiY9CTl9pI_IFc was your desired playlist, PLmo4pBukfRoN8SB5RKvfiY9CTl9pI_IFc would be the playlist ID. Add the ID of the first video in the playlist, followed by the playlist ID, as such:

  • [youtube:500:400:Qyclqo_AV2M:autoplay=1&list=PLmo4pBukfRoN8SB5RKvfiY9CTl9pI_IFc]

Embedding a Radio

xat recommends the embedding of radios via the service xatRadio. You can still use services such as SHOUTcast and Icecast.

  • [radiohtml:width:height:player id]

Replace player id with your xatRadio player ID, which can be found on the manage page under the "URL" heading.

Other radio services use the following, similar, format:

[radiohtml5:ip:port:extra]

  • IP = Streaming IP.
  • Port = Streaming Port.
  • Extra = Streaming mount point. (shoutcast/icecast)

[radio:width:height:ip:port:extra:skin]

  • IP = Streaming IP.
  • Port = Streaming Port.
  • Extra = Streaming mount point. (shoutcast/icecast)
  • Available skins: 3dpixelstyle, atomicred, bekle, bluemetal, comet, controlpanel, dangdang, fashion, festival, grungetape, icecreamsneaka, kleur, magma, metarby10, modieus, nacht, neon, pearlized, pixelize, playcaso, schoon, seawave, silverywhite, sneal, stijl, traganja

Embedding from Spotify

To embed a Spotify track, playlist or album, you will need to know the track ID, playlist ID or album ID respectively. More information can be found on Spotify about how to obtain the ID for each feature.

  • [spotify:track:id:width:height]
  • [spotify:playlist:id:width:height]
  • [spotify:album:id:width:height]

For example:

  • [spotify:album:1DFixLWuPkv3KT3TnV35m3:300:380]

Embedding from Facebook

Embedding a page

To embed a Facebook Page and its posts, you just need the name of the desired page.

  • [box:fbposts:width:height:page name]

Replace page name with the name of the Facebook Page you want to embed.

For example:

  • [box:fbposts:300:400:xatchats]

Embedding a comments box

To embed a Facebook comments box, you need a unique token code. This code can be anything you want, and is used to distinguish between other users with other comments boxes.

  • [box:fbcomments:height:width:your token]

For example:

  • [box:fbcomments:height:width:xatchats]

Embedding a like box

Once again, to embed a Facebook like box, you only need the name of the desired page.

  • [fblike:page name]

For example, to embed a xat Facebook like box:

  • [fblike:xatchats]

Embedding from Twitter

Use the following code to embed a Twitter profile:

  • [box:twitter:width:height:page name]

For example:

  • [box:twitter:300:400:xat]

Embedding from Geovisite

You first need to register on Geovisite to create your own globe and clock.

For the following codes, the geo id variable refers to the identification number of your Geovisite account. To access it, simply login in here.

Note: Geovisite is not affiliated with xat. We strongly suggest you to use a different password on Geovisite than on xat.

Embedding a globe

Use the following code to embed a globe:

  • [box:globe:width:height:geo id]

For example:

  • [box:globe:180:190:398644531899]

Embedding a view counter

Use the following code to embed a view counter (named clock on Geovisite):

  • [box:counter:width:height:geo id]

For example:

  • [box:counter:200:200:398644531899]

Embedding from RevolverMaps

To embed a globe from RevolverMaps, first generate your embed code at their website: https://www.revolvermaps.com/?target=setupgl.

Once the code is generated, take the i= part and add it into the following code:

  • [box:revolvermaps:width:height:i:value]

For example:

  • [box:revolvermaps:645:645:i:0qkv5b2uq9f&m=0&c=ff0000&cr1=ffffff&f=trebuchet_ms&l=1&rs=50]

Due to security reasons, some characters have to be changed from the original code, so in your code replace & with - and = with : so that your code looks something like this:

  • [box:revolvermaps:645:645:i:0qkv5b2uq9f-m:0-c:ff0000-cr1:ffffff-f:trebuchet_ms-l:1-rs:50]

You should now be able to use the code on your profile. If you get stuck, please use our special codes generator.

Embedding a bubble shooter game

You can embed a bubble shooter game by using the following code:

  • [box:bs:width:height:n]

n refers to the color of the background and can be replaced by any integer between 1 and 10.

1 is default, 2 is blue, 3 is sea, 4 is orange, 5 is pink, 6 is green, 7 is yellow, 8 is white, 9 is red and 10 is purple.

  • Note: Using a different size than the default one (645x645) may break the design.

For example:

  • [box:bs:645:645:1]

Custom Fonts

You can use custom font types from Google Fonts with the following code:

  • [font:font name]

For example, to use the Open Sans font, the code will look like this:

  • [font:Open Sans]

Icons

Before using any icons, you must first include the library that you wish to use. There is currently support for the following icon libraries:

Once you have found the desired icon, and have included the correct library, use the following format to display the icon:

  • [icon:icon_name:icon_size]

The icon sizes must be 1-100 pixels.

When using the Bootstrap or Font Awesome libraries, you do not need to include the "fa fa-" or "glyphicon glyphicon-" prefixes, only the main word.

For example:

  • The "fa fa-comments" icon from Font Awesome uses the code: [icon:comments:icon_size]
  • The "glyphicon glyphicon-asterisk" icon from Bootstrap uses the code: [icon:asterisk:icon_size]

Suggestions

If you have any suggestions for new special codes or how to improve the current system, please click here and post a new thread with your suggestions.

More codes may be added with time.