This page is a translated version of the page MoreMenu and the translation is 45% complete.

منوی بیشتر اسکریپتی است که منوهای کشویی «صفحه» و در صورت وجود «کاربر» را به نوار ابزار اضافه می کند. این جانشین ابزارک Haza-w's منوهای کشویی است. و به شدت تحت تاثیر آن قرار گرفت.

MoreMenu
تجزیه و تحلیل مشارکت‌های جیمبو
توضیحاتپیوندهای مفید به وظایف رایج، صفحهٔ ابزارهای تحلیلی و کاربر و گزارش‌ها
نویسنده‌هاMusikAnimal
به‌روزرسانی‌ها۲۰۲۳-۰۷-۲۵ (Expression error: Unrecognized punctuation character "۱".)
نسخه‌ها5.1.23
منبعGitHub
پشتیبانی از اسکینهمه
پشتیبانی از مرورگرهمه مرورگرهای «پیشرفته»، سازگاری#مرورگر را ببینید

نمای کلی

این ابزار حداکثر دو منوی کشویی را به نوار منو اضافه می‌کند که حاوی پیوندهایی به کارهای رایج مفید، گزارش‌های کاربر/صفحه، ابزارهای تحلیلی/آمار و ابزارهایی برای مدیران است. برای همه به جز صفحات ویژه منوی صفحه قابل مشاهده است. منوی کاربر فقط در صفحات مربوط به یک کاربر، از جمله صفحات مشارکت قابل مشاهده است.

 
اسکرین شات از منوی Analytics از منوی کشویی Page.
MoreMenu

2022 Coolest Tool
Award Winner

in the category
Editor

برخی از پیوندها فقط در صورتی در دسترس هستند که حقوق خاصی داشته باشید (مثلاً برای مسدود کردن پیوندها مسدود کنید). علاوه بر این، آیتم‌های منو در منوی کاربر ممکن است بر اساس شرایط کاربری که مشاهده می‌کنید، مانند حقوق کاربری آنها، یا اگر گزارش مسدودفعلی یا قبلی داشته‌اند، و غیره ظاهر شوند. آیتم در زیر منوی بلوک‌ها تنها در صورتی ظاهر می‌شود که آن کاربر در گذشته مسدود شده باشد. برخی از پیوندها نیز فقط در فضاهای نامی خاص و در پروژه‌های خاص قابل مشاهده هستند.

نصب

نصب در سطح جهانی (توصیه می شود)

موارد زیر را به خود اضافه کنید global.js:

mw.loader.load('https://meta.wikimedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:MoreMenu.import.js');

This will import all the core modules and give you a functioning script and make it available on all wikis.

پسوند ویکی‌پدیا انگلیسی

If you are a user of the English Wikipedia, browse to your common.js and import the enwiki extension, which adds menu items for RfAs/RfBs and XfDs, where applicable.

mw.loader.using(['mediawiki.util', 'mediawiki.api'], function () {
	mw.loader.load('https://en.wikipedia.org/w/?title=MediaWiki:Gadget-MoreMenu.enwiki.js&action=raw&ctype=text/javascript');
});

Similar extensions can be added for any wiki, or may already exist on your wiki. See Customization below for more.

پرش منوها در بارگذاری صفحه

If you use the Vector skin, you prevent the tabs at the top ("Edit", "View history", etc.) from jumping around. For English users, add the following to the top of your global.css:

@import url('https://meta.wikimedia.org/w/index.php?title=MediaWiki:Gadget-MoreMenu-pagestyles.en.css&action=raw&ctype=text/css');

For non-English, replace the .en in the path to your desired language. See Special:PrefixIndex/MediaWiki:Gadget-MoreMenu-pagestyles for a list of supported languages. If your language is missing, let the maintainers know on the talk page.

نصب به عنوان ابزار

Your local wiki may have MoreMenu available in the gadget preferences. Installing globally is recommended, however, so that MoreMenu is available on all wikis.

If you are an interface administrator and would like to install MoreMenu as a gadget on your wiki, follow these steps:

  1. Create MediaWiki:Gadget-MoreMenu-local.js with the following:
    mw.loader.load('https://meta.wikimedia.org/w/load.php?modules=ext.gadget.MoreMenu');
    
  2. Add the following to MediaWiki:Gadgets-definition:
    * MoreMenu-local[ResourceLoader|dependencies=mediawiki.api,mediawiki.util,user.options]|MoreMenu-local.js
  3. Add a description for the gadget at MediaWiki:Gadget-MoreMenu-local, preferably linking to this page ([[meta:MoreMenu]])
  4. Optional: You can set up a peer gadget that prevents the menus from "jumping" on page load in the Vector skin. See Peer gadget for more information.
  5. Optional: Extend MoreMenu by adding links that specific to your wiki, for example links to a user's Request for Adminship. Create MediaWiki:Gadget-MoreMenu.extension.js with your extension code, and modify your MediaWiki:Gadgets-definition to use it:
    * MoreMenu-local[ResourceLoader|dependencies=mediawiki.api,mediawiki.util,user.options]|MoreMenu-local.js|MoreMenu.extension

بومی سازی

Translations are pulled from MediaWiki:Gadget-MoreMenu.messages.lang.js, with MediaWiki:Gadget-MoreMenu.messages.en.js as the fallback. To add new translations, make a protected edit request on the talk page, listing the key/value pairs of the messages. See Special:PrefixIndex/MediaWiki:Gadget-MoreMenu.messages for a list of currently supported languages.

Please submit changes to the English translations as a pull request on the GitHub repository.

شخصی‌سازی

گزینه‌ها

  • MoreMenu.disableAutoRemovalDon't automatically remove the native "More" menu when it's empty.
  • MoreMenu.prefillDeletionReasonSet to false to disable prefilling the deletion reason when clicking the Delete link.

These options should be set at the top of your global.js, like the following:

MoreMenu = {
    disableAutoRemoval: true,
};

MoreMenu can be extended with custom links and functionality. Links should be added only after the moremenu.ready hook has been fired. See the examples below.

افزودن پیوندهای سفارشی

  • MoreMenu.addLink(menu, name, url, insertAfter)Adds the link to the given menu.
  • MoreMenu.addSubmenuLink(menu, submenu, name, url, insertAfter)Adds the link to the given submenu.

Here are the descriptions for each parameter:

  • menuThe ID of the top-level menu under which to place the link. Either "user" or "page".
  • submenuThe ID of the submenu under which to place the link. For example, "analysis" or "page-logs".
  • nameThe title for the link. This can be either a raw string or a message key.
  • urlThe URL for the link. Use mw.util.getUrl() for internal links.
  • insertAfter (optional) — The ID of an existing link after which to place the link. You can use false to force the link to be put at the top, and true to force it to the bottom. Otherwise, if no link with the given ID is found, or this parameter is omitted entirely, the link will be placed into the menu alphabetically.

مثال‌ها

To add a link to https://example.org under the "Page" menu, add the following code to your common.js page:

mw.hook('moremenu.ready').add(function (config) {
    MoreMenu.addLink(
        'page',
        'Example',
        'https://www.example.org'
    );
    
    // add more MoreMenu.addLink(); instances here...
    
});

The config object contains a lot of data. In most cases you want your link to contain the target username (config.targetUser.name) or the page name (config.page.name). If these are external links, you may need to use the encoded names, as with config.targetUser.encodedName and config.page.encodedName. See Configuration values for a list of all the available data.

Say you wanted to show a link to the user's "Requests for Adminship" pages under the "Analysis" submenu:

mw.hook('moremenu.ready').add(function (config) {
    MoreMenu.addSubmenuLink(
        'user',
        'analysis',
        'RfAs',
        mw.util.getUrl('Special:PrefixIndex/Wikipedia:Requests for Adminship/' + config.user.name)
    );
    
    // add more links here...
    
});

Now let's say you wanted to add a "RfXs" submenu, with links to RfAs, request for bureaucratship, etc., and only show these links if those pages exist. See Links to pages matching a pattern for how to do this!

پیشرفته

مقاله اصلی: MoreMenu/Advanced

In addition to MoreMenu.addLink() and MoreMenu.addSubmenuLink(), you can take advantage of the logic MoreMenu provides you in constructing your link based on some parameters, such as the user's permissions, or adding an entirely new submenu of links.

See MoreMenu/Advanced for more information.

ابزار همتا

{{{1}}}

When top-level menus are added in the Vector skin, the "Read", "Edit", and "View history" tabs will shift. This means that if you are working very quickly, you might accidentally click in the wrong place before MoreMenu finishes loading. To prevent this, you can use a peer gadget to keep the space available.

First, check Special:PrefixIndex/MediaWiki:Gadget-MoreMenu-pagestyles to see if there is CSS code for your language already that you can copy to your wiki. If there isn't, you'll need to calculate the widths. Once the gadget is enabled, you can run $('.mm-page').outerWidth() and $('.mm-user').outerWidth() to get the widths in pixels.

Once you have the widths, create MediaWiki:Gadget-MoreMenu-local-pagestyles.css with the following (in this case for English, and using em instead of px):

/*** VECTOR ***/

/* User menu */
.client-js .skin-vector.ns-2 #p-views,
.client-js .skin-vector.ns-3 #p-views,
.client-js > .skin-vector.mw-special-Contributions #p-views,
.client-js > .skin-vector.mw-special-DeletedContributions #p-views,
.client-js > .skin-vector.mw-special-Block #p-views {
    padding-right: 3.68em;
}

/* Page menu */
.client-js .skin-vector:not(.ns-special) #p-views .vector-menu-content::after {
    content: '';
    display: inline-block;
    width: 3.85em;
}

Then update your gadget configuration accordingly:

* MoreMenu-local[ResourceLoader|dependencies=mediawiki.api,mediawiki.util,user.options|peers=MoreMenu-local-pagestyles]|MoreMenu-local.js
* MoreMenu-local-pagestyles[hidden]|MoreMenu-local-pagestyles.css


اشکالات/درخواست ویژگی

Ask/request anything you'd like on the talk page.