YesNoOk
avatar

New BBCode tags (Read 2721 times)

Started by Nightwish, October 04, 2011, 18:28:09

0 Members and 1 Guest are viewing this.
Share this topic:
#1
New BBCode tags |
October 04, 2011, 18:28:09
Some tests for new BBCodes.

1. Spoiler tag
Simple tag to hide text that should not be visible instantly. Typically used when a piece of text may "spoil" a reader's experience with the topic that is discussed in the thread (for example, movie or book reviews).

Spoiler tags can NOT be used to really hide content. Everyone who has permission to view the topic can open the spoiler and see its content, so this is not a real hide tag. Hide tags, that are permission based and allow text fragments to be hidden based on the viewer's permissions will be implemented later.

Spoiler, click to toggle visibilty
2. Hide tag
Hide BBCodes can be used to really hide content from viewers without sufficient permissions. Right now, there are 3 levels for hidden content and the visibility is controlled by a couple of new board permissions. The hide tags are implemented with the new stage 2 bbc parser, so they are compatible with the parsed content caching system (stage2 bb codes are never cached).

The messages that appear to viewers who cannot see the hidden content are customizable via the admin panel or language packs.

  Level 1 hidden content

  Level 2 hidden content
Hidden content (you have insufficient permission to view)


3. Header tags

Header level 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam purus quam, rutrum eget rhoncus sed, tristique at arcu. Integer ultrices, orci a aliquam ornare, mi nisl egestas justo, nec faucibus massa odio et risus. Curabitur dolor massa, congue nec congue porta, hendrerit vehicula erat. Curabitur mattis convallis sagittis. Aliquam egestas risus non justo sodales quis molestie leo pharetra. Phasellus vel risus lacus. Aliquam sodales luctus vulputate. Phasellus purus urna, aliquam ac commodo et, interdum dapibus mauris. Phasellus et leo lorem. Duis luctus hendrerit magna eget consequat.

Header level 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam purus quam, rutrum eget rhoncus sed, tristique at arcu. Integer ultrices, orci a aliquam ornare...

Header level 3
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam purus quam, rutrum eget rhoncus sed, tristique at arcu. Integer ultrices, orci a aliquam ornare...

Header level 4
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam purus quam, rutrum eget rhoncus sed, tristique at arcu. Integer ultrices, orci a aliquam ornare

Column layout and generic CSS styled paragraphs

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam nulla erat, dictum et tincidunt sit amet, venenatis non nunc. Donec aliquet auctor justo, nec sodales sem hendrerit in. Nullam nec quam augue, vel rhoncus urna. Curabitur vitae urna erat, quis aliquam tellus. Morbi vehicula lacus auctor diam scelerisque vel congue diam venenatis. Curabitur sit amet orci ante. Suspendisse posuere lacinia enim in egestas. Nunc quis libero nulla. Mauris ut enim et odio sagittis viverra a vel tortor. Ut a nunc elit. Ut ut erat urna. Sed sagittis nisl et nisi pharetra faucibus dapibus lorem tincidunt. Mauris non condimentum orci. Praesent ligula nisl, vehicula fringilla pretium non, molestie in lectus. Etiam tincidunt mauris sit amet nulla elementum eget rhoncus sapien rutrum. Nulla tempus, libero nec bibendum consequat, augue nunc commodo risus, in ultrices felis neque quis dolor.

[css=bbc_dropcaps]Praesent fringilla cursus aliquet. Vivamus sagittis felis eu tellus ornare iaculis. Maecenas molestie faucibus sapien sit amet condimentum. Donec nec lectus vitae lectus gravida ultrices. Etiam ac erat eu odio fermentum ornare ac vitae est. Nam a quam ac purus tincidunt rutrum. In ac velit quis tellus interdum commodo id eget massa.[/css]

Praesent bibendum lectus eu diam tincidunt et lacinia tellus facilisis. Donec sit amet mi turpis. Donec fermentum tincidunt nibh sit amet rhoncus. Suspendisse ut ipsum eros. Donec placerat, orci eu tempor hendrerit, ipsum elit dictum dui, ac iaculis orci tortor at risus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aliquam risus metus, mattis at tempor vitae, auctor posuere metus. Etiam lobortis varius libero, eu interdum sem egestas eget. Etiam eu tristique lectus. Morbi id arcu lacus. Phasellus elit mi, fringilla non euismod sit amet, interdum non leo. Quisque non porta sem. In erat tortor, feugiat at vulputate ut, facilisis vel erat. Ut quam mauris, commodo sed semper rutrum, molestie ac dolor. Proin ullamcorper mauris sit amet lacus lacinia eu pharetra nulla facilisis.
[/columns]

[columns=N]Your text[/columns] - Format the text with N columns, applying bbc_columns CSS class. Note that it needs a modern browser with CSS column-count support. Works on Firefox, Opera, Chrome, Safari
[class=foo]Your text[/class] - Format a paragraph with CSS class "foo". Useful for advanced typography like dropcaps.
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
5 Like It 
Last Edit: October 26, 2011, 03:26:23 by Nightwish
New #2
Re: New BBCode tags |
August 04, 2012, 09:20:18
Test spoiler tags with parameters

Format:
[spoiler=title]content[/spoiler]
Spoiler: This is the title (click to see content)
Format of the title can be changed by modifying $txt['spoiler_intro'] in index.english.php. It has to be a valid printf()-style formatting string.
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
3 Like It  | 2 Thank You 
Last Edit: August 07, 2012, 10:37:44 by Nightwish