Help:Gadget-UserMessages/zh

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
This page is a translated version of a page Help:Gadget-UserMessages and the translation is 2% complete. Changes to the translation template, respectively the source language can be submitted through Help:Gadget-UserMessages and have to be approved by a translation administrator.

User Messages is a gadget which provides links to easily leave standardised messages for users via common message templates. It provides a number of links in the Toolbox when visiting a user's talk page. The gadget is activated by visiting Preferences and ticking the "User Messages" box. The script itself can be found at MediaWiki:Gadget-UserMessages.js.

AxUserMsg adds a "Notify this user" toolbox-link. Clicking this link will allow you to simply add templates from a selection dialog to the user's talk page.


What has been improved?

  • More convenient editing. Who knows the old method which was using browsers navigation to "fake" an edit, will be convinced.
  • No double-adding of messages when you click on the back-button like the old script did.
  • Adding template is slightly faster. Using Load-On-Demand to speed-up your page-loading.
  • No cluttering of your toolbox. Only one link with full functionality.
  • Namespace auto-detection. You can fill in files and users with or without namespace - as you prefer.
  • No modal dialog boxes preventing tab-switching during execution.
  • Improved summaries, which often are addressed to the user you are talking to, now.
  • Don't talk to users who do not exist. Your input will be checked.
  • Closing a security-vulnerability, the old script had. Example (works only for those who have installed) of a prepared link.
  • Instant preview container. Did you select the tag you wanted to? Did you format your text correct? - You'll see it.


Documentation

First select the tag to insert:
Then, insert the required fields:

Developing and finding and fixing Bugs

Dependencies:

Custom settings

To either your common.js or skin.js

list of values
0. Please link images
  1. Copyvionote
  2. Derivativenote
  3. No fair use
  4. Please name images
  5. Please tag images
  6. Please describe images
  7. Project scope
  8. No comments
  9. Welcome
  10. End of copyvios
  11. Off topic
  12. No re-uploading
  13. Test
  14. Test2
  15. Test3
  16. Test4
  17. Inappropriate imagenotes
  18. Dont remove delete
  19. Dont remove nsd or nld
  20. Dont remove speedy
  21. Dont remove warnings
  22. Be civil
  23. Be civil final
  24. Blocked user
  25. Inappropriate username
  26. Copyviouploadindefblock
  27. Indefblockeduser
  28. Imposter
  29. Sockpuppet
  30. Please register
  31. Provide better quality
  32. Please use SVG
  33. No scaled down dupes
  34. Unfree
  35. Attackimage
  36. Attackpage
  37. Dont overwrite
  38. Dont recreate
  39. Speedywhat
  40. No advertising
  41. Sign
  42. empty option
  43. Blocked
  44. Sockpuppeteer
  45. Anonblock
  46. Blocked proxy
  47. IPsock
  48. Geocoding
  49. Sourcefield
  50. Dateformat
  51. Do not upload thumbnails
  52. Flickrvionote
  53. Speedynote

To specify a pre-selected/ default tag, add e.g.

window.AxUserMsgPreSelect = 5; // For registered users, selects "Please tag images"
window.AxUserMsgPreSelectIP = 13; // For IPs, selects "No sandboxing"
to your common.js.

List of possible values: see right side.

If you prefer to clutter your toolbox like the old script did, add

window.installOldLinks = true;

To restore the behavior of immediately firing a message after clicking a link (and install the old links), add

window.AxUserMsgFireAsYouClick = true;

You can customize the default-user-additional-talk-note:

window.AxUserMsgCustomText = 'Sincerely -+-';

To disable the instant-preview, add

window.AxUserMsgNoParse = true;

In order to disable the filter-box and get a light-weight select control, add

window.AxUserMsgUseSelect = true;

If you just want to set the maximum-list-items provided by the filter-box, add

window.AxUserMsgMaxSelect = 10;

To add custom tags, use the following sytax:

$(document).bind('scriptLoaded', function(evt, st, o) {
	if (st) {
		if ('AxUserMsg' === st && o) {
			o.umTemplate.push(['Template', "Display", "Summary and display", number-Type, "talk-Summary"]);
			// Example
			o.umTemplate.push(['Nopenis', "No penises", "Commons doesn't need excessive amount of images depicting genitalia", 128]);
		}
	}
});
  • Template: The template that will be substituted
  • Display: The link to display in the tool-box (if enabled) and in the select
  • Summary and display: This text is used as a summary if the optional summary param (below is not used)
  • number-Type: Combinations like this possible: (1|2|16)
    • 1: Media query
    • 2: Username required
    • 4: Media must filled in
    • 8: 添加命名空间
    • 16: universal parameter 1
    • 32: universal parameter 2
    • 64: Message for IP only
    • 128: Message for logged in users only
  • talk-Summary: This parameter is optional.



To either your common.css or skin.css

To hide the edit-summary, add

#umSummaryWrapper { display:none; };