Web Scripts

PhotoWarp 2 includes a powerful feature to generate custom web pages for your jobs based on a template. These templates are called web scripts. Some web scripts are included with PhotoWarp. You can also write your own web scripts using a template language or in the PHP scripting language.

Web Script format

To use a web script, add a web script format to your job. A list of web scripts is presented at the top of the format pane:

Web script format

Web script format

To use a particular web script, simply select the script of your choosing. When you unwarp your job, PhotoWarp will run the web script for each panorama, generating an HTML file for viewing in a browser.

Web Script Options

Options following the selection control certain aspects of the generated pages. Some of these options may be disabled depending upon your job.

Title

Declares the title of your project, which may be used as a heading in the web script.

Show Web Scripts Folder

Clicking this button will reveal the Web Scripts folder in the Finder or Windows Explorer. Use this button to quickly gain access to add, remove or change your web scripts.

Using source notes

Most web scripts will make use of source notes if they are present in your job. Using notes, things like copyright notices, author credit or a description of a panorama can be included.

Switch to the source pane, and choose a source to annotate. Open the source settings, and switch to the Notes tab.

Source Notes

Source notes

Complete the fields of interest. Author and Copyright are automatically applied to the entire job and every source in it. Comment and description are stored only for a particular source. Go through each of the sources in your job to give useful descriptions for each panorama.

It is a good idea to save your job when you have added annotations, because these annotations are not stored anywhere else and will be lost if you decided to change them later on.

Included Web Scripts

PhotoWarp includes some basic web scripts to get started.

Basic

The Basic web script generates a plain HTML file that simply includes a title, panorama and source annotations if present.

Basic web script

Slideshow

The Slideshow web script creates a single "slideshow.html" web page containing all of your panoramas. A single, large interactive view is placed above a horizontal scrolling list of thumbnail images (be sure to have a Thumbnail output format in your job.) Clicking on any of the thumbnails changes the interactive view to that source.

Debug web script

Debug

The Debug web script is used as a guide when creating your own PHP web scripts. If you would like a list of information available to your script, set up a typical Job and unwarp with the Debug web script. A complete list of all the defined variables will be printed in a table, along with their values. Simply copy and paste variables from the table into the PHP code to use then in a custom script.

Debug web script

Creating Web Scripts

PhotoWarp 2.5.7 introduces a new template-based web script engine. You can create your own web scripts by modifying your own HTML designs with a few special tags to loop across sources, embed panoramas and more. Read more about web script templates in the next chapter.