Skip to content
S. D. Salyer edited this page Oct 17, 2017 · 1 revision

Welcome to the ap_shortcodes.js Wiki!

What is ap_shortcodes.js?

A fork of Shortcode.js, providing BBCode/WordPress-style "shortcodes" tailored to the needs of tabletop role-playing game bloggers (or forum administrators) who post "actual play" reports on their site. See README.md for other basic information.

What this Wiki Should Contain

The short answer is: whatever it needs to contain. Examples: detailed instructions, example usage, community-contributed shortcodes and CSS styles that are not in the master branch, explanations of the JavaScript code, etc.

What is an Actual Play and Why Should I Care?

An "actual play" report, or AP, is a blog or forum post sharing the details of a pen and paper role-playing adventure for others to enjoy online. These posts typically involve the expected blog-style setup and commentary amidst a mixture of narration and game play elements. It's not always easy or straightforward for blog authors to distinctly style (or obfuscate, if you're trying to avoid spoilers) these separate elements to better distinguish them for readability, aesthetics, or even dramatic effect.

If you post your actual plays online and are permitted to add JavaScript to your site, ap_shortcodes.js can simplify this task for you. It supplies the styles to distinguish the separate portions of your actual plays, packaged in BBCode / WordPress-style shortcodes, convyed by JavaScript.

What are Shortcodes and Why Should I Care?

The term "shortcode" is attributed to WordPress, but if you've ever posted on an internet forum or message board then you've probably seen or used BBCode -- those tags in square brackets that allow you to format your post, insert a link, or create an enormous chain of animated gif emoticons to troll your pals.

Same idea here, but we're focused on a drop-in solution for most any blog or website which is tailor-made to actual play posts.

Why JavaScript?

ap_shortcodes.js uses common client-side JavaScript to read your post and replace the shortcode tags, rather than server-side scripts that you may not have the expertise or permissions to implement, depending on your blogging platform or web host.

JavaScript has its drawbacks -- it runs every time the page loads, and could potentially be slow to parse your entire post, not to mention your site users could simply have it turned off entirely (in which case, the tags would be visible in your post and the styling would not be applied)!

That being said, very few users browse the web without JavaScript enabled and most modern browsers are extremely capable and fast in interpreting and executing JavaScript. Consider these things

Clone this wiki locally