Tuesday, February 24, 2009

DeviantArt BBCode

Here's a phpBB3 BBCode definition to allow people to easily display DeviantArt work in their forum:

BBCode usage
HTML replacement
<div><object width="450" height="{NUMBER1}"><param name="movie" value="http://backend.deviantart.com/embed/view.swf"></param><param name="flashvars" value="id={NUMBER2}" /><embed src="http://backend.deviantart.com/embed/view.swf" type="application/x-shockwave-flash" width="450" flashvars="id={NUMBER2}" height="{NUMBER1}"></embed></object>
<br />[ <a href="http://www.deviantart.com/deviation/{NUMBER2}">Direct Link</a> ]</div>

Unfortunately, this is as easy as I could make it. The user still needs to hunt for the correct numbers. The first number, {NUMBER1}, specifies the object height and can be anything, but ideally it you should use height value used for the object that you can find in the embed fields on the DeviantArt art page. The second number, {NUMBER2}, needs to be the number of the art piece. You can get this from the URL. For example, with the URL http://microugly.deviantart.com/art/A-Tiger-100706280 the number will be 100706280. So the entire BBCode usage will be [da=535]100706280[/da].

No comments:

Post a Comment