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

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

"portal name (from Interface Configuration)", "ADMINEMAIL" => "administrator email address (from Interface Configuration)", "BASEURL" => "base URL for the site (useful in constructing links in the message)", "LEGALNOTICE" => "legal/copyright notice (from Interface Configuration)", "USERLOGIN" => "user account name (like ".User::getCurrentUser()->Get("UserName").")", "USERREALNAME" => "\"real\" name of user (as set in Preferences)", "USEREMAIL" => "email address of user", "RESOURCELIST" => "list of resources that triggered email", "RESOURCECOUNT" => "number of items in list of resources that triggered email", "DATE" => "full date (like ".date("M j Y").")", "TIME" => "full time (like ".date("g:ia T").")", "YEAR" => "year (like ".date("Y").")", "MONTH" => "month as a number (like ".date("n").")", "DAY" => "day as a number (like ".date("j").")", "MONTHNAME" => "month name (like ".date("F").")", "MONTHABBREV" => "month name abbreviation (like ".date("M").")", "WEEKDAYNAME" => "weekday name (like ".date("l").")", "DAYWITHSUFFIX" => "day as a number with suffix (like ".date("jS").")", ]; $ItemKeywords = [ "RESOURCENUMBER" => "numerical position of resource in list", "RESOURCEID" => "ID of resource (useful in constructing URLs)", "RESOURCEVIEWURL" => "URL for full record view for resource", "FIELD:xxx" => "field value (see below)", ]; if (PluginManager::getInstance()->pluginEnabled("SocialMedia")) { $ItemKeywords += [ "SHARE:FACEBOOK" => "URL to share the resource on Facebook", "SHARE:TWITTER" => "URL to share the resource on Twitter", "SHARE:LINKEDIN" => "URL to share the resource on LinkedIn" ]; } $SavedSearchKeywords = [ "SEARCHNAME" => "user-defined name of saved search", "SEARCHCRITERIA" => "text description of search criteria", ]; function DisplayKeywordList($Keywords) { ?>

$Description) { ?>
X--X

setIcon("Disk.svg"); $DeleteButton = new HtmlButton("Delete"); $DeleteButton->setIcon("Delete.svg"); $TestButton = new HtmlButton("Test"); $TestButton->setIcon("MagicWand.svg"); $CancelButton = new HtmlButton("Cancel"); $CancelButton->setIcon("Cross.svg"); # add appropriate content-area title if ($H_DisplayMode == "Adding") { $AF->setPageTitle("Add Email Message Template"); ?>

# Adding New Template

setPageTitle("Edit Email Message Template"); ?>

# Editing Message Template

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

The following keywords only apply to saved search mailings:

The following keywords only apply in the List Item text:

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 |
Send One Email per Matching Resource | />
From |
Subject |
HTML Message Settings
Body | <?PHP print htmlspecialchars($H_Body, ENT_SUBSTITUTE); ?> Note: Do not include `<!DOCTYPE...>`, `<html>`, `<head>`, or `<body>` tags.
List Item | <?PHP print htmlspecialchars($H_ItemBody, ENT_SUBSTITUTE); ?>
Collapse Margins | /> Yes /> No
Plain Text Message Settings
Body | <?PHP print htmlspecialchars($H_PlainTextBody, ENT_SUBSTITUTE); ?> 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, ENT_SUBSTITUTE); ?>
Additional Settings
Extra Message Headers | <?PHP print htmlspecialchars($H_Headers); ?>

getHtml(); ?> getHtml(); ?> getHtml(); ?> getHtml(); ?>
Test Resource IDs: Test Seed:
setIcon("Plus.svg"); $AddTemplateButton->makeSubmitButton(); $AF->setPageTitle("Email Message Templates"); if (isset($H_Msgs)) { DisplayMessages($H_Msgs); } foreach ($H_Templates as $Id => $Template) { $H_Templates[$Id]["TemplateUsers"] = $H_Plugin->FindTemplateUsers($Id); $H_Templates[$Id]["Name"] = "".$Template["Name"].""; } $ListFields = [ "Name" => [ "AllowHTML" => true, ], "Users" => [ "Heading" => "", "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($ListFields); $ItemList->Heading("Email Message Templates"); $ItemList->ItemsPerPage(count($H_Templates)); $ItemList->BaseLink(""); $ItemList->fieldsSortableByDefault(false); $ItemList->AddActionButton( "Edit", "index.php?P=P_Mailer_EditMessageTemplates&AC=Edit&ID=\$ID", "Pencil.svg" ); $ItemList->AddActionButton( "Delete", "index.php?P=P_Mailer_EditMessageTemplates&AC=Delete&ID=\$ID", "Cross.svg", function ($Item) { return count($Item["TemplateUsers"]) == 0 ? true : false ; } ); $ItemList->Display($H_Templates); print $AddTemplateButton->getHtml(); } elseif ($H_DisplayMode == "Confirm") { # ----- STATE: CONFIRMING DELETION -------------------------------------------- $ConfirmButton = new HtmlButton("Confirm"); $ConfirmButton->setIcon("Delete.svg"); $ConfirmButton->makeSubmitButton(); $CancelButton = new HtmlButton("Cancel"); $CancelButton->setIcon("Cross.svg"); $CancelButton->makeSubmitButton(); $AF->setPageTitle("Confirm Email Message Template Deletion"); ?>

# Confirm Template Deletion

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

getHtml(); ?> getHtml(); ?>