How to link directly to a single tutorial

This has been asked several times in support, so I thought it would be good to include it here. There is an easy way to link directly to a tutorial from your emails, another web page, etc… instead of referring your customers to your Tutorial Viewer and telling them to “find” a specific tutorial.

This applies to both Purchasers and Subscribers… anyone who is using the Tutorial Viewer (which ALL subscribers are, but for purchasers it is optional).

Simply put, the links on tutorials.php will function on any page of your site. Right-click one of the tutorial titles and use Copy Link Location or your browser’s equivalent to copy the link for the tutorial you want.

For example:

You can also link to a specific series:

(It is possible to customize viewer/templates/demo.tpl so that demo.php looks like any other part of your site, that way when you link directly to a video it’s not on a blank white page.)

Hope that helps!

How to re-order your series and tutorials in your viewer

There is a file provided with the Tutorial Viewer script – overrides.php, in the includes/ directory – that allows you to reorder the series and demos, hide them, override their titles, as well as inject text between certain series & demos.

There will eventually be a simple interface that will produce this file for you, but until then, you should find it easy enough to create.

You’ll probably want to clear the file of the examples, or just make sure you don’t put the code inside the comment tags. (The comment tags I’ve used are /* and */. Anything inside those won’t be executed by PHP.)

You will need the numeric ID of the demo or series you’d like to affect. The easiest way to find a demo or series ID is to hover over its link and look in the URL. You will see something similar to these examples:

Series IDs show up as series=XX, demo IDs show up as id=XX.

You can also find a list of series IDs on the series lists of the My Subscriptions and My Purchases pages in our Client Area.

So, if you want to hide series #39 and #40, you would put:

$hide_series = array(39, 40);

Hiding demos works the same way:

$hide_demos = array(710, 715, 302, 333);

To change the order of series and demos, you will need to list all of the IDs in the order you want. Any series/demos whose IDs aren’t listed will be appended to the end of the list.

$sort_series = array(180, 152, 182);
$sort_demos[152] = array(2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2462);

To change the titles of certain series/demos, use $series_titles and $demo_titles:

$series_titles = array(
39 => "Configuring Email series OVERRIDDEN",
40 => "Example Series"

To insert arbitrary text AFTER a series or demo, put it in $text_after_series / $text_after_demo:

$text_after_series = array(
39 => "<b>This can be random HTML</b>, a list of custom tutorials, or whatever else you want.",

The variables $text_before_series and $text_before_demo work exactly the same way:

$text_before_series = array(
40 => "This will show up after Series 39 but before Series 40."


Purchased Demos in a Subscription

If you are a subscriber but have also purchased demos and want them to show up next to the demos to which you’re subscribing, keep reading to find out how!

Start by going to the My Purchases page and creating a Tutorial Viewer with the same Display Options as your subscription. Make sure to create a Dynamic Tutorial Viewer; the Static Viewer is not compatible with subscriptions. Download and extract the Tutorial Viewer ZIP file. There are two files inside that you need: includes/ and js/dw-display-options.js. (The .js file is only needed if you’ll be using one of the Display Options that uses JavaScript, such as Colorbox and Accordion.)

Rename the file to purchased_demos.php, and upload it to the includes/ directory of your subscription. This file will automatically be included by the Tutorial Viewer if it exists.

dw-display-options.js can be uploaded as is to the js/ directory of your subscription. You then need to include that file by adding the following HTML to your site header (make sure the src attribute is correct!):

<script type="text/javascript" src="js/dw-display-options.js"></script>

You will also need to add three lines to the bottom of your subscription’s includes/conf.php file, indicating where (relative to the Tutorial Viewer) your purchased demos actually are and which formats you’d like to display. If your tutorials are in a subdirectory of the Tutorial Viewer folder called tutorials/ and you have tutorials in both SWF and Text format, you would put:

$_CONF['demo_path'] = "tutorials/"; // Filesystem path to the folder containing your series folders.
$_CONF['demo_uri'] = "tutorials/"; // URI (web address) to the folder containing your series folders.
$_CONF['formats'] = "swf,text";

Be sure to put that code before the closing PHP tag ( ?> ), or else PHP will not be aware of your code.

That’s all there is to it! Your purchased demos should now show up alongside your subscription. If you need further assistance or if any parts of these instructions were unclear, please just let us know.

(NOTE: If your tutorials were purchased prior to the launch of our new system in June 2010, you’ll need to contact us and have us add all the series you’ve purchased to your account. Once we’ve done that, you will see an order appear under My Purchases in the Client Area. You won’t be able to generate that order again, but having it there will give you access to create a Tutorial Viewer for those series.)

Changing your Primary Server

Our system is designed with redundancy in mind. That is, if the primary server that your Tutorial Viewer retrieves your tutorials from ever goes down, your Tutorial Viewer will automatically try a backup server after 5 seconds of no response from the primary server. Your Tutorial Viewer will then continue to use the backup server for 2 hours before trying the primary server again. An exact copy of your tutorials is included on at least 2 servers, so if this ever does happen, only the FIRST person who tries to view a tutorial will be delayed 5 seconds before the tutorial will display. After that, no tutorial down time should be experienced.

This guide is for those of you who would rather use our backup server as your primary server, and our primary server as your backup. Our primary server is located in Chicago, USA while our backup server is in London, UK. If your server is located closer to the UK server, then you may want to perform this procedure. It will result in slightly faster load times of your tutorials.

If you’d rather use our new server as your primary server, you must update your Tutorial Viewer configuration file (includes/conf.php). Inside the $_CONF array, a few lines down, you will see an entry for each server, like this:

'servers' =>
array (
0 =>
array (
'url' => '',
'down' => false,
'last_attempt' => 0,
1 =>
array (
'url' => '',
'down' => false,
'last_attempt' => 0,

To change which server gets connected to first – your primary server – simply renumber the servers. “0 =>” becomes “1 =>”, “1 =>” becomes “0 =>”:

'servers' =>
array (
1 =>
array (
'url' => '',
'down' => false,
'last_attempt' => 0,
0 =>
array (
'url' => '',
'down' => false,
'last_attempt' => 0,

Once you’ve made this change, save your conf.php file and upload it to your server. Your Tutorial Viewer will now look at our backup server first, and use our primary server as your backup.

Any questions, just let us know.

Run Modes & Website Integration

The Tutorial Viewer has several “Run Modes”:

  • WHMCS, Kayako & WordPress Integration
  • Standalone (the default)
  • PHP Include
  • Inline Frame (or iframe)

WHMCS, Kayako & WordPress Integration
Guides for all three of these scripts are available here:


When running in Standalone mode, you will need to edit the templates/tutorials.tpl file and essentially make the Tutorial Viewer another page of your site. tutorials.tpl is a basic XHTML document, used by tutorials.php. There are a few variables that will be replaced by tutorials.php when it loads the template file:

  • {{title}} – Goes in the <title></title> tag of the document
  • {{head}} – Used by the script to include the CSS & JavaScript files needed by your Display Options.
  • {{content}} – Will be replaced with the content output by tutorials.php

Apart from those variables, feel free to customize the template to fit your needs.

The value that goes into {{title}} can be customized in the includes/conf.php file.

You could put your site’s JavaScript and CSS before or after {{head}}. Putting {{head}} before your site’s JavaScript and CSS would allow you to more easily override any of the CSS used by the Tutorial Viewer.

PHP Include

This run mode puts the three variables from Standalone mode — {{title}}, {{head}}, and {{content}} — into PHP variables. This allows you to use a PHP “include” on the tutorials.php page and then output the contents of those variables wherever you want them.

You can read more about this mode here:

Inline Frame (iframe)

An iframe is an HTML tag that can be used in a webpage to include another page. This is the easiest way to integrate the Tutorial Viewer with a site. With an iframe, you would only need to make minor changes to the Tutorial Viewer’s template and CSS in order to get it to match your site, if at all.

Then, on any page of your site, you could put HTML similar to the following:

<iframe src="/tutorials/tutorials.php" style="width: 100%; height: 1000px; border: 0;"></iframe>

Copying and Pasting HTML

If you prefer, you can simply visit tutorials.php, copy the code it puts out, and paste it somewhere on your site. You’ll have to do this again whenever you add additional series, however.

Manually Linking to Demos

You might also wish to manually create links to the demos on your site, as described here:

Be sure to let us know if there’s anything we can do to make integrating the script with your website easier. We will be happy to accommodate you if at all possible!