• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Add [STYLE], [TEXT] and [MACRO] Tag

Status
Not open for further replies.
Level 7
Joined
Apr 30, 2011
Messages
359
[STYLE] = a block of simple tags.

Format: [STYLE=<NAME>][/STYLE] and [<NAME>][/<NAME>]

Acts as an additional BBCode that applies all tags inside it to the text between [<NAME>] and [/<NAME>]. The tags are applied in the same order as it is declared inside [STYLE=<NAME>] and [/STYLE] blocks, and closed in opposite order. This works inside the whole post.

Doesn't Supports:
  • [LIST]
  • [/b]
    [*][b][HTML][/b]
    [*][b][PHP][/b]
    [*][b][TRIGGER][/b]
    [*][b][code=jass][/b]
    [*][b][icode=jass][/b]
    [*][b][ATTACH][/b]
    [*][b][POINT][/b]
    [*][b][HR][/b]
    [*][b][YOUTUBE][/b][/list]

    [b]Supports with Limited Abilities:[/b]
    [list][*][b][table][/b]
    [*][b][stable][/b]
    [*][b][TABLE][/b]
    [*][b][INVTABLE][/b][/list]
    They can only be used once, like: [b][TABLE][TD][/b], which will be: [b][plain][TABLE][TD]<TEXT>[/TD][/TABLE][/plain][/b]

    [code][plain]
    [STYLE=WEIRD]
    [FONT=Arial]
    [SIZE=3]
    [COLOR=#FF00FF]
    [B][I][U][S]
    [/STYLE]
    [STYLE=SUB_TEXT]
    [SIZE=1]
    [COLOR=#0000FF]
    [SUB]
    [/STYLE]
    [STYLE=SUP_TEXT]
    [SIZE=1]
    [COLOR=#FF0000]
    [SUP]
    [/STYLE]
    [WEIRD]This is a weird [SUB_TEXT]subscript[/SUB_TEXT] and [SUP_TEXT]superscript[SUP_TEXT] text.[/WEIRD]
    [/plain][/code]

    [indent][b]Output:[/b][/indent]

    [quote][FONT=Arial][SIZE=3][COLOR=#FF00FF][B][I][U][S]This is a weird [SIZE=1][COLOR=#0000FF][SUB]subscript[/SUB][/COLOR][/SIZE] and [SIZE=1][COLOR=#FF0000][SUP]superscript[/SUP][/COLOR][/SIZE] text.[/S][/U][/I][/B][/COLOR][/SIZE][/FONT][/quote]

    [indent][b]Code:[/b][/indent]

    [code][plain]
    [FONT=Arial][SIZE=3][COLOR=#FF00FF][B][I][U][S]This is a weird [SIZE=1][COLOR=#0000FF][SUB]subscript[/SUB][/COLOR][/SIZE] and [SIZE=1][COLOR=#FF0000][SUP]superscript[/SUP][/COLOR][/SIZE] text.[/S][/U][/I][/B][/COLOR][/SIZE][/FONT]
    [/plain][/code]


    [size=3][b][TEXT][/b] = [i]a block of text.[/i][/size]

    [b]Format: [TEXT=<NAME>][/TEXT][/b] and [b][<NAME>/][/b]

    Works like a variable for any texts. This tag will save any texts within [b][TEXT=<NAME>][/b] and [b][/TEXT][/b]. This tag will delete all page breaks and spaces before the first character in the text and after the last character in it. Allows the use of BBCodes inside it. Note that the text in the tag will be invisible, to make it visible, you must write something like this [b][<NAME>/][/b].

    [code][plain]
    [TEXT=TEXT1]

    This is TEXT1

    [/TEXT]
    [TEXT=TEXT2]


    This is TEXT2


    [/TEXT]
    [TEXT=TEXT3]



    This is TEXT3



    [/TEXT]
    [TEXT1/]
    [TEXT2/]
    [TEXT3/]
    [TEXT1/] and [TEXT2/]
    [TEXT1/], [TEXT2/], and [TEXT3/]
    [/plain][/code]

    [indent][b]Output:[/b][/indent]

    [quote]This is TEXT1
    This is TEXT2
    This is TEXT3
    This is TEXT1 and This is TEXT2
    This is TEXT1, This is TEXT2, and This is TEXT3[/quote]

    [indent][b]Code:[/b][/indent]

    [code][plain]
    This is TEXT1
    This is TEXT2
    This is TEXT3
    This is TEXT1 and This is TEXT2
    This is TEXT1, This is TEXT2, and This is TEXT3
    [/plain][/code]


    [size=3][b][MACRO][/b] = [i]a block of text that can take additional texts.[/i][/size]

    [b]Format: [MACRO=<NAME>, <T_NAME1>, <T_NAME2>, <T_NAME3>, . . . ][<T_NAME1>/][<T_NAME2>/][<T_NAME3>/][/MACRO][/b] and
    [b][<NAME>][<T_NAME1>][/<T_NAME1>][<T_NAME2>][/<T_NAME2>][<T_NAME3>][/<T_NAME3>] . . . [/<NAME>][/b]

    Works like [b][TEXT][/b], but with additional feature, adding external texts. This tag will save any texts within [b][MACRO=<NAME>, . . . ][/b] and [b][/MACRO][/b]. This tag will delete all page breaks and spaces before the first character in the text and after the last character in it. Allows the use of BBCodes inside it. Note that the text in the tag will be invisible, to make it visible, you must write something like this [b][<NAME>] . . . [/<NAME>][/b] (see above).
    For more information about those additional texts, please see this example.
    And note that all commas and spaces are separators between [b]<NAME>[/b]s.

    [code][plain]
    [MACRO=PERSON, NAME, AGE, HEIGHT, WEIGHT]
    Name: [NAME/]
    Age: [AGE/]
    Height: [HEIGHT/] cm
    Weight: [WEIGHT/] kg
    [/MACRO]
    [PERSON]
    [NAME]John Connor[/NAME]
    [AGE]14[/AGE]
    [HEIGHT]145[/HEIGHT]
    [WEIGHT]30[/WEIGHT]
    [/PERSON]

    [PERSON]
    [NAME]Marie Connor[/NAME]
    [AGE]13[/AGE]
    [HEIGHT]120[/HEIGHT]
    [WEIGHT]29[/WEIGHT]
    [/PERSON]

    [PERSON]
    [NAME]David Connor[/NAME]
    [AGE]10[/AGE]
    [HEIGHT]115[/HEIGHT]
    [WEIGHT]24[/WEIGHT]
    [/PERSON]
    [/plain][/code]

    [indent][b]Output:[/b][/indent]

    [quote]Name: John Connor
    Age: 14
    Height: 145 cm
    Weight: 30 kg

    Name: Marie Connor
    Age: 13
    Height: 120 cm
    Weight: 29 kg

    Name: David Connor
    Age: 10
    Height: 115 cm
    Weight: 24 kg[/quote]

    [indent][b]Code:[/b][/indent]

    [code][plain]
    Name: John Connor
    Age: 14
    Height: 145 cm
    Weight: 30 kg

    Name: Marie Connor
    Age: 13
    Height: 120 cm
    Weight: 29 kg

    Name: David Connor
    Age: 10
    Height: 115 cm
    Weight: 24 kg
    [/plain][/code]


    [size=3][b][BBCODE][/b] = [i]acts the same as <body> in HTML.[/i][/size]

    [b]Format: [BBCODE][/BBCODE][/b]
    [b]Additional Tags: [LB/][/b]

    Acts the same as <body> tags in HTML codes, this removes all line-breaks and spaces before the first character it found (other than spaces and line-breaks), and after the last character it found between between [b][<NAME>][/b] and [b][/<NAME>][/b]. It also replaces all line-breaks and multiple spaces to single space after the previous deletion. To add line-breaks use [b][LB/][/b].

    That's all. Thanks for viewing :D
 
Last edited:
Level 7
Joined
Apr 30, 2011
Messages
359
well . . . .
i'm just sick seeing those so many
, [td], stuffs in my thread template (only a template)
then how i won't get sicker on the real threads?

this is a replace for HTML codes, since . . . they're venomous in bad guys' hands D:

please implement that [MACRO] tag, since those above it is just a simpler versions of it
but those ones above are needed in some ways . . .

EDIT:

please make every BBCodes delete all spaces and page breaks before the first character it found, and after the last character it found (like that [TEXT] ), so it supports stuffs like this:

[LIST] [*] List 1
[*] List 2
[*] List 3

[/LIST]

without making any page breaks between
  • and the first [*], it makes the whole codes looks really much more readable . .

    and i just found a bug that [tr] and their cousins can't be written as [TR], BBCodes should not be case sensitive, except for [STYLE]s, [TEXT]s, and [MACRO]s which must be case sensitive (for those generated tags (<NAME>), not for their own tags) . . .

    EDIT:

    added [BBCODE] and [LB/] to make them more . . . HTML-like :)
 
Last edited:
Status
Not open for further replies.
Top