Letter module Written Communications

ThisPlugin allows you to create letters and form letters. Based on a *.docx template with placeholders (template) this plugin generates a complete * .docx document and start downloading the file you created. The resulting document can be processed with corresponding software on the PC. MS Office, OpenOffice and LibreOffice are supported.

Admidio Version 2.4.4 or higher

written communications_3.4.1.zip - (Admidio 4.1 - Admidio 4.3)

Older versions:
written communications_3.3.3.zip - (Admidio 4.0)
written communications_3.2.2.zip - (Admidio 3.3)
written communications_3.1.zip - (Admidio 3.2)
written communications_3.0.zip - (Admidio 3.1)
written communications_2.0.1.zip - (Admidio 3.0)
written communications_1.1.zip - (min. Admidio 2.4.4)

Supported by: Thomas-RCV

Plugin-Version: 3.4.1

Required Admidio-Version: at least version 2.4.4

Supported Databases: MySQL, PostgreSQL

Supported Languages: German, German(polite), Englisch

License: GPL 2

Sourcecode: Github

An installation is not nescessary. Just unpack the downloaded files an copy them into adm_plugins. Add a link to the Admidio menu in your used theme and also in the overview page.


In file my_body_bottom.php add at the end of the menu the follwing link:

$moduleMenu->addItem('written_communications', '/adm_plugins/written_communications/written_communications.php','Letters', '/icons/page_white_word.png');

Access rights can be linked to roles. The limitation on roles can be configured in the config.php file of the plugin. To this end, the role of monitoring must match the parameter $plg_wc_roleAccess = 1; be activated. If this parameter is set (default: 0 for all members of the organization) then the access is limited to the roles that were defined in the config.php in the array $plg_wc_roleArray. Please use the Admidio function hasRole () to make the link only visible for defined roles.

if(hasRole('Webmaster') || hasRole('Executive Board'))
   $moduleMenu->addItem('written_communications','/adm_plugins/written_communications/written_communications.php','Letters', '/icons/page_white_word.png');

The plugin provides the option on the surface to create individual letters to a manual receiver, or a form letter to a role within the organization. By default, the address of the creator is automatically used. But also a sender can optionally be created manually. About the CKEditor additional styles of text content can be formatted. Likewise, tables and lists are supported. It does not support the insertion of images, as well as the use of hyperlinks.

The plugin generates from a template file, which must have the format * .docx, an edited file in which all the placeholders are replaced with the user input. The plugin will start an automatic download of the created *.docx file with all sites. This makes it possible to create custom templates and letterheads.

If a new release is available all files and folders are replaced by newer version scripts.

  • Since Admidio 3.2 the role “Webmaster” changed to “Administrator” and will be removed in future.
  • Add this changes to your config.php to avoid troubleshooting:
$plg_wc_roleArray = array('Administrator');

Starting with version 1.1 custom profile fields can be additionally registered as desired, then they can be used automatically in a template as wildcard. If you need to provide additional profile fields they are needed to be registered in the config.php of the plugin in the array $plg_wc_arrCustomProfileFields. Please purpose defining the profile field, which is to be used, with the desired placeholder in the template, as a key / value pair. Note that the database fields must be written in capital letters!


To define a placeholder ${userEmail} it must be assigned to the profile field “EMAIL”:

$plg_wc_arrCustomProfileFields = array('userEmail' => 'EMAIL');

Since version 1.1 it is possible to define recurring text passages and texts, such as a complimentary close as fixed text nodes in the form as placeholder. These texts are recorded in the array $plg_wc_arrCustomText in config.php. To register your own texts please have a look at: Register more profile fields in the Plugin.

To create your own templates the plugin is linked to the Download module of Admidio. Own letter templates should not be created in the example folder “Templates” of the Plugin, because this folder is possibly replaced with updates. In the download module you should create a folder “MSWord_Templates”. Such a directory once exists, this folder is to be choosen automatically and templates are loaded only from this directory. Now your own templates can be easily provided on the upload. The templates must have the format *.docx!

The old *.doc format and presentation formats are not permitted!

To be used, all placeholders are included in the demo templates demo_de.docx and demo_en.docx in the folder “templates” of the Plugin. The placeholders are all optional and can be removed at any time if a detail, eg, the date “${LetterDate}” is not required in the template.

If you have created a nice template and you want to share like a demo just contact the Admidio Team

3.4.1 (13.01.2024)

  • Compatibility with Admidio 4.3

3.4.0 (05.12.2021)

  • Compatibility with Admidio 4.1

3.3.3 (24.01.2021)

  • [Bug] Output of street was not possible because of a rename of the internal field name

3.3.2 & 3.2.2 (15.11.2020)

  • PHP 7.4 compatibility
  • Update SimpleHtmlDom library to version 1.9.1

3.3.1 (07.11.2020)

  • Compatibility with Admidio 4.0

3.2.1 (16.11.2018)

  • Compatibility with Admidio 3.3

3.1 (08.01.2017)

  • Compatibility with Admidio 3.2
  • Changed folder path of the user tamplates to new organization folder names in the Download module.
  • Renamed “Webmaster” to “Administrator” in the config file ( $plg_wc_roleArray = array('Administrator'); ).

3.0 (12.10.2016)

  • Compatibility with Admidio 3.1
  • PHP7 ready
  • Language “de_sie” added
  • rework of Color style assignment

2.0.1 (28.09.2015)

  • Bugfix loading Admidio classes
  • Bugfix root path for template files
  • Internal name convention of variables and arrays

2.0 (24.09.2015)

  • Ready for Admidio 3.0
  • Common enhancements

1.1 (18.08.2014)

  1. Access to roles configurable in config file now
  2. Customs profile fields can be registered in config file
  3. Customs text fields can be registred in config file

1.0.2 (29.06.2014)

  • Bugfix openbase_dir settings causes errors
  • Bugfix Prefix of temporary file changed to “zip”

1.0.1 (22.04.2014)

  • Bugfix Wrong spelling of role class

1.0 (13.04.2014)

  • Modul Written Communications released
  • en/plugins/written_communications.txt
  • Last modified: 2024/01/13 21:11
  • by fasse