Build and test StageBloc themes locally
CSS Scala PHP JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
php-stagebloc-api @ 4cf9167

Local Theme Development


We've created this codebase to allow for theme development via our API using of our StageBloc PHP API Wrapper.


  1. In order to use this for local theme development, you'll need a localhost set up and capable of running PHP.

  2. You'll need to sign up for Fullscreen Direct and be an admin for at least one account.

Getting Started

  1. Once you've cloned this repo, run these commands from the project's root directory to get the resources for the StageBloc PHP API Wrapper:

     git submodule init
     git submodule update

    1a. We've noticed issues may occur sometimes on Windows (or with WAMP) where the cURL requests made by the PHP API wrapper have SSL authentication issues. In that case you can add the following lines to StageBloc.php in the _request() method:

     $options[CURLOPT_SSL_VERIFYPEER] = false;
     $options[CURLOPT_SSL_VERIFYHOST] = false;
  2. Rename config-sample.php to config.php and run chmod 775 config.php so that we can populate it with your access token upon authentication and other data.

  3. You can edit themes in your IDE / text editor of choice.

  4. Run a local server by typing php -S localhost:7252 (linux or OS X). This requires you have php version 5.4 or newer installed.

  5. Simply load http://localhost:7252/ in your browser and log in using your Fullscreen Direct account to see your themes.

General Information

  • Adding themes: Themes are stored in the /themes/ directory. Create a new directory (or a symlink) with a theme.sbt, style.css, and javascript.js file to populate your new theme in the dropdown selector. The theme path can also be change in the config.php file using the $themePath variable, but symlinking is likely a better approach.

  • Theme Views: If you don't like having your entire site contained within a single theme.sbt file, you can create your own theme view structure using theme.sbt as the "manifest" (a list of .sbt files). Set the $themeViewsPath config variable to a path relative to your theme, and save your <theme_view_name>.sbt files within that path. The main theme.sbt file will now become your manifest, within which you can include individual views in the following manner:

      {Include file="[ optional/path/to/ ] <theme_view_name>.sbt"}

Feedback And Questions

Found a bug or missing a feature? Don't hesitate to create a new issue here on GitHub.