Table of Contents

Subject Line Placeholder

—- plugin —-

description: Activate placeholders for user attributes in the subject line
author : Arnold Lesikar
email : alesikar@mac.com
type :
lastupdate : 2015-06-22
compatible : 3.x
depends : PHP 5.x
conflicts :
similar :
tags : placeholder, attribute, subjectline

downloadurl: https://github.com/arnoldle/phplist-plugin-subjectLinePlaceholdersPlugin/archive/master.zip
bugtracker : https://github.com/arnoldle/phplist-plugin-subjectLinePlaceholdersPlugin/issues
sourcerepo : https://github.com/arnoldle/phplist-plugin-subjectLinePlaceholdersPlugin/
donationurl:

screenshot_img :


This plugin allows you to use placeholders for user attributes in the subject line of list messages.

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Configuration and Settings

None

Discussion

The placeholder is the attribute name in uppercase and enclosed in square brackets. If the replacement is to be in uppercase, there must be an '!' immediately after the opening bracket. Thus if subscribers have attributes named 'City' and 'State' and the state is to be in upper case, a subject line might read:

    A message for subscribers in [CITY], [!STATE]

For a subscriber in Dallas, Texas, this would result in the subject line:

    A message for subscribers in Dallas, TEXAS

Conditional placeholders are also supported, allowing an alternative replacement when an attribute has no specified value.

Thus [NAME?Subscriber] results in 'Subscriber' being used in the subject line if the user's 'Name' attribute is empty.

Note: Can now use '%%' as well as '?' as the separator between the attribute name and the default value.

If upper case is specified by '!' after the opening bracket, the alternative value will be transformed to upper case, just as the attribute value would be. With the '%%' separator this does not work. If this separator is used, the '!' will prevent any replacement from taking place at all.

No configurations or settings are required.

Change Log