Thành viên:Nhatminh01/Chỗ thử của tôi

My sandbox is a feature which gives you a place to practice editing, either to build a draft for later publication in the main encyclopedia, or just to practice formatting with wiki markup syntax. If you have an account, you will see a link in the upper right corner of the screen that says "Sandbox"; this will take you to your sandbox.

The link opens a user subpage Special:MyPage/sandbox. If the page does not exist then it is opened for editing with {{User sandbox}} added to the top of the editing window. The template notifies readers that the page is a sandbox, not an article, and it prevents the page from being indexed by search engines.

Di chuyển một chỗ thử sửa

If you have an existing sandbox that is not named "sandbox", then you can move it. See Help:How to move a page.

Customizing sửa

Removing sửa

The sandbox link was previously a gadget but is now a built-in feature. It cannot be disabled in preferences but it can be removed by placing this in CSS của bạn:

li#pt-sandbox { display: none; }

The feature lacks feature-settings to support customization; however, it can be removed and a JavaScript version created in userspace.

Moving to toolbar sửa

To create a toolbar link to Special:MyPage/Sandbox.

mw.util.addPortletLink(
 'p-personal',
 '/w/index.php?title=Special:MyPage/Sandbox&action=edit&preload=Template:User_sandbox/preload&editintro=Template:User_sandbox',
 'My sandbox',
 'pt-mysandbox',
 'Go to your sandbox',
 null,
 '#pt-preferences'
 );

To remove autoedit:

var NoEditSandbox = $('#pt-mysandbox a').slice(0,1).attr('href', '/wiki/User:' + wgUserName + '/sandbox');

My subpages sửa

If you have multiple sandboxes or other user subpages, it may be more useful to show a list of your subpages:

Ensure you replace username with your username.
 mw.util.addPortletLink(
 'p-personal',
 '/wiki/Special:PrefixIndex/User:username',
 'My subpages',
 'pt-mysubpages',
 'Show my subpages',
 null,
 '#pt-preferences'
 );