Template:Tgchannel: Difference between revisions

From <3 wiki
No edit summary
Tag: 2017 source edit
update template to v2 version using metatemplate
Tag: 2017 source edit
Line 1: Line 1:
<includeonly><templatestyles src="Tgchannel/styles.css" />
<includeonly>{{Infobox
<div class="infobox">
|title={{{title|}}}
<div class="infobox-title">{{{title|{{PAGENAME}}}}}</div><center>Telegram channel</center>{{#if:{{{image|}}}|
|subtitle=Telegram channel
<div class="infobox-image">
|image={{{image|}}}
{{#ifeq:{{{add_preview|true}}}|true|
|add_preview={{{add_preview|}}}
<!--then -->[[File:{{#setmainimage:{{{image}}}}}|300px]]
|infobox_items=<tr>
|<!--else -->[[File:{{{image}}}|300px]]}}</div>}}
<table class="infobox-table">
<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
</table>
|add_category={{{add_category|}}}}}</includeonly><noinclude>
</div>{{#ifeq: {{{add_category|true}}}|true|[[Category:Telegram channel]]}}</includeonly>
{{TgchannelV2
<noinclude>
| title = title
{{Tgchannel
| image = Lt three icon.jpg
|image=Moeka-love.jpg
| username = lt_three
|username=username
| description = Multiline
|description=your description
description
|Creation Date=2024-01-01
| Creation Date = 2023-03-11
|add_category=false
| add_category = false
}}
}}
<templatedata>{
text start
"description": "Infobox for telegram channel",
<templatedata>
"format": "block",
{
"params": {
"params": {
"title": {
"title": {
"label": "Title",
"description": "Title shown at the top of the template. Defaults to page title.",
"type": "line",
"type": "line"
"required": false,
"description": "Title shown at the top of the template. Defaults to page title"
},
},
"image": {
"image": {
"label": "Image",
"description": "Image to be used in infobox. Will also be used in page preview.",
"type": "wiki-file-name",
"type": "wiki-file-name",
"required": false,
"suggested": true
"suggested": true,
},
"description": "Image to be used in infobox. Will also be used in page preview."
"add_preview": {
"description": "Whether to set infobox image as OpenGraph preview",
"type": "boolean",
"default": "true"
},
},
"username": {
"username": {
"label": "Username",
"description": "Telegram username. Will also add link to the channel.",
"required": true,
"example": "lt_three",
"description": "telegram username",
"type": "line",
"example": "lt_three"
"required": true
},
"Creation Date": {
"description": "Creation Date. Prefer Japanese YYYY-MM-DD",
"example": "2024-01-01",
"type": "date"
},
},
"description": {
"description": {
"label": "Description",
"description": "Short description displayed inside the infobox",
"description": "short description displayed inside the infobox",
"type": "string"
"type": "content",
"suggested": true
},
"Creation Date": {
"label": "Creation Date",
"type": "line"
},
},
"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",
"default": "true"
},
"add_preview": {
"description": "Whether to set infobox image as OpenGraph preview",
"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

title
Telegram channel
Username lt_three
Creation Date 2023-03-11
Description Multiline description

text start

Infobox for telegram channels. Will set provided image as page preview and put page into 'Telegram channel' category unless disabled.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
titletitle

Title shown at the top of the template. Defaults to page title.

Lineoptional
imageimage

Image to be used in infobox. Will also be used in page preview.

Filesuggested
add_previewadd_preview

Whether to set infobox image as OpenGraph preview

Default
true
Booleanoptional
usernameusername

Telegram username. Will also add link to the channel.

Example
lt_three
Linerequired
Creation DateCreation Date

Creation Date. Prefer Japanese YYYY-MM-DD

Example
2024-01-01
Dateoptional
descriptiondescription

Short description displayed inside the infobox

Stringoptional
add_categoryadd_category

Whether to add 'Telegram channel' category tag with this template

Default
true
Booleanoptional