Jump to content

User:Odie5533/SnipManager

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Odie5533 (talk | contribs) at 19:55, 8 November 2012 (Translations: +help with translations). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
SnipManager
Developer(s)User:Odie5533
Stable release
June 4, 2009; 16 years ago (2009-06-04)
Written inJavaScript
PlatformCross-platform

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 wikEd (and TW/HW).

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

Installation

Open your skin's js page and add the following to it:

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

If you use Greasemonkey, just click here.

Translations

Willy Weazley has translated SnipManager into Portuguese for use on the Portuguese Wikipedia! You can install the translation by visiting his page at pt:Usuário:Willy_Weazley/SnipManager.user.js.

If you would like to help translate SnipManager to work on a different Wikipedia just send me a PM and I would be glad to assist.

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.

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