Tokens

Top  Previous  Next

Tokens are placeholders for text that is generated at run time e.g. the current date and time, unique ids or random numbers. They can be used in many different settings that use text e.g. captions in prints, filenames, message text, URLs

A variety of tokens for modifying or extracting elements from strings provide a way of creating dynamic or conditional behavior.

 

Date and time tokens
 

{hour}

Hours (00 to 23)

e.g. 17

{hourNow}

Same as {hour}


{min}

Minutes (0 to 59)

e.g. 45

{minNow}

Same as {min}


{sec}

Seconds (0 to 59)

e.g. 23

{secNow}

Same as {sec}


{time}

Time in the form HHMMSS

e.g. 174523

{timeNow}

Same as {time}


{year}

Year in the form YYYY

e.g. 2019

{yearNow}

Same as {year}


{month}

Month (01 to 12)

e.g. 06

{monthNow}

Same as {month}


{day}

Day (01 to 31)

e.g. 19

{dayNow}

Same as {day}


{date}

Date in the form YYYY-MM-DD

e.g. 2019-03-04

{dateNow}

Same as {date}


{yearLess8h}

Year with century 8 hours ago - useful when shooting events which continue after midnight

e.g. 2019

{monthLess8h}

Month (01 to 12) 8 hours ago - useful when shooting events which continue after midnight

e.g. 01

{dayLess8h}

Day of the month (01 to 31) 8 hours ago - useful when shooting events which continue after midnight

e.g. 21

{dateLess8h}

Year, month, day less 8 hours in the form YYYY-MM-DD

e.g. 2019-01-21

 

 

General tokens
 

{uid}

Unique id in the form ABCDE123.  The id is guaranteed not to repeat within 776 days and two photo booths running at exactly the same time have a 1 in 216,000,000 chance of generating the same id.

e.g. APZRT965

{random,n,m}

Returns a random number in the range n to m. A new random number is generated each time the ready screen is displayed

e.g. random,1,10} returns a random number between 1 and 10

{iPadId}

Vendor Id of this iPad (same as the Id displayed in the settings screen)


{iPadName}

Name of this iPad as defined in the iPad's Settings->General->About

e.g. Demo's iPad

{user_name}

name of user when logged in else empty


{user_id}

user Id when logged in else empty


{user_email}

user's email address when logged in else empty


{photoboothDir}

Path of the current photo booth images folder


{photoboothSubDir}

name of the current photo booth images folder


{photoboothParentDir}

name of the parent folder of the current photo booth images folder


{filename}

Filename of the saved print layout in photo booth mode (only available for captions used in photo booth prints and in message text)

 

{filenameNoExt}

Same as {filename} but returns the filename without a file extension


{eventTitle}

Event title (see Creating Events)


{eventDescription}

Event description (see Creating Events)


{eventName}

Event name (defined locally or supplied by Breeze Hub)


{eventString1} to {eventString5}

Event strings 1 through 5 (defined locally or supplied by Breeze Hub)


{printCounter}

Print counter supplied by Breeze Hub


{printQuotaUsed}

Returns 1 if {printCounter} reaches 0 else returns 1

 

{syncCode}

The text entered in the sync keyboard displayed before updating an event


 

 
Tokens for modifying strings

 

The tokens below can be used to modify tokens or strings:

 

Token

Description

Example

{left,n,str}

Extracts the first n characters from str (which can be a string or token).

{left,4,{filename}} for D:\Photos\image1.jpg will give: image

{mid,n,m,str}

Extracts m characters starting from the n'th character from str (which can be a string or token).

{mid,1,3,{filename}} for D:\Photos\image1.jpg will give: mag
{mid,3,,{filename}} for D:\Photos\image1.jpg will give: ge1

{right,n,str}

Extracts the last n characters from str (which can be a string or token).

{right,2,{filename}} for D:\Photos\image1.jpg will give: e1

{field,n,str}

Extracts the nth field from str. Fields are separated by space, period, hyphen, slash, backslash or underscore characters

{field,2,{filename}} for D:\Photos\IMG_0001.jpg will give: IMG

{first,str}

Extracts the first word from str (which can be a string or token).

{first,%L} for an image taken Monday, January 17, 2015 will give: Monday

{last,str}

Extracts the last word from str (which can be a string or token).

{last,%L} for an image taken Monday, January 17, 2015 will give: 2015

{upper,str}

Converts str to upper case

{upper,%B} for a photo taken in June gives: JUNE

{lower,str}

Converts str to lower case

{lower,%B} for a photo taken in June gives: june

{capitalize,str}

Converts str to lower case and capitalizes the first letter

{capitalize,john} gives John

{default,str1,str2}

Returns str1 unless it is an empty string in which case it returns str2 (str1 and str2 can be strings or tokens

{default,1,2} returns 1
{default,,2} returns 2

{if,test,str1,str2}

Returns str1 if test contains any text except 0 else returns str2 (test, str1 and str2 can be strings or tokens)

{if,1,2,3} returns 2

{if,0,2,3} returns 3
{if,,2,3} returns 3

{compare,str1,str2}

Returns 1 if str1 is the same as str2 else returns an empty string

{compare,photo,photo} returns 1, {compare,photo,image} returns empty string

{urlencode,str}

Encodes str so that it can be used as a parameter in a URL e.g. when providing a URL for a microsite

https://yoursite.com/viewer.php?id={urlencode,my name} gives https://yoursite.com/viewer.php?id=my%20name

{hulaEncode,str}

Converts str into a lower case letters, digits and hyphens for use in a URL linking to a Hula Gallery

{hulaEncode,John and Sue Wedding} returns john-and-sue-wedding

{tinyUrl,str}

Converts a URL to a shortened version using tinyurl.com

https://breezesys.com/BreezeBooth/betatest.htm is shortened to https://tinyurl.com/ycnmcn8n