User:Odie5533/SnipManager

From Wikipedia, the free encyclopedia

Jump to: navigation, search
SnipManager
SnipManager.png
Developer(s) User:Odie5533
Stable release 2009-06-04; 4 months ago
Written in JavaScript
Platform Cross-platform
Development status Active

SnipManager is a script which adds a toolbar to the top of the edit box for holding complex signatures, templates, or other pieces of text. It is compatible with wikiEd (and TW/HW).

Contents

[edit] Features

  • Customizable menu (smMenus)
  • Customizable forms (smCustomForms)
    • Customizable form display (smColumns & smTextWidth)
    • Form tooltips support
    • Default value support (using either 'default':'default value here' or 'defeval' which supports javascript functions like getting the date)
    • Multiple forms open at once
  • Prepend and append support (for adding <ref> tags)
  • Ribbon UI
  • Preview templates before adding them to articles

[edit] Installation

Open your monobook.js page and add the following to it:

importScript('User:Odie5533/SnipManager.user.js');

If you use Greasemonkey, just click here.

[edit] Configuration

Note: SnipManager no longer supports customization but will again in the near future.

SnipManager supports customization by editing your monobook.js page. Read through the first part of the script to see a list of all the variables you can configure. Here's a quick example. Add the following to your monobook.js:

smConfig = {};
smConfig.smColumns = 3;
smConfig.smSingleForm = false;

This will change the default two-column form display to three columns and allow you to have more than one form open at once.

For more customization, an example of a custom configuration can be found at my Halopedia js page, here.

[edit] Future ideas

  • Display example of templates
    • Tool-tip like display when hovering over the template button
    • Display example at the top of a form
    • Example could be shown either using plain HTML, or a live example using an AJAX preview request
      • On hover, set tooltip timeout, delay 0.5 seconds before displaying. Leaving the button disables the timeout
  • Infobox ribbon tab
    • A panel is displayed that displays the usage for the template and has a button to insert the template (not an entry form like for citations, just for usage and insertion)
    • Could just use the above tool-tip onHover method for infoboxes
  • Add button to bottom right of panels to link to a list of similar templates
    • Later change link to dialog similar to Friendly/Twinkle
  • Auto-generate reference names with author's last name and year
    • Have a button to generate it
    • Or have a button to Add with generated ref name
    • Or automatically generate it as the user fills in the year and last name