Vendor
MindTouch
Type Script
Categories Widget
Requires MindTouch Core 1.8.3 or later
Status Stable
License Free/Open Source
Manifest http://scripts.mindtouch.com/xboxlive.xml

 

Install Script
To add  this script to your site, enter the address of your MindTouch installation (ex: http://www.mindtouch.com) and click the Add Script button.  This will open your control panel and prepopulate the necessary values.  You will still need to manually add configuration settings if required.  Note that no changes are made to your site until you confirm the action in your control panel.
Your site address:     


Table of Contents

Description

This extension contains functions exposed by Xbox Live.

See also How to add a script, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.


Functions

xboxlive.avatar(gamerTag : str) : xml

Embeds a picture of your avatar for all to see!

Parameters:

NameTypeDescription
gamerTagstrYour Xbox Live gamer tag. It's your publically displayed name.


xboxlive.gamerCard(gamerTag : str) : xml

Embeds your gamer card in the wiki page.

Parameters:

NameTypeDescription
gamerTagstrYour Xbox Live gamer tag. It's your publically displayed name.


Script Source

<extension>
	<title>Xbox Live Extensions</title>
	<label>Xbox Live</label>
	<description>This extension contains functions exposed by Xbox Live.</description>
	<uri.help>http://wiki.developer.mindtouch.com/User:Guerric</uri.help>
	<namespace>xboxlive</namespace>


	<function>
		<name>gamerCard</name>
		<description>Embeds your gamer card in the wiki page.</description>
		<param name="gamerTag" type="str">Your Xbox Live gamer tag. It's your publically displayed name.</param>
		<return>
			<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
				<body>
					<iframe eval:src="'http://gamercard.xbox.com/'.. string.replace(uri.encode(args.gamerTag), '+', '%20') .. '.card'" scrolling="no" frameBorder="0" height="140" width="204"><eval:expr>args.gamerTag</eval:expr></iframe>
				</body>
			</html>
		</return>
	</function>

	<function>
		<name>avatar</name>
		<description>Embeds a picture of your avatar for all to see!</description>
		<param name="gamerTag" type="str">Your Xbox Live gamer tag. It's your publically displayed name.</param>
		<return>
			<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
				<body>
					<div style="width: 160px; text-align: center;" eval:title="args.gamerTag">
						<div eval:style="'height: 300px; background: transparent url(http://avatar.xboxlive.com/avatar/' .. string.replace(uri.encode(args.gamerTag), '+', '%20') .. '/avatar-body.png) no-repeat top center;'"></div>
						<a eval:href="'http://live.xbox.com/member/' .. string.replace(uri.encode(args.gamerTag), '+', '%20')">
							<eval:expr>args.gamerTag</eval:expr>
						</a>
					</div>
				</body>
			</html>
		</return>
	</function>

</extension>


Samples

  Output

To embed the Gamer Card widget:

{{ xboxlive.gamercard("wikinaut") }} 

To embed the full Avatar:

{{ xboxlive.avatar("wikinaut") }} 

 

Tag page (Edit tags)
You must login to post a comment.