Talk:How to Edit the Configuration File

From MemberPlugin

Jump to: navigation, search

This discussion page is really a description of how to edit the editor of the member plugin.

The editor is controlled by the use of the options.xml file. This file contains an entry for every option the plugin supports (as well as MessageMaker options), and within those entries describes how various options interact with each other.

The basic layout of the file is as follows...

<Configuration>
  <Options>
    <Option>
      . . .
    </Option>
    <Option>
      . . .
    </Option>
    . . .
    <Option>
    . . .
    </Option>
  </Options>
  <Exports>
    <JavaScript>
        <Line>Static JavaScript Text the starts the JS export of the configuration</Line>
        <Line>...</Line>
        . . .
        <Line>...</Line>
    </JavaScript>
  </Exports>
</Configuration>

There is currently only one export type supported by the editor system at the moment, which is the JavaScript one being used in the Beta version of the editor for people to download their configuration.

The individual options are made up of the following tags...

  • Setting (Required)
    • This is the actual name of the setting in the JavaScript file.
  • SafeSetting (Optional)
    • This tag is use to create a 'safe' version of the setting value. The Editing routines can't handle it if there are square brackets ([ and ]) in in the name. Using SafeSetting allows you to put in a safe version of the same setting name (eg. FOP_LINE[0] becomes FOP_LINE_0).
  • Name (Required)
    • The displayed name/short description for this option. Gets displayed in the editor.
  • Hover (Optional)
    • The 'hover text' to display when the user hovers over the option.
  • Type (Required)
    • The type of the setting. Currently this can be any of the following...
      • Checkbox
      • String
      • Numeric
      • MultipleString
      • MultipleNumeric
      • Textbox
      • Divider
  • Default/Defaults (Optional)
  • Width (Optional)
  • Height (Optional)
  • Maximum (Optional)
  • UsedBy (Optional)
    • Which posting tools use this option. MM = MessageMaker, MF = My.Freecycle, MP = MemberPlugin
  • Enables (Optional)
    • Used on Checkbox options only. This tag can be used to list a set of fields that are enabled when this options checkbox is ticked by the user. The format is <Enables><Field>Fieldname</Field><Field>Fieldname</Field>...</Enables>. Any option types excluding Divider can be enabled.
  • Disables (Optional)
    • Used on Checkbox options only. This tag can be used to list a set of fields that are disabled when this options checkbox is ticked by the user. The format is <Disables><Field>Fieldname</Field><Field>Fieldname</Field>...</Disables>. Any option types excluding Divider can be disabled.
  • Selects (Optional)
    • Used on Checkbox options only. This tag can be used to list a set of other checkboxes that are also ticked when this options checkbox is ticked by the user. The format is <Selects><Field>Fieldname</Field><Field>Fieldname</Field>...</Selects>. Only other checkbox fields can be selected.
  • Deselects (Optional)
    • Used on Checkbox options only. This tag can be used to list a set of other checkboxes that are to be unticked when this options checkbox is ticked by the user. The format is <Deselects><Field>Fieldname</Field><Field>Fieldname</Field>...</Deselects>. Only other checkbox fields can be deselected.
  • Level (Optional)
    • The complexity level that this option gets displayed at. The value of this can be 1 (Basic), 3 (Normal), or 5 (Expert). If this tag is left out completely, then 1/Basic is assumed for this option.