CustomFields 1.2x Manual

Installing CustomFields

An updated user manual for CustomFields 2.x is currently being written. This version details CustomFields 1.0. Although the plugin has changed considerably, major sections of this manual still applies and hence can be used as a reference.

Extract the distribution and preserve the directories. The directories that have been extracted correspond to the directories in your Movable Type installation. Upload these directories to your Movable Type installation such that file structure looks like so (where mt-static is your StaticWebPath):

    MT_DIR/
    |__ plugins/
    |  \__ CustomFields/
    |     |__ author_archive.cgi
    |     |__ author_archive.pl
    |     |__ author.cgi
    |     |__ author.pl
    |     |__ categories.cgi
    |     |__ categories.pl
    |     |__ entries.cgi
    |     |__ entries.pl
    |    |
    |     \__ lib/
    |    |  \__ CustomFields/
    |    |    |__ AuthorArchive.pm
    |    |    |__ Authors.pm
    |    |    |__ Categories.pm
    |    |    |__ CustomFields.pm
    |    |    |__ Entries.pm
    |    |    |
    |    |    \__ Template/
    |    |       |__ ContextHandlers.pm
    |    |
    |    \__ tmpl/
    |       |__ archives.tmpl
    |       |__ edit-extended-authors.tmpl
    |       |__ list-custom-fields.tmpl
    |       |__ list-edit-custom-fields.tmpl
    |       |__ rebuild.tmpl
    |
    |__ php/
    |  \__ plugins/
    |     |__ (20 .php files)
    |
    |__ mt-static/
    |  \__ plugins/
    |     \__ CustomFields/
    |    |__ (12 files)

Set the permissions of the four .cgi files (author_archive.cgi, author.cgi, categories.cgi, entries.cgi) to 755 and if the plugin was successfully installed, you should see something similar to this on the Plugins listing under System Overview.

CustomFields Registration

Creating Custom Fields

Custom Entry Fields

An updated user manual for CustomFields 2.x is currently being written. This version details CustomFields 1.0. Although the plugin has changed considerably, major sections of this manual still applies and hence can be used as a reference.

You can create a custom entry field on two different levels:

  • blog level - custom entry fields created on the blog level only show up for the blog they were created for
  • system level - custom entry fields created on the system level will show up for all blogs within the system.

To create a custom entry field on the system level, go to the Plugins listing screen under System Overview and click the Custom Entry Fields link (under the CustomFields Pluginset):

Custom Entry Fields System Wide

To create a custom entry field on the blog level, go to your blog's main menu and in the middle column under Plugin Actions click Edit Custom Entry Fields

Custom Entry Fields Blog Level

Both these links take you to the CustomFields Creation Page where you can create custom entry fields.

By default, these custom entry fields will not appear on the new/edit entry screens. Follow these steps to have them show up:

  1. Go to the entrry screen and click the Customize the display of this page link at the bottom of the page.
  2. In the ensuing popup window, choose the Custom layout and check the CustomFields box.
  3. After hitting Save the entry screen will refresh and the custom entry fields will now appear.

Custom Entry Fields

The order that these fields appear can easily be changed. Simply grab the field's name and then move it to where you'd like it to appear from now on. The other fields will shuffle down to make room.

Custom Category Fields

Like custom entry fields, custom category fields can be created on two different levels:

  • blog level - custom category fields created on the blog level only show up for the blog they were created for
  • system level - custom category fields created on the system level will show up for all blogs within the system.

To create a custom category field on the system level, go to the Plugins listing screen under System Overview and click the Custom Category Fields link (under the CustomFields Pluginset):

Custom Category Fields System Wide

To create a custom category field on the blog level, go to your blog's main menu and in the middle column under Plugin Actions click Edit Custom Category Fields

Custom Category Fields Blog Level

Both these links take you to the CustomFields Creation Page where you can create custom category fields.

These fields appear by default on the category editing page.

Custom Category Fields

The order that these fields appear can easily be changed. Simply grab the field's name and then move it to where you'd like it to appear from now on. The other fields will shuffle down to make room.

Custom Author Fields

To create a custom author field, go to the Plugins listing screen under System Overview and click the Custom Author Fields link (under the CustomFields Pluginset):

Custom Author Fields

which will take you to the CustomFields Creation Page where you can create custom author fields.

To edit these custom author fields, click your username at the top of any Movable Type screen. This takes you to your author profile where you'll notice a set of tabs. Click the Extended Profile tab to edit your custom author fields.

Note: These custom author fields can only be filled in by the authors themselves.

Custom Author Fields

The order that these fields appear can easily be changed. Simply grab the field's name and then move it to where you'd like it to appear from now on. The other fields will shuffle down to make room.

The CustomFields Creation Screen

Custom Fields

The interface for creating custom author, entry and category fields is identical. To create a new custom field, click the Create New Field link that appears towards the right and a green bar will appear as demonstrated above.

  1. Enter the name of the field in the first text box and an optional short description for it in the field below.

  2. Next you'll notice that a custom template tag has been automatically created for you, if this isn't to your liking, you can change it (be careful that you don't name it after a template tag that already exists!). Remember to leave off the starting MT bit, so if you wanted to create a tag called MTMyCurrentMood, you would enter simply MyCurrentMood into the template tag text field.

  3. Choose the type of field, if you choose Drop Down Menu or Radio Buttons, a further field will appear where you can enter the valid options separated with commas for example

    Option 1, Option 2, Option 3
    
  4. Finally check the Required box if the field cannot be left blank by authors.

To edit an existing custom field, just click its title and an orange bar (similar to the green one shown above) will appear with the details of the custom field filled in. Edit away!

Author Archiving

An updated user manual for CustomFields 2.x is currently being written. This version details CustomFields 1.0. Although the plugin has changed considerably, major sections of this manual still applies and hence can be used as a reference.

CustomFields allows you to create archives for authors in Movable Type and these author archives closely model the existing archive types in Movable Type (if you don't understand what I mean by author archives, think of the Individual Entry Archive for authors). To create a new author archive:

  1. Create a new archive template. You can use any of the MTAuthor tags (detailed below) in this template. Note: You do not need to first use the MTAuthors container tag, just use MTAuthor tags directly

  2. Once you've create an author archive template, go to your blog's publishing settings (Settings > Publishing) and click Edit Author Archives under Plugin Actions at the bottom of the page

    Edit Author Archives

  3. In the screen that follows, you can setup your author archiving mapping. The file maps can use any MTAuthor tag as the screenshot demonstrates:

    Author Archive Mapping

  4. To rebuild author archives click Rebuild at the bottom of the left hand menu and in the popup window choose Rebuild Author Archives. Note: Choosing Rebuild All Files will not rebuild author archives

Template Tags

MTAuthors

This container tag retrieves the authors from Movable Type (comparable to MTEntries). It takes the following attributes:

  • permissions — Allows you to list only authors who have the given permissions. Separate permissions using a comma. Valid permissions you can filter by are:
    • post
    • upload
    • edit_all_posts
    • edit_templates
    • edit_authors
    • edit_config
    • rebuild
    • send_notifications
    • edit_categories
    • edit_notifications
  • id="X" where X is the author_id of an author — Restricts the returned results to just the specified author.

MTAuthorLink

Produces a link for the author either using their website URL or, if no URL has been entered, their email address. It takes the following attributes:

  • spam_protect="1" — If specified, this will use the Movable Type technique for 'masking' an e-mail address so that it is less likely to be harvested for spamming.

MTAuthorID

An author's author_id

MTAuthorName

An author's username

MTAuthorDisplayName

An author's display name as defined in their profile.

MTAuthorURL

An author's website URL as defined in their profile

MTAuthorEmail

An author's email address. It takes the following attributes:

  • spam_protect="1" — If specified, this will use the Movable Type technique for 'masking' an e-mail address so that it is less likely to be harvested for spamming.

MTAuthorBlogCount

Returns the number of blogs an author has access to

MTAuthorEntryCount

Returns the number of entries an author has created

MTAuthorData

This container tag retrieves the all the custom author fields for an author. It takes the following attributes:

  • field="X" where X is the name of a custom author field — This will restrict MTAuthorData so that it only returns details about field X.

MTAuthorDataFieldName

The name of the custom author field

MTAuthorDataFieldDescription

The description of the custom author field

MTAuthorDataFieldValue

Displays the value entered by the author for the custom author field

MTAuthorDataIfFieldValue

A conditional tag which evaluates as true if the author has entered a value for the custom author field

MTEntryData

This container tag retrieves the all the custom entry fields for an entry. It takes the following attributes:

  • field="X" where X is the name of a custom entry field — This will restrict MTEntryData so that it only returns details about field X.

MTEntryDataFieldName

The name of the custom entry field

MTEntryDataFieldDescription

The description of the custom entry field

MTEntryDataFieldValue

Displays the value of the custom entry field

MTEntryDataIfFieldValue

A conditional tag which evaluates as true if a value has been entered for the custom entry field

MTCategoryData

This container tag retrieves the all the custom category fields for an category. It takes the following attributes:

  • field="X" where X is the name of a custom category field — This will restrict MTCategoryData so that it only returns details about field X.

MTCategoryDataFieldName

The name of the custom category field

MTCategoryDataFieldDescription

The description of the custom category field

MTCategoryDataFieldValue

Displays the value entered for the custom category field

MTCategoryDataIfFieldValue

A conditional tag which evaluates as true if a value for the custom category field

Leave a comment

Preview

About

This is part of the official user manual for CustomFields, a plugin for Movable Type by Arvind Satyanarayan.

More Information »

Screenshots

Click a screenshot to browse through the gallery or the arrows to flip through them

←→

Powered by Movable Type 4.0