1. For prospective new members, a word of warning: don't use common names like Dennis, Simon, or Kenny if you decide to create an account. Spammers have used them all before you and gotten those names flagged in the anti-spam databases. Your account registration will be rejected because of it.
    Dismiss Notice
  2. Since it has happened MULTIPLE times now, I want to be very clear about this. You do not get to abandon an account and create a new one. You do not get to pass an account to someone else and create a new one. If you do so anyway, you will be banned for creating sockpuppets.
    Dismiss Notice
  3. If you wish to change your username, please ask via conversation to tehelgee instead of asking via my profile. I'd like to not clutter it up with such requests.
    Dismiss Notice
  4. Due to the actions of particularly persistent spammers and trolls, we will be banning disposable email addresses from today onward.
    Dismiss Notice

BB-Code

Discussion in 'General' started by tehelgee, Nov 27, 2014.

  1. tehelgee

    tehelgee The stern gaze of justice. Administrator

    Joined:
    Feb 12, 2013
    Messages:
    2,675
    Likes Received:
    9,969
    In this thread, I will show off new BB-code as we get it.

    TABS

    Code:
    [tabs]
    	[tab=Title 1]Content 1[/tab]
    	[tab=Title 2]Content 2[/tab]
    [/tabs]
    
    • Content 1
    • Content 2





    Tables
    Code:
    [xtable]
    	{tbody}
    		{tr}
    			{td} {/td}
    			{td} {/td}
    		{/tr}
    		{tr}
    			{td} {/td}
    			{td} {/td}
    		{/tr}
    	{/tbody}
    [/xtable]
    
      
      
    For tables, it is much more user-friendly to use Table button in the rich text editor. Unless you're a coder, I guess.




    Horizontal Rule
    Code:
    [hr][/hr]
    



    The line above is the bb-code in action. What can be placed inside, I don't know.




    Latex
    Code:
    [LATEX] c=\sqrt{a^2+b^2} [/LATEX]
    





    Highlighter

    Code:
    [hl]Bleh.[/hl] [hl=green]Bleh.[/hl] [hl=blue]Bleh.[/hl] [hl=orange]Bleh.[/hl]
    
    Bleh. Bleh. Bleh. Bleh.




    Accordion

    Code:
    [accordion=]
    {slide=Lorem ipsum|right}Lorem ipsum dolor sit amet, consectetur adipiscing elit.{/slide}
    {slide=Morbi vitae|center|open}Morbi vitae turpis hendrerit, bibendum ante vel, sodales lorem.{/slide}
    [/accordion]
    
    Lorem ipsum
    Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    Morbi vitae
    Morbi vitae turpis hendrerit, bibendum ante vel, sodales lorem.





    As more code gets added, I will edit this post to display them in code and in use.
     
    Last edited: Dec 6, 2014
    Ddmkm122, Valette-Serafina and Arkeus like this.
  2. The Shadowmind

    The Shadowmind Well worn.

    Joined:
    May 29, 2014
    Messages:
    5,648
    Likes Received:
    25,881
    Ddmkm122 likes this.
  3. a2znut

    a2znut Needs more handholding. [Forever DM]

    Joined:
    Nov 12, 2013
    Messages:
    4,078
    Likes Received:
    4,380
    Test to see if roll is online yet.
    Vanathor rolled 1 die of 100 faces, total: 57+9000 = 9057
    For: GREAT JUSTICE
    Rolled on: December-14-2014, 09:54pm
    57
     
    Ddmkm122 likes this.
  4. Xicree

    Xicree Destroy and Rejoice!

    Joined:
    Jun 1, 2013
    Messages:
    19,696
    Likes Received:
    29,437
    ... Not sure I trust this roller...

    Vanathor rolled 1 die of 100 faces, total: 57+9000 = 9057
    For: GREAT JUSTICE
    Rolled on: December-14-2014, 09:54pm
    57



    Vanathor rolled 1 die of 100 faces, total: 57+9000 = 9057
    For: GREAT JUSTICE
    Rolled on: December-14-2014, 09:54pm
    57
     
    Ddmkm122 likes this.
  5. tehelgee

    tehelgee The stern gaze of justice. Administrator

    Joined:
    Feb 12, 2013
    Messages:
    2,675
    Likes Received:
    9,969
    It doesn't do equations. It's a flat dice roller without modifications. 2d20 will roll 2 twenty-sided dice and tell you what each are, it won't add them.
     
    Ddmkm122 likes this.
  6. Dinya

    Dinya Know what you're doing yet?

    Joined:
    Feb 19, 2013
    Messages:
    156
    Likes Received:
    123
    I remember that the original SV dice roller has had the issue of using the simple and biased rand() function. (Link.)

    Have we managed to avoid this problem?
     
    Ddmkm122 likes this.
  7. abyssmal_kismet

    abyssmal_kismet Experienced.

    Joined:
    Aug 17, 2014
    Messages:
    3,389
    Likes Received:
    3,626
    test to figure out how to work the new dice-roller:
    Vanathor rolled 1 die of 100 faces, total: 57+9000 = 9057
    For: GREAT JUSTICE
    Rolled on: December-14-2014, 09:54pm
    57
     
    Ddmkm122 likes this.
  8. tehelgee

    tehelgee The stern gaze of justice. Administrator

    Joined:
    Feb 12, 2013
    Messages:
    2,675
    Likes Received:
    9,969
    Dunno. I didn't create it, I just found it and installed it.
     
    Ddmkm122 likes this.
  9. Dinya

    Dinya Know what you're doing yet?

    Joined:
    Feb 19, 2013
    Messages:
    156
    Likes Received:
    123
    Well, if there is a source code you can read it. (Or just post a link to where you found it and I can do it.)

    If there's not, we can read the description and/or ask the author. (Again, post the link.)
     
    Ddmkm122 and Valette-Serafina like this.
  10. a2znut

    a2znut Needs more handholding. [Forever DM]

    Joined:
    Nov 12, 2013
    Messages:
    4,078
    Likes Received:
    4,380
    [roll]1d20[/roll]
     
    Ddmkm122 likes this.
  11. Vanathor

    Vanathor 『Back In Black』

    Joined:
    Feb 19, 2013
    Messages:
    5,519
    Likes Received:
    9,036
    disregard
     
    Ddmkm122 likes this.
  12. Vanathor

    Vanathor 『Back In Black』

    Joined:
    Feb 19, 2013
    Messages:
    5,519
    Likes Received:
    9,036
    [ tab]
    {slide=title 1} Stuff{/slide}
    {slide=title 2} Stuff{/slide}

    [ /tab]
     
    Ddmkm122 likes this.
  13. alethiophile

    alethiophile Shadowed Philosopher Administrator

    Joined:
    Apr 26, 2013
    Messages:
    4,294
    Likes Received:
    19,364
    Testing, one:


    • {slide=First}
      Testing the first!
      {/slide}
      {slide=Second}

      • {slide=Sub-text!}
        Now with
        {/slide}
        {slide=Text!}
        recursion!
        {/slide}

      {/slide}
     
    Ddmkm122 likes this.
  14. Vanathor

    Vanathor 『Back In Black』

    Joined:
    Feb 19, 2013
    Messages:
    5,519
    Likes Received:
    9,036
    Ddmkm122 likes this.
  15. Vanathor

    Vanathor 『Back In Black』

    Joined:
    Feb 19, 2013
    Messages:
    5,519
    Likes Received:
    9,036
    This is a Table
    Yes No
    ΔB
    C D
    E F


    And hr tags.

    Yay line breaks.
     
  16. alethiophile

    alethiophile Shadowed Philosopher Administrator

    Joined:
    Apr 26, 2013
    Messages:
    4,294
    Likes Received:
    19,364
    For the math geeks among us, there is also this:
     
    Ddmkm122 and Walkir like this.
  17. Vanathor

    Vanathor 『Back In Black』

    Joined:
    Feb 19, 2013
    Messages:
    5,519
    Likes Received:
    9,036
    My name is Vanathor. If this tag works I am awesome.



    It totally worked. I am awesome.
     
    Ddmkm122 and Least Devotee like this.
  18. tehelgee

    tehelgee The stern gaze of justice. Administrator

    Joined:
    Feb 12, 2013
    Messages:
    2,675
    Likes Received:
    9,969
    Code:
    [tabs]
    	[tab=The First]
    		[xtable=skin1|bcenter]
    			{tbody}
    				{tr}
    					{td}1{/td}
    					{td}2{/td}
    					{td}3{/td}
    					{td}4{/td}
    				{/tr}
    				{tr}
    					{td}5{/td}
    					{td}6{/td}
    					{td}7{/td}
    					{td}8{/td}
    				{/tr}
    			{/tbody}
    		[/xtable]
    	[/tab]
    	[tab=The Second]
    		[tabs]
    			[tab=The Second First]
    				[xtable=skin1|bright]
    					{tbody}
    						{tr}
    							{td}1{/td}
    							{td}2{/td}
    						{/tr}
    						{tr}
    							{td}3{/td}
    							{td}4{/td}
    						{/tr}
    						{tr}
    							{td}5{/td}
    							{td}6{/td}
    						{/tr}
    					{/tbody}
    				[/xtable]
    			[/tab]
    		[/tabs]
    	[/tab]
    [/tabs]
    


    So, tables can be put into tabs.

    Praise be unto alethiophile!
     
  19. tehelgee

    tehelgee The stern gaze of justice. Administrator

    Joined:
    Feb 12, 2013
    Messages:
    2,675
    Likes Received:
    9,969
    Can you put tabs into tables?





    • Possible?

    • Possible?








    • Possible?

    • Possible?








    • Possible?

    • Possible?








    • Possible?

    • Possible?




    Looks kinda ugly, but you can.
     
    Ddmkm122 and Valette-Serafina like this.
  20. tehelgee

    tehelgee The stern gaze of justice. Administrator

    Joined:
    Feb 12, 2013
    Messages:
    2,675
    Likes Received:
    9,969
    Added the highlighter and accordion BB Codes to the op.
     
    Ddmkm122 and Valette-Serafina like this.
  21. alethiophile

    alethiophile Shadowed Philosopher Administrator

    Joined:
    Apr 26, 2013
    Messages:
    4,294
    Likes Received:
    19,364
    There now exist superscript and subscript. Also in the RTE.
     
    Last edited: Dec 10, 2014
    Ddmkm122, Least Devotee and Walkir like this.
  22. alethiophile

    alethiophile Shadowed Philosopher Administrator

    Joined:
    Apr 26, 2013
    Messages:
    4,294
    Likes Received:
    19,364
    Size tests: small, large, in pixels (twice), [size=5pt]in points[/size].

    size size size size size size size size size size size size
     
    Last edited: Dec 11, 2014
    Ddmkm122 likes this.
  23. alethiophile

    alethiophile Shadowed Philosopher Administrator

    Joined:
    Apr 26, 2013
    Messages:
    4,294
    Likes Received:
    19,364
    There now exist abbreviations.
     
    Last edited: Dec 11, 2014
    Ddmkm122 likes this.
  24. tehelgee

    tehelgee The stern gaze of justice. Administrator

    Joined:
    Feb 12, 2013
    Messages:
    2,675
    Likes Received:
    9,969
    That BB code seems, well, backwards. Why put the long bit inside the brackets?

    Code:
     
    Instead of this: [abbr=expanded]abbreviations[/abbr].
     
    We'd use this: [abbr=abbreviations]expanded[/abbr].
     
    
    Think it'd be possible to flip it around?
     
    Ddmkm122 likes this.
  25. alethiophile

    alethiophile Shadowed Philosopher Administrator

    Joined:
    Apr 26, 2013
    Messages:
    4,294
    Likes Received:
    19,364
    The current orientation is true to the way it works in the underlying HTML, and also to how it worked on SMF. Since the purpose of the new tag is to make old posts look better, maintaining the SMF syntax is indicated.
     
    Ddmkm122 likes this.
  26. alethiophile

    alethiophile Shadowed Philosopher Administrator

    Joined:
    Apr 26, 2013
    Messages:
    4,294
    Likes Received:
    19,364
    Okay, it's not actually a BB code, but here's a new feature anyway: dice rolling.

    Click the 'roll dice' button next to 'reply' on one of your own posts. The result will be echoed in the post itself, and also on the master list here (to avoid cheating).

    alethiophile rolled 5 die of 6 faces, total: 13
    For: Test
    Rolled on: December-14-2014, 09:55pm
    1
    1
    5
    1
    5
     
  27. Vanathor

    Vanathor 『Back In Black』

    Joined:
    Feb 19, 2013
    Messages:
    5,519
    Likes Received:
    9,036
    DICE
    Vanathor rolled 1 die of 100 faces, total: 88
    For: AWESOME
    Rolled on: December-14-2014, 09:55pm
    88

    Vanathor rolled 1 die of 100 faces, total: 87
    For: Another test
    Rolled on: December-14-2014, 10:02pm
    87
     
    Last edited: Dec 14, 2014
    Ddmkm122 likes this.
  28. Valette-Serafina

    Valette-Serafina Shameless Shadow

    Joined:
    Feb 16, 2014
    Messages:
    4,704
    Likes Received:
    24,330
    Okay, so you have to make a post first...
    Valette-Serafina rolled 10 die of 10 faces, total: 69
    For: Testing
    Rolled on: December-14-2014, 10:18pm
    6
    5
    4
    7
    10
    3
    10
    10
    7
    7


    And it's limited to d100.
     
    Ddmkm122 likes this.
  29. alethiophile

    alethiophile Shadowed Philosopher Administrator

    Joined:
    Apr 26, 2013
    Messages:
    4,294
    Likes Received:
    19,364
    The max faces is configurable, if people really want higher than D100 for some reason.

    The max dice per roll I'm leaving at 10, just because otherwise it'll start overflowing screens.
     
    Ddmkm122 likes this.
  30. Vanathor

    Vanathor 『Back In Black』

    Joined:
    Feb 19, 2013
    Messages:
    5,519
    Likes Received:
    9,036
    You should be able to adjust the size of the dice with CSS. See if you can scale it down some.
     
    Ddmkm122 likes this.