User:Acagastya/totdr/doc

From Wikipedia, the free encyclopedia

Usage[edit]

This is the {{User:Acagastya/totdr}} template. This template displays the Tip of the Day box which is much similar to the {{totd-random}}.
This template is intended to be used at the top of the users' talk page.
Do not use the Wiki-code substitute for this template.

Who can use it?[edit]

This template can be used by any editor who wish to have a tip of the day box on their talk page.

Parameters[edit]

This template has five parameters:

Border Color[edit]

The parameter is used to change the border color of the box:
|border-c=
Enter either the color name or the hexadecimal value for this parameter.
NOTE: Do not forget to use the symbol # before the hexadecimal value.

  • The default border color in this template is BLACK.
  • I am not sure but this feature might not be available in {{totd-random}}.

Width of the box[edit]

This parameter is used to change the width of the box.
|width=
You may choose the size either by the pixels example: |width=80px or the percentage (%) value example: |width=80%.

  • Default is set at 100px.
  • I am not sure but this feature might not be available in {{totd-random}}.

Border Radius[edit]

This parameter is used to obtain the curved edges of the of the box.
|border-radius=
You may choose the size either by the pixels example: |border-radius=20px or the percentage (%) value example: |border-radius=10%.

  • Default is set at 0px.
  • I am not sure but this feature might not be available in {{totd-random}}.

NOTE: If you are assigning the value to this parameter using percentage (%); You would probably hate the look. It is depicted in the examples.

Image to purge[edit]

This parameter is used to change the image used to purge the tip.
|img=
Enter the name of the image you think would be appropriate.
NOTE: You need to mention the image as example: |img=:Example

  • The image which we all don't like in our notifications (i.e. ) is the default image.
  • I am not sure but this feature might not be available in {{totd-random}}.

Image size[edit]

This parameter is used to change the size of the image used to purge the tip.
|img-size=
Enter the size in pixel or percentage to match accordingly.

  • Default value of this parameter is 30px.
  • I am not sure but this feature might not be available in {{totd-random}}.

Function[edit]

The function of this template is to display The tip of the Moment.

Difference between this and the original template[edit]

  • I am pretty sure that in the original template, you won't be able to customise it.
  • The space consuming bulbs' filament is broken! will not appear in this template. That is one of the reasons which lead to creation of this template.
  • To add this auto-updating template to your user page, use {{totd-random}}....Say goodbye to this space occupying thing.
  • But not this: Become a Wikipedia tipster. I can't remove it. There will be a huge loss to those who want to learn new tips.

Examples[edit]

Because the Tip of the Moment changes every time when purged and as the tip aren't of the uniform size: I will club the parameters together.

Using all the parameters with size quoted in pixels[edit]

  • |border-c= #9dd04f
  • |width=750px (chosen as per my screen resolution)
  • |border-radius=25px
  • |img=File:Gnome-media-playlist-shuffle.svg
  • |img-size=25px

Code {{User:Acagastya/totdr|border-c#9dd04f|width=750px|border-radius=25px|img=Gnome-media-playlist-shuffle.svg|img-size=25px}}
Output:

Tip of the moment...
How to insert a picture into an article

The syntax used for displaying an image is:

[[File:{name}|{type}|{location}|{size}|{alt=}|{caption}]]

Only [[File:{name}]] parameter is required.
Do not put spaces between parameters. The other parameters are optional and can be placed in any order. Some infoboxes do not require the brackets. Keep parameters in lower case. The other parameters are:
Type
'thumb' / 'thumbnail' or 'frame'. This causes image to be displayed with specific formatting. "thumb" is normally preferred.
Location
'right', 'left', 'center' or 'none'. Determines placement of the image on the page. "Left" or "right" is the norm, but large panoramas or timelines can be displayed in the center.
Size
{width}px or {width}x{height}px (e.g. 50x40px, would limit width to 50 pixels and height to 40 pixels). Normally only one variable is used. Use common sense when determining the sizes; you can use the "Show preview" button if you need to. If thumb or thumbnail is chosen, size should normally be left out, so that the size defaults to the size set in a user's preferences.
alt=
(keep it lower case). This is the "alternate image" parameter used to describe the image for screenreaders or for people with low-vision. It should be more descriptive than the caption alone. Do not use this for another copy of the caption or of the article title, as the reader will already be aware of these.
Caption
Any element which cannot be identified as one of the above is automatically treated as caption text. It is traditional to put this last. The caption should identify what the image is, and ideally be a complete sentence that adds to the article by pointing out something a casual reader would not have noticed otherwise, or add information the pertains to the image. Full sentence or multi fragment captions require full stop punctuation.

If you have created a picture that is not already in Wikipedia's image collection on the Commons that you want to include in an article, you will need to upload it first. Bonus tip: Similar formatting is used to insert basic audio or basic video clips into articles.

Become a Wikipedia tipster


Using all the parameters with size quoted in percentage (%)[edit]

CAUTION: the weird look at the edges is because of |box-radius='s value is set in percentage (%)

  • |border-c= #9f0fe90
  • |width=75%px (chosen as per my screen resolution)
  • |border-radius=10%
  • |img=File:Gnome-media-playlist-shuffle.svg
  • |img-size=25%

Code {{User:Acagastya/totdr|border-c#f0fe90|width=75%px|border-radius=10%|img=Gnome-media-playlist-shuffle.svg|img-size=25%}}
Output:

25% Tip of the moment...
How to watch for pages that do not exist yet

If you have requested an article, are waiting for an article that someone else has requested, or are concerned about a deleted article being re-created, you can add the non-existent page to your watchlist and find out when it is created! Follow the red link, then click the "watch" tab.

Read more:
Become a Wikipedia tipster


NOTE: It is advisable to set width of the box in percentage (%) and border radius in pixels