User Tools

Site Tools


plugin:dateplaceholder

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
plugin:dateplaceholder [2015/11/29 10:26]
phplist [Configuration]
plugin:dateplaceholder [2015/11/29 10:27] (current)
phplist
Line 1: Line 1:
 +====== dateplaceholder ======
 +
 +---- 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: ​
 +----
 +
 +===== Purpose =====
 +
 +Add placeholders that relate to dates.
 +
 +===== Installation =====
 +
 +Install the plugin using the [[plugin:​plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:​Plugins]] on how to install plugins manually.
 +
 +===== Examples/​Usage =====
 +
 +
 +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
 +- (more to follow)
 +
 +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.
 +
 +===== Configuration =====
 +
 +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.
 +
 +
 +=== Change Log ===
 +
 +https://​github.com/​michield/​phplist-plugin-dateplaceholder/​commits/​master
 +
 +
 +  * 2015/11/29 v 0.2 - fix the dates when the campaign has finished sending (requires phpList 3.2.4 or later)
 +
 +  * **2015/​06/​25 16:03**
 +    * Initial release
 +
 +
 +=== ToDo/Wish List ===
 +
 +  * more placeholders can be added if and when needed. Send a PR or add an issue in the tracker if there is a placeholder you would like.
 +
 +(eg NEXTYEAR, LASTYEAR).
  
plugin/dateplaceholder.txt · Last modified: 2015/11/29 10:27 by phplist

Resources
Contact Us

e: info@phplist.com

Boring Bit

phpList is a registered limited company

UK Company No. 07582966

VAT Registration 122 0788 37

© phpList 2016