Added [indent] BBCode tag (#1375)

* Added `[indent]` BBCode tag

* Update CHANGELOG.md

* Update main.php

* Update posting_editor.tpl
This commit is contained in:
Roman Kelesidis 2024-02-02 21:31:29 +07:00 committed by GitHub
commit a716283be0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 1 deletions

View file

@ -14,6 +14,7 @@
- Added new flag 🕊 [\#1347](https://github.com/torrentpier/torrentpier/pull/1347) ([belomaxorka](https://github.com/belomaxorka))
- Added ability to view "Watching topics" of other people's (For admins only) [\#1336](https://github.com/torrentpier/torrentpier/pull/1336) ([belomaxorka](https://github.com/belomaxorka))
- Added `[box]` BBCode tag [\#1368](https://github.com/torrentpier/torrentpier/pull/1368) ([belomaxorka](https://github.com/belomaxorka))
- Added `[indent]` BBCode tag [\#1375](https://github.com/torrentpier/torrentpier/pull/1375) ([belomaxorka](https://github.com/belomaxorka))
- Added `bt_announce_url` autofill via cron [\#1331](https://github.com/torrentpier/torrentpier/pull/1331), [\#1364](https://github.com/torrentpier/torrentpier/pull/1364) ([belomaxorka](https://github.com/belomaxorka))
- Added ability to send debug via Telegram [\#1323](https://github.com/torrentpier/torrentpier/pull/1323), [\#1372](https://github.com/torrentpier/torrentpier/pull/1372) ([belomaxorka](https://github.com/belomaxorka))
- Added "Random release" button in tracker.php [\#1334](https://github.com/torrentpier/torrentpier/pull/1334) ([belomaxorka](https://github.com/belomaxorka))

View file

@ -1531,6 +1531,7 @@ $lang['ITALIC'] = 'Italic text: [i]text[/i] (Ctrl+I)';
$lang['UNDERLINE'] = 'Underline text: [u]text[/u] (Ctrl+U)';
$lang['STRIKEOUT'] = 'Strikeout text: [s]text[/s] (Ctrl+S)';
$lang['BOX_TAG'] = 'Frame around text: [box]text[/box]';
$lang['INDENT_TAG'] = 'Insert indent: [indent]text[/indent]';
$lang['SUPERSCRIPT'] = 'Superscript text: [sup]text[/sup]';
$lang['SUBSCRIPT'] = 'Subscript text: [sub]text[/sub]';
$lang['QUOTE_TITLE'] = 'Quote text: [quote]text[/quote] (Ctrl+Q)';

View file

@ -126,6 +126,8 @@ class BBCode
'[/sub]' => '</sub>',
'[box]' => '<div class="post-box-default"><div class="post-box">',
'[/box]' => '</div></div>',
'[indent]' => '<div class="post-indent">',
'[/indent]' => '</div>',
'[del]' => '<span class="post-s">',
'[/del]' => '</span>',
'[clear]' => '<div class="clear">&nbsp;</div>',

View file

@ -380,6 +380,10 @@ a.gen, a.med, a.genmed, a.small, a.gensmall {
padding: 0 8px 1px;
}
.post-indent {
margin-left: 2em;
}
/* ---------------------------------- *
Code blocks
* ---------------------------------- */

View file

@ -73,7 +73,8 @@ ajax.callback.posts = function(data) {
<input type="button" value="sup" name="codeSup" title="{L_SUPERSCRIPT}" />
<input type="button" value="sub" name="codeSub" title="{L_SUBSCRIPT}" />&nbsp;
<input type="button" value="&#8212;" name="codeHR" title="{L_HOR_LINE}" style="font-weight: bold;" />
<input type="button" value="&para;" name="codeBR" title="{L_NEW_LINE}" />&nbsp;
<input type="button" value="&para;" name="codeBR" title="{L_NEW_LINE}" />
<input type="button" value="&#8667;" name="codeIndent" title="{L_INDENT_TAG}" />&nbsp;
<input type="button" value="{L_SPOILER}" name="codeSpoiler" title="{L_SPOILER}" />
<input type="button" value="box" name="codeBox" title="{L_BOX_TAG}" />
</span>
@ -207,6 +208,7 @@ function checkForm(form) {
bbcode.addTag("codeSup", "sup", null, "", ctrl);
bbcode.addTag("codeSub", "sub", null, "", ctrl);
bbcode.addTag("codeBox", "box", null, "", ctrl);
bbcode.addTag("codeIndent", "indent", null, "", ctrl);
bbcode.addTag("fontFace", function (e) {
var v = e.value;