XPHP

XPHP is an ever-growing library of scripting statements that you can use for powerful template control, widget behaviors, and more in LiveWhale.

In the below statements, you can use any of the XPHP variables from the XPHP Dictionary, or item-specific variables in widget results and details pages (i.e., "profiles_45" might be one of your custom profile fields).

XPHP Logic Operations

If/Then Example

The following examples demonstrate first, a simple check (is variable “X” empty?) and a more complicated one, using some of the tricks from the conditional functions below.

1
2
3
4
5
6
<xphp content="true">
<if var="X" value=""/>
<content>
<!-- do something here -->
</content>
</xphp>
1
2
3
4
5
6
<xphp content="true">
<if var="server_path" value="{group_directory}index.php"/>
<content>
<!-- show this if it's the group homepage -->
</content>
</xphp>

Whatever is in-between <content></content> will be shown if the if statement is true. It could be simple HTML, a widget, or more XPHP code.

If/Then Shorthand (1.7+)

Since LiveWhale 1.7, the above syntax can be shortened to <xphp if. For example:

1
2
3
<xphp if="X">Variable X exists.</xphp>
<xphp if="X" value="Y">Variable X has value Y.</xphp>
<xphp if="X" matches="Y">Variable X contains the text Y.</xphp>

If/Else Example

Below is an example using If/Else in xphp to display a default image in your profile details page when the person does not have a photo:

1
2
3
4
5
6
7
8
9
10
11
<xphp content="true">
<if var="profiles_image"/>
<content>
<xphp var="profiles_image"/>
</content>
<else content="true">
<content>
<img src="/path/to/default_image.png"/>
</content>
</else>
</xphp>

In this example, we see we can use <xphp var="foo"/> to display an XPHP variable directly.

AND & OR Operators

By default, XPHP if statements are treated as ANDs when two or more variables must meet the conditions set, but you can switch to an OR relationship with the addition of only one attribute on the surrounding <xphp> tag.

1
2
3
4
5
6
7
8
<!-- the default AND state -->
<xphp content="true">
<if var="a"/>
<if var="b"/>
<content>
<p>A and B are both non-empty.</p>
</content>
</xphp>
1
2
3
4
5
6
7
8
<!-- with the addition of the ifmode="or" attribute, the comparison becomes an OR -->
<xphp content="true" ifmode="or">
<if var="a"/>
<if var="b"/>
<content>
<p>Either A or B is non-empty.</p>
</content>
</xphp>

XPHP Conditional Functions

You can alter the <if> statements above, mixing and matching from the following library, to execute all sorts of logical tests:

Description Code
Does variable foo exist and have a non-empty value? <if var="foo"/>
Does variable foo not exist or have an empty value? <if var="foo value=""/>
Does variable foo equal “bar”? <if var="foo" value="bar"/>
Does variable foo not equal “bar”? <if var="foo" not_equals="bar"/>
Does variable foo equal variable bar? <if var="foo" value="{bar}"/>
Does variable foo (a comma-separated list) contain value “bar”? <if var="foo" contains="bar"/>
Does variable foo contain the text “bar” anywhere in it? <if var="foo" matches="bar"/>
Does variable foo not contain the text “bar” anywhere in it? <if var="foo" not_matches="bar"/>
Does the tag foo exist on this page/item? <if var="has_tag_foo"/>
Does the tag foo not exist on this page/item? <if var="has_tag_foo" not_matches="1"/>
Is variable foo (a number) less than 100?
For dates, can use “today”, “yesterday”, etc as values.
<if var="foo" less_than="100"/>
Or: <if var="foo" before="yesterday"/>
Is variable foo (a number) greater than 100?
For dates, can use “today”, “yesterday”, etc as values.
<if var="foo" greater_than="100"/>
Or: <if var="foo" after="today"/>
Is variable foo (a number) in between 5 and 7 (inclusive)? <if var="foo" range="5 to 7"/>
Does variable foo match the regular expression "~^This.+?test"?~"? <if var="foo" regexp="^This.+?test"/>
Does variable foo not match the regular expression "~^This.+?test"?~"? <if var="foo" not_regexp="^This.+?test"/>

Using other variables (POST, GET) in your if statements

By default, the above tests will check for your variables in the XPHP Dictionary (also known as $_GLOBALS in PHP). You can use the type attribute to check variables from server, get, or post.

Variable Code
From URL string: ?foo=bar <if var="foo" type="get" ...
From form (POST) to page <input name="foo"> <if var="foo" type="post" ...
From the PHP server variables <if var="foo" type="server" ...

Checking for elements on the page

You can also use XPHP to check for certain elements in the source code of the current page, using the has_element function. Your check can match any valid single CSS selector in the following forms:

1
2
3
4
5
6
7
8
<if has_element="span"/>
<if has_element="#aaa"/>
<if has_element=".bbb"/>
<if has_element="span#aaa"/>
<if has_element="span.bbb"/>
<if has_element="span#aaa.bbb"/>
<if has_element="#aaa.bbb"/>
<if has_element="#aaa.bbb.ccc"/>

This is especially useful if, for example, you want a section of your page to display only if <div id="sidebar"> exists (<if has_element="div#sidebar"/>).

Note: The element must exist in the page before the <if> statement in question is reached. This may mean, if you have other page changes being output from another XPHP statement, it could not be caught by this logical test.

XPHP Tools

In addition to the above conditional statements and logical tests, XPHP has several tools that you can use to make your website more responsive, intelligent, or fun.

Function Code
Display a random integer from 5 to 10. <xphp random="5,10"/>
Limit the output of variable foo to 10 words. <xphp var="foo" words="10"/>
Limit the output of variable foo to 10 characters. <xphp var="foo" length="10"/>
Limit the output of a variable to a specific substring, following the offset, length syntax for substr (LiveWhale 2.0+) <xphp var="foo" substring="2,8"/>

Advanced: Extracting specific HTML elements from an XPHP variable

Sometimes you may want to extract only a specific HTML object from an existing XPHP variable. In LiveWhale 2.0.0 and later, you can use selector="" in your <xphp> variables (and, in widget formats, with <field> variables) to do just that.

This advanced tool supports the XPath syntax (cheatsheet). selector="//foo will grab the element <foo> wherever it appears. See below for some examples.

Function Selector Code XPHP Example
Display only the h2 tags selector="//h2" In a details template:
<xphp var="details_body" selector="//h2"/>

In a widget format:
<field var="body" selector="//h2"/>
Display only the first paragraph tag selector="//p[1]" In a details template:
<xphp var="details_body" selector="//p[1]"/>

In a widget format:
<field var="body" selector="//p[1]"/>
Display only the last paragraph tag selector="//p[last()]" In a details template:
<xphp var="details_body" selector="//p[last()]"/>

In a widget format:
<field var="body" selector="//p[last()]"/>
Display only divs with class=”special” selector="//div[@class='special']" In a details template:
<xphp var="details_body" selector="//div[@class='special']"/>

In a widget format:
<field var="body" selector="//div[@class='special']"/>
Display only h3s inside of <aside> inside of <main> selector="//main/aside/h3" In a details template:
<xphp var="details_body" selector="//main/aside/h3"/>

In a widget format:
<field var="body" selector="//main/aside/h3"/>

Timely Content

You can use XPHP to show content before/after a certain date, or daily before/after a certain time.

LiveWhale 1.7.1+

Starting with LiveWhale 1.7.1 you can define timely content with the simple attributes start and end. You can also preview timely content from other dates/times by adding ?lw_preview_date= to your URL. e.g., /my-page/?lw_preview_date=April 7

You can use any PHP-readable date/time strings in your schedules and preview links (dates, dates with times, or just times for daily repeating schedules).

1
2
3
4
5
6
<xphp content="true" end="2020-11-28">
<content>Countdown to our Day of Giving...</content>
</xphp>
<xphp content="true" start="2020-11-28">
<content>Today is Day of Giving!</content>
</xphp>
1
2
3
4
5
6
7
8
9
<xphp content="true" end="12pm">
<content>Good morning!</content>
</xphp>
<xphp content="true" start="12pm" end="5pm">
<content>Good afternoon!</content>
</xphp>
<xphp content="true" start="5pm">
<content>Good night!</content>
</xphp>

LiveWhale 1.7 and before

In previous versions of LiveWhale, you can define your schedule with before_date and after_date, and you can preview timely content by adding ?xphp_request_time=XXX to your URL, replacing XXX with a timestamp. These methods are still supported for backwards-compatibility.

1
2
3
4
5
6
<xphp content="true" before_date="2020-11-28">
<content>Countdown to our Day of Giving...</content>
</xphp>
<xphp content="true" after_date="2020-11-28">
<content>Today is Day of Giving!</content>
</xphp>

Using XPHP Variables Inside Quotes

In LiveWhale 1.6.2+, you can use the following XHTML-friendly syntax to place XPHP variables inside other XPHP or HTML tags and attributes. You do so by replacing <xphp var="my_variable" /> with %%xphp_my_variable%%. For example, if you have <xphp var="start_date" /> set, you can use:

1
2
3
<xphp content="true" after_date="%%xphp_start_date%%">
<content>Today is Day of Giving!</content>
</xphp>

Or even in simpler cases, you can use the %% format where you want to nest XPHP code inside other tags:

1
2
This is the URL: <xphp var="href" />
<a href="%%xphp_href%%">Read more</a>

Note, this syntax only works for individual XPHP variables and not for larger chunks of XPHP logic.

Specifying Type and Cast

Whether using the normal <xphp syntax or the in-quotes %%xphp_ format, you can also request variables of alternate types (GET, POST, COOKIE, SERVER) and casts (dashed, encoded, decoded, text, urlencoded, obfuscated, uppercase, lowercase, uppercase-first, uppercase-words, int, bool, float, string).

When in quotes, the format is %%xphp_variable|TYPE|CAST:value%% with |TYPE and |CAST:value both being optional. You can also use multiple casts by separating them with spaces. A few examples are below:

<xphp> syntax %%xphp%% syntax
<xphp var="foo" /> %%xphp_foo%%
<xphp var="foo" type="GET" /> %%xphp_foo|GET%%
<xphp var="foo" cast="urlencoded" /> %%xphp_foo|CAST:urlencoded%%
<xphp var="foo" cast="urlencoded lowercase" /> %%xphp_foo|CAST:urlencoded lowercase%%
<xphp var="foo" type="POST" cast="lowercase" /> %%xphp_foo|POST|CAST:lowercase%%

XPHP Cast Dictionary

Cast Description Example Code
dashed Replaces spaces, underscores, and / with dashes and removes all non alphanumeric characters (appropriate for using as an ID or CSS class name) “Department of Biology, Chemistry, & Physics” => department-of-biology-chemistry-physics <xphp var="foo" cast="dashed"/>
encoded Encodes all HTML entities, quotes, and ampersands & => &amp; <xphp var="foo" cast="encoded"/>
decoded Decodes any HTML entities in the string &amp; => & <xphp var="foo" cast="decoded"/>
text Formats the string as text (removes all HTML tags) <h2>Homepage</h2> => Homepage <xphp var="foo" cast="text"/>
urlencoded URL-encodes the string (all non-alphanumeric characters are replaced with % versions) “Department of Journalism, Broadcasting & Public Relations” => Department%20of%20Journalism%2C%20Broadcasting%20%26%20Public%20Relations <xphp var="foo" cast="urlencoded"/>
obfuscated Obfuscates the string using AES-256 encryption “Default Group” => “MHpEYmdmeS80S2pJZkJ2VnN4aVFoUT09” <xphp var="foo" cast="obfuscated"/>
int, bool, float, string Reformats the variable as an integer, boolean, float, or string “1.0” as int => “1”
“1.0” as bool => true
<xphp var="foo" cast="int"/>
<xphp var="foo" cast="bool"/>
lowercase Reformat string to all lowercase “Welcome” => “welcome” <xphp var="foo" cast="lowercase"/>
uppercase Reformat string to all uppercase “Welcome” => “WELCOME” <xphp var="foo" cast="uppercase"/>
uppercase-first Reformat string to capitalize first word “request more information” => “Request more information” <xphp var="foo" cast="uppercase-first"/>
uppercase-words Reformat string to capitalize every word “request more information” => “Request More Information” <xphp var="foo" cast="uppercase-words"/>
flatten If variable is an array, return as ,-separated list Array containing “tag 1”, “tag 2”, and “tag 3” => “tag 1, tag 2, tag 3” <xphp var="foo" cast="flatten"/>
json Formats the variable as JSON Array containing “tag 1”, “tag 2”, and “tag 3” => ["tag 1", "tag 2", "tag 3"] <xphp var="foo" cast="json"/>
alphanumeric Formats the string to allow only a-z, A-Z, and 0-9 (LiveWhale 2.12+) “2024 Commencement - Ceremony, Awards, & Dismissal” => “2024CommencementCeremonyAwardsDismissal” <xphp var="foo" cast="alphanumeric"/>

You can also re-cast variables in widget formats—for example, by replacing {title_clean} with <field var="title_clean" cast="uppercase"/>.

XPHP Variables Dictionary

Site-wide Variables

Server Variables

Examples are from the URL https://www.myschool.edu/folder/my-page/?foo=bar

Variable Code Example
server_host <xphp var="server_host" /> www.myschool.edu
server_path <xphp var="server_path" /> /folder/my-page/index.php
server_file
server_basename
<xphp var="server_file" />
<xphp var="server_basename" />
index.php
server_filename <xphp var="server_filename" /> index
server_extension <xphp var="server_extension" /> php
server_dirname <xphp var="server_dirname" /> /folder/my-page
server_request_uri <xphp var="server_request_uri" /> /folder/my-page/?foo=bar
server_query_string <xphp var="server_query_string" /> foo=bar

Note: The special variable <xphp var="server_path_flat" /> returns the contents of server_dirname but with / replaced with -. This has been used in some legacy Jumpchart integrations and may not be too useful nowadays.

Page Variables

Variable Description Code
page_title Page title of current page <xphp var="page_title" />
page_last_modified Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) <xphp var="page_last_modified" />
page_last_editor Name of user who last edited <xphp var="page_last_editor" />
page_description Description <xphp var="page_description" />
page_keywords List of keywords <xphp var="page_keywords" />
page_tags List of tags selected <xphp var="page_tags" />

Group Variables

Variable Description Code
group_title Group title
(uses “Public Name” if group has one,
otherwise uses the back-end group name)
<xphp var="group_title" />
group_directory Name of group directory <xphp var="group_directory" />
group_fullname Full name of group
(always uses back-end group name)
<xphp var="group_fullname" />
group_link Path to group <xphp var="group_link" />
group_gid Numeric value of the Group ID <xphp var="group_gid" />
group_navigation <xphp var="group_navigation" />
group_breadcrumb <xphp var="group_breadcrumb" />
group_twitter_name <xphp var="group_twitter_name" />
group_twitter_link <xphp var="group_twitter_link" />
group_twitter_feed <xphp var="group_twitter_feed" />
group_facebook_name <xphp var="group_facebook_name" />
group_facebook_link <xphp var="group_facebook_link" />
group_facebook_feed <xphp var="group_facebook_feed" />
group_instagram_name <xphp var="group_instagram_name" />
group_instagram_link <xphp var="group_instagram_link" />
group_instagram_feed <xphp var="group_instagram_feed" />

Note: Groups that use the main navigation of another group also inherit all group_* variables from that group.

Using Page and Group Variables in an include:

When using a file widget, LiveWhale will include the full source code into your page, meaning you can use context-specific variables like <xphp var="group_title"/>. However, when you append any GET variables (?foo=bar) to a file widget path, LiveWhale will instead make an HTTP request for that URL and then use the response, meaning context-specific variables like <xphp var="group_title"/> won’t work in that include, since LiveWhale doesn’t see /_ingredients/includes/my-include.php as belonging to any particular group.

Time

Variable Code Example
server_date_month <xphp var="server_date_month" /> September
server_date_month_numeric <xphp var="server_date_month_numeric" /> 9
server_date_day <xphp var="server_date_day" /> Monday
server_date_day_of_year <xphp var="server_date_day_of_year" /> 255
server_date_date <xphp var="server_date_date" /> 12
server_date_year <xphp var="server_date_year" /> 2022
server_date_full <xphp var="server_date_full" /> Monday, September 9, 2022
server_time_full_12 <xphp var="server_time_full_12" /> 1:44pm
server_time_full_24 <xphp var="server_time_full_24" /> 13:44pm
server_time_hour_12 <xphp var="server_time_hour_12" /> 1
server_time_hour_24 <xphp var="server_time_hour_24" /> 13
server_time_minute <xphp var="server_time_minute" /> 44
server_time_ampm <xphp var="server_time_ampm" /> pm
server_time_timezone <xphp var="server_time_timezone" /> EDT

Tags

Variable Description Code
tag_title Returns only the title of tag <xphp var="tag_title" />
tag_links Returns the tag link <xphp var="tag_links" />

Details Template Variables

Please note, XPHP variables for details pages are prefixed with details_. If your site was built using LiveWhale 1.6 or before, you may see in your details templates some variable prefixed with events_, forms_, news_, etc. However, since LiveWhale 1.6.1, details_ is the correct prefix for those variables (others are supported for backwards compatibility).

Events

Variable Description Code
id Events ID (ex., 4) <xphp var="details_id" />
parent The ID of the parent event, in the case of a shared or linked copy <xphp var="details_parent" />
gid Group ID <xphp var="event_gid" />
title Title of event <xphp var="details_title" />
status Hidden or Live Status is returned <xphp var="details_status" />
is_canceled Returns true or false is event is cancelled <xphp var="details_is_canceled" />
summary Summary <xphp var="details_summary" />
description Description <xphp var="details_desciption" />
views Number of views <xphp var="details_views" />
date_dt 2014-11-22 14:00:00 <xphp var="details_date_dt" />
date2_dt 2014-11-22 17:00:00 <xphp var="details_date2_dt" />
timezone Timezone <xphp var="details_timezone" />
is_all_day Returns true/false if event is all day <xphp var="details_is_all_day" />
repeats Returns true/false if a repeating event <xphp var="details_repeats" />
repeats_from Starting date (2014-11-22 14:00:00) <xphp var="details_repeats_from" />
repeats_until Ending date (2014-11-29 14:00:00) <xphp var="details_repeats_until" />
repeats_occurrences <xphp var="details_repeats_occurrences" />
has_registration Returns true or false if there is registration <xphp var="details_has_registration" />
registration_owner_email Email of registration owner <xphp var="details_registration_owner_email" />
has_wait_list Returns true/false if event has a waiting list <xphp var="details_has_wait_list" />
last_modified Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) <xphp var="details_last_modifed" />
url URL to event <xphp var="details_url" />
source <xphp var="details_source" />
cost Cost of event <xphp var="details_cost" />
contact_info Contact Information <xphp var="details_contact_info" />
is_starred Returns true/false if event is starred <xphp var="details_is_starred" />
subscription_id Subscription ID <xphp var="details_subscription_id" />
subscription_status <xphp var="details_subscription_status" />
location Location title and address <xphp var="details_location" />
location_latitude Latitude coordinate of locations (ex., 41.40338) <xphp var="details_location_latitude" />
location_longitude Longitude coordinate of locations (ex., 2.17403) <xphp var="details_location_longitude" />
tags List of tags selected <xphp var="details_tags" />
image <xphp var="details_image" />
group_title <xphp var="details_group_title" />
has_comments <xphp var="details_has_comments" />
registration_instructions <xphp var="details_registration_instructions" />
registration Displays registration instructions, registration form, and any additional RSVP forms that are attached (1.6+) <xphp var="details_registration"/>
is_paid True/false if this is a paid event <xphp var="details_is_paid" />
payment_price Cost of event <xphp var="details_payment_price" />
payment_method Method of payment <xphp var="details_payment_method" />
style <xphp var="details_style" />
group_fullname Fullname of group event is stored <xphp var="details_group_fullname" />
group_directory Directory path of event’s group <xphp var="details_group_directory" />
tags_calendar List of tags selected <xphp var="details_tags_calendar" />
gateway <xphp var="details_gateway" />
registration_open <xphp var="details_registration_open" />
last_editor Name of user who last edited <xphp var="details_last_editor" />
rsvp_form Displays RSVP form <xphp var="details_rsvp_form" />
images <xphp var="details_images" />
related_content Related Content (galleries, web links, etc..) <xphp var="details_related_content" />
date_ts Returns in the following format: 1416664800 <xphp var="details_date_ts" />
date_utc Starting date/time (2014-11-22 14:00:00) <xphp var="details_date_utc" />
date_time Time (12:00pm - 12:45pm) <xphp var="details_date_time" />
start_time Start time (12:00pm) <xphp var="details_start_time" />
date Date and Time (12:00pm - 12:45pm CST December 3) <xphp var="details_date" />
date2_time End Time (12:45pm) <xphp var="details_date2_time" />
image_src URL of uploaded image <xphp var="details_image_src" />
hero_image Displays large version of upload image <xphp var="details_hero_image" />
thumbnail_href URL of thumbnail <xphp var="details_thumbnail_href" />
thumbnail Displays thumbnail <xphp var="details_thumbnail" />
ical Displays “Download ical event” link <xphp var="details_ical" />
ical_link URL to ical feed <xphp var="details_ical_link" />
timestamp Start date in following format: 1416664800 <xphp var="details_timestamp" />
timestamp_end End date in following format: 1416675600 <xphp var="details_timestamp_end" />
share Returns true/false if shared to other groups <xphp var="details_share" />
cal_date Displays in stack format:
Nov
22
<xphp var="details_cal_date" />
save_to_calendar Displays “Add to Calendar” button <xphp var="details_save_to_calendar" />
canonical_url The full canonical URL of the details page (LiveWhale 2.8.0+) <xphp var="details_canonical_url" />

Forms

Variable Description Code
title Form Title <xphp var="details_title" />
last_modified Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) <xphp var="details_last_modified" />
last_editor Name of user who last edited <xphp var="details_last_editor" />
tags List of tags selected <xphp var="details_tags" />
group_title Title of group forms is stored in <xphp var="details_group_title" />
canonical_url The full canonical URL of the details page (LiveWhale 2.8.0+) <xphp var="details_canonical_url" />

Galleries

Variable Description Code
id Gallery ID <xphp var="details_id" />
title Gallery Title <xphp var="details_title" />
date Gallery Date entered in field (11/06/2014) <xphp var="details_date" />
description Description <xphp var="details_description" />
image Displays image <xphp var="details_image" />
thumbnails Displays all thumbnail images <xphp var="details_thumbnails" />
thumbnail Displays thumbnail <xphp var="details_thumbnail" />
thumbnail_href URL to thumbnail <xphp var="details_thumbnail_href" />
location Returns Title and address of location <xphp var="details_location" />
location_title Location title <xphp var="details_location_title" />
location_latitude Latitude coordinate of locations (ex., 41.40338) <xphp var="details_location_latitude" />
location_longitude Longitude coordinate of locations (ex., 2.17403) <xphp var="details_location_longitude" />
galleryphotos <xphp var="details_galleryphotos" />
related_content Related Content (galleries, web links, etc..) <xphp var="details_related_content" />
share Returns true/false if shared to other groups <xphp var="details_share" />
gid Numerical value of Group ID (ex., 4) <xphp var="details_gid" />
group_title Name of group gallery is stored in <xphp var="details_group_title" />
group_directory Directory path to group <xphp var="details_group_directory" />
status Returns Hidden or Live status <xphp var="details_status" />
views Number of views of gallery <xphp var="details_views" />
url URL to gallery <xphp var="details_url" />
last_modified Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) <xphp var="details_last_modified" />
has_comments Returns true/false if comments exist <xphp var="details_has_comments" />
last_editor Name of user who last edited <xphp var="details_last_editor" />
details_url <xphp var="details_details_url" />
tags List of tags selected <xphp var="details_tags" /> ​ ​
canonical_url The full canonical URL of the details page (LiveWhale 2.8.0+) <xphp var="details_canonical_url" />

News

Variable Description Code
id News ID <xphp var="details_id" />
gid Group ID <xphp var="details_gid" />
group_title Group name <xphp var="details_group_title" />
group_directory Directory path to group <xphp var="details_group_directory" />
headline Headine <xphp var="details_headline" />
summary Summary of the news story <xphp var="details_summary" />
date News date (ex., May 17, 2017) <xphp var="details_date" />
date_dt News datetime (ex., 2017-11-07 06:00:00) <xphp var="details_date_dt" />
body News story body <xphp var="details_body" />
url URL to the news story <xphp var="details_url" />
status Hidden or Live news story <xphp var="details_status" />
views Number of views of story received <xphp var="details_views" />
last_modified Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) <xphp var="details_last_modified" />
has_comments Returns true or false if comments exist <xphp var="details_has_comments" />
last_editor Name of user who last edited the story <xphp var="details_last_editor" />
details_url <xphp var="details_details_url" />
tags List of starred tags selected <xphp var="details_tags" />
location Name and address of location <xphp var="details_location" />
location_title Name of location <xphp var="details_location_title" />
location_longitude Longitude coordinate of locations (ex., 2.17403) <xphp var="details_location_longitude" />
related_content Related Content (galleries, web links, etc..) <xphp var="details_related_content" />
date Story date entered in date field <xphp var="details_date" />
thumbnail Displays thumbnail image <xphp var="details_thumbnail" />
thumbnail_href URL to thumbnail image (available in 1.6) <xphp var="details_thumbnail_href" />
image Displays the uploaded image <xphp var="details_image" />
contactinfo Information entered in Contact Information field <xphp var="details_contactinfo" />
share Returns true/false if shared to other groups <xphp var="details_share" />
views Returns the number of views from Google Analytics (LW 1.5.1+) <xphp var="details_views" /> ​
canonical_url The full canonical URL of the details page (LiveWhale 2.8.0+) <xphp var="details_canonical_url" />

Profiles

Variable Description Code
id Numerical profile id (ex., 7) <xphp var="details_id" />
gid Numerical group id the profile is stored <xphp var="details_gid" />
tid Numerical profile type id <xphp var="details_tid" />
group_title Name of the group the profile is stored. (ex., Admissions) <xphp var="details_group_title" />
group_directory URL path to the group (ex., http://localhost.edu/admissions) <xphp var="details_group_directory" />
parent <xphp var="details_parent" />
url URL path to profile <xphp var="details_url" />
status Hidden or Live <xphp var="details_status" />
firstname First name (ex., “Jane”) <xphp var="details_firstname" />
middlename Middle name (ex., “Ann”) <xphp var="details_middlename" />
lastname last name (ex., “Smith”) <xphp var="details_firstname" />
title Returns data entered in title field (ex., “Director of Marketing”) <xphp var="details_title" />
name Full name is returned (“Jane Ann Smith”) <xphp var="details_name" />
style Returns the profile style (ex., person) <xphp var="details_style" />
description Returns data entered in Description field <xphp var="details_description" />
description_location <xphp var="details_description_location" />
last_modifed Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) <xphp var="details_last_modified" />
contact_info Returns data entered into the Contact Information field <xphp var="details_contact_info" />
contact_info_location <xphp var="details_contact_info_location" />
views Number of profile views <xphp var="details_views" />
last_editor Returns name of the person who last edited the profile. <xphp var="details_last_editor" />
details_url <xphp var="details_details_url" />
tags List of tags are displayed <xphp var="details_tags" />
location_title Location Title <xphp var="details_location_title" />
location_latitude Latitude coordinate of locations (ex., 41.40338) <xphp var="details_location_latitiude" />
location_longitude Longitude coordinate of locations (ex., 2.17403) <xphp var="details_location_longitude" />
type Returns the profile type name (ex., Faculty) <xphp var="details_type" />
images Returns a collection of profile’s images upload <xphp var="details_images" />
related_content Related Content (galleries, web links, etc..) <xphp var="details_related_content" />
thumbnail_href URL to the image thumbnail <xphp var="details_thumbnail_href" />
thumbnail Displays the thumbnail image <xphp var="details_thumbnail" />
image Displays the uploaded image <xphp var="details_image" />
body Returns all data entered and set as “body” in profile type <xphp var="details_body" />
sidebar Returns all data entered and set as “sidebar” in profile type <xphp var="details_sidebar" />
share Returns true/false if shared to other groups <xphp var="details_share" />
canonical_url The full canonical URL of the details page (LiveWhale 2.8.0+) <xphp var="details_canonical_url" />

Blurbs

Variable Description Code
id Numerical blurb id (ex., 7) <xphp var="details_id" />
gid Numerical group id the blurb is stored <xphp var="details_gid" />
tid Numerical blurb type id <xphp var="details_tid" />
group_title Name of the group the blurb is stored. (ex., Admissions) <xphp var="details_group_title" />
status Hidden or Live <xphp var="details_status" />
title Returns data entered in title field <xphp var="details_title" />
body Returns data entered in body field <xphp var="details_body" />
last_modifed Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) <xphp var="details_last_modified" />
last_editor Returns name of the person who last edited the blurb. <xphp var="details_last_editor" />
tags List of tags are displayed <xphp var="details_tags" />
canonical_url The full canonical URL of the details page (LiveWhale 2.8.0+) <xphp var="details_canonical_url" />