-
Notifications
You must be signed in to change notification settings - Fork 0
Structure of a bbcode
Visman edited this page Jan 6, 2021
·
6 revisions
Each bb-code is declared by means of an array. / Каждый bb-код объявляется с помощью массива.
It is a lot of examples: / Много примеров: bbcodes_test.php
- 'tag' =>
string,required
BB-code name. / Имя bb-кода.
Name format:^[a-z\*][a-z\d-]{0,10}$
- 'type' =>
string
BB-code type. / Тип bb-кода.inlineby default. / По умолчаниюinline.
- 'parents' =>
array
Types of a parent bb-code. / Типы родительского bb-кода.['inline', 'block']by default forinlinebb-codes,['block']by default for other bb-codes. / По умолчанию['inline', 'block']для bb-кода с типомinlineи['block']для других типов.
- 'handler' =>
null|Closure
The processor for HTML output. / Обработчик для вывода HTML.nullby default. / По умолчаниюnull.
- 'text_handler' =>
null|Closure(v 0.9.3+)
The processor for TEXT output. / Обработчик для вывода текста без bb-кодов.nullby default. / По умолчаниюnull.
- 'recursive' =>
true
It is the recursive bb-code. Before the end of recursion doesn't react to other bb-codes. / Это рекурсивный bb-код. До окончания рекурсии не реагирует на другие bb-коды.nullby default. / По умолчаниюnull.
- 'text_only' =>
true
This bb-code contains only the text. / Этот bb-код содержит только текст.nullby default. / По умолчаниюnull.
- 'tags_only' =>
true
This bb-code contains only other bb-codes. / Этот bb-код содержит только другие bb-коды.nullby default. / По умолчаниюnull.
- 'pre' =>
true
Characters the new line, tabulation and spaces standing nearby won't be replaced. / Символы перевод строки, табуляция и пробелы стоящие рядом не будут заменены.nullby default. / По умолчаниюnull.
- 'single' =>
true
Single tag. / Одиночный тег.nullby default. / По умолчаниюnull.
- 'self_nesting' =>
bool(v 0.9.2+falseorpositive int)
May it be nested a bb-code in same. And how many times. / Может ли это bb-код быть вложен в такой же. И сколько раз.falseby default. / По умолчаниюfalse.
- 'auto' =>
bool
Autoclosing of this tag with other bb-code. / Автозакрытие тега другим bb-кодом.trueby default forinlinebb-codes,falseby default for other bb-codes. / По умолчаниюtrueдля bb-кода с типомinlineиfalseдля других типов.
- 'attrs' =>
null|array
Listing of attributes. / Перечисление атрибутов.nullby default. / По умолчаниюnull.
- 'No_attr' =>
true|array
The description for this bb-code without attributes. / Описание для bb-кода без атрибутов.
The array contains rules for this bb-code body. / Массив содержит правила для тела bb-кода.
- 'body_format' =>
string
The regular expression, sets the rule for a tag body. / Регулярное выражение, задает правило для тела тега.nullby default. / По умолчаниюnull.
You shall remember about the modifierD. / Помните про модификаторD.
- 'text_only' =>
true
This bb-code contains only the text. / Этот bb-код содержит только текст.nullby default. / По умолчаниюnull.
- 'body_format' =>
- 'Def' =>
true|array
The description for primary attribute. / Описание для первичного атрибута.
The array contains rules for attribute and (or) the body of this bb-code. / Массив содержит правила для атрибута и(или) тела bb-кода.
- 'required' =>
true
Required attribute. / Обязательный атрибут.nullby default. / По умолчаниюnull.
- 'format' =>
string
The regular expression, sets the rule for attribute. / Регулярное выражение, задает правило для атрибута.nullby default. / По умолчаниюnull.
- 'body_format' =>
string
The regular expression, sets the rule for a tag body. / Регулярное выражение, задает правило для тела тега.nullby default. / По умолчаниюnull.
You shall remember about the modifierD. / Помните про модификаторD.
- 'text_only' =>
true
This bb-code contains only the text. / Этот bb-код содержит только текст.nullby default. / По умолчаниюnull.
- 'required' =>
- 'name' =>
true|array
The description for secondary attribute with thenamename. / Описание для вторичного атрибута с именемname.
The array contains rules for attribute and (or) the body of this bb-code. / Массив содержит правила для атрибута и(или) тела bb-кода.
- ...
- 'No_attr' =>