User:Nx/Extensions/wigo3/doc

From RationalWiki
Jump to navigation Jump to search
Images
The images are determined by the following interface strings: MediaWiki:wigouparrow, MediaWiki:wigoresetvote, MediaWiki:wigodownarrow. By default these are png files, so while you can upload a different png file in the same place, you can't upload an image in a different format, e.g. svg or gif. Editing the interface strings allows you to use any format.
Here's the current set: File:⧼wigouparrow⧽ File:⧼wigoresetvote⧽ File:⧼wigodownarrow⧽
The anchor tag that contains the images has the class wigobutton.
Alt text
The alt text for the vote buttons is located at MediaWiki:wigoaltup, MediaWiki:wigoaltreset, MediaWiki:wigoaltdown.
Tooltips
Tooltips for the buttons are at MediaWiki:wigotitleup, MediaWiki:wigotitlereset, MediaWiki:wigotitledown.
The vote result tooltip displays the total number of votes. This number is inserted into the text at MediaWiki:wigovotestotal as $1, and magic words are parsed. The default uses the plural magic word.
Error
When no poll id has been specified, MediaWiki:wigoerror will be displayed in red in front of the wigo text.

Multichoice voting[edit]

Multichoice uses two strings: MediaWiki:multi-votebutton is the text of the vote link and MediaWiki:multi-votetitle is the tooltip.

CSS Customization[edit]

The span containing the text of the option has the class multioption. The span containing the result has the class multiresult. The spans containing the text and result of the option the user has voted for have the class myvote. The columns consist of two divs, one is the background, the other is the filled out foreground, inside the background div. The background has the class votecolumnback, the foreground votecolumnfront. Because the extension inserts css directly into the style attribute of these divs and the span containing the text and result, !important must be used to override the values of the following css attributes:

  • myvote: font-weight
  • votecolumnback: border, background, width, height
  • votecolumnfront: background, height (width depends on the number of votes and should not be altered)