MarioOlivier


I would like to use the getPlayerPresence info from the Xbox Live block and output it as text to use on a blog page. Is there any way to do this



Re: Output to text for use on blog?

AndyS


You can output to plain text the getPlayerPresence does have a default toString() that outputs HTML but it isn't so pretty. You could create a block that displays text such as the various table blocks. You will still need to make use of an iframe though but it can just be plain ol text.





Re: Output to text for use on blog?

MarioOlivier

Thanks for the reply Andy but I am not a programmer and didnt really understand a word of what you suggested.






Re: Output to text for use on blog?

AndyS

No problem.

What do you want the mashup to look like




Re: Output to text for use on blog?

MarioOlivier

Well to be honest it doesnt really need to be a mashup. All I want is to display the Current Status info and the Last Seen info on my blog. The ideal way to do it would be in html in iframe format so i can just add it to the blog actually. The only reason I thought of doing it with a mashup was because there is already a block that extracts that information from xbox live and I dont know of any other way to get that information.





Re: Output to text for use on blog?

RealHeartMozart [msft]

Hi,

Sorry about the long delay getting back to you.

What you want to do should be very easy - just create a mashup that outputs the desired information from the XBoxLive block, and then embed the mashup in your blog.

Unfortunately, the XBoxLive block seems to be broken. I've filed a bug and we'll get this fixed in an upcoming release.

Yours,

Michael






Re: Output to text for use on blog?

MarioOlivier

Thanks for the reply Michael.

Yes ok.. its easy enough to get to the info i want but what do I use for the output In other words.. what do I connect to the xbox block to give me the plain text output I need Preferably something that will let me change the font etc.





Re: Output to text for use on blog?

RealHeartMozart [msft]

You're welcome. Smile

Now I see the XBoxLive block is working again.

I think possibly the easiest way to get what you want is to format the html from the block yourself. A simple way to do so is like this:

1. Create Mashup

2. Add XBoxLive block to your mashup

3. Click the wrench

4. Change the operation to getPlayerPresence

5. Click to go into Advanced Mode

6. You will see a line of code like this:

Code Block
environment.output(result); // Output the result because there is no block to send it to.

This means that the results of the getPlayerPresence call are output to the browser.

7. If you don't like the default html that is output, you can do something like this

environment.output("<h1>"+result.GamerTag+"</h1>"); // Output the result because there is no block to send it to.

You can use result. with any field from the XboxLivePresence object. Let me know if you need some help understanding the structure of the XboxLivePresence object.

Yours, Michael