Quick Start Guide

TextTwister’s setup is easy and will take less only a few minutes to drop into your existing code base.

Step One – Install TextTwister

You need to copy the TextTwister files to your server.

  • When you download and unzip TextTwister there are two folders, documentation and TextTwister.
  • Copy the texttwister folder to the your webserver using a FTP client, or your webhosts (contactyour webhost for help regarding this.)

TextTwister can be saved to any location you wish however we recommend that TextTwister should be saved to the root directory, which will mean that if your website site is http://www.example.com the TextTwister files will be uploaded to http://www.example.com/texttwister/ once copied to your server you can test TextTwister by going to the test file (test.php) within the texttwister folder with your web browser, which will be found at a similar web address as http://www.example.com/ texttwister/test.php

TextTwister is now installed!

Step Two – Integrate with your existing website

Find a page on your site with text that you wish to twist.

Open the page where the text you wish to twist is located in your favorite text editor such as Notepad for Windows or TextEdit for Mac and add a line of PHP code to the file above where the text you wish to twist is located

Like the below.

<?php include ‘http://www.example.com/texttwister/texttwister.php’; ?>

Where www.example.com is your sites website address and when you have decided to save texttwister.php within the texttwister folder in the root of your website.

Unfortunately TextTwister can only word on PHP files. If the text you wish to twist is not in a php file already, you can convert it by changing the file name so that it ends with .php, instead of .htm or .html.

Step Three – now to twist some text

To make a section of text twistable simply add brackets around the twistable text options divided by the ‘pipe’ character | and inside of a call to the texttwister function like this.

<?php texttwister(“Spot is a {red|blue|yellow} stuffed {dog|cat|bear}.”); ?>

This example will twist this small sentence into 9 possible different sentences.

  • Spot is a red stuffed dog.
  • Spot is a red stuffed cat.
  • Spot is a red stuffed bear.
  • Spot is a blue stuffed dog.
  • Spot is a blue stuffed cat.
  • Spot is a blue stuffed bear.
  • Spot is a yellow stuffed dog.
  • Spot is a yellow stuffed cat.
  • Spot is a yellow stuffed bear.

Step Four

Done!

Was this article helpful to you? Yes No

How can we help?