m (increase limit to 3 days) |
(remake to be cleaner (i hope this works)) |
||
Line 2: | Line 2: | ||
IF YOU DO NOT DO THIS, IT WILL BREAK THE TEMPLATE. and that would be sad. | IF YOU DO NOT DO THIS, IT WILL BREAK THE TEMPLATE. and that would be sad. | ||
{{subst:(}}subst:# | {{subst:(}}subst:#ifexpr:{{{2|1}}}>72|ERROR: Cannot claim for more than 3 days|{{subst:(}}subst:#if:{{subst:(}}subst:void{{subst:)}}|<span style="color:red;">'''ERROR: must [https://www.mediawiki.org/wiki/Help:Substitution substitute] the template'''</span>|{{subst:(}}subst:#if:{{{1|}}}|{{#ifexpr: {{CURRENTTIMESTAMP}} < {{subst:(}}subst:#time:YmdHis|+{{{2|1}}} hour{{subst:)}}|{{Claim/1|{{{1}}}}}{{subst:(}}subst:#time:Y-m-d "at" H:i|+{{{2|1}}} hour{{subst:)}} UTC. {{Claim/2|{{{1}}}}}|}}|ERROR: Did not specify a user}}}}}} | ||
--> | --> | ||
<onlyinclude><!--This is where a "claim" template is. If it's gone, not needed, or you want to renew it, delete all this first.--> | <onlyinclude><!--This is where a "claim" template is. If it's gone, not needed, or you want to renew it, delete all this first.--> | ||
{{subst:#ifexpr:{{{2|1}}}>72|ERROR: Cannot claim for more than 3 days| | |||
{{subst:# | |||
{{subst:#if: | {{subst:#if: | ||
{{subst:void | {{subst:void | ||
}}|<span style="color:red;">'''ERROR: must [https://www.mediawiki.org/wiki/Help:Substitution substitute] the template'''</span>| | }}|<span style="color:red;">'''ERROR: must [https://www.mediawiki.org/wiki/Help:Substitution substitute] the template'''</span>| | ||
{{subst:#if:{{{1|}}}|{{# | {{subst:#if:{{{1|}}}|{{#ifexpr: {{CURRENTTIMESTAMP}} < | ||
{{subst:#time:YmdHis|+{{{2|1}}} hour | {{subst:#time:YmdHis|+{{{2|1}}} hour | ||
}}|{{Claim/1|{{{1}}}}} | |||
{{subst:#time:Y-m-d "at" H:i|+{{{2|1}}} hour | {{subst:#time:Y-m-d "at" H:i|+{{{2|1}}} hour | ||
}} UTC. | }} UTC. {{Claim/2|{{{1}}}}}|}}|ERROR: Did not specify a user}}}}}} | ||
<!--Code from the "claim" template ends here. Remember to delete these comments when deleting or re-using--></onlyinclude> | <!--Code from the "claim" template ends here. Remember to delete these comments when deleting or re-using--></onlyinclude> | ||
{{documentation}} | {{documentation}} |
Revision as of 23:06, 26 August 2023
{{subst:#ifexpr:1>72|ERROR: Cannot claim for more than 3 days|
{{subst:#if:
{{subst:void
}}|ERROR: must substitute the template|
{{subst:#if:|Expression error: Unrecognized punctuation character "{".|ERROR: Did not specify a user}}}}}}
Description
This template allows you to "claim" pages you want to edit for up to 72 hours (3 days).
Syntax
{{subst:claim|Username}}
{{subst:claim|Username|Hours}}
You must substitute this template. Transcluding it normally will not work.
Usage
The claim warning is used to prevent edit conflicts. It places a box explaining that a user (should be yourself) is wanting to edit a page, and is wanting to be the only editor until a specified time. The template hides itself after this time.
It is best to use this template at the very start of a page. The idea is for people to see it then wait for your submission before they start editing.
The purpose of limiting the time is that the claim template is supposed to be used directly before the user starts typing out the actual edit. The maximum time is 72 hours, but keep the time at a minumum.
Parameters
Put a box warning users that you are editing the page.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Username | 1 | Your username. Your user page and user talk page will both be linked in the template.
| Line | required |
Hours claimed | 2 | The length of the claim in hours. Can be any number 1-72.
| Number | optional |
Sample
The following input:
{{subst:claim|ZASNK}}
Produces:
Note: this example is rigged to never disappear, despite it being out of date.