User:AFigureOfBlue/assessortags.js/doc

ratemath
Author(s)User:Drilnoth
StatusUnstable
Updated2009-06-01
SourceUser:Drilnoth/assessortags.js

AssessorTags is a user script that allows for easy tagging of pages with WikiProject banners. Please note that this script is still new, so there may still be bugs and not all of its final functionality has been implemented. Additionally, as the script is being worked on, errors may be introduced which cause it (and possibly other user scripts which you are using) to stop functioning for a short time, although this should usually be fixed within a few minutes.

Compatibility: At this time, AssessorTags does not work in Internet Explorer and Opera. It is only continually tested by its maintainer in Firefox 3, but most browsers should be able to run the script without any issues. Please notify me on my talk page if you encounter any problems.

Use edit

 
The "wikiprojects" tab.
 
Selecting a banner

When AssessorTags is installed (see #Installation), you should see a new "wikiprojects" tab at the top of every talk page (regardless of namespace). Clicking on this tab will open an additional box, containing a list of options (see example. Each option on the list corresponds with a single WikiProject; projects with task forces or work groups also let you choose any of these "sub-projects" when you select the main project from the list. Options for "cleanup" parameters are also included, such as "needs-infobox" on appropriate templates. Choose which projects the page should be a part of from the list by clicking the checkboxes next to them and click "submit" when you're done. The page should be edited and will reload in a few seconds (see example), with the new banners added. The edit summary for the edit is automatically minor and includes a link to this page (see example, unless you specify otherwise (see #Configuration)

Adding two or more banners simultaneously will cause them to be collapsed into {{WikiProjectBannerShell}} to save talk page space. If you would prefer that the banners not be collapsed, you can do so by unchecking the box at the top of the list. You can also set the box to be unchecked by default (see #Configuration).

AssessorTags has a simple text-detection system built into it, which will read the page for preexisting banners and not add those which it has found are already on the page.

Projects included edit

This script is still pretty new, so not many WikiProjects are supported by it at this time. If you would like to request that a project be added, see #Project requests.

WikiProject Banner Task forces? Cleanup paramters?
Albums {{Album}} N/A All
Biography {{WPBiography}} All All
Books {{WPBooks}} N/A All
Computing {{WikiProject Computing}} All All
Disambiguation {{DisambigProject}} N/A N/A
Dungeons & Dragons {{D&D}} All All
Films {{Film}} All All
LGBT Studies {{LGBTProject}} N/A N/A
Military History {{WPMILHIST}} All All
Mississippi {{WikiProject Mississippi}} N/A All
Russia {{WikiProject Russia}} N/A All
The Simpsons {{WikiProject The Simpsons}} N/A N/A
Songs {{Songs}} N/A All
Soviet Union {{WikiProject Soviet Union}} N/A All
Vital Articles {{Vital}} N/A All

Installation edit

To install AssessorTags for your own use, simply add the following to your vector.js or monobook.js page (if you're using a non-standard skin, you probably know what to do).

importScript('User:Drilnoth/assessortags.js'); //See [[User:Drilnoth/assessortags.js/doc]] for details

After adding this, just purge your cache and the script should begin working.

If wanted, you can also add User:Drilnoth/assessortags.js/News to your watchlist, so that you are aware whenever significant changes are made to the script.

Configuration edit

You can configure AssessorTags from its base settings by adding the following text to your monobook.js page.

if( typeof( assessortagsConfig ) == 'undefined' ) assessortagsConfig = {}; //DO NOT REMOVE THIS LINE-required for configuration

This line tells AssessorTags that you are configuring its default settings; if you add configuration settings without this line, they will not work.

Default configuration edit

Copy and paste the following code into your monobook.js page if you want to configure AssessorTags; otherwise, these aren't needed. You can remove any settings that you do not want to change from the default, but do not remove the line discussed above, which is required for settings to work. When changing settings, make sure not to remove the semicolon from the end of each line.

assessortagsConfig.summaryAd = " using [[User:Drilnoth/assessortags.js/doc|AssessorTags]]";
assessortagsConfig.groupByDefault = true;
assessortagsConfig.groupingBanner = "WikiProjectBannerShell";
assessortagsConfig.markTaggedPagesAsMinor = true;

.summaryAd edit

This is the text added to the edit summary when you use AssessorTags. The text "Adding WikiProject banners to page" cannot be changed or removed. You can alter the final string by changing the text within the quotes to anything you want; just make sure that it doesn't exceed 200 characters in length when combined with the first part of the summary. Make sure that both quotation marks are left in place when changing this option, and the space at the beginning is nesseccary to avoid having words run together (unless you put a period/full stop as the first part of the customized string).

.groupByDefault edit

By default, the Group into {{WikiProjectBannerShell}} checkbox is checked, so that you don't have to press it to group banners together when adding two or more. If you'd prefer to have the box unchecked by default, this configuration can be set to "false".

.groupingBanner edit

Selects the template that WikiProject banners are grouped into if two or more are added at one. Default is "WikiProjectBannerShell". Alternatively, you can enter "WikiProjectBanners" (making sure to include the quote marks). This is mainly just a matter of personal preference.

.markTaggedPagesAsMinor edit

By default, adding WikiProject banners is a minor edit. If you'd rather that your additions made using this script be marked as non-minor edits, set this to "false".

Custom banners edit

You can also customize AssessorTags by selecting additional banners to add to the list. These custom banners appear at the top of the list of banners, before all of the other ones, with an additional Submit button between them and the standard banners. This allows you to choose the banners that you use most and make them easily accessible at the top of the menu. To do this, simply add

assessortagsConfig.customBannerList	=	[
		{
			label: 'TEXT TO DISPLAY',
			value: 'NAME OF TEMPLATE WITHOUT {{}} BRACKETS'
		}
	];

underneath the required "configuration" line of code, discussed above.

You can add as many custom tags as you want. If you add more than one, be sure to add a comma after the last curved bracket (}) of each custom banner except for the last one. For example:

assessortagsConfig.customBannerList	=	[
		{
			label: 'TEXT TO DISPLAY',
			value: 'NAME OF TEMPLATE WITHOUT {{}} BRACKETS'
		},
		{
			label: 'TEXT TO DISPLAY',
			value: 'NAME OF TEMPLATE WITHOUT {{}} BRACKETS'
		}
	];
Subgroups

Creating subgroups in the custom section is a little more difficult. To do so, it is probably best to look at the code at User:Drilnoth/assessortags.js and copy-paste an appropriate subgroup into the right position. Remember to make sure that all of the formatting, from the beginning of an option to its end after all subgroups, is the same as what's in the script; missed commas can make the whole thing stop working. Additionally, each subgroup requires about five lines of code elsewhere in the script which can't currently be customized, so the only subgroups that you can add are those already in the main script (you'd just want to copy them so that they're at the top of the menu with the appropriate custom banner). Once again, however, if there's a request below I'll probably code the banner into the script's default settings, and once I do that you'll be able to copy the subgroup. Did that all make sense? :)

Parameters

You can also add empty parameters to the custom template if you'd like. Although at this time you can't customize it to allow you to fill them in automatically, you can alter the custom section so that code like |class=|importance= appears on the page, for future use when someone assesses the article. The coding for this is simple: After the name of the template in the "value" section, add the additional parameters, including the pipe symbols and equals signs. Then put a \ before each pipe; this tells the script that you want the | to be shown on the page, rather than to be interpreted as an "Or" as it usually does in JavaScript. The slash will not be added to the page.

For example:

assessortagsConfig.customBannerList	=	[
		{
			label: 'Tulips',
			value: 'WPTulips\|class=\|importance='
		}
	];

Will add {{WPTulips|class=|importance=}} to the page, to make it easier to fill out the template in the future.

Bugs and to-do list edit

If you have found a bug: Please leave a descriptive entry here and a note on my talk page about the issue. Thanks!

  • Add more projects! –Drilnoth (TC) 19:33, 19 March 2009 (UTC)
  • Is it possible that even if the banner already exists on the talk page to be able to add parameters to it? For example if {{Film}} is already present and I wanted to add a task force, the script only recognizes that the banner already exists and doesn't modify it at all. --Nehrams2020 (talk) 18:09, 20 March 2009 (UTC)
    • This is a known issue and I plan to fix it at some point, but it may take some time and a lot of testing. Once I do have something like that in the script, it might just replace the entire banner which is already there with the new banner (at which point there would also have options for things like Class, importance, etc. in the script). I have a few other bugs to figure out first, and then it will probably take a fair bit of time just to figure out how to do this, but I definitely have it on my plan. –Drilnoth (TC) 18:11, 20 March 2009 (UTC)
      • Sounds good. I totally understand, I don't have the slightest idea on how to do this type of stuff, and I commend you for working on this valuable script. Happy editing! --Nehrams2020 (talk) 18:22, 20 March 2009 (UTC)
        • Thanks! As I said, it may be awhile... perhaps even a few months... until I can get that particular problem figured out. I think that I might need to do a near-complete rewrite of the script's method for actually editing and reading pages to add that functionality in (although other features should be easily addable at the same time), so consider this a "trial" version which is good for tagging new articles or pages which just don't have banners for one reason or another. –Drilnoth (TC) 18:25, 20 March 2009 (UTC)

Project requests edit

If you would like to request that a new banner be added to the page, please edit this section and add your request here. Hopefully, all banners will eventually be included in the script, but there aren't many right now. If you request an addition here, I'll do that as soon as possible. Until I add the the code, you can configure AssessorTags to add the banner yourself (see #Configuration). Once the banner is added, I will remove the request from this section, add it to the #Projects included table, and notify you on your talk page.