BB代码

广告位招租,站内联系站长,仅支持虚拟币支付,500U/月
  • [B],[I],[U],[S] - 粗体、斜体、下划线、中划线

    将标签内文字产生加粗、斜体、下划线、中划线效果
    示例:
    这是[B]粗体[/B]文字。
    这是[I]斜体[/I]文字。
    这是[U]下划线[/U]文字。
    这是[S]中划线[/S]文字。
    输出:
    这是粗体文字。
    这是斜体文字。
    这是下划线文字。
    这是中划线文字。
  • [COLOR=color],[FONT=name],[SIZE=size] - 文字颜色、字体、尺寸

    改变文字颜色、字体和大小。
    示例:
    这是[COLOR=red]红色[/COLOR] 和 [COLOR=#0000cc]蓝色[/COLOR] 文字。
    这是[FONT=Courier New]Courier New字体[/FONT]文字。
    这是[SIZE=1]小[/SIZE] 和 [SIZE=7]大[/SIZE]文字。
    输出:
    这是红色蓝色 文字。
    这是Courier New字体文字。
    这是文字。
  • [URL],[EMAIL] - 链接

    将标签内的文本内容作为链接地址。
    示例:
    [URL]http://www.xenforo.com[/URL]
    [EMAIL][email protected][/EMAIL]
    输出:
  • [URL=链接],[EMAIL=地址] - 链接 (高级)

    为文字添加网页和邮件地址连接。
    示例:
    [URL=http://www.xenforo.com]链接到 xenforo.com[/URL]
    [[email protected]]点此给我发邮件[/EMAIL]
    输出:
  • [USER=ID] - 链接至个人空间

    用户个人空间链接。当提到会员时自动插入此链接。
    示例:
    [USER=1]用户名[/USER]
    输出:
  • [IMG] - 图像

    显示图像,标签内为图像的链接地址。
    示例:
    [IMG]https://www.tear.cc/data/assets/logo/tear_logo.png[/IMG]
    输出:
    tear_logo.png
  • [MEDIA=site] - 嵌入式媒体

    嵌入可用视频站点的视频,推荐使用编辑器上的视频按钮来添加视频。
    可用的站点: Apple Music, Dailymotion, Facebook, Flickr, Giphy, Imgur, Instagram, Pinterest, Reddit, SoundCloud, Spotify, TikTok, Tumblr, Twitch, Twitter, Vimeo, YouTube
    示例:
    [MEDIA=youtube]kQ0Eo1UccEE[/MEDIA]
    输出:
    嵌入的 YouTube 播放器会显示在此处
  • [LIST] - 列表

    显示项目符号或编号列表。
    示例:
    [LIST]
    [*]Bullet 1
    [*]Bullet 2
    [/LIST]
    [LIST=1]
    [*]Entry 1
    [*]Entry 2
    [/LIST]
    输出:
    • Bullet 1
    • Bullet 2
    1. Entry 1
    2. Entry 2
  • [LEFT],[CENTER],[RIGHT] - 文字对齐

    改变文字对齐方式。
    示例:
    [LEFT]左对齐[/LEFT]
    [CENTER]居中对齐[/CENTER]
    [RIGHT]右对齐[/RIGHT]
    输出:
    左对齐​
    居中对齐​
    右对齐​
  • [QUOTE] - 引用文字

    显示由其它位置引用文字。您可以指定引用的属性。
    示例:
    [QUOTE]引用文字[/QUOTE]
    [QUOTE=某人]他说了一些什么事。[/QUOTE]
    输出:
    引用文字
    某人 说:
    他说了一些什么事。
  • [SPOILER] - 隐藏内容

    隐藏文本必须点击后查看。
    示例:
    [SPOILER]隐藏内容[/SPOILER]
    [SPOILER=隐藏标题]隐藏内容[/SPOILER]
    输出:
    隐藏内容
    隐藏内容
  • [ISPOILER] - 包含剧透的内联文本

    允许您在正常显示的内容中隐藏可能包含剧透的内嵌文本,并且必须由查看者单击才能看到。
    示例:
    您必须单击以下[ISPOILER]词语[/ISPOILER]才能看到内容。
    输出:
    您必须单击以下词语才能看到内容。
  • [CODE] - 显示源代码

    以程序源代码的方式显示文本,并可对其中的关键字进行高亮显示。
    示例:
    通用代码:
    [CODE]通用代码[/CODE]

    丰富代码:
    [CODE=rich][COLOR=red]丰富[/COLOR]
    代码[/CODE]

    PHP代码:
    [CODE=php]echo $hello . ' world';[/CODE]

    JS代码:
    [CODE=js]var hello = 'world';[/CODE]
    输出:
    通用代码:
    代码:
    通用代码

    丰富代码:
    丰富的(BB 代码):
    丰富
    代码

    PHP代码:
    PHP:
    echo $hello . ' world';

    JS代码:
    代码:
    var hello = 'world';
  • [ICODE] - 显示内联源代码

    允许在正常的贴子内容中内联显示代码。语法不会高亮显示。
    示例:
    内联代码段 [ICODE] 是一种显示内联代码的便捷方式[/ICODE]。
    内联代码段 [ICODE=rich] 中的丰富格式 [COLOR=red] 也[/COLOR] [U] 支持 [/U][/ICODE]。
    输出:
    内联代码段 是一种显示内联代码的便捷方式
    内联代码段 中的丰富格式 支持
  • [INDENT] - 文字缩进

    使文字产生缩进效果,可以嵌套使用。
    示例:
    正常文字
    [INDENT]缩进文字
    [INDENT]更多缩进[/INDENT]
    输出:
    正常文字
    缩进文字
    更多缩进​
  • [TABLE] - 表格

    用于在内容中显示表格的特殊标记。
    示例:
    [TABLE]
    [TR]
    [TH]标头 1[/TH]
    [TH]标头 2[/TH]
    [/TR]
    [TR]
    [TD]内容 1[/TD]
    [TD]内容 2[/TD]
    [/TR]
    [/TABLE]
    输出:
    标头 1标头 2
    内容 1内容 2
  • [HEADING=level] - 标题级别 1 到 3

    将文本标记为结构化标题以提高机器可读性
    示例:
    [HEADING=1]大标题[/HEADING]
    该文本位于一个主要标题下,用于分隔文章的主要部分。

    [HEADING=2]小标题[/HEADING]
    当您需要细分文章的主要部分时,请使用 2 级次要标题。

    [HEADING=3]副标题[/HEADING]
    如果你需要额外的细分,你可以降到第 3 级。
    输出:

    大标题​

    该文本位于一个主要标题下,用于分隔文章的主要部分。

    小标题​

    当您需要细分文章的主要部分时,请使用 2 级次要标题。

    副标题​

    如果你需要额外的细分,你可以降到第 3 级。
  • [PLAIN] - 原始文字

    行文本禁用BB代码转换。
    示例:
    [PLAIN]这是[B]粗体[/B]文字。[/PLAIN]
    输出:
    这是[B]粗体[/B]文字。
  • [ATTACH] - 插入附件

    插件附件至指定的位置。如果附件为图像,点击相应的按钮,可插入图片的缩略图或全尺寸图片。
    示例:
    缩略图: [ATTACH]123[/ATTACH]
    完整尺寸: [ATTACH=full]123[/ATTACH]
    输出:
    附件内容将显示在此处。
  • [CLUB] - For club members

    Information inside the code is displayed only to members of the club.
    示例:
    [CLUB]Hello World![/CLUB] - Hidden text for club members
    输出:
    - Hidden text for club members
  • [DAYS=option] - Number of days

    Number of days from the date of registration on the forum, which the user needs to be able to view
    示例:
    [DAYS=5]Hello World![/DAYS] - Only registered users who are registered not earlier than 5 days ago are displayed.
    输出:
    - Only registered users who are registered not earlier than 5 days ago are displayed.
  • [GROUPS=option] - For user groups

    The tag hides content from people who are not members of X,Y,Z usergroups.
    示例:
    [GROUPS=2]Hello World![/GROUPS] - Displayed only for group members with ID 2.
    输出:
    Content of this hidden block can only be seen by members of: Registered
    - Displayed only for group members with ID 2.
  • [HIDE] [HIDE=option] - For register only

    Tag [HIDE] is used for hidden content. If [HIDE=(condition)] is specified, the condition will be applied to the hidden content. Note: After the = sign, you must enclose the conditions in parentheses to indicate the start and end of condition processing. Inside, you can use any condition grouping.

    Allowed expressions (tags):

    • posts: Number of user posts.
    • likes: User reaction count.
    • reactions: User reaction count (same as likes).
    • trophies: Number of user trophies.
    • days: Number of days since user registration.
    • isMemberOf(id): User group, for multiple groups you can use comma-separated values.
    • username: User's username.
    • user_id: User's identifier.
    • user_state: User's state.
    • is_staff: Flag indicating whether the user is a staff member.
    • is_admin: Flag indicating whether the user is an administrator.
    • is_moderator: Flag indicating whether the user is a moderator.

    Allowed operators:

    • Arithmetic operators:
      Arithmetic operators are used for performing mathematical calculations:
      • +
      • -
      • *
      • /
      • % (modulus)
      • ** (exponentiation)
    • Comparison operators:
      Comparison operators are used for comparing values and returning a boolean result:
      • == (equal to)
      • === (strictly equal to)
      • != (not equal to)
      • !== (strictly not equal to)
      • < (less than)
      • > (greater than)
      • <= (less than or equal to)
      • >= (greater than or equal to)
    • Logical operators:
      Logical operators are used for performing logical operations and returning a boolean result:
      • and or && (logical AND)
      • or or || (logical OR)
      • not or ! (logical NOT)
    • Bitwise operators:
      Bitwise operators are performed on binary representations of numbers:
      • & (bitwise AND)
      • | (bitwise OR)
      • ^ (bitwise XOR)
    • String operators:
      The ~ operator is used for string concatenation:
      • ~ (string concatenation)
    • Array operators:
      Array operators are used for checking element membership in an array:
      • in (element present in array)
      • not in (element not present in array)
    • Numeric operators:
      The .. operator is used to create a range of numbers:
      • .. (number range)
    • Ternary operator:
      The ?: operator is used to perform conditional operations in a single line:
      • ?: (ternary operator)
    示例:
    [HIDE]Hello World![/HIDE] - only registered users see the hidden text
    [HIDE=(posts > 1 or likes > 1)]Hello world![/HIDE] - The hidden text "Hello world!" will be displayed if the number of user posts is greater than 1 OR the number of likes is greater than 1.
    [HIDE=(posts > 1 and likes > 1)]Hello world![/HIDE] - The hidden text "Hello world!" will be displayed if the number of user posts is greater than 1 AND the number of likes is greater than 1.
    [HIDE=(days > 1 or user_state == "valid")]Hello World![/HIDE] - The hidden text "Hello World!" will be displayed if the number of days since user registration is greater than 1 OR the user state is "valid".
    [HIDE=(isMemberOf(2) or trophies >= 0)]Hello World![/HIDE] - The hidden text "Hello World!" will be displayed if the user is a member of group 2 OR the number of user trophies is greater than or equal to 0.
    [HIDE=(is_staff)]Hello World![/HIDE] - The hidden text "Hello World!" will be displayed if the user is a staff member.
    输出:
    View hidden content is available for registered users!
    - only registered users see the hidden text
    message > 1 (0) or like > 1 (0)
    - The hidden text "Hello world!" will be displayed if the number of user posts is greater than 1 OR the number of likes is greater than 1.
    message > 1 (0) and like > 1 (0)
    - The hidden text "Hello world!" will be displayed if the number of user posts is greater than 1 AND the number of likes is greater than 1.
    day > 1 (0) or 用户状态 is "valid" (valid)
    Hello World!
    - The hidden text "Hello World!" will be displayed if the number of days since user registration is greater than 1 OR the user state is "valid".
    Member group(s): Registered or point >= 0 (0)
    Hello World!
    - The hidden text "Hello World!" will be displayed if the user is a member of group 2 OR the number of user trophies is greater than or equal to 0.
    管理成员
    - The hidden text "Hello World!" will be displayed if the user is a staff member.
  • [LIKES=option] - Number of likes

    Number of like on the forum, which the user needs to be able to view
    示例:
    [LIKES=5]Hello World![/LIKES] - Displayed only registered users whose number of reactions on the forum is greater than or equal to 5.
    输出:
    - Displayed only registered users whose number of reactions on the forum is greater than or equal to 5.
  • [POSTS=option] - Number of posts

    Number of posts on the forum, which the user needs to be able to view
    示例:
    [POSTS=5]Hello World![/POSTS] - Displays users who have 5 or more posts on the forum.
    输出:
    - Displays users who have 5 or more posts on the forum.
  • [REACTS=option] - By the reacts

    Hidden text for which you need to select a specific reaction
    示例:
    [REACTS=1]Hello World![/REACTS] - displayed for those who clicked the 'Like' reaction.
    输出:
    - displayed for those who clicked the 'Like' reaction.
  • [REPLY] - Answers the thread

    Hidden text until the user answers the thread.
    示例:
    [REPLY]Hello World![/REPLY] - Displayed to users when they reply to the thread.
    输出:
    - Displayed to users when they reply to the thread.
  • [REPLYANDTHANKS] - Answer and click Like

    Hidden text until the user responds to the thread and clicks Like on this message.
    示例:
    [REPLYANDTHANKS]Hello World![/REPLYANDTHANKS] - It is displayed to users when they reply to the thread and click "I like".
    输出:
    - It is displayed to users when they reply to the thread and click "I like".
  • [REPLYTHANKS] - Answer or click Like

    Hidden text until the user responds to the thread or clicks Like on this message.
    示例:
    [REPLYTHANKS]Hello World![/REPLYTHANKS] - It is displayed to users when they reply to the thread or click "I like".
    输出:
    - It is displayed to users when they reply to the thread or click "I like".
  • [THANKS] - Click "Like"

    This tag hides the text until the user clicks the Like button in the message.
    示例:
    [THANKS]Hello World![/THANKS] - This tag hides the text until the user clicks the Like button in the message.
    输出:
    - This tag hides the text until the user clicks the <b>Like button</b> in the message.
  • [TROPHIES=option] - Number of trophies

    Number of trophies on the forum, which the user needs to be able to view
    示例:
    [TROPHIES=5]Hello World![/TROPHIES] - It is displayed only to registered users, the number of points for trophies on the forum which is greater than or equal to 5.
    输出:
    - It is displayed only to registered users, the number of points for trophies on the forum which is greater than or equal to 5.
  • [USERS=option] - For users

    Hides the text from users, except for the parameters listed in the list of BB-code.
    示例:
    [USERS=Alex,John,Bryan]Hello World![/USERS] - Displayed only by user Alex, John, Bryan.
    输出:
    Hidden text for users:
    - Displayed only by user Alex, John, Bryan.
  • [USERSEXC=option] - Exclude users

    Hides the text from users that are listed in the list of parameters of the BB-code.
    示例:
    [USERSEXC=Alex,John,Bryan]Hello World![/USERSEXC] - Displayed to all users except Alex, John, Bryan.
    输出:
    - Displayed to all users except Alex, John, Bryan.
  • [USERSID=option] - Users by id

    Hides the text from users by id, except for the parameters listed in the list of BB-code.
    示例:
    [USERIDS=1,2,3]Hello World![/USERIDS] - Appears only for users with ids 1, 2, 3.
    输出:
    [USERIDS=1,2,3]Hello World![/USERIDS] - Appears only for users with ids 1, 2, 3.
  • [USERSIDEXC=option] - Exclude users by id

    Hides the text from users by id that are listed in the list of parameters of the BB-code.
    示例:
    [USERSIDEXC=1,2,3]Hello World![/USERSIDEXC] - Appears only for all users except with ids 1, 2, 3.
    输出:
    - Appears only for all users except with ids 1, 2, 3.
后退
顶部