Template:Tgchannel: Difference between revisions
No edit summary Tag: 2017 source edit |
update template to v2 version using metatemplate Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly>{{Infobox | ||
|title={{{title|}}} | |||
|subtitle=Telegram channel | |||
|image={{{image|}}} | |||
|add_preview={{{add_preview|}}} | |||
|infobox_items=<tr> | |||
| | |||
<tr> | |||
<th>Username</th> | <th>Username</th> | ||
<td>[https://t.me/{{{username}}} {{{username}}}]</td> | <td>[https://t.me/{{{username}}} {{{username}}}]</td> | ||
</tr> | </tr>{{#if:{{{Creation Date|}}}|<tr> | ||
{{#if:{{{Creation Date|}}}| | |||
<tr> | |||
<th>Creation Date</th> | <th>Creation Date</th> | ||
<td>{{{Creation Date}}}</td> | <td>{{{Creation Date}}}</td> | ||
</tr>}} | </tr>}}{{#if:{{{description|}}}|<tr> | ||
{{#if:{{{description|}}}| | |||
<tr> | |||
<th>Description</th> | <th>Description</th> | ||
<td>{{{description}}}</td> | <td>{{{description}}}</td> | ||
</tr>}} | </tr>}} | ||
|category_name=Telegram channel | |||
|add_category={{{add_category|}}}}}</includeonly><noinclude> | |||
{{TgchannelV2 | |||
<noinclude> | | title = title | ||
{{ | | image = Lt three icon.jpg | ||
|image= | | username = lt_three | ||
|username= | | description = Multiline | ||
|description= | description | ||
|Creation Date= | | Creation Date = 2023-03-11 | ||
|add_category=false | | add_category = false | ||
}} | }} | ||
text start | |||
<templatedata> | |||
{ | |||
"params": { | "params": { | ||
"title": { | "title": { | ||
"description": "Title shown at the top of the template. Defaults to page title.", | |||
"type": "line" | |||
"description": "Title shown at the top of the template. Defaults to page title" | |||
}, | }, | ||
"image": { | "image": { | ||
" | "description": "Image to be used in infobox. Will also be used in page preview.", | ||
"type": "wiki-file-name", | "type": "wiki-file-name", | ||
" | "suggested": true | ||
}, | |||
"description": " | "add_preview": { | ||
"description": "Whether to set infobox image as OpenGraph preview", | |||
"type": "boolean", | |||
"default": "true" | |||
}, | }, | ||
"username": { | "username": { | ||
" | "description": "Telegram username. Will also add link to the channel.", | ||
"required": true, | "example": "lt_three", | ||
"description": " | "type": "line", | ||
"example": " | "required": true | ||
}, | |||
"Creation Date": { | |||
"description": "Creation Date. Prefer Japanese YYYY-MM-DD", | |||
"example": "2024-01-01", | |||
"type": "date" | |||
}, | }, | ||
"description": { | "description": { | ||
"description": "Short description displayed inside the infobox", | |||
"description": " | "type": "string" | ||
"type": " | |||
}, | }, | ||
"add_category": { | "add_category": { | ||
"description": "Whether to add category tag with this template | "description": "Whether to add 'Telegram channel' category tag with this template", | ||
"type": "boolean", | "type": "boolean", | ||
"default": "true" | "default": "true" | ||
} | } | ||
} | }, | ||
"description": "Infobox for telegram channels. Will set provided image as page preview and put page into 'Telegram channel' category unless disabled." | |||
} | } | ||
</templatedata> | </templatedata></noinclude> | ||
</noinclude> |
Revision as of 23:17, 22 December 2024
text start
Infobox for telegram channels. Will set provided image as page preview and put page into 'Telegram channel' category unless disabled.
Parameter | Description | Type | Status | |
---|---|---|---|---|
title | title | Title shown at the top of the template. Defaults to page title. | Line | optional |
image | image | Image to be used in infobox. Will also be used in page preview. | File | suggested |
add_preview | add_preview | Whether to set infobox image as OpenGraph preview
| Boolean | optional |
username | username | Telegram username. Will also add link to the channel.
| Line | required |
Creation Date | Creation Date | Creation Date. Prefer Japanese YYYY-MM-DD
| Date | optional |
description | description | Short description displayed inside the infobox | String | optional |
add_category | add_category | Whether to add 'Telegram channel' category tag with this template
| Boolean | optional |