ব্যবহারকারী:Jayantanth/ParserFunctions
Magic words
Magic words are strings of text that MediaWiki associates with a return value or function, such as time, site details, or page names. This page is about usage of standard magic words; for a technical reference, see
.
There are three general types of magic words:
- Behavior switches: these are uppercase words surrounded by double underscores, e.g. __FOO__
- Variables: these are uppercase words surrounded by double braces, e.g.
{{FOO}}
. As such, they look a lot like templates. - Parser functions: these take parameters and are either of the form
{{foo:...}}
or{{#foo:...}}
. See also
.
Page-dependent magic words will affect or return data about the current page (by default), even if the word is added through a transcluded template or included system message.
Behavior switches
A behavior switch controls the layout or behavior of the page and can often be used to specify desired omissions and inclusions in the content.
Word | Description | Versions |
---|---|---|
Table of contents | ||
__NOTOC__
|
Hides the table of contents (TOC). | |
__FORCETOC__
|
Forces the table of contents to appear at its normal position (above the first header). | |
__TOC__
|
Places a table of contents at the word's current position (overriding __NOTOC__ ). If this is used multiple times, the table of contents will appear at the first word's position.
|
|
Editing | ||
__NOEDITSECTION__
|
Hides the section edit links beside headings. This is especially useful, where a heading is created from within a template: the normal wiki section-edit would in this case edit the template code, which is normally counterintuitive to the user. If a template contains multiple headings, it may be necessary to add "" after each heading. | |
__NEWSECTIONLINK__
|
Adds a link ("+" by default) beside the "edit" tab for adding a new section on a non-talk page (see মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: Adding a section to the end |
1.7+ |
__NONEWSECTIONLINK__
|
Removes the link beside the "edit" tab on pages in talk namespaces. | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.15+ |
Categories | ||
__NOGALLERY__
|
Used on a category page, replaces thumbnails in the category view with normal links. | 1.7+ |
__HIDDENCAT__
|
Used on a category page, hides the category from the lists of categories in its members and parent categories (there is an option in the user preferences to show them). | 1.13+ |
Language conversion | ||
__NOCONTENTCONVERT__ __NOCC__
|
On wikis with language variants, don't perform any content language conversion (character and phase) in article display; for example, only show Chinese (zh) instead of variants like zh_cn, zh_tw, zh_sg, or zh_hk. | |
__NOTITLECONVERT__ __NOTC__
|
On wikis with language variants, don't perform language conversion on the title (all other content is converted). | |
Other | ||
__START__
|
No effect. | |
__END__
|
Explicitly marks the end of the article, to prevent MediaWiki from removing trailing whitespace. Removed in মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 19213 |
1.1–1.8 |
__INDEX__
|
Tell search engines to index the page (overrides মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: $wgArticleRobotPolicies |
1.14+ |
__NOINDEX__
|
Tell search engines not to index the page (ie, do not list in search engines' results). | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.14+ |
__STATICREDIRECT__
|
On redirect pages, don't allow MediaWiki to automatically update the link when someone moves a page and checks "Update any redirects that point to the original title". | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.13+ |
Variables
Variables return information about the current page, wiki, or date. Their syntax is similar to templates. Variables marked as "[expensive]" are tracked by the software, and the number that can be included on a page is limited.
If a template name conflicts with a variable, the variable will be used (so to transclude the template টেমপ্লেট:PAGENAME you would need to write {{টেমপ্লেট:PAGENAME}}
). In some cases, adding parameters will force the parser to invoke a template; for example, {{CURRENTDAYNAME|x}}
transcludes টেমপ্লেট:CURRENTDAYNAME, not the variable.
Date and time
The following variables return the current date and time in UTC.
Due to MediaWiki and browser caching, these variables frequently show when the page was cached rather than the current time.
The date and time magic words are formatted in the wiki content language. Since উদ্ধৃতি ত্রুটি: <ref>
ট্যাগ বৈধ নয়; নাম কোন সরল পূর্ণসংখ্যা হতে পারবে না। একটি বিবরণমূলক শিরোনাম ব্যবহার করুন[১], they depend on the page content language.
Variable | Output | Description | Versions |
---|---|---|---|
Year | |||
{{CURRENTYEAR}}
|
২০২৪ | Year | |
Month | |||
{{CURRENTMONTH}}
|
০৪ | Month (zero-padded number) | |
{{CURRENTMONTHNAME}}
|
এপ্রিল | Month (name) | |
{{CURRENTMONTHNAMEGEN}}
|
এপ্রিল | Month (genitive form) | |
{{CURRENTMONTHABBREV}}
|
এপ্রিল | Month (abbreviation) | 1.5+ |
Day | |||
{{CURRENTDAY}}
|
২৬ | Day of the month (unpadded number) | |
{{CURRENTDAY2}}
|
২৬ | Day of the month (zero-padded number) | 1.6+ |
{{CURRENTDOW}}
|
৫ | Day of the week (unpadded number), 0 (for Sunday) through 6 (for Saturday) | |
{{CURRENTDAYNAME}}
|
শুক্রবার | Day of the week (name) | |
Time | |||
{{CURRENTTIME}}
|
০৮:৫৮ | Time (24-hour HH:mm format) | |
{{CURRENTHOUR}}
|
০৮ | Hour (24-hour zero-padded number) | |
Other | |||
{{CURRENTWEEK}}
|
১৭ | Week (number) | |
{{CURRENTTIMESTAMP}}
|
20240426085825 | YYYYMMDDHHmmss timestamp | 1.7+ |
The following variables do the same as the above, but using the site's server config or $wgLocaltimezone.
{{LOCALYEAR}}
{{LOCALMONTH}}
{{LOCALMONTHNAME}}
{{LOCALMONTHNAMEGEN}}
{{LOCALMONTHABBREV}}
{{LOCALDAY}}
{{LOCALDAY2}}
{{LOCALDOW}}
{{LOCALDAYNAME}}
{{LOCALTIME}}
{{LOCALHOUR}}
{{LOCALWEEK}}
{{LOCALTIMESTAMP}}
- For more thorough time formatting, you may want to install Extension:ParserFunctions to use the #time parser function
Technical metadata
Note: Revision variables return data about the latest edit to the current page, even if viewing an older version of the page.
Variable | Output | Description | Versions |
---|---|---|---|
Site | |||
{{SITENAME}}
|
উইকিপিডিয়া | The wiki's site name ( মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: $wgSitename |
|
{{SERVER}}
|
//bn.wikipedia.org | domain URL ( মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: $wgServer |
|
{{SERVERNAME}}
|
bn.wikipedia.org | domain name (No longer dependent on মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: $wgServerName |
|
{{DIRMARK}} {{DIRECTIONMARK}}
|
|
Outputs a unicode-directional mark that matches the wiki's default language's direction (‎ on left-to-right wikis, ‏ on right-to-left wikis), useful in text with multi-directional text. Since উদ্ধৃতি ত্রুটি: <ref> ট্যাগ বৈধ নয়; নাম কোন সরল পূর্ণসংখ্যা হতে পারবে না। একটি বিবরণমূলক শিরোনাম ব্যবহার করুন[১], it depends on the page content language.
|
উদ্ধৃতি ত্রুটি: <ref> ট্যাগ বৈধ নয়; নাম কোন সরল পূর্ণসংখ্যা হতে পারবে না। একটি বিবরণমূলক শিরোনাম ব্যবহার করুন[২]
|
{{SCRIPTPATH}}
|
/w | relative script path ( মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: $wgScriptPath |
|
{{STYLEPATH}}
|
/w/skins | relative style path ( মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: $wgStylePath |
1.16+ |
{{CURRENTVERSION}}
|
1.43.0-wmf.2 (ce9d259) | The wiki's MediaWiki version. | উদ্ধৃতি ত্রুটি: <ref> ট্যাগ বৈধ নয়; নাম কোন সরল পূর্ণসংখ্যা হতে পারবে না। একটি বিবরণমূলক শিরোনাম ব্যবহার করুন[২]
|
{{CONTENTLANGUAGE}} {{CONTENTLANG}}
|
bn bn |
The wiki's default interface language ( মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: $wgLanguageCode |
উদ্ধৃতি ত্রুটি: <ref> ট্যাগ বৈধ নয়; নাম কোন সরল পূর্ণসংখ্যা হতে পারবে না। একটি বিবরণমূলক শিরোনাম ব্যবহার করুন[২]
|
Latest revision to current page | |||
{{REVISIONID}}
|
- | Unique revision ID | 1.5+ |
{{REVISIONDAY}}
|
26 | Day edit was made (unpadded number) | 1.8+ |
{{REVISIONDAY2}}
|
26 | Day edit was made (zero-padded number) | 1.8+ |
{{REVISIONMONTH}}
|
04 | Month edit was made (zero-padded number as of মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.17+ |
1.8+ |
{{REVISIONMONTH1}}
|
4 | Month edit was made (unpadded number) | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.17+ |
{{REVISIONYEAR}}
|
2012 | Year edit was made | 1.8+ |
{{REVISIONTIMESTAMP}}
|
20120426165346 | Timestamp as of time of edit | 1.8+ |
{{REVISIONUSER}}
|
Jayantanth | The username of the user who made the most recent edit to the page, or the current user when previewing an edit | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.15+ |
{{PAGESIZE:page name}} {{PAGESIZE:page name|R}}
|
৮৯ 89 |
[expensive] Returns the byte size of the specified page. Use "|R " to get raw numbers.
|
মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.13+ |
{{PROTECTIONLEVEL:action}}
|
Outputs the protection level (e.g. 'autoconfirmed', 'sysop') for a given action (e.g. 'edit', 'move') on the current page or an empty string if not protected. | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.15+ | |
Affects page content | |||
{{DISPLAYTITLE:title}}
|
Format the current page's title header. The value must be equivalent to the default title: only capitalization changes and replacing spaces with underscores are allowed (this can be changed with টেমপ্লেট:Manual). It can be disabled or enabled by মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: $wgAllowDisplayTitle |
1.7+ | |
{{DEFAULTSORT:sortkey}} {{DEFAULTSORTKEY:sortkey}} {{DEFAULTCATEGORYSORT:sortkey}} {{DEFAULTSORT:sortkey|noerror}} {{DEFAULTSORT:sortkey|noreplace}}
|
Used for categorizing pages, sets a default category sort key. For example if you put {{DEFAULTSORT:Smith, John}} at the end of John Smith, the page would be sorted under "S" by default in categories. It can take a second argument of noerror or noreplace to suppress error messages when multiple defaultsortkey's are used on one page or to make it do nothing if multiple defaultsortkey's are used.
|
1.10+ মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.19+ |
Statistics
Numbers returned by these variables normally contain separators (commas or spaces, depending on the local language), but can return raw numbers with the ":R" flag (for example, {{NUMBEROFPAGES}}
→ ১২,৩৮,৪৮৩ and {{NUMBEROFPAGES:R}}
→ 1238483). Use "|R" for magic words that require a parameter like PAGESINCATEGORY (for example {{PAGESINCATEGORY:Help}}
and {{PAGESINCATEGORY:Help|R}}
). Also applicable to {{PAGESIZE:page name}}
above.
The number magic words are formatted in the wiki content language. Since উদ্ধৃতি ত্রুটি: <ref>
ট্যাগ বৈধ নয়; নাম কোন সরল পূর্ণসংখ্যা হতে পারবে না। একটি বিবরণমূলক শিরোনাম ব্যবহার করুন[১], it depends on the page content language.
Variable | Output | Description | Versions |
---|---|---|---|
Entire wiki | |||
{{NUMBEROFPAGES}}
|
১২,৩৮,৪৮৩ | Number of wiki pages. | 1.7+ |
{{NUMBEROFARTICLES}}
|
১,৫১,৭৬৯ | Number of pages in মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: content namespaces |
|
{{NUMBEROFFILES}}
|
১৮,৩২৮ | Number of uploaded files. | 1.5+ |
{{NUMBEROFEDITS}}
|
৭৩,৪১,৩২৯ | Number of page edits. | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.10+ |
{{NUMBEROFVIEWS}}
|
টেমপ্লেট:NUMBEROFVIEWS | Number of page views. Usually useless on a wiki using caching. | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.14+ |
{{NUMBEROFUSERS}}
|
৪,৫৪,৪০৩ | Number of registered users. | 1.7+ |
{{NUMBEROFADMINS}}
|
১৪ | Number of users in the sysop মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: group |
1.7+ |
{{NUMBEROFACTIVEUSERS}}
|
৯৫০ | Number of active users, based on the criteria used in Special:Statistics. | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.15+ |
{{PAGESINCATEGORY:categoryname}} {{PAGESINCAT:Help}}
|
৩ ৩ |
[expensive] Number of pages in the given category. | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.13+ |
{{NUMBERINGROUP:groupname}} {{NUMINGROUP:groupname}}
|
২ ২ ({{NUMBERINGROUP:bureaucrat}} used here) |
Number of users in a specific মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: group |
মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.14+ |
{{PAGESINNS:index}} {{PAGESINNAMESPACE:index}}
|
not enabled | Number of pages in the given namespace (replace index with the relevant namespace index). For instance, {{PAGESINNAMESPACE:14}} will output the number of category pages. {{PAGESINNS:0}} differs from {{NUMBEROFARTICLES}} in that the former includes redirects and disambiguation pages. Disabled by default, enable with মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: $wgAllowSlowParserFunctions |
1.7+ |
Page names
Variable | Output | Description | Versions |
---|---|---|---|
{{FULLPAGENAME}}
|
ব্যবহারকারী:Jayantanth/ParserFunctions | Namespace and page title. | 1.6+ |
{{PAGENAME}}
|
Jayantanth/ParserFunctions | Page title. | |
{{BASEPAGENAME}}
|
Jayantanth | Page title excluding the current subpage and namespace ("Title/foo" on "Title/foo/bar").
For more complex splitting, use |
1.7+ |
{{SUBPAGENAME}}
|
ParserFunctions | The subpage title ("foo" on "Title/foo"). | 1.6+ |
{{SUBJECTPAGENAME}} {{ARTICLEPAGENAME}}
|
ব্যবহারকারী:Jayantanth/ParserFunctions ব্যবহারকারী:Jayantanth/ParserFunctions |
The namespace and title of the associated subject page. | 1.7+ |
{{TALKPAGENAME}}
|
ব্যবহারকারী আলাপ:Jayantanth/ParserFunctions | The namespace and title of the associated talk page. | 1.7+ |
The {{BASEPAGENAME}}
and {{SUBPAGENAME}}
magic words only work in namespaces that have subpages enabled. See
for information on enabling subpages.
URL encoded page names
The following are equivalents encoded for use in MediaWiki URLs (i.e. spaces replaced with underscores and some characters HTML escaped using numeric character encoding):
{{FULLPAGENAMEE}}
{{PAGENAMEE}}
{{BASEPAGENAMEE}}
{{SUBPAGENAMEE}}
{{SUBJECTPAGENAMEE}}
{{ARTICLEPAGENAMEE}}
{{TALKPAGENAMEE}}
For example, if page name is "L'Aquila", the following code will produce the string "Numeric char encoding":
{{#switch:{{PAGENAME}} |L'Aquila = No translation |L = not ok |L'Aquila = Entity Escaping |L'Aquila = Numeric char encoding }}
(See this bug for more information.)
As of
, these can all take a parameter, allowing specification of the page to be operated on, instead of just the current page:
{{PAGENAME:Template:Main Page}}
→ Main Page
Page titles containing certain characters, such as single quotes (') or asterisks * , may produce unexpected results when handled with these magic words, e.g. {{PAGESINCATEGORY:{{PAGENAME}}}} . See bugs মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 14779 মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 16474 |
Note that {{PAGENAME}}
, {{PAGENAMEE}}
and {{urlencode:}}
have distinct implementations. See Manual:PAGENAMEE encoding for details.
Namespaces
Variable | Output | Description | Versions |
---|---|---|---|
{{NAMESPACE}}
|
ব্যবহারকারী | Name of the page's namespace | |
{{NAMESPACENUMBER}}
|
2 | ID of the page's namespace | 1.20+ |
{{SUBJECTSPACE}} {{ARTICLESPACE}}
|
ব্যবহারকারী ব্যবহারকারী |
Name of the associated content namespace | 1.7+ |
{{TALKSPACE}}
|
ব্যবহারকারী আলাপ | Name of the associated talk namespace | 1.7+ |
The following are equivalents encoded for use in MediaWiki URLs (spaces replaced with underscores and some characters percent-encoded):
{{NAMESPACEE}}
{{SUBJECTSPACEE}}
{{TALKSPACEE}}
As of
, these can take a full-page-name parameter and will return the requested namespace associated with that page, instead of with the current page:
{{NAMESPACE:Template:Main Page}}
→ টেমপ্লেট{{SUBJECTSPACE:Template:Main Page}}
→ টেমপ্লেট{{TALKSPACE:Template:Main Page}}
→ টেমপ্লেট আলোচনা
Parameter must not be a namespace name:
{{SUBJECTSPACE:Help talk}}
→ '
Parser functions
Parser functions are very similar to variables, but take one or more parameters (technically, any magic word that takes a parameter is a parser function), and the name is sometimes prefixed with a hash to distinguish them from templates.
This page only describes parser functions that are integral to the MediaWiki software. Other parser functions may be added by MediaWiki extensions such as the
. For those see Help:Extension:ParserFunctions.
URL data
Parser function | Input → Output | Description | Versions |
---|---|---|---|
{{localurl:page name}} {{localurl:page name|query_string}}
|
{{localurl:MediaWiki}} → /wiki/MediaWiki{{localurl:MediaWiki|printable=yes}} → /w/index.php?title=MediaWiki&printable=yes
|
The relative path to the title. | |
{{fullurl:page name}} {{fullurl:page name|query_string}} {{fullurl:interwiki:remote page name|query_string}}
|
{{fullurl:Category:Top level}} → //bn.wikipedia.org/wiki/%E0%A6%AC%E0%A6%BF%E0%A6%B7%E0%A6%AF%E0%A6%BC%E0%A6%B6%E0%A7%8D%E0%A6%B0%E0%A7%87%E0%A6%A3%E0%A7%80:Top_level
|
A protocol-relative path to the title. This will also resolve Interwiki prefixes. Note: Unbracketed (plain) protocol-relative links are not automagically linked. | 1.5+ |
{{canonicalurl:page name}} {{canonicalurl:page name|query_string}} {{canonicalurl:interwiki:remote page name|query_string}}
|
{{canonicalurl:Category:Top level}} → https://bn.wikipedia.org/wiki/%E0%A6%AC%E0%A6%BF%E0%A6%B7%E0%A6%AF%E0%A6%BC%E0%A6%B6%E0%A7%8D%E0%A6%B0%E0%A7%87%E0%A6%A3%E0%A7%80:Top_level
|
The absolute path to the title, using the canonical url. This will also resolve Interwiki prefixes. | 1.18+ |
{{filepath:file name}} {{filepath:file name|nowiki}} {{filepath:file name|thumbnail_size}}
|
{{filepath:Wiki.png}} →
|
The absolute URL to the full size or thumbnail ( মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.18+ |
মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.12+ মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.18+ |
{{urlencode:string}} (or {{urlencode:string|QUERY}} ){{urlencode:string|WIKI}} {{urlencode:string|PATH}}
|
{{urlencode:x y z á é}} (or {{urlencode:x y z á é|QUERY}}) → x+y+z+%C3%A1+%C3%A9{{urlencode:x y z á é|WIKI}} → x_y_z_%C3%A1_%C3%A9{{urlencode:x y z á é|PATH}} → x%20y%20z%20%C3%A1%20%C3%A9
Note that the default changed from |
The input encoded for use in URLs. Note that there is no urldecode function like there is in the obsolete Extension:StringFunctions. | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.7+ মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.17+ মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.17+ মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.17+ |
{{anchorencode:string}}
|
{{anchorencode:x y z á é}} → x_y_z_á_é
|
The input encoded for use in URL section anchors (after the '#' symbol in a URL). | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.8+ |
Namespaces
{{ns:}}
returns the current localized name for the namespace with that index, canonical name, or local alias. Thus {{ns:6}}
, {{ns:File}}
, and {{ns:Image}}
(an old name for the File namespace) all return "চিত্র". On a wiki where the content language was French, {{ns:Fichier}}
would also be valid, but {{ns:Datei}}
(the localisation of "File" into German) would not.
{{nse:}}
is the equivalent encoded for MediaWiki URLs. It does the same, but it replaces spaces with underscores, making it usable in external links.
Content namespaces | Talk namespaces | |||
---|---|---|---|---|
Usage | Output | Usage | Output | |
{{ns:-2}} or {{ns:Media}}
|
মিডিয়া | |||
{{ns:-1}} or {{ns:Special}}
|
বিশেষ | |||
{{ns:0}} or {{ns:}}
|
{{ns:1}} or {{ns:Talk}}
|
আলাপ | ||
{{ns:2}} or {{ns:User}}
|
ব্যবহারকারী | {{ns:3}} or {{ns:User talk}}
|
ব্যবহারকারী আলাপ | |
{{ns:4}} or {{ns:Project}}
|
উইকিপিডিয়া | {{ns:5}} or {{ns:Project talk}}
|
উইকিপিডিয়া আলোচনা | |
{{ns:6}} or {{ns:File}} or {{ns:Image}}
|
চিত্র | {{ns:7}} or {{ns:File talk}} or {{ns:Image talk}}
|
চিত্র আলোচনা | |
{{ns:8}} or {{ns:MediaWiki}}
|
মিডিয়াউইকি | {{ns:9}} or {{ns:MediaWiki talk}}
|
মিডিয়াউইকি আলোচনা | |
{{ns:10}} or {{ns:Template}}
|
টেমপ্লেট | {{ns:11}} or {{ns:Template talk}}
|
টেমপ্লেট আলোচনা | |
{{ns:12}} or {{ns:Help}}
|
সাহায্য | {{ns:13}} or {{ns:Help talk}}
|
সাহায্য আলোচনা | |
{{ns:14}} or {{ns:Category}}
|
বিষয়শ্রেণী | {{ns:15}} or {{ns:Category talk}}
|
বিষয়শ্রেণী আলোচনা |
Formatting
Usage | Input → Output | Description | Version | ||
---|---|---|---|---|---|
{{formatnum:unformatted num}} {{formatnum:formatted num|R}}
|
{{formatnum:987654321.654321}} → ৯৮,৭৬,৫৪,৩২১.৬৫৪৩২১
|
The input with decimal and decimal group separators, and localized digit script, according to the wiki's default locale. The |R parameter can be used to unformat a number, for use in mathematical situations. It doesn't always work if you try to unformat a number in non-English format on a wiki with non-English locale; if you need to format (according the wiki's locale) a number in unknown input format, try and use formatnum two times (but not if it can have a decimal group, or its separator will be eaten or the number won't be formatted).
|
1.7+ মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.13+ | ||
|
|
Formats an unlinked date based on user "Date format" preference, and adds metadata tagging it as a formatted date. For logged-out users and those who have not set a date format in their preferences, dates can be given a default: mdy , dmy , ymd , ISO 8601 (all case sensitive). If only the month and day are given, only mdy and dmy are valid. If a format is not specified or is invalid, the input format is used as a default. If the supplied date is not recognized as a valid date (specifically, if it contains any metadata such as from a nested use of these or similar templates), it is rendered unchanged, and no (additional) metadata is generated.
|
মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.15+ | ||
{{lc:string}}
|
{{lc:DATA CENTER}} → data center
|
The lowercase input. | 1.5+ | ||
{{lcfirst:string}}
|
{{lcfirst:DATA center}} → dATA center
|
The input with the very first character lowercase. | 1.5+ | ||
{{uc:string}}
|
{{uc:text transform}} → TEXT TRANSFORM
|
The uppercase input. | 1.5+ | ||
{{ucfirst:string}}
|
{{ucfirst:text TRANSFORM}} → Text TRANSFORM
|
The input with the very first character uppercase. | 1.5+ | ||
{{padleft:xyz|stringlength}} {{padleft:xyz|strlen|char}} {{padleft:xyz|strlen|string}}
|
{{padleft:xyz|5}} → 00xyz{{padleft:xyz|5|_}} → __xyz {{padleft:xyz|5|abc}} → abxyz {{padleft:xyz|2}} → xyz{{padleft:|1|xyz}} → x (first character of the string) |
Inserts a string of padding characters (character chosen in third parameter; default '0') of a specified length (second parameter) next to a chosen base character or variable (first parameter). The final digits or characters in the base replace the final characters in the padding; i.e. {{padleft:44|3|0}} produces 044. The padding string may be truncated if its length does not evenly divide the required number of characters.মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: bug মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: r45734 |
1.8+ | ||
{{padright:xyz|stringlength}} {{padright:xyz|strlen|char}} {{padright:xyz|strlen|string}}
|
{{padright:xyz|5}} → xyz00
|
Identical to padleft, but adds padding characters to the right side. |
See also: Extension:StringFunctions
Localisation
Here are the magic words which are used as main localisation tools. Other magic words will often depend on the wiki's locale and configuration or on the chosen language: see in particular #Date and time, #Formatting, #Miscellaneous.
The usage of these magic words can be very complex, and the documentation is currently incomplete; there's some more info on Plural, Grammar, Gender.
Usage | Input → Output | Description | Version |
---|---|---|---|
{{plural:2|is|are}}
|
{{plural:0|is|are}} → is{{plural:1*1|is|are}} → is{{plural:21 mod 10|is|are}} → are{{plural:{{#expr:21 mod 10}}|is|are}} → is{{plural:1|is|are}} → is{{plural:2|is|are}} → are(for Polish): {{plural:2|milion|miliony|milionów}} → miliony
|
Outputs the singular form (second parameter) if the first parameter is an expression equalling one; the plural form (third parameter) otherwise. Its functioning is language-dependent. Plural transformations are used for languages like Russian based on "count mod 10". You should not expect this to handle fractions (like 44.5) — see bug 28128. | |
{{grammar:N|noun}}
|
Outputs the correct inflected form of the given word described by the inflection code after the colon (language-dependent). Grammar transformations are used for inflected languages like Polish. See also মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: Manual:$wgGrammarForms |
1.7+ | |
{{gender:username
|
(depends on the named user's gender) | A switch for the gender set in Special:Preferences. Note: If 3rd parameter is omitted and user hasn't defined his/her gender, then |
মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.15+ |
{{int:message name}}
|
{{int:edit}} → সম্পাদনা (depends on user language, try: fr •ja) |
Internationalizes (translates) the given interface (MediaWiki namespace) message into the user language. Note that this can damage/confuse cache consistency in MediaWiki 1.17 and earlier, see bug 14404. | |
{{int:editsectionhint|MediaWiki}}
|
{{int:editsectionhint|MediaWiki}} → অনুচ্ছেদ সম্পাদনা: MediaWiki
|
You may also use parameters with translations. Parameters are designated in messages with: $1, $2, $3, etc. For example, here is the message for editsectionhint: Edit section: $1 In this example, MediaWiki replaces $1. |
Miscellaneous
Usage | Output | Description | Version | ||
---|---|---|---|---|---|
{{#language:language code}}
|
language code العربية language code Arabic |
The full name of the language for the given language code: native name by default, name translated in target language if a target language code is specified. Codes are mostly in accordance with ISO 639. | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.7+ উদ্ধৃতি ত্রুটি: | ||
{{#special:special page name}}
|
বিশেষ:Special page name বিশেষ:ব্যবহারকারী প্রবেশ |
The localized name for the given canonical Special: page. | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.9+ | ||
{{#speciale:special page name}}
|
%E0%A6%AC%E0%A6%BF%E0%A6%B6%E0%A7%87%E0%A6%B7:Special_page_name %E0%A6%AC%E0%A6%BF%E0%A6%B6%E0%A7%87%E0%A6%B7:%E0%A6%AC%E0%A7%8D%E0%A6%AF%E0%A6%AC%E0%A6%B9%E0%A6%BE%E0%A6%B0%E0%A6%95%E0%A6%BE%E0%A6%B0%E0%A7%80_%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A6%AC%E0%A7%87%E0%A6%B6 |
The localized and url-encoded name for the given canonical Special: page. | মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.20+ | ||
{{#tag:tagname
|
(depends on parser tag) | Alias for XML-style Mediawiki parser tags or extension tags. It allows execution of wiki code and parser functions within tags before the tag is processed. It also prevents parsing of tags in conditional paths that aren't executed (like in #if statements). Content between tags is passed as the first parameter, and any attributes for the tags can be passed as subsequent parameters. This example:
...can be rewritten like this:
Example for the Cite extension's
{{#tag: tagname|| attribute1=value1| attribute2=value2}} to pass an empty content. No space is permitted in the area reserved for content between the pipe characters || before attribute1.
|
মিডিয়াউইকিতে এই সম্পর্কে একটি পাতা রয়েছে: 1.12+ |
[[Category:ব্যবহারকারী টেমপ্লেট {{{2}}}|]]
#time
Code | Description | Current output (Purge this page's cache to update) |
---|---|---|
Year | ||
Y | 4-digit year. | ২০২৪ |
y | 2-digit year. | ২৪ |
L | 1 or 0 whether it's a leap year or not. | ১ |
o ¹ | ISO-8601 year number. ² | ২০২৪ ³ |
¹ Requires PHP 5.1.0 and newer and rev:45208. | ||
Month | ||
n | Month index, not zero-padded. | ৪ |
m | Month index, zero-padded. | ০৪ |
M | An abbreviation of the month name, in the site language. | এপ্রিল |
F | The full month name in the site language. | এপ্রিল |
xg | Output the full month name in the genitive form for site languages that distinguish between genitive and nominative forms. | For Polish:
(nominative) {{#time:d F Y|20 June 2010}} → 20 czerwiec 2010 (genitive) {{#time:d xg Y|20 June 2010}} → 20 czerwca 2010 |
Week | ||
W | ISO 8601 week number, zero-padded. | ১৭ |
Day | ||
j | Day of the month, not zero-padded. | ২৬ |
d | Day of the month, zero-padded. | ২৬ |
z | Day of the year (January 1 = 0). [[#ref_{{{1}}}|^]] To get the ISO day of the year add 1. |
১১৬ |
D | An abbreviation for the day of the week. Rarely internationalised. | শুক্র |
l | The full weekday name. Rarely internationalised. | শুক্রবার |
N | ISO 8601 day of the week (Monday = 1, Sunday = 7). | ৫ |
w | Number of the day of the week (Sunday = 0, Saturday = 6). | ৫ |
Hour | ||
a | "am" during the morning (00:00:00 → 11:59:59), "pm" otherwise (12:00:00 → 23:59:59). | am |
A | Uppercase version of a above. | AM |
g | Hour in 12-hour format, not zero-padded. | ৮ |
h | Hour in 12-hour format, zero-padded. | ০৮ |
G | Hour in 24-hour format, not zero-padded. | ৮ |
H | Hour in 24-hour format, zero-padded. | ০৮ |
Minutes and seconds | ||
i | Minutes past the hour, zero-padded. | ৫৮ |
s | Seconds past the minute, zero-padded. | ২৫ |
U | Seconds since January 1 1970 00:00:00 GMT. | ১৭১৪১২১৯০৫ |
Miscellaneous | ||
t | Number of days in the current month. | ৩০ |
c | ISO 8601 formatted date, equivalent to Y-m-dTH:i:s+00:00. | 2024-04-26T08:58:25+00:00 |
r | RFC 5322 formatted date, equivalent to D, j M Y H:i:s +0000, with weekday name and month name not internationalised. | Fri, 26 Apr 2024 08:58:25 +0000 |
Non-Gregorian calendars | ||
Islamic | ||
xmj | Day of the month. | ১৭ |
xmF | Full month name. | শাওয়াল |
xmn | Month index. | ১০ |
xmY | Full year. | ১৪৪৫ |
Iranian | ||
xij | Day of the month. | ৭ |
xiF | Full month name. | অর্দিবেহেশ্ত |
xin | Month index. | ২ |
xiY | Full year. | ১৪০৩ |
Hebrew | ||
xjj | Day of the month. | ১৮ |
xjF | Full month name. | নিসান |
xjt | Number of days in month. | ৩০ |
xjx | Genitive form of the month name. | নিসান |
xjn | Month number. | ৭ |
xjY | Full year. | ৫৭৮৪ |
Thai solar | ||
xkY | Full year. | ২৫৬৭ |
Minguo/Juche year | ||
xoY | Full year. | ১১৩ |
Japanese nengo | ||
xtY | Full year. | 令和6 |
Flags | ||
xn | Format the next numeric code as a raw ASCII number. | In the Hindi language, {{#time:H, xnH}} produces ०६, 06. |
xN | Like xn, but as a toggled flag, which endures until the end of the string or until the next appearance of xN in the string. | |
xr | Format the next number as a roman numeral. Only works for numbers up to 3000. | {{#time:xrY}} → MMXXIV |
xh | Format the next number as a Hebrew numeral. | {{#time:xhY}} → ב'כ"ד |
This parser function takes a date and/or time (in the Gregorian calendar) and formats it according to the syntax given. A date/time object can be specified; the default is the value of the magic word {{CURRENTTIMESTAMP}} – that is, the time the page was last rendered into HTML.
- {{#time: format string }}
- {{#time: format string | date/time object }}
The list of accepted formatting codes is given in the table to the right. Any character in the formatting string that is not recognised is passed through unaltered; this applies also to blank spaces (the system does not need them for interpreting the codes). There are also two ways to escape characters within the formatting string:
- A backslash followed by a formatting character is interpreted as a single literal character
- Characters enclosed in double quotes are considered literal characters, and the quotes are removed.
In addition, the digraph xx is interpreted as a single literal "x".
- {{#time: Y-m-d }} → ২০২৪-০৪-২৬
- {{#time: [[Y]] m d }} → ২০২৪ ০৪ ২৬
- {{#time: [[Y (year)]] }} → ২০২৪ (২৪UTCamFri, 26 Apr 2024 08:58:25 +0000)
- {{#time: [[Y "(year)"]] }} → ২০২৪ (year)
- {{#time: i's" }} → ৫৮'২৫"
The date/time object can be in any format accepted by PHP's strtotime() function. Both absolute (eg 20 December 2000) and relative (eg +20 hours) times are accepted.
{{#time: r|now}} → Fri, 26 Apr 2024 08:58:26 +0000
{{#time: r|+2 hours}} → Fri, 26 Apr 2024 10:58:26 +0000
{{#time: r|now + 2 hours}} → Fri, 26 Apr 2024 10:58:26 +0000
If you've calculated a Unix timestamp, you may use it in date calculations by pre-pending an @ symbol.
{{#time: U | now }} → ১৭১৪১২১৯০৬
{{#time: r|@১৭১৪১২১৯০৫}} → ত্রুটি: অবৈধ সময়
The range of acceptable input is 1 January 0111 → 31 December 9999. For the years 100 through 110 the output is inconsistent, Y and leap years are like the years 100-110, r, D, l and U are like interpreting these years as 2000-2010. {{#time: d F Y | 29 Feb 0100 }} → ০১ মার্চ ০১০০ Year numbers 0-99 are interpreted as 2000-2069 and 1970-1999, even when written with leading zeros: |
Full or partial absolute dates can be specified; the function will "fill in" parts of the date that are not specified using the current values:
- {{#time: Y | January 1 }} → ২০২৪
The fill-in feature is not consistent; some parts are filled in using the current values, others are not: {{#time: Y m d H:i:s | June }} → ২০২৪ ০৬ ২৬ ০০:০০:০০ Gives the start of the day, but the current day of the month and the current year. {{#time: Y m d H:i:s | 2003 }} → ২০০৩ ০৪ ২৬ ০০:০০:০০ Gives the start of the day, but the current day of the year. |
With MediaWiki r86805 - Code Review, a four-digit number is always interpreted as a year, never as hours and minutes:
{{#time: Y m d H:i:s | 1959 }} → ১৯৫৯ ০৪ ২৬ ০০:০০:০০
A six-digit number is interpreted as hours, minutes and seconds if possible, but otherwise as an error (not, for instance, a year and month):
{{#time: Y m d H:i:s | 195909 }} → ২০২৪ ০৪ ২৬ ১৯:৫৯:০৯ Input is treated as a time rather than a year+month code.
{{#time: Y m d H:i:s | 196009 }} → ত্রুটি: অবৈধ সময় Although 19:60:09 is not a valid time, 196009 is not interpreted as September 1960.
The function performs a certain amount of date mathematics:
- {{#time: d F Y | January 0 2008 }} → ৩১ ডিসেম্বর ২০০৭
- {{#time: d F | January 32 }} → ত্রুটি: অবৈধ সময়
- {{#time: d F | February 29 2008 }} → ২৯ ফেব্রুয়ারি
- {{#time: d F | February 29 2007 }} → ০১ মার্চ
- {{#time:Y-F|now -1 months}} → ২০২৪-মার্চ
The total length of the format strings of the calls of #time
is limited to 6000 characters [১].
test
- {{CURRENTWEEK}}=১৭
- {{CURRENTDAY}}=২৬
- {{CURRENTDAYNAME}}=শুক্রবার
- {{#time:xN Y-m-d }}= 2024-04-26
- {{#time:xN Y-F-d }}= 2024-এপ্রিল-26
- {{#time:xN d F Y | January 0 2008 }} = 31 ডিসেম্বর 2007
- {{ #expr: {{ #expr: ((({{#time:xNYmdHis}} / 1000000) round 0)) /10000 round 0}} - {{{year|2005}}} }}=19
- {{#time:xnU}}=1714121905
- {{#time:nU}}=৪১৭১৪১২১৯০৫
- {{#time:Y}}=২০২৪
- {{#time:xNY}}=2024
- {{#time:F}}=এপ্রিল
- {{#time:xNF}}=এপ্রিল
- {{#time: F j}}=এপ্রিল ২৬
- {{#time:xN F j}}= এপ্রিল 26
- {{#time:xN F j |{{{Day|1}}} {{{Month|January}}} {{CURRENTYEAR}} }}=ত্রুটি: অবৈধ সময়
test2
- {{CURRENTDAY}}-1=২৬-1
- {{en2bndigit|{{#expr: {{#time:xnj}}-1}}}} = ২৫
- {{REVISIONYEAR}} =2012
Problems
- {{#time:Y F j|{{{1|{{CURRENTYEAR}}}}}-{{{2|{{CURRENTMONTH}}}}}-{{{3|{{CURRENTDAY}}}}} -2 days}}=ত্রুটি: অবৈধ সময়
- {{#time:Y F j|{{{1|{{CURRENTYEAR}}}}}-{{{2|{{CURRENTMONTH}}}}}-{{{3|{{CURRENTDAY}}}}}}}=ত্রুটি: অবৈধ সময়
prob
- {{#time:Y-F-j|{{Bn2endigits|{{{1|{{CURRENTYEAR}}}}}}}-{{Bn2endigits|{{{2|{{CURRENTMONTH}}}}}}}-{{Bn2endigits|{{{3|{{CURRENTDAY}}}}}}} -1days}}= ২০২৪-এপ্রিল-২৫
- {{#time:Y-F-j|{{Bn2endigits|{{{1|{{CURRENTYEAR}}}}}}}-{{Bn2endigits|{{{2|{{CURRENTMONTH}}}}}}}-{{Bn2endigits|{{{3|{{CURRENTDAY}}}}}}}-2days}}= ২০২৪-এপ্রিল-২৪
mejor
- {{#time:Y F j-1 days}}= ২০২৪ এপ্রিল ২৬-1 ২৬am২৪২৫
- {{#time:Y F j -1 }}= ২০২৪ এপ্রিল ২৬- 1
- {{#time: Y-F-d | {{{date}}} }}=ত্রুটি: অবৈধ সময়https://bugzilla.wikimedia.org/show_bug.cgi?id=19412
- {{{year|{{CURRENTYEAR}}}}}=২০২৪
- {{#time:xND|{{{year|{{CURRENTYEAR}}}}}0301}}=ত্রুটি: অবৈধ সময়
- {{#time:D|{{{year|{{#time:xY}}}}}0301}}=শুক্র
- {{#time:xND|{{{year|{{#time:xY}}}}}0301}}=শুক্র
- {{#time:D}}=শুক্র
- {{#time:d}}=২৬
- {{#time:xNd}}=26
- {{#time:xND}}=শুক্র
- {{CURRENTDAY}}=২৬
- {{#time:F}}=এপ্রিল
- {{#time:xgF}}=এপ্রিলএপ্রিল
- {{CURRENTMONTH}}=০৪
- {{#time: xN m }}= 04
- {{#time: xnY}} instead of {{CURRENTYEAR}}=2024 instead of ২০২৪
- {{subst:#time:xN Y-m-dl}}= 2010-03-15সোমবার
- {{#time:xN Y-m-d}}= 2024-04-26
- {{#time: xN m }}= 04
Style
Text Any thing here |
<script language="javascript" type="text/javascript" src="http://www.pallab.com/services/BanglaDateToday.js"></script>
<script language="javascript" type="text/javascript" src="http://www.pallab.com/services/BanglaDateTodayInEnglish.js"></script>
var today = new Date(); var dd = today.getDate(); var mm = today.getMonth() + 1; var yyyy = today.getFullYear(); var hh = today.getHours(); var min = today.getMinutes(); var eDate = mm + "/" + dd + "/" + yyyy + " " + hh + ":" + min; document.write('<script language="javascript" src="http://www.pallab.com/services/getbangladate.aspx?EDate=' + eDate + '"><\/script>');
এক্সক্সক্স
- {{#time: M d| +6 Hours}} =এপ্রিল ২৬
- {{#time: M d| +6 Hours}} = এপ্রিল ২৬