Productions Plugin Documentation

About

The productions plugin is a Wordpress plugin which is designed to allow organizations to maintain and display a database of productions. The original intent is for live theater productions, although there may be other possible uses for it. The database is managed via the Wordpress administration pages, while the content can be displayed on any post or page

Installation

Download the zip file and extract it into your wp-content/plugins directory. Go into your WordPress dashboard and, in the "Plugins" section, activate the plugin. The "Configuration" steps must then be run at least once before the plugin will function

Configuration

In the dashboard, choose the "Settings" link. There should be an option for "Productions Database" Click on it. The settings form will be shown, with 4 to 8 options shown.

  • Tickets to the City ID
    • This field only applies if your organization uses Tickets to the City to sell tickets online. In all probability, you only use this if you are a Texas theater who belongs to Texas Nonprofit Theaters. Leave blank if you don't use Tickets to the City.
  • Scrapbook path
    • If you upload photos from shows, this is the path where those files will be stored. The path must be writable by whatever user runs your web server (often 'apache' or 'www' on Unix-based systems). Example: /home/wordpress/wp-content/scrapbook
  • Scrapbook URL
    • The URL that corresponds to the path given above. Example: /wp-content/scrapbook
  • Database type
    • The database engine that will be used to store the production database. Unless you really know what you're doing, leave this as "Wordpress Database" which will cause the data to be stored in the same database that the rest of the Wordpress system uses. The other option is "PostgreSQL"

The remaining options are only shown if the "Database type" is set to "PostgreSQL"

  • Database host
    • The server that hosts the PostgreSQL database (usually 'localhost')
  • User name
    • The username that has permission to access the PostgreSQL database instance
  • Password
    • The password associated with the above user
  • Database
    • The name of the PostgreSQL database to connect to

Once all settings are correct, click "Save Changes." This will case the database tables to be created if needed

Data Entry

Information on productions is done through controls found in the "Tools" section of the dashboard. The "Productions Database" link under "Tools" allows for the following options:

  • Export Database
    • This creates an XML file which can be used to migrate the productions database to a new server
  • Import Database
    • Enter the path to an XML file created via the "Export Database" function to import the data into a new instance
  • Admin Seasons
    • Create new or edit existing season information
  • Admin Venues
    • Create new or edit existing venues
  • Admin Productions
    • Create new or edit existing productions

Data entry screens

All editing screens (seasons, venues, and productions) try to be dynamic in the way editing is performed. There is no need ever to click a "Save" button. Data entered in a field is saved as soon as the user leaves that field. That is, if you type "test" into, for instance, the title of a production, that value will be written to the database as soon as you tab or click to another field.

To create a new item, click on the "New (item)" in the list given. To edit an existing item, click on it's name in the list. In either case, the same form will be presented, prepopulated with the existing data if available.

Season editing

Two fields are provided:

  • Season name
    • Examples: 2008-2009, 2011, 4oth season, etc
  • Tagline
    • Extra info you wish to add about the season. Examples: Our Fifth Year, etc

Venue Editing

The following fields are available

  • Name
  • Street1
  • Street2
  • City
  • State
  • Zip
  • Phone

Production Editing

Productions are the most complex of the pages to edit.

  • Title
    • Title of the production
  • Description
    • A description of the production
  • Author
    • The author(s) of the production
  • Director
    • The director(s) of the production
  • Production Run Dates
    • Freeform text of the dates of the production
  • Auditions
    • Freeform text of the information on auditions
  • Season
    • The season of the production
  • Slot
    • The position within the season of this production
  • Active?
    • A flag that indicates if this production should be visible or not
  • TicketsToTheCity ID
    • (Only applies if tickets are sold via Tickets To The City) Internal TTtC ID used to set purchase links
  • Cast
    • One line per each cast entry. There are four fields:
      • Role
      • Description
      • Actor
      • Separator?
      • (To allow for alternate formatting if desired)
    • Headshot URL
  • Crew
    • One line per each cast entry. There are four fields:
      • Role
      • Description
      • Actor
      • Separator?
      • (To allow for alternate formatting if desired)
      • Headshot URL
  • Auditions
    • One line per each audition entry. There are three fields
      • Date/Time of the audition, in the form YYYY-MM-DD HH:MM
      • Tickets to the City purchase ID (ignored)
      • Venue (Drop down list driven from the "Venues" list)
  • Production Dates
    • One line per each production entry. There are three fields
      • Date/Time of the production, in the form YYYY-MM-DD HH:MM
      • Tickets to the City purchase ID
      • Venue (Drop down list driven from the "Venues" list)
  • Scrapbook
    • Allows for the uploading of pictures along with a caption. Hovering over an upload pictures should show a preview of the image
      • Caption
      • Uploaded file

Display of Content

Any post or page an make use of data from the production database. There are four types of requests that a page can make of the plugin, though they all follow the same syntax. All requests are enclosed in curly brackets: {}. For the purposes of documentation, all commands will be shown with spaced between the brackets and the command, to prevent the plugin from processing them. In actual usage, there should be no spaces

  • Hard-coded Selection requests
    • These requests are for loading a specific, predetermined item into memory. Most users will not have need for these commands
      • { productions:season:ID } (where ID is the ID number of a specific season)
        • Loads the given season into memory
      • { productions:production:ID } (where ID is the ID number of a specific production)
        • Loads the given production into memory. Also loads the corresponding season
      • { productions:casting:ID } (where ID is the ID number of a specific casting)
        • Loads the given casting (cast or crew) into memory. Also loads the corresponding production and season
      • { productions:date:ID } (where ID is the ID number of a specific audition or production)
        • Loads the given date info into memory. Also loads the corresponding production and season
      • { productions:search:keywords } (where keywords is a phrase to search on)
        • Searches the production database for the given term and loads the result set
  • Query specifications
    • These options are for allowing for a page to load a specific item into memory, based on a parameter placed on the URL.
      • { productions:season:query:param_name } (where param_name is the name of the parameter to use)
        • Loads the season into memory identified by the param_name request. For example, if the request is { productions:season:query:season }, then a URL like /wp-admin/mypage/?season=123 will load production ID 123 into memory
      • { productions:production:query:param_name } (where param_name is the name of the parameter to use)
        • Loads the production into memory identified by the param_name request. Also loads the corresponding season. For example, if the request is productions:production:query:show, then a URL like /wp-admin/mypage/?show=123 will load production ID 123 into memory, and the season that show 123 is associated with
      • { productions:casting:query:param_name }
        • See { productions:production:query }
      • { productions:date:query:param_name }
        • See { productions:production:query }
      • { productions:production:next_show }
        • Loads the production (and corresponding season) into memory with the first performance scheduled after the current time
      • { productions:production:next_audition }
        • Loads the production (and corresponding season) into memory with the first audition scheduled after the current time
  • Displaying values
    • These are the core options for displaying data from the database into a post or page. Before any of these commands can be used, one of the appropriate query functions above should be used to load the object into memory
    • Season displayable values:
      • { productions:season:id } - the ID of this season
      • { productions:season:year } - the year of this season
      • { productions:season:tagline } - the tagline entered for this season
    • Production displayable values:
      • { productions:production:id } - the ID of this production
      • { productions:production:title }
      • { productions:production:author }
      • { productions:production:director }
      • { productions:production:auditions }
      • { productions:production:run }
      • { productions:production:slot }
      • { productions:production:season }
      • { productions:production:description }
      • { productions:production:image }
      • { productions:production:tttcid }
      • { productions:production:cast_count } - number of rows in the cast of the show
      • { productions:production:crew_count } - number of rows in the crew of the show
      • { productions:production:production_count } - number of performances
      • { productions:production:audition_count } - number of auditions
      • { productions:production:photo_count } - number of photos
      • { productions:production:onsale } - are tickets currently on sale at Tickets to the City?
    • Search results displayable values
      • { productions:search:term }
      • { productions:search:resultcount }
    • Date values
      • { productions:date:id }
      • { productions:date:venue }
      • { productions:date:time }
    • cast
      • { productions:cast:id }
      • { productions:cast:role }
      • { productions:cast:actor }
      • { productions:cast:description }
      • { productions:cast:headshot }
    • photos
      • { productions:scrapbook:id }
      • { productions:scrapbook:filename }
      • { productions:scrapbook:thumbnail }
      • { productions:scrapbook:url }
      • { productions:scrapbook:caption }
  • Conditional Processing
    • These options work in pairs, to block off a section of a page to be conditionally displayed or not, depending on the state of one of the display variables above.  In all case below, variable will be one of the display values above, minus the {} and the productions: leadin. That is, to only display a portion of a page if the photo URL is set would be to use { productions:isset:scrapbook:url }
      • { productions:isset:variable }
        • Mark the beginning of a block of content to be displayed only if variable is set
      • { productions:isset_end }
        • Mark the end of a block of content begun with { productions:isset }
      • { productions:notset:variable }
        • Mark the beginning of a block of content to be displayed only if variable is not set
      • { productions:notset_end }
        • Mark the end if a block of content begin with { productions:notset }
  • Loop control
    • These controls, which work in pairs, define blocks of content to be displayed in a loop over a given set of content, such as cast lists or search results
      • { productions:season:production_start }
        • Mark the beginning of a block of content to be displayed once for each production of the currently loaded season
      • { productions:season:production_end}
        • Mark the end of a block of content to be displayed once for each production of the currently loaded season
      • { productions:production:audition_start }
        • Mark the beginning of a block of content to be displayed once for each audition row for the current show
      • { productions:production:audition_end}
        • Mark the end of a block of content to be displayed once for each audition row for the current show
      • { productions:production:performance_start }
        • Mark the beginning of a block of content to be displayed once for each performance row for the current show
      • { productions:production:performance_end }
        • Mark the end of a block of content to be displayed once for each performance row for the current show
      • { productions:search_start }
        • Mark the start of a block of content to be displayed once for each show found by the last search
      • { productions:search_end }
        • Mark the end of a block of content to be displayed once for each show found by the last search
      • { productions:audition_start }
        • Mark the beginning of a block of content to be displayed once for each audition row for the current show
      • { productions:production:audition_end }
        • Mark the end of a block of content to be displayed once for each audition row for the current show
      • { productions:production:casting_start }
      • { productions:production:casting_end }
      • { productions:production:crew_start }
      • { productions:production:crew_end }
      • { productions:production:photo_start }
      • { productions:production:photo_end }
      • { productions:season_start }
      • { productions:season_end }

Example usage

Sample showing content for a show

This page will show some of the content for a show. It is set up to accept a parameter of 'showid' to choose a specific show. If no parameter is provided, then the content for the next show to be seen will be shown. Remember to remove the space between '{' and 'productions' in your content

{ productions:production:query:showid} { productions:notset:production:id} { productions:production:next_show} { productions:notset_end}

Show Content

{ productions:notset:production:id}No show content found{ productions:notset_end}

{ productions:isset:production:id}

Title: { productions:production:title}

Director: { productions:production:director}

{ productions:isset:production:cast_count}Cast:

{ productions:production:cast_start}

Role { productions:cast:role} played by { productions:cast:actor}

{ productions:production:cast_end}

{ productions:isset_end}

Dump of all seasons/shows

This sample shows all seasons, and the title of all shows in that season.

{ productions:season_start}

Season: { productions:season:year} { productions:season:tagline}

{ productions:season:production_start}

Title: { productions:production:title}

{ productions:season:production_end}

{ productions:season_end}