Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Enabling  





2 Usage  





3 Options  





4 Installation on another wiki  



4.1  For individual use  





4.2  As a gadget  







5 See also  














Wikipedia:Shortdesc helper







Add links
 









Project page
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Shortdesc helper

DescriptionAllows easy changing and importing of short descriptions
Author(s)Galobtter
StatusStable
Version3.5.3
UpdatedOctober 5, 2023; 7 months ago
Skin support
  • Vector
  • Monobook
  • Modern
  • Timeless
  • MinervaNeue
  • Source
  • MediaWiki:Gadget-Shortdesc-helper.css
  • MediaWiki:Gadget-Shortdesc-helper-pagestyles-vector.css
  • MediaWiki:Gadget-libSettings.js (libSettingsonGitHub)
  • GitHub repositoryshortdesc-helper
  • WP:SDHELPER
  • Shortdesc helper (SDH) is a gadget for adding, editing, and importing short descriptions.

    Enabling

    Select the gadget at the "Editing" section of Special:Preferences#mw-prefsection-gadgets (and save).

    (if you already have the script installed, remove importScript('User:Galobtter/Shortdesc helper.js'); from Special:MyPage/common.jsorSpecial:MyPage/skin.js)

    Usage

    When activated, the article's short description will be displayed on the page immediately under the line "From Wikipedia, the free encyclopedia", and edits may be made by clicking the buttons to the right of the short description (see image). An edit summary may be added using the "summary" button.

    If there is no local short description but there is a Wikidata description, the gadget will instead show that in pink, with an option to import it to Wikipedia (capitalising the first letter).

    By default, adding short descriptions to an article also adds the description to Wikidata if Wikidata has no description. This can be changed in the settings.

    The gadget is compatible with the page assessments gadget.

    Options

    Settings as of version 3.4.3

    Shortdesc helper may be configured using the settings window that can be accessed when editing or adding a short description by clicking the gear-wheel button on the right.

    Installation on another wiki

    Shortdesc helper will automatically detect if it is loaded on another wiki, and allow viewing and editing of Wikidata descriptions on those wikis.

    For individual use

    Add

    mw.loader.getScript( 'https://en.wikipedia.org/w/load.php?modules=ext.gadget.libSettings' ).then( function() {
     mw.loader.load( 'https://en.wikipedia.org/w/load.php?modules=ext.gadget.Shortdesc-helper' );
    })
    

    toSpecial:MyPage/common.js on that wiki to use the script on another wiki.

    As a gadget

    To install Shortdesc helper on another wiki, create a file named "MediaWiki:Gadget-Shortdesc-helper.js" with the content (comments there note how to localize):

    window.sdh = {};
    
    /* These messages can be changed to localize Shortdesc helper for your wiki. 
    ** If that is not necessary, then this can be removed, and English-language messages will be used. */
    window.sdh.messages = {
     /** Uncomment the following to change messages used in settings dialog */
     /*
     "libSettings-settings-title": "Settings",
     "libSettings-save-label": "Save settings",
     "libSettings-cancel-label": "Cancel",
     "libSettings-showDefaults-label": "Show defaults",
     "libSettings-showCurrentSettings-label": "Show current settings",
     "libSettings-save-success-message": "Settings for $1 successfully saved.",
     "libSettings-save-fail-message": "Could not save settings for $1.",
     */
     /* Settings messages */
     'sdh-settingsDialog-title': 'Settings for Shortdesc helper',
     'sdh-header-general': 'General',
     'sdh-header-appearance': 'Appearance',
     'sdh-AddToRedirect-label': 'Allow additions of short descriptions to redirects',
     'sdh-AddToRedirect-help': 'When checked, redirects will have an "add" button to add a short description. (default off)',
     'sdh-InputWidth-label': 'Width of editing input in characters (default 40)',
     'sdh-FontSize-label': 'Font size, as a percentage (default 100%)',
     /* Initial view messages */
     'sdh-missing-description': 'Missing <a href="/wiki/Wikipedia:Short description">$1 description</a>',
     /* Initial view buttons */
     'sdh-add-label': 'Add',
     'sdh-add-title': 'Add short description',
     'sdh-edit-label': 'Edit',
     'sdh-edit-title': 'Edit short description',
     /* Editing messages */
     'sdh-description-placeholder': 'Short description',
     'sdh-summary-placeholder': 'Custom edit summary',
     'sdh-save-label': 'Save',
     'sdh-save-title': 'Save description',
     'sdh-cancel-label': 'Cancel',
     'sdh-cancel-title': 'Cancel editing',
     'sdh-summary-label': 'Summary',
     'sdh-summary-title': 'Show edit summary box',
     'sdh-settings-title': 'Settings',
     /* Wikidata summary messages */
     'sdh-wd-summary': '([[w:en:Wikipedia:Shortdesc helper|Shortdesc helper]])',
     'sdh-wd-edit-failed': 'Saving the edit to Wikidata failed.',
     'sdh-wd-edit-failed-prefix': '\n\nThe info given by Wikidata is that:\n\n'
    };
    
    mw.loader.getScript( 'https://en.wikipedia.org/w/load.php?modules=ext.gadget.libSettings' ).then( function() {
     mw.loader.load( 'https://en.wikipedia.org/w/load.php?modules=ext.gadget.Shortdesc-helper' );
    })
    

    and create a CSS file named "MediaWiki:Gadget-Shortdesc-helper-pagestyles-vector.css" with the content of MediaWiki:Gadget-Shortdesc-helper-pagestyles-vector.css.

    Then, add to MediaWiki:Gadgets-definition:

    * Shortdesc-helper-loader[ResourceLoader|dependencies=mediawiki.api,mediawiki.notify,user.options,mediawiki.util|skins=vector,monobook,modern,timeless|peers=Shortdesc-helper-pagestyles-vector]|Shortdesc-helper.js
    * Shortdesc-helper-pagestyles-vector[hidden|skins=vector]|Shortdesc-helper-pagestyles-vector.css
    

    See also


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:Shortdesc_helper&oldid=1217908339"

    Category: 
    Wikipedia scripts
    Hidden category: 
    Indexed pages
     



    This page was last edited on 8 April 2024, at 15:52 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki