Config Assistant for Movable Type

Configuration Assistant for Movable Type is the perfect tool for Movable Type designers. With virtually no technical knowledge or background, one can easily design an entire settings page for your theme or plugin complete with field sets, labels, default values, pull down menus, radio buttons, check boxes, text areas, and text input fields for all the options you wish to expose. You can do this all through a simple config file. No coding required.

Theme Options Pull-down Menu

The settings a user then saves using this auto-generated form will automatically be made available to you, the designer, through a set of template tags that you choose yourself so that you can easily access the values they hold from directly within your templates.

If Config Assistant is being used within the context of a theme, then users of your theme will automatically have a "Theme Options" menu item added to their design menu so they can easily access the settings you define.

Download

Prerequisites

  • Movable Type 4.1 or higher

Installation

This plugin is installed just like any other Movable Type Plugin.

One important note is that this plugin should be installed into Movable Type's addons directory. Installing this plugin into any other directory will potentially cripple your installation. So please be careful.

Also be aware that if you are upgrading from a previous version, you should remove any copy of Config Assistant from your plugins directory if one is installed there.

Documentation

Example Implementation

Here is an excerpt from a Movable Type plugin config.yaml file that will define three settings for your plugin:

id: MyPluginID
name: My Plugin
template_sets:
    my_awesome_theme:
        options:
            fieldsets:
                homepage:
                    label: 'Homepage Options'
                feed:
                    label: 'Feed Options'
            feedburner_id:
                type: text
                label: "Feedburner ID"
                hint: "This is the name of your Feedburner feed."
                tag: 'MyPluginFeedburnerID'
                fieldset: feed
            use_feedburner:
                type: checkbox
                label: "Use Feedburner?"
                tag: 'IfFeedburner?'
                fieldset: feed
            posts_for_frontfoor:
                type: text
                label: "Entries on Frontdoor"
                hint: 'The number of entries to show on the front door.'
                tag: 'FrontdoorEntryCount'
                fieldset: homepage

This is the settings page it creates:

Theme Options Screen

And here is the template code that utilizes the tags it auto-creates for you (you would place these in the templates that render your web site:

<mt:IfFeedburner>
  My feedburner id is <mt:FeedburnerID>.
<mt:Else>
  Feedburner is disabled!
</mt:IfFeedburner>

35 Comments

I love it! Made my life a lot easier ;)

Byrne, This looks very promising. Thank you for filling the gaps in Movable Type functionality.

I downloaded and installed version 1.0 today, but I noticed that in line 33 of theme_options.tmpl the form action goes to /~breese/mt/mt.cgi instead of

Michael - thank you. I just released version 1.01 fixing that issue. Blasted copy and paste! :)

Hi Byrne, I think there's something wrong with the layout of the ZIP file. Here's what I get once decompressed:

CONFIGASSIST-README.mdwn ConfigAssistant-1.01/Plugins/ConfigAssisant/config.yaml META.yml plugins/ConfigAssistant/config.yaml plugins/ConfigAssistant/lib/ (with contents) plugins/ConfigAssistant/tmpl/ (with contents)

The first three elements are useless for the end user, they're harmless but confusing.

META.yml is not necessary for sure. The rest are essential:

  • CONFIGASSIST-README.mdwn - this is documentation
  • config.yaml - you know what that is!

I am a little confused. I tried installing it to mt-static/plugins. But nothing happens. Any suggestion as to what I'm doing wrong?

Any help would be very appreciated!

@Elena - Have you read The Ultimate Guide to Installing Movable Type Plugins carefully? It should explain exactly how to perform the installation. There is even a video demo!

I have read the guide to installing MT plugins. I followed the directions very carefully. And still, no luck.

Here is a screenshot of the installation. From this, can you tell if I am doing anything wrong?

You need to install the plugins/ConfigAssistant directory not into the MTHOME/mt-static/plugins directory, but into the MTHOME/plugins directory.

Seems to not work on MTOS-4.3. I copied over ConfigAssistant/ to $MT_HOME/plugins, and nothing happens. ConfigAssistant is not listed in either blog nor system plugin lists.

Is it supposed to work with MT 4.3?

It is my strong belief that Config Assistant is installed incorrectly in your MT instance. Config Assistant absolutely works with MT 4.3. Please read the The Ultimate Guide to Installing Movable Type Plugins carefully and watch the video. If followed properly, Config Assistant should work flawlessly.

I'm trying to get it to work with MT4.3 and the latest PhotoGallery module. In the download I got today, the first few lines of app.css have the fieldset-options, #fieldset h3, and a couple of other IDs and classes set to display:none; when I go to the Display Options screen there are no options visible. After I change the stylesheet I can see them, but they don't DO anything: after republishing the display is still the same as before.

More: Using the Net panel in Firebug, I can see the POST parameters that are being passed to mt.cgi:

_mode casaveconfig blogid 342 magictoken [the magic token] mid-century-photo-galleryphotolayout Blog mid-century-photo-galleryusefeaturedphoto 1 pluginsig PhotoGallery returnargs _mode=themeoptions&blog_id=342&saved=1

But it doesn't save the changes. On the reload, the settings are back to the defaults, galleryphotolayout is Grid, galleryusefeatured_photo is 0.

Seems to be a conflict between PhotoGallery 2.4.3 and Config Assistant 1.4. I rolled back to CA v. 1.3.3 and it worked.

I installed this plugin and I see it in my list of system plugins, but I don't know how to use the plugins. I just see a list of them, where do I find config asst on my MT?

I noticed your site is showing wrong in the menu section, the page is all out of alignment a lot I suppose it happens sometimes when you cannot test it in all operating systems. Anyway i thought i would let you know

Byrne,

I am trying to write some fieldsets of my own, and I have even just tried your FeedBurner example above.

I have added these options to the Community Blog theme set, since that is what I am using.

When I click Theme Options, I am greeted with this:

Can't locate object method "getconfighash" via package "MT::Component"

Any help there? Running MT Pro 4.261.

Thanks!

Ken

Yes. Well, theme options can only work on plugins. It is unable to work with addons. You need to abstract the pro blog theme into a plugin, and then attach your options.

Well, that is disappointing. Can I write a plugin that works along side the Community Blog template set that JUST has the Config Assistant variables I need? This would be ideal for my project, actually.

You can actually. You will need to be using Config Assistant 1.6.1 (which will require you update any other plugins that use config assistant like custom css or image cropper). Just create a plugin with a single config.yaml. Then declare a bunch of plugin options. Or extricate the Professional Template Set from addons/Commercial.pack/config.yaml. That is what I would do personally...

I am testing on PhotoGallery right now and this works pretty easily. Is there any docs on the other field types such as image radios or entry selectors - I could really utilize entry selectors? I will give the plugin-only rout a try, it seems the path to least resistance. Thx.

Hi Byrne,

Any chance of having "value":"Label" on select elements? (ala the image radios)?

Would mean I can ditch my hacked together blog_config.tmpl completely whilst maintaining the same "pretty" options on the blog config screens.

Thanks.

Are you talking about pull down menus? Or image radio buttons?

sorry, i meant pulldowns (i.e. html select) could be generated in a simiilar way to image radios sytnax.

e.g. values: "value1":"Pretty name 1", "value2":"Pretty name 2"

I want the option value to something useful to my code, but that then means the user sees something not as friendly.

Thanks for the report. Fixed in 1.7.1 now on github.

Thanks Bryne!

P.S. CA works fine in MT5 (although like a lot of MT4 plugins it breaks the JS on the MT5 plugins screen)

Hi Byrne, I downloaded latest version (1.6.1) and the unzipped file contain these folders:

addons => ConfigAsssistant.plugin mt-static => plugins=>ConfigAssistant

Should it be ...

plugin=>ConfigAsssistant mt-static=>plugins=>ConfigAssistant

... instead like previous versions or is this an install change? Merv

Comment style issue above, should be ...

addons => ConfigAsssistant.plugin

mt-static => plugins=>ConfigAssistant

and

plugin => ConfigAsssistant

mt-static => plugins=> ConfigAssistant

This is an install change. Please remove plugins/ConfigAssistant from your Movable Type install.

Thanks Byrne, Hybrid Theme Options now work (saving plugin data with blog ID). I have the Hybrid Theme now working completely on MT 4.32.

I appreciate all the work you do for the MT community!! Merv

Hi Byrne, is there a way to change the Theme Options label in the menu? And might be putting it under Preferences? Thanks.

Not really, but I would like to know and understand what you are trying to do and what your reasoning is. Perhaps there is another way we can address this issue?

Well, I'm new with perl and of course MT, I need to have additional blog settings other than those specified in Prefs:General settings

I can't doc settings into the other screens, but you can register plugin options at a blog or system level. They will appear on the Tools > Plugins screen associated with the plugin you are creating...

Hi Byrne, I just tried to install this Config Assistant into another MT4.3 instance, and I get this error when trying to access the Theme Option page: Can't locate object method "getconfighash" via package "MT::Component"

Leave a comment

what will you say?


Recent Comments

  • Thanks Bryne! P.S. CA works fine in MT5 (although like a lot of MT4 plugins it breaks the JS on the MT5 plugins screen) ...

  • Thanks for the report. Fixed in 1.7.1 now on github. ...

  • sorry, i meant pulldowns (i.e. html select) could be generated in a simiilar way to image radios sytnax. e.g. values: "value1":"Pretty name 1", "value2":"Pretty name 2" I want the option value to something useful to my...

  • Hi Byrne, I just tried to install this Config Assistant into another MT4.3 instance, and I get this error when trying to access the Theme Option page: Can't locate object method "getconfighash" via package "MT::Component...

  • I can't doc settings into the other screens, but you can register plugin options at a blog or system level. They will appear on the Tools > Plugins screen associated with the plugin you are creating... ...

Close