New ExpressionEngine Plugin: Scrippet
- Categories:
- ExpressionEngine, Film, Writing
- Tags:
- expressionengine, plugin, screenplay, scrippet, script
- Published:
- 11:27am on Tuesday 16th June, 2009
Here’s a little piece of formatting niceness that will be handy for anyone with an interest in film or scriptwriting. The Scrippet plugin converts your plain text screenplay extracts into nicely-formatted script blocks.
Based on an original idea by screenwriter John August, most of the work on Scrippets was done by Nima Yousefi for the original Wordpress plugin. I’ve simply taken that code and adapted it for use in ExpressionEngine.
Installation and Usage
To install the Scrippet plugin, grab the plugin and stylesheet from my GitHub repository. Copy the pi.scrippet.php file into your /plugins folder.
Unfortunately, ExpressionEngine doesn’t offer an easy way to dynamically load additional stylesheets, so for now you can either attach the scrippets.css stylesheet to your template, or copy-and-paste the CSS rules from that file into your existing site stylesheet.
To use the plugin, wrap your unformatted screenplay extract in {exp:scrippet}{/exp:scrippet} tags:

{exp:scrippet}
INT. CARGO LOCK
The Queen spins at the sound of door motors behind her. The
parting doors REVEAL an inhuman silhouette standing there.
Ripley steps out, WEARING TWO TONS OF HARDENED STEEL. THE
POWER LOADER. Like medieval armor with the power of a
bulldozer. She takes a step…the massive foot CRASH-CLANGS
to the deck. She takes another, advancing.
Ripley’s expression is one you hope you’ll never see… Hell
hath no fury like that of a mother protecting her child
and that primal, murderous rage surges through her now,
banishing all fear.
RIPLEY
Get away from her, you bitch!
{/exp:scrippet}
Parameters
There are a few optional parameters available to use with the {exp:scrippets} tag:
width- Sets the width (in pixels) of your scrippet blockbg_color- Sets the background colour of the block; you can use hex values, colour keywords, or RGBa valuestext_color- Sets the text colour; possible values as perbg_coloralignment- Valid values areleftorcenter; blocks withalignment=“center”will be centered on the page
The default appearance of the scrippet blocks is black text on a pale yellow background, 400 pixels wide.
Formatting options
Styles are applied to the text according to how it is formatted:
- Scene headings start with either “INT”, “EXT” or “EST” and are all capitalised
- Transitions end with a colon (e.g. “CUT TO:”) or can be a few hard-coded other options (e.g. “FADE TO BLACK”)
- Characters will be in ALL CAPS followed by a single new-line
- Parantheticals will be wrapped in parentheses, obviously
- Dialogue comes straight after a character or paranthetical element
- and Action is anything that doesn’t fall into any of the above categories
You can also include some additional formatting by using standard Textile markup for **bold text**, *italicised text* or _underlined text_.
Future developments
Another obvious use-case for this would be as a new field type for Brandon Kelly’s FieldFrame extension, and when I have a few spare minutes I’ll throw that together too.
What is GitHub? GitHub is a web application that uses the version control software Git to allow its members to manage their code online. I am hosting the files for this article there so that any bugfixes or improvements I make can be found in one central location.

I'd love to hear what you think - please use the form below to leave your comments. Some HTML is permitted:
b,i,em,del,ins,strong,pre,code,blockquote,abbr. URLs or email addresses will be automatically converted into links.John August at 11:10pm on 16th June, 2009 #
Jim at 4:13pm on 17th June, 2009 #
Matthew Pennell at 11:01am on 18th June, 2009 #
Dekoracje Okien at 10:12am on 19th June, 2009 #
Mieszkania Gryfino at 1:48pm on 18th August, 2009 #
Matthew Pennell at 8:38pm on 19th August, 2009 #