NeuroWiki hereby wishes Evil Neuro happy 2nd birthday on March 25, 2025!

Template:Need to synchronize

From NeuroWiki
Jump to navigation Jump to search
[ View | Edit | History | Purge ]Documentation page

Template Documentation

This template is used to mark pages that need to be updated via cross-language synchronization to other language sites. If you want to mark a section or page that needs to synchronize updates from another language site, please use {{Need_to_synchronize_from}}.

It adds a notification box and automatically categorizes the page into Category:Pages requiring edits to be synchronized to other language sites. When parameters are added, it can display synchronization information for specific language versions.

Parameters

Parameter Name Type Description
tag Optional
  • When set to "fullpage":
    • Changes the prompt text to "The content of this page has been updated."
    • Removes the width restriction (displays in full width).
    • Used for large-scale full-page edits. Do not use this parameter for section edits.
    • When enabled, it must be placed at the top of the page, not within the modified section.
zh-pagename Optional The corresponding page name in the Chinese site that needs synchronization (format: Namespace:Page name, e.g., "首页").
zh-oldid Optional The revision ID (timestamp) of the corresponding page in the Chinese site at the time of adding this template.
ja-pagename Optional The corresponding page name in the Japanese site that needs synchronization (format: 名前空間:ページ名, e.g., "プロジェクト:メインページ").
ja-oldid Optional The revision ID (timestamp) of the corresponding page in the Japanese site at the time of adding this template.

How to Obtain the Timestamp

  1. Click the "History" button on the article page.
  2. Select the latest revision in the target language site.
  3. Copy the number following "oldid=" from the URL (e.g., oldid=12345).

Usage Examples

Basic Usage

{{Need_to_synchronize}}

Result:

This section has been updated, but the changes have not yet been synchronized to other language sites.
The version before the update is available at: [1].

Please assist in synchronizing the content to the corresponding language sites, and remove this template once the synchronization is complete.
This template was added and updated by [[[:Template:Canonicalurl:User:]] ][More][[User talk:|Talk page]]ContributionsUpload historyBlockDeleted contributionsMove logPatrol logUser rights

  • Displays a general notification.
  • Automatically records the old revision ID of the current page.
  • Displays the username of the current editor.

With Cross-Language Versions

{{Need_to_synchronize
| zh-pagename = Project:Main Page
| zh-oldid = 12345
| ja-pagename = プロジェクト:メインページ
| ja-oldid = 67890}}

Result:

This section has been updated, but the changes have not yet been synchronized to other language sites.
The version before the update is available at: [2]. The corresponding language sites and their respective version numbers at the time of the update are as follows:

Please assist in synchronizing the content to the corresponding language sites, and remove this template once the synchronization is complete.
This template was added and updated by [[[:Template:Canonicalurl:User:]] ][More][[User talk:|Talk page]]ContributionsUpload historyBlockDeleted contributionsMove logPatrol logUser rights

  • Displays additional links to the English and Japanese site versions to be synchronized.
  • Link format: Page name/revision ID.

Full-Width Mode

{{Need_to_synchronize
| tag = fullpage}}

Result:

This page has been updated, but the changes have not yet been synchronized to other language sites.
The version before the update is available at: [3].

Please assist in synchronizing the content to the corresponding language sites, and remove this template once the synchronization is complete.
This template was added and updated by [[[:Template:Canonicalurl:User:]] ][More][[User talk:|Talk page]]ContributionsUpload historyBlockDeleted contributionsMove logPatrol logUser rights

  • Changes the prompt text to "The content of this page."
  • Removes the right-side blank space limitation.

Technical Details

  • Revision Recording: Automatically retrieves the revision ID before the edit using the {{SaveRevisionID}} magic word.
  • User Recording: Automatically retrieves the editor's username using the {{SaveUserName}} magic word.
  • Link Generation: Dynamically constructs cross-site links using the [{{fullurl:{{{1}}}|{{{2}}}}} {{{1}}}] parser function.
  • Conditional Logic: Uses {{#ifeq}} to check for parameter existence.

Notes

  1. Extension Dependency: The NeuroWiki custom SaveRevisionID extension is required.
  2. Synchronization Workflow:
    • First complete synchronization on the target language site.
    • Then return to remove this template.
  3. Obtaining the Timestamp: Go to the target language site and retrieve the specific revision ID (timestamp) from the page history:
    1. Click the "History" button on the article page.
    2. Select the latest revision in the target language site.
    3. Copy the number following "oldid=" from the URL (e.g., oldid=12345).
  4. Icon File: Pre-uploaded to the shared repository:
  

Style Classes

Style Class Target Element
metadata The entire notification box container.
mw-file-element The left-side icon.
mw-parser-output The text content area.

Redirects

  • Abbreviation: {{NTS}}

See Also

[ View | Edit | History | Purge ]The above documentation is transcluded from Template:Need to synchronize/doc.