This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
plugin:common [2020/06/06 20:58] duncanc |
plugin:common [2021/11/29 06:55] (current) duncanc [Inline CSS styles] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Common Plugin ====== | ||
+ | ---- plugin ---- | ||
+ | description: | ||
+ | author | ||
+ | type : | ||
+ | lastupdate : 2020-06-06 | ||
+ | compatible : phplist 3 | ||
+ | depends | ||
+ | conflicts | ||
+ | similar | ||
+ | tags : | ||
+ | |||
+ | sourcerepo : https:// | ||
+ | donationurl: | ||
+ | ---- | ||
+ | |||
+ | This plugin provides support classes required by some other plugins. It also provides three pages which are added to the Config menu | ||
+ | |||
+ | * display the output of the phpinfo() function | ||
+ | * display the config.php file (user id and passwords are removed) | ||
+ | * display the contents of the php session | ||
+ | |||
+ | The plugin also provides an option to inline CSS styles when phplist sends campaign emails. | ||
+ | |||
+ | This plugin is now included with phplist, so you need to only enable it on the Manage Plugins page. | ||
+ | |||
+ | |||
+ | ====== Installation ====== | ||
+ | |||
+ | See the README file on the GitHub page https:// | ||
+ | |||
+ | ====== Inline CSS styles ====== | ||
+ | The plugin provides an option to inline CSS styles when phplist builds the email content. This allows you to include < | ||
+ | |||
+ | Some email clients have limited or no support for < | ||
+ | |||
+ | For example, having a set of styles defined as | ||
+ | <code css> | ||
+ | <style type=" | ||
+ | p { margin-bottom: | ||
+ | p.small { font-size: 13px; line-height: | ||
+ | h2 { margin-bottom: | ||
+ | h3 { margin-bottom: | ||
+ | td { padding: 5px 10px 5px 10px; } | ||
+ | td.border { border-bottom: | ||
+ | ul { font-size: 15px; color: rgb(102, 102, 102); font-family: | ||
+ | </ | ||
+ | </ | ||
+ | An h3 element in the template | ||
+ | < | ||
+ | will be changed to | ||
+ | < | ||
+ | |||
+ | There are two packages to do the inlining that are included in the plugin - PreMailer (https:// | ||
+ | {{ : | ||
+ | |||
+ | <WRAP center round info 60%> | ||
+ | This feature requires php 7.1 or later. You should not try to use this if you are running an earlier version of php. | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Logging database queries ====== | ||
+ | |||
+ | There is a mechanism to log the sql queries created by most plugins. This might be useful in debugging or to be able to run a query manually. | ||
+ | |||
+ | Add the following to the config.php file (at the end of the file is ok) | ||
+ | |||
+ | < | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ), | ||
+ | );</ | ||
+ | |||
+ | Now queries will be logged to a file in the phplist temporary directory, identfied by the '' | ||
+ | |||
+ | Alternatively you can specify a particular directory for the log file. The directory must be writeable by the web server process. | ||
+ | |||
+ | < | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ), | ||
+ | ' | ||
+ | );</ | ||
+ | |||
+ | Each query will be logged similar to this | ||
+ | |||
+ | < | ||
+ | elapsed time 11.165857315063 ms | ||
+ | SELECT id, email, confirmed, blacklisted | ||
+ | FROM phplist_user_user u | ||
+ | LEFT JOIN phplist_listuser lu ON u.id = lu.userid | ||
+ | WHERE userid is NULL | ||
+ | </ | ||
+ | |||
+ | To stop logging queries simply change DEBUG to OFF. |