Creating Your Own Configuration

From MemberPlugin

(Redirected from More Advanced Configuration)
Jump to: navigation, search

This article explains how you can do more complicated things with the configuration of the plugin - for example, configure a map, or change the text that appears on the screen.

If you're just starting with the plugin, then have a look at the Quick Start.

This is a bit complicated for a couple of reasons:

  • We don't want to force you to store configuration on a central database.
  • We want to be able to share configuration with things like the Message Maker, so we need to store a pointer to the configuration.
  • The only place we know members can definitely access is the home page for the group - but sometimes people are very short of space there because of Yahoo's length limit, so we need another method too.

So you need to know:

  • How the plugin finds the pointer to its configuration.
  • How you configure that pointer
  • What that pointer can point to.

Contents

How the plugin finds configuration

The plugin looks for configuration (its orders) as follows:

  • When the member loads the post page for your group, the plugin first makes a request under the covers and reads the home page of your group. So for example if the member loads the page http://groups.yahoo.com/group/EdinburghFreegle/post, the plugin will look at http://groups.yahoo.com/group/Edinburgh'Freegle.
  • It looks on that page for some special text - we'll see the format of that text in a minute - but if it's present, that text contains another URL. If that special text is found, then the plugin does another request under the covers to that URL to read the configuration.
  • If there was no special text in your home-page description area then the plugin looks in the Files section of your group for a text file with the special name memplugin. If that file exists, it must contain an URL, and then the plugin does a request to that particular URL and reads the configuration it finds there.

So essentially what you're doing here is 'pointing' the plugin at a specific URL for its configuration. You can do that pointing using either the description on your group's home page, or a file in the Files section.

How you configure the configuration URL

Remember there are two ways:

  • in the group description
  • in the Files section.

Where possible, put it in the description - it's one less step to get confused by.

Putting the URL in the group description

You need to put special text into your group's description, by editing this in Yahoo via Management->Description & Appearance->Description.

What you put here has two parts:

  • A tag, to let the plugin find it. This is memplugin.
  • An URL pointing at the preferences. This is a standard http:// address, which points at the configuration.
 <A href="http://www.memberplugin.org/MemPrefs.js" name="memplugin"></A>

This is a link with no actual text associated with it, so it won't show up in your group description and members won't be able to see it or click on it. It's only purpose is to tell the plugin where to go.

Putting the URL in the Files section

The other option is to create a file in the Files section. It has to be called memplugin. Not memplugin.txt, or memberplugin - exactly memplugin.

Image:PointerFile.jpg

Inside that memplugin file you put the URL of where the configuration lives:

  http://www.memberplugin.org/MemPrefs.js

Notes:

  • Don't put the config itself - just a URL pointing to the config file.
  • This config file could be one of the generic ones hosted at memberplugin.org or it could be a config file you are hosting in the Files section of your group.

What the URL can point to

You must not use a 'shortening' service such as tinyurl.com. This will work on Firefox but not Internet Explorer.

You can point the plugin at:

  • one of the standard files.
  • the Message Maker-compatible preferences that My Freecycle generates
  • an existing Message Maker custom preferences file which (if you use the Message Maker) you set up when you started to use the it, and which Em kindly hosts
  • a file stored on a Yahoo group
  • a preferences file that you write yourself and host somewhere.

The plugin uses the same format of configuration as the Message Maker, which is also supported by My Freecycle. So you can configure the plugin to behave fairly closely to how the Message Maker or My Freecycle does.

Pointing at a standard file

These are http://www.memberplugin.org/MemPrefs.js and http://www.memberplugin.org/MemPrefsFOP.js. Usually if you're reading this page you'll want to point at a non-standard file, but you might do this for test.

Don't forget the www. part.

Pointing at Message Maker

In the UK, Em kindly hosts the message maker files. For each group using it, there's a 'custom' js file containing the preferences. This is what you point to - you don't point to the URL that members would go to in order to use the message maker.

The URL is like this, but with your group name substituted for FreecycleEdinburgh:

 http://uk.freecycle.org/mm/custom/FreecycleEdinburgh.js

Pointing at My Freecycle

My Freecycle also supports this configuration format. If you manage your group and go to Message Maker Prefs, at the bottom of a page is a link which will look a bit like this:

 http://www.freecycle.org/group/United Kingdom/Scotland/Edinburgh/mmprefs

...though obviously adjust this for the name of your group. In that case, what you'd put in the group description would be:

<A href="http://www.freecycle.org/group/United Kingdom/Scotland/Edinburgh/mmprefs" 
  name="memplugin"></A>

Pointing at a file on a Yahoo group

This file can itself live on your Yahoo group. If you do this:

An example of what this should look like is:

  http://tech.groups.yahoo.com/group/ehtest/files/MemPrefs.js

Pointing at a file you write

If you've not come across this format before, and you use neither Message Maker nor My Freecycle, you can still set up a file of the same format and put it wherever you like. An Editor to help you do this is described in the next section.

Changing the Configuration to suit your group

So now that you have an idea about the hosting of the prefs file, and how to get a members plugin to access it, you can set about changing those configurations to suit your groups needs.

  • For instance you might prefer the term "OFFERED" to appear in subject lines instead of "OFFER". Or you might like to change the FOP text slightly.
  • Or alter the drop-down warnings displayd for missing items, locations, long subject lines.
  • Or indeed set a shorter subject line length.

This can all be done by making changes to the prefs file, using a basic web page which acts as an editor. How to Edit the Configuration File takes you through this.

Keep in mind that it could take up to 24 hours for your members' plugins to start recognising changes you make to your configuration file - but if you move your mouse over (but don't click) the Disable button it'll force it pick up any changes.

Personal tools