TABLE OF CONTENTS › Customizing Preferences

After requests to allow for “admin preferences,” I thought about adding another sub-tab to PM and perhaps another table, but that all seemed to complicated to do what we really wanted to do.

So as of 0.3, the “bab_pm_preferences” function is right at the top of the Postmaster Library. Users can “hack” the code and customize many of the labels that appear under the Postmaster tab [your changes will not be overwritten with each updated version — unless the Library needs to be updated].

In the Textpattern Admin > Plugins tab, click the “Edit” link next to “Postmaster Library”; the first thing you’ll see is this:

<P>//  POSTMASTER =======================<br />
// ================================</p>
function bab_pm_preferences($what)

and then a few lines down, this:

// ---- subscriber-related preferences

The next several lines of code show an item on the left, and what it’s going to display on the right (of the “=>“):

		'subscriber_name'         => 'Name:',
		'subscriber_email'        => 'Email:',
		'subscriber_lists'        => 'Lists:',
		'subscriber_custom_1'     => 'Custom 1:',
		'subscriber_custom_2'     => 'Custom 2:',
		'subscriber_custom_3'     => 'Custom 3:',
		'subscriber_custom_4'     => 'Custom 4:',
		'subscriber_custom_5'     => 'Custom 5:',
		'subscriber_custom_6'     => 'Custom 6:',
		'subscriber_custom_7'     => 'Custom 7:',
		'subscriber_custom_8'     => 'Custom 8:',
		'subscriber_custom_9'     => 'Custom 9:',
		'subscriber_custom_10'    => 'Custom 10:',

For example, if you want “Custom 1” to appear as “Address 1” on the Add or Edit a Subscriber pages, edit the proper line so that it looks like this:

		'subscriber_custom_1'     => 'Address 1:',

Don’t forget to hit “Save” when you’ve finished! If you go to the Extensions > Postmaster > Subscribers sub-tab and click on a subscriber name, you’ll see where your change is visible.

You can also change list-related labels as well:

// ---- list-related preferences
		'list_name'               => 'List Name:',
		'list_description'        => 'Description:',
		'list_admin_email'        => 'Admin Email:',
		'list_unsubscribe_url'    => 'Unsubscribe Url:',
		'list_form'               => 'Form:',
		'list_subject_line'       => 'Subject Line:',

And some other options as well [for the number of subscribers to list per page on the Postmaster > Subscribers sub-tab, and the number of emails to send in each batch]:

// ---- miscellaneous preferences
		'edit_fields_width'           => '440',
		'edit_fields_height'           => '14',
		'subscribers_per_page'           => '20',
		'emails_per_batch'           => '50',
		'zemDoSubscribe_no'           => 'No',
		'unsubscribe_error'           => 'That is not a valid unsubscription. Please contact the list administrator or website owner. ',
		'aggregate_field'           => 'zemSubscriberAggregate',

Back to the Table of Contents

Comment

Textile Help

Official Documentation for Postmaster (A Textpattern Plugin)

Get Postmaster

RELATED

REGULARS

DISCLAIMER

Postmaster is a plugin for Textpattern, and is licensed under the GNU GPL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licens for more details.