GUIFile("CKEditorSetup.php")); # HTML page setup ?>

".$Msg."\n"; } ?>

# Adding New Template

# Editing Message Template

The following keywords will be replaced when the email is sent as follows:

X-PORTALNAME-X
  portal name (from System Configuration)
X-ADMINEMAIL-X
  administrator email address (from System Configuration)
X-BASEURL-X
  base URL for the site (useful in constructing links in the message)
X-LEGALNOTICE-X
  legal/copyright notice (from System Configuration)
X-USERLOGIN-X
  user account name (like Get("UserName"); ?>)
X-USERREALNAME-X
  "real" name of user (as set in Preferences)
X-USEREMAIL-X
  email address of user
X-RESOURCELIST-X
  list of resources that triggered email
X-RESOURCECOUNT-X
  number of items in list of resources that triggered email
X-DATE-X
  full date (like )
X-TIME-X
  full time (like )
X-YEAR-X
  year (like )
X-MONTH-X
  month as a number (like )
X-DAY-X
  day as a number (like )
X-MONTHNAME-X
  month name (like )
X-MONTHABBREV-X
  month name abbreviation (like )
X-WEEKDAYNAME-X
  weekday name (like )
X-DAYWITHSUFFIX-X
  day as a number with suffix (like )

The following keywords only apply to saved search mailings:

X-SEARCHNAME-X
  user-defined name of saved search
X-SEARCHCRITERIA-X
  text description of search criteria

The following keywords only apply in the List Item text:

X-RESOURCENUMBER-X
  numerical position of resource in list
X-RESOURCEID-X
  ID of resource (useful in constructing URLs)
X-FIELD:xxx-X
  field value (see below)
PluginEnabled("SocialMedia")) { ?>
X-SHARE:FACEBOOK-X
  URL to share the resource on Facebook
X-SHARE:TWITTER-X
  URL to share the resource on Twitter
X-SHARE:LINKEDIN-X
  URL to share the resource on LinkedIn
X-SHARE:GOOGLEPLUS-X
  URL to share the resource on Google Plus

For the "X-FIELD:xxx-X" keyword, the "xxx" portion should correspond to a field name with all spaces and non-alphanumeric characters removed and all letters translated to upper case (e.g. X-FIELD:DATESUBMITTED-X).

Basic Settings
Template Name |
Confirm Before Sending | />
Send One Email per Matching Resource | />
From |
Subject |
HTML Message Settings
Body | <?PHP print htmlspecialchars($H_Body); ?> Note: Do not include `<!DOCTYPE ...>`, `<html>`, `<head>`, or `<body>` tags.
List Item | <?PHP print htmlspecialchars($H_ItemBody); ?>
Collapse Margins | /> Yes /> No
Plain Text Message Settings
Body | <?PHP print htmlspecialchars($H_PlainTextBody); ?> Note: The plain text message is only displayed to users who are unable to view HTML e-mail or have configured their e-mail application to display plain text instead of HTML in e-mail.
List Item | <?PHP print htmlspecialchars($H_PlainTextItemBody); ?>
Additional Settings
Extra Message Headers | <?PHP print htmlspecialchars($H_Headers); ?>

Test Resource IDs: Test Seed:
$Template) { $H_Templates[$Id]["TemplateUsers"] = $H_Plugin->FindTemplateUsers($Id); $H_Templates[$Id]["Name"] = "".$Template["Name"].""; if ($Template["ConfirmMode"]) { $H_Templates[$Id]["Name"] = $Template["Name"]." [C]"; } } $ListFields = [ "Name" => [ "Heading" => "Name", "NoSorting" => TRUE, "AllowHTML" => TRUE, ], "Users" => [ "Heading" => "", "NoSorting" => TRUE, "ValueFunction" => function($Item, $FieldName) { if (count($Item["TemplateUsers"])) { return "Currently in use and cannot be deleted.
" ."Used by: ".implode(", ",$Item["TemplateUsers"]).""; } else { return ""; } }, ], ]; $ItemList = new ItemListUI("Email Message Templates", $ListFields, count($H_Templates), ""); $ItemList->AddActionButton("Edit", "index.php?P=P_Mailer_EditMessageTemplates&AC=Edit&ID=\$ID", "pencil.png"); $ItemList->AddActionButton("Delete", "index.php?P=P_Mailer_EditMessageTemplates&AC=Delete&ID=\$ID", "cross.png", function($Item) { return count($Item["TemplateUsers"])==0 ? TRUE : FALSE ; }); $ItemList->Display($H_Templates); ?>

Templates marked with [C] will queue messages for manual confirmation rather than sending them immediately

# Confirm Template Deletion

Template Name |
From |
Subject |
Body |
List Item |
Plain Text Body |
Plain Text List Item |
Extra Message Headers |