« Modèle:Réponse » : différence entre les versions

Contenu supprimé Contenu ajouté
imported>Amalthea
Undo change by Edokter: Not only does this break Friendly, it also makes it impossible to leave talkbacks for other discussion pages (WP, WT, Template Talk, ...)
imported>Amalthea
Copy version from Template:Talkback/sandbox2
Ligne 1 :
<!--
<includeonly>{{#if:{{{1|}}}||<span style="font-size: 120%; font-weight: bold; color: red;">ERROR:</span> '''Please enter the ''username'' parameter when using the {{tl|Talkback}} template.'''<div style="display: none;">}}</includeonly><div class="usermessage" style="background-color: #BBDDFF; border-color: RoyalBlue;"><span style="float:left">{{Click|image=Nuvola apps edu languages.svg|size=40px|link=User talk:{{{1|Example}}}{{#if:{{{2|}}}|&#35;{{{2}}}|&#35;toc}}|title=You have new messages}}</span> Hello, {{BASEPAGENAME}}. {{#if:{{{tp|}}}|You have new messages on [[{{{1|Talk:Example}}}{{#if:{{{2|}}}|&#35;{{{2}}}}}]]|You have new messages at [[User talk:{{{1|Example}}}{{#if:{{{2|}}}|&#35;{{{2}}}|&#35;toc}}|{{{1|Example}}}'s talk page]]}}.<br /><span class="plainlinks" style="font-size: 88%; font-weight: normal;">{{#if:{{{ts|}}}|Message added on {{{ts}}}.}} You can [{{fullurl:{{FULLPAGENAMEE}}|action=edit}} remove this notice] at any time by removing the {{tl|Talkback}} or {{tl|Tb}} template.</span></div><includeonly>{{#if:{{{1|}}}||</div>}}</includeonly><noinclude>
 
***********************************************************************************
* Place a display:None DIV around the talkback template if no parameter was given *
***********************************************************************************
-->{{#if:{{{1<noinclude>|Example</noinclude>}}}|<!--then: (continue) else:<!--
-->|<span style="font-size: 120%; font-weight: bold; color: red;">ERROR:</span> <!--
-->'''Please enter the ''username'' parameter when using the {{tl|Talkback}} template.'''<!--
--><div style="display: none;">}}<!--
 
 
*********
* Image *
*********
--><div class="usermessage" style="background-color: #BBDDFF; border-color: RoyalBlue;"><!--
--> [[Image:Nuvola apps edu languages.svg<!--
--> |left<!--
--> |40px<!--
--> |link=<!--
 
Prefix the given page with User talk:, if it has no namespace given<!--
--> {{#ifeq:<!--
--> {{NAMESPACE:{{{1<noinclude>|Example</noinclude>}}}}}<!--
--> | {{ns:0}}<!--
--> | {{ns:3}}:<!--
--> }} <!--
--> <!--Page link--><!--
--> {{{1<noinclude>|Example</noinclude>}}}<!--
--> <!--Section link--><!--
--> {{#if:{{{2|}}}|&#35;{{{2}}}|&#35;toc}}<!--
--> |You have new messages<!--
--> ]]<!--
 
 
********
* Text *
********
-->Hello, {{#titleparts:{{PAGENAME}}|1}}. You have new messages at <!--
-->[[<!--
 
Prefix the given page with User talk:, if it has no namespace given
--> {{#ifeq:<!--
--> {{NAMESPACE:{{{1<noinclude>|Example</noinclude>}}}}}<!--
--> |{{ns:0}}<!--
--> |{{ns:3}}:<!--
--> }}<!--
 
Page link
--> {{{1<noinclude>|Example</noinclude>}}}<!--
--><!--Section link--><!--
--> {{#if:{{{2|}}}|&#35;{{{2}}}|&#35;toc}}<!--
 
Pipe
-->|<!--
 
The display name is "Example's talk page" only if parameter 1 was "Example" or "User talk:Example".
In all other cases (other namespaces or subpages, in particular) we show the page title
This is determined by checking if the namespace is not Mainspace, User talk and if
the page is no subpage.
--> {{#if:<!--
 
Evaluates to "NOT USERSPACE" if namespace is neither 0 nor 3
--> {{#switch:<!--
--> {{NAMESPACE:{{{1<noinclude>|Example</noinclude>}}}}}<!--
--> |{{ns:0}}|{{ns:3}}=<!--silent--><!--
--> |NOT USERSPACE<!--
--> }}<!--
 
Evaluates to "TITLE" if the page is a subpage
--> {{#ifeq:{{#titleparts:{{{1<noinclude>|Example</noinclude>}}}|1|2}}||<!--silent-->|IS SUBPAGE}}<!--
 
Display the full page title if any of the above was true, i.e. either TITLE or NOT USERSPACE
--> |{{#ifeq:{{NAMESPACE:{{{1<noinclude>|Example</noinclude>}}}}}|{{ns:0}}|{{ns:3}}:}}{{{1<noinclude>|Example</noinclude>}}}<!--
 
Display the PAGENAME of {{{1}}} (i.e. the user name) otherwise
--> |{{PAGENAME:{{{1<noinclude>|Example</noinclude>}}}}}'s talk page<!--
--> }}<!--
-->]].<br /><!--
 
 
*********************
* Timestamp, notice *
*********************
--><span class="plainlinks" style="font-size: 88%; font-weight: normal;">{{#if:{{{ts|}}}|Message added on {{{ts}}}.}} You can [{{fullurl:{{FULLPAGENAMEE}}|action=edit}} remove this notice] at any time by removing the {{tl|Talkback}} or {{tl|Tb}} template.</span><!--
--></div><!--
 
 
*******************************************
* Close the display:none DIV from the top *
*******************************************
-->{{#if:{{{1<noinclude>|Example</noinclude>}}}||</div>}}<noinclude>
{{Documentation}}<!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
</noinclude>