—- plugin —-
description: Add date related placeholders
author : phplist
email : info@phplist.com
type :
lastupdate : 2015/06/25 16:03
compatible : 3.0 or later
depends :
conflicts :
similar :
tags :
downloadurl: https://github.com/michield/phplist-plugin-dateplaceholder/archive/master.zip
bugtracker : https://github.com/michield/phplist-plugin-dateplaceholder/issues
sourcerepo : https://github.com/michield/phplist-plugin-dateplaceholder
donationurl:
Add placeholders that relate to dates.
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.
You can use formatting like the “date” command in PHP (see https://php.net/date)
The general format for a placeholder is:
[PLACEHOLDER:FORMAT]
where PLACEHOLDER can be one of:
- TODAY
- YESTERDAY
- TOMORROW
- NEXTWEEK
- LASTWEEK
- NEXTMONTH
- LASTMONTH
and FORMAT can be any format allowed by the date command in PHP
Some common Formats:
- “Y-m-d” will produce 2015-06-25
- “d/m/Y” will produce 25/06/2015
- “M jS Y” will produce Jun 25th 2015
- “l jS F Y” will produce Thursday 25th June 2015
You can also set the default format in the phpList settings. It will appear in the General settings.
When you have a default format, you can leave FORMAT empty and just use eg.
[TODAY]
The replacement works both in the body of a campaign and the subject of the campaign.
Once the campaign has finished sending the dates will be fixed, when the campaign is archived. When you re-queue the campaign, the placeholder will no longer exist. You can bypass this behaviour in the settings.
This requires phpList 3.2.4 or later.
This plugin will add the option to define a default date format in the settings.
It will also add an option in category archive that when set will bypass the final fixing of the dates when the campaign has been sent.
https://github.com/michield/phplist-plugin-dateplaceholder/commits/master
(eg NEXTYEAR, LASTYEAR).