originally posted in:BungieNetPlatform
I'm currently building a new userscript which extends the current BBCode formatting of the site. So far I've got things like strikethrough, code, imgur album embedding, lists, and so on. One of the other things I'm currently adding is a [post] tag, which lets you specify a post id and embeds the remote post within your own post.
What I would like to have is a little widget, something similar to [url=http://support.twitter.com/articles/20169559-embedding-a-tweet-on-your-website-or-blog]what Twitter has for Tweets[/url]. So given [url=http://www.bungie.net/Platform/Forum/GetPostAndParent/59939429/?showbanned=]a response for GetPostAndParent[/url], it should display at the very least:
1. The author and a link to their profile
2. The post body
3. The post date (creation date)
4. A link to the post in context
Anything else would probably be superfluous. It might be a good idea to make it collapsible to only show x lines of body text until it's interacted with.
The widget should be a component created with Javascript (ie. a function) so I can put it in a userscript, and it should take, at the very least, the post id of the post to be embedded. It should immediately return a string of HTML/jQuery object which has some uniqueness (ie. a div with a data-embedded-post-id attribute) to be inserted into the page, make the request to the bungienetplatform for the post, and then update the unique element on the page using the data from the response once it arrives. And be fault tolerant.
Full credit to the author of the widget of course.
-
I just updated the script for this to fix a bug - it's still up on Github if you intend to use it :)
-
I sent you a note with a DropBox link to the js file I put together for this. If it needs tweaking, just let me know!
-
Do you want nested embedded posts to be supported? I'm figuring on yes but thought I'd clarify.
-
Edited by Krimm: 11/19/2013 7:25:08 AMIgnore [post id='60532107']this[/post]. Just needed a sample quote.
-
Damnit just get hired by Bungie already.
-
Another BNext member PM'd me that he was going to take a crack at this. Did he ever send it to you?
-
So you want a script that will fetch the data and feed it to A - the widget so the user can verify what post he's embedding without altering its contents and B - the user script so it can interpolate the appropriate HTML output into whichever element contains the [post] tag. Is that correct, and are you still waiting for this?
-
Im not familiar with BB code, only HTML, CSS, and Java. So cant help you there :/
-
I would love a desktop forum widget that's always open on the forums, so I can just scroll through and reply whenever I want. That would be lovely.
-
-
Interesting, can't wait to see the final product.