Template:Word bubble: Difference between revisions

From Fanon Wiki
m (→‎Example: existient image)
(→‎Advanced: Commenting out for now since this seems to be completely broken on both Refreshed and Monobook. Also changing monaco to refreshed since it looks like this entire section hasn't been edited since Pikmin Fanon was on Fandom and using locally-uploaded image)
 
Line 169: Line 169:
</pre>
</pre>


== Advanced ==
<!--== Advanced ==
It is also possible to use a custom edit button to automatically insert your word bubble. To do this, add this code to [[Special:MyPage/monaco.js]].
It is also possible to use a custom edit button to automatically insert your word bubble. To do this, add this code to [[Special:MyPage/refreshed.js]].
<pre>
<pre>
  if (mwCustomEditButtons) {
  if (mwCustomEditButtons) {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images3.wikia.nocookie.net/central/images/f/fc/Button_user_talk.png",
     "imageFile": "https://cdn.fanonwiki.org/b/b6/Word_bubble_add_button.png",
     "speedTip": "Insert word bubble",
     "speedTip": "Insert word bubble",
     "tagOpen": "{{<name of template>|text=",
     "tagOpen": "{{<name of template>|text=",
Line 182: Line 182:
</pre>
</pre>


Note that this will only work if you are using the Monaco skin; if you are using the Monobook skin, you must add the code above to <code>User:Username/monobook.js</code>, replacing "Username" with your username. Once you have put the code at your personal js subpage, replace "<name of template>" with the name of the template you use for your word bubble.
Note that this will only work if you are using the Refreshed skin; if you are using the Monobook skin, you must add the code above to <code>User:Username/monobook.js</code>, replacing "Username" with your username. Once you have put the code at your personal js subpage, replace "<name of template>" with the name of the template you use for your word bubble.
 
[[File:Word bubble add button.png|right]]
After doing a hard refresh, when you edit, you will now see an image (http://images3.wikia.nocookie.net/central/images/f/fc/Button_user_talk.png) appear in the edit toolbar. Clicking this image will put this code in an article:
After doing a hard refresh, when you edit, you will now see an image appear in the edit toolbar. Clicking this image will put this code in an article:
<pre>
<pre>
{{<name of template>|text=Blah blah blah<nowiki>|time=~~~~~}}
{{<name of template>|text=Blah blah blah<nowiki>|time=~~~~~}}
Line 193: Line 193:
{{<name of template>|Blah blah blah<nowiki>|time=~~~~~}}
{{<name of template>|Blah blah blah<nowiki>|time=~~~~~}}
</pre>
</pre>
-->


== Example ==
== Example ==

Latest revision as of 16:46, 7 July 2022

[[File:{{{image}}}|50px]]
[[User:{{{name}}}|{{{name}}}]] – {{{sig}}}
[[User talk:{{{name}}}|TALK]]
{{{text}}}

This template creates a "word bubble" that you can use on talk pages and wherever else discussions take place. An example can be seen both above and below.

Usage

To make your own version of this template you first must create a template with your username in it. For example, if your username is "User", then you make your word bubble at "Template:User". Next, on your template page ("Template:User"), add the following code.

{{Word bubble 
|image=
|color=
|color2=
|textcolor=
|textcolor2=
|line=
|fonttype=
|name=
|sig=
|time={{{time}}}
|text={{{text}}}
}}

You can fill in the fields to whatever you want, with the colors either being in hexadecimal notation (e.g. #FFF) or in words (e.g. white); a list of colors can be found at Wikipedia's list of colors article. Note that for the image field, you have to leave out the "File:" part of the filename. Once you have filled in the fields, your word bubble is ready to be used. On talk pages, you can now include it with this code:

{{<name of template>|text=Blah blah blah.|time=~~~~~}}

Alternatively, if you don't want to always add the "text" field whenever you use your template on talk pages, go to your template and change {{{text}}} to {{{1}}}, which does not require the "text=" field. Instead, you just need to use the following code:

{{<name of template>|Blah blah blah.|time=~~~~~}}


Example

More examples can be found by looking through Category:Word bubble templates.

{{word bubble
|image=Logo-favicon.png
|color=black
|color2=red
|textcolor=white
|textcolor2=blue
|line=yellow
|fonttype=Times New Roman
|name=User
|sig=Hey, how's it going?
|time=~~~~
|text=Hi. My name is User.
}}
Logo-favicon.png
User – Hey, how's it going?
TALK – 17:51, 27 June 2009 (UTC)
Hi. My name is User.