Template:Tweet

文档图示 模板文档[查看] [编辑] [历史] [清除缓存]
Example Twitter
@example

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dignissim, dolor vitae ullamcorper aliquet, velit mi sagittis metus.

2017-07-12[1]

此模板可以在条目中轻松展示相关的推文,并使用{{cite tweet}}自动生成引文。

使用此模板比加入推文的屏幕截图更好,因为该模板对屏幕阅读器具有亲和力

它是标准的引文模板的替代品,因为它以反映Twitter设计语言的方式,显示了有关推文的所有相关信息(发布日期,用户名,昵称等)。

全空白语法

{{tweet
|text =           [推文内容]
|name =        [显示在推文顶部的用户昵称]
|verified =       [可选:如果账号已被认证,则可在此参数填入任意值,此时用户名右侧会出现认证图标]
|username =       [用户名(不包括“@”符号)]
|date =         [基于格式手册修正的推文日期]
|ID =             [推文网址末尾的数字]
|replyto =        [可选:用户名推文正在回复]
|image =          [可选:与Twitter帐户关联的图像或标志]
|left =           [可选:任何值使推文对齐左侧]
|block =          [可选:任何值都将推文显示为block(上下的文本均不会浮动),覆盖left参数。]
|width =          [可选:自定义推文宽度]
|reference =      [可选: {{tweet}}会自动创建一个引用,但可以提供一个引用来代替。见第二个例子。]
|lang =         [可选:非中文的推文的语言代码]
|translation =   [可选: 若原始推文非中文時,該推文的中文翻譯]
}}

用法示例

{{tweet
| text =@WilliamShatner Good day, Captain. #ISS is in standard orbit and Commander Swanson has the conn. Hope you’re having a great weekend!
| name = NASA
| verified = yes
| username = NASA
| date = 2014年8月2日
| ID = 495719809695621121
|replyto=WilliamShatner
|image=NASA logo.svg
}}
NASA Twitter
@NASA

回复 @WilliamShatner

@WilliamShatner Good day, Captain. #ISS is in standard orbit and Commander Swanson has the conn. Hope you’re having a great weekend!

2014年8月2日[1]

{{tweet
|text=Despite the constant negative press covfefe
|name=Donald J. Trump
|verified = yes
|username=realDonaldTrump
|date=2017年5月30日
|ID=869766994899468288
|left=yes
|reference={{dummy reference}}
}}
Donald J. Trump Twitter
@realDonaldTrump

Despite the constant negative press covfefe

2017年5月30日[1]

{{tweet
|name=Donald J. Trump
|verified = yes
|username=realDonaldTrump
|date=2018年1月5日
|text=I authorized Zero access to White House (actually turned him down many times) for author of phony book! I never spoke to him for book. Full of lies, misrepresentations and sources that don't exist. Look at this guy's past and watch what happens to him and Sloppy Steve [Bannon]!
|reference=<ref name="zero">{{cite web |url=http://www.foxnews.com/politics/2018/01/05/trump-tweets-explosive-white-house-tell-all-full-lies.html |first=Ryan |last=Gaydos |title=Trump tweets explosive White House tell-all 'full of lies'|date=2018-01-05 |website=Fox News |accessdate=2018-01-05 |deadurl=no|archiveurl=https://web.archive.org/web/20180105122005/http://www.foxnews.com/politics/2018/01/05/trump-tweets-explosive-white-house-tell-all-full-lies.html |archivedate=2018-01-05 }}</ref>
|block=yes
}}
Donald J. Trump Twitter
@realDonaldTrump

I authorized Zero access to White House (actually turned him down many times) for author of phony book! I never spoke to him for book. Full of lies, misrepresentations and sources that don't exist. Look at this guy's past and watch what happens to him and Sloppy Steve [Bannon]!

2018年1月5日[2]

{{tweet
|text=Dubito, ergo cogito, ergo sum
|lang=la
|translation=我疑故我思 我思故我在
|username=descartes
|name=René Descartes
|ref=example
|date=1637
}}
René Descartes Twitter
@descartes

Dubito, ergo cogito, ergo sum


我疑故我思 我思故我在

1637[3]

模版数据

此模板可以在条目中轻松展示相关的推文,并使用"cite tweet"模板自动生成引文。 使用此模板比加入推文的屏幕截图更好,因为该模板对屏幕阅读器具有亲和力。 它是标准的引文模板的替代品,因为它以反映Twitter设计语言的方式,显示了有关推文的所有相关信息(发布日期,用户名,昵称等)。

模板参数[编辑模板数据]

参数描述类型状态
blockblock

任何值都将推文显示为block(上下的文本均不会浮动),覆盖left参数。

字符串可选
宽度width

自定义推文宽度

示例值
300px
字符串可选
leftleft

填入任何值都会使推文向左对齐

字符串可选
昵称name

显示在推文顶部的用户昵称

字符串必需
用户名username

用户的Twitter用户名。不要包含@符号。

未知必需
日期date

推文的日期

日期必需
文字text

推文内容

字符串必需
IDID id

推文的网址末尾的数字

数字推荐
参考文献reference ref

可以提供自定义来源来引用,而不是自动生成的来源

示例值
<ref>自定义来源</ref>
字符串可选
图像image

与该推特帐户关联的图像或标志

文件可选
回复replyto

该推文回复的用户名

字符串可选
语言lang language

原始推文的语言代码

示例值
ja
字符串可选
翻译translation

推文的中文翻译

未知可选
认证verified verify

如果账号已被认证,则可在此参数填入任意值,此时用户名右侧会出现认证图标

示例值
yes
字符串可选

注释

  1. ^ NASA [@NASA]. @WilliamShatner Good day, Captain. #ISS is in standard orbit and Commander Swanson has the conn. Hope you’re having a great weekend! (推文). 2014-08-02 –通过Twitter. 
  2. ^ Gaydos, Ryan. Trump tweets explosive White House tell-all 'full of lies'. Fox News. 2018-01-05 [2018-01-05]. (原始内容存档于2018-01-05). 
  3. ^ example