Difference between revisions of "Template:MsgBox"
(31 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<div id="TemplateMsgBox"> | <div id="TemplateMsgBox"> | ||
− | <table id="TemplateMsgBoxTable" style="{{#if:{{{BgColor|}}}|background-color:{{{BgColor}}} !important;}}{{#if:{{{BorderColor|}}}|border-color:{{{BorderColor}}} !important;}}"> | + | <table class="TemplateMsgBoxTheme{{#if:{{{theme|}}} | {{{theme}}} |default}}" id="TemplateMsgBoxTable" style="{{#if:{{{BgColor|}}}|background-color:{{{BgColor}}} !important;}}{{#if:{{{BorderColor|}}}|border-color:{{{BorderColor}}} !important;}}"> |
<tr><td id="TemplateMsgBoxIcon">[[File:{{#if:{{{icon|}}} | {{{icon}}} | {{#switch:{{{theme}}} | <tr><td id="TemplateMsgBoxIcon">[[File:{{#if:{{{icon|}}} | {{{icon}}} | {{#switch:{{{theme}}} | ||
| red = Template_MsgBox_redSerious.png | | red = Template_MsgBox_redSerious.png | ||
Line 8: | Line 8: | ||
| Template_MsgBox_blueInfo.png}} }} |45x35px|alt=|link=]] | | Template_MsgBox_blueInfo.png}} }} |45x35px|alt=|link=]] | ||
</td><td> | </td><td> | ||
− | <div {{#if:{{{TitleStyle|}}}| style="{{{TitleStyle}}}"}} id="TemplateMsgBoxTitle"> | + | <div {{#if:{{{TitleStyle|}}}| style="{{{TitleStyle}}}"}} id="TemplateMsgBoxTitle">{{{title|{{{1|<span class="error">Error : « title » is missing</span>}}}}}}</div> |
− | <div {{#if:{{{TextStyle|}}}| style="{{{TextStyle}}}"}} id="TemplateMsgBoxText"> | + | <div {{#if:{{{TextStyle|}}}| style="{{{TextStyle}}}"}} id="TemplateMsgBoxText">{{{text|{{{2|}}}}}}</div> |
</td> | </td> | ||
</tr> | </tr> | ||
− | </table> | + | </table></div></includeonly><noinclude> |
− | </div> | + | The MsgBox allow you to write a message on a page so that other users are aware of information was about this page. As this message: |
− | </ | + | {{MsgBox|This page is protected|Because it is used on many pages.}}<br/> |
− | < | + | == MsgBox ReadyToUse == |
− | {{MsgBox | + | This type of MsgBox are ready to be used. There just needs to write their names so that they appear. Prefer this type of MsgBox rather than personalized : [[:Category:MsgBox_ReadyToUse|list of MsgBox ReadyToUse]]. |
− | |BgColor | + | |
− | |BorderColor | + | == Personalized MsgBox == |
− | |TitleStyle | + | === Minimal call : Title === |
− | | | + | ---- |
− | | | + | To make a minimal call to MsgBox, you just need to specify the title: |
− | }} | + | <pre>{{MsgBox|title=Hello !}}</pre> |
+ | '''Result:'''{{MsgBox|title=Hello !}} | ||
+ | <br/> | ||
+ | === Text === | ||
+ | ---- | ||
+ | You can add text under the title: | ||
+ | <pre>{{MsgBox|title=Hello !|text=World !}}</pre> | ||
+ | '''Result:'''{{MsgBox|title=Hello !|text=World !}} | ||
+ | <br/> | ||
+ | === Theme === | ||
+ | ---- | ||
+ | You can change the theme of the MsgBox. To change the theme, add the parameter "theme" as below: | ||
+ | <pre>{{MsgBox|title=Hello !|theme=NameOfTheme}}</pre> | ||
+ | There are currently 3 themes, replace "NameOfTheme" by one of them: | ||
+ | {|class="wikitable" style="width:100%;text-align:center;" | ||
+ | !scope="col"| Name of theme | ||
+ | !scope="col"| Result | ||
+ | |- | ||
+ | | blue<br/>(default theme) | ||
+ | | {{MsgBox|title=This is blue theme|theme=blue}} | ||
+ | |- | ||
+ | | orange | ||
+ | | {{MsgBox|title=This is orange theme|theme=orange}} | ||
+ | |- | ||
+ | | red | ||
+ | | {{MsgBox|title=This is red theme|theme=red}} | ||
+ | |} | ||
+ | === Icon === | ||
+ | ---- | ||
+ | You can change the icon in any image imported into the wiki, the recomended size is 35x35px.To change the icon, add the parameter "icon" as below: | ||
+ | <pre>{{MsgBox|title=Hello !|icon=nameOfIcon}}</pre> | ||
+ | Here is the list of recommended icon: | ||
+ | {|class="wikitable" | ||
+ | !scope="col"| Name of icon | ||
+ | !scope="col"| Icon | ||
+ | |- | ||
+ | | Template_MsgBox_blueInfo.png | ||
+ | | [[file:Template_MsgBox_blueInfo.png]] | ||
+ | |- | ||
+ | | Template_MsgBox_orangeWarning.png | ||
+ | | [[file:Template_MsgBox_orangeWarning.png]] | ||
+ | |- | ||
+ | | Template_MsgBox_redSerious.png | ||
+ | | [[file:Template_MsgBox_redSerious.png]] | ||
+ | |- | ||
+ | | Template_MsgBox_Pen.png | ||
+ | | [[file:Template_MsgBox_Pen.png]] | ||
+ | |} | ||
+ | === Colors of background and border === | ||
+ | ---- | ||
+ | You can change the color of the border and background by adding the parameters "BorderColor" and "BgColor". You can use color names like "red" or "blue", or the hex value that you can recover on this [http://www.colorpicker.com/ site] on the top: "#?????". Remember to write the # for this to work. | ||
+ | Example: | ||
+ | <pre>{{MsgBox|title=Hello !|BgColor=yellow|BorderColor=#FF00AE}}</pre> | ||
+ | Result: | ||
+ | {{MsgBox|title=Hello !|BgColor=yellow|BorderColor=#FF00AE}} | ||
+ | === Style of title and text === | ||
+ | ---- | ||
+ | You can change the style of the title and text. To this add the parameters "TitleStyle" and "TextStyle". Complete them with CSS. | ||
+ | Example: | ||
+ | <pre>{{MsgBox|title=Hello !|text=Yeeah|TitleStyle=color:#00FF44;text-decoration:underline;|TextStyle=border:solid Red 1px;}}</pre> | ||
+ | Result: | ||
+ | {{MsgBox|title=Hello !|text=Yeeah|TitleStyle=color:#00FF44;text-decoration:underline;|TextStyle=border:solid Red 1px;}} | ||
+ | [[fr:Modèle:MsgBox]] | ||
</noinclude> | </noinclude> |
Latest revision as of 23:30, June 12, 2012
The MsgBox allow you to write a message on a page so that other users are aware of information was about this page. As this message:
This page is protected
Because it is used on many pages.
|
Contents
MsgBox ReadyToUse
This type of MsgBox are ready to be used. There just needs to write their names so that they appear. Prefer this type of MsgBox rather than personalized : list of MsgBox ReadyToUse.
Personalized MsgBox
Minimal call : Title
To make a minimal call to MsgBox, you just need to specify the title:
{{MsgBox|title=Hello !}}
Result:
Hello !
|
Text
You can add text under the title:
{{MsgBox|title=Hello !|text=World !}}
Result:
Hello !
World !
|
Theme
You can change the theme of the MsgBox. To change the theme, add the parameter "theme" as below:
{{MsgBox|title=Hello !|theme=NameOfTheme}}
There are currently 3 themes, replace "NameOfTheme" by one of them:
Name of theme | Result | ||
---|---|---|---|
blue (default theme) |
| ||
orange |
| ||
red |
|
Icon
You can change the icon in any image imported into the wiki, the recomended size is 35x35px.To change the icon, add the parameter "icon" as below:
{{MsgBox|title=Hello !|icon=nameOfIcon}}
Here is the list of recommended icon:
Name of icon | Icon |
---|---|
Template_MsgBox_blueInfo.png | |
Template_MsgBox_orangeWarning.png | |
Template_MsgBox_redSerious.png | |
Template_MsgBox_Pen.png |
Colors of background and border
You can change the color of the border and background by adding the parameters "BorderColor" and "BgColor". You can use color names like "red" or "blue", or the hex value that you can recover on this site on the top: "#?????". Remember to write the # for this to work. Example:
{{MsgBox|title=Hello !|BgColor=yellow|BorderColor=#FF00AE}}
Result:
Hello !
|
Style of title and text
You can change the style of the title and text. To this add the parameters "TitleStyle" and "TextStyle". Complete them with CSS. Example:
{{MsgBox|title=Hello !|text=Yeeah|TitleStyle=color:#00FF44;text-decoration:underline;|TextStyle=border:solid Red 1px;}}
Result:
Hello !
Yeeah
|