A wiki entry that looks like this:
Will produce a page that looks like this:
| INT. - A DARKENED ROOM | DAY |
| BOB sits in front of a computer screen. |
| BOB |
| Hello friends, I'm so glad you could join us. We're gonna make a happy little program today. |
| VOICE |
| (offstage) |
| Oh goodie! |
| THE END |
And create a PDF that looks like this.
ScreenPlay supports three new editing hooks to add style codes that visually re-format certain wiki syntax (specifically, that used for definition lists, or "dl's") into proper screenplay format. The extension also adds a new "Special" page, which produces PDF output for hard copy delivery. PDF output provides additional notation including page and scene numbering, and dialogue continuation notes.
Though ScreenPlay is certainly no replacement for a full-featured ScreenWriting software package, it offers a number of advantages for screenwriters:
Installing ScreenPlay is as easy as installing any MediaWiki extension. Simply download the php source file (there's only one) and copy it into your 'extensions/' directory inder your MediaWiki installation. Then add an appropriate include to your LocalSettings.php file.
Once installed, it is a simple matter to use ScreenPlay. Simply create a new wiki page, and begin by putting a '<screenplay>' tag on the first line as directed below. When rendered, this page will now contain screenplay formatting. To add a scene, use the '<scene>' tag as directed below. Stage directions are entered as normal paragraphs, and dialogue is written using "dl" syntax, (the ';' and ':' characters). We use the "dl" method because by simply changing the style attributes associated with them, the "dt" and "dd" html elements become the perfect tool for formatting dialogue, due to their already logically correct structure. Beyond that you can use any built-in wiki formatting you desire, but be warned that the PDF engine does not yet support any additional formatting codes. PDF output may not look like what you expect.
For correct PDF processing, all hooks must start and end on the same line.
The 'screenplay' hook is used to activate the extension. The value of 'title' is used in the construction of a title page by the PDF engine. See below. This tag should appear near the top of your document, ideally as the first line. It can also be included through a template (though doing so removes the title page from a generated PDF), but again... keep it near the top.
The tag actually inserts a <style> code block into the output HTML which changes the default style attributes of the definition lists used to create dialogue. In addition, a <script> block is also inserted. It is this which adds a new entry to the top tab list for viewing the document as a PDF.
This hook is used to add a scene heading to your screenplay, and easily identify interior or exterior, time of day, and the location
The transition hook is used at the end of a scene to add... well... a transition note. "CUT TO," "FADE TO," "THE END," whatever...
ScreenPlay will add a title page to a generated PDF file if there is anything between the <screenplay> hooks. A simple text string will result in a plain title page with a "by" line that reflects the login ID of the individiual that authored the wiki page.
For a more proper title page, you can enter a simple XML snippit instead. Available XML title page tags are:
Tags are used one for each line of output (though only the first <title> is used) in place of using new-lines. The following example demonstrates a two-line address:
Note that when used in this way, the <screenplay> hook does not have to start and end on the same line.
One new "Special" page is added to your wiki if PDF support is available. Special:ScreenPlayPDF is created, and automatically linked to the top of any ScreenPlay page. When referenced, this page uses the built-in PDF library provided by PHP to convert your document to a savable PDF file.
PDF output uses PHP's built-in PDF API. If your copy of PHP is not compiled with PDF support, you can still write and view your screenplay in MediaWiki, but the PDF output function will not work. Adding PDF functionality to PHP is beyond the scope of this document.
The default configuration allows for on-disk caching of created PDF files by document edition number. That means once you create a PDF document, the cache remains in use either until deleted or the source document (the wiki page) is changed. You can create a PDF of any previous edition of a document by finding it in history and clicking "view pdf" (provided, of course, that the edition in question supported ScreenPlay).
Instructions for adjusting the default configuration are found in the ScreenPlay source file. You should make all changes in your LocalSettings.php file. Some of the settings you can change include: