From a716283be0b24cd5f3368c5e23da0e1334b1ce9a Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Fri, 2 Feb 2024 21:31:29 +0700 Subject: [PATCH] Added `[indent]` BBCode tag (#1375) * Added `[indent]` BBCode tag * Update CHANGELOG.md * Update main.php * Update posting_editor.tpl --- CHANGELOG.md | 1 + library/language/source/main.php | 1 + src/Legacy/BBCode.php | 2 ++ styles/templates/default/css/globals.css | 4 ++++ styles/templates/default/posting_editor.tpl | 4 +++- 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38fc3320a..1a8b79f9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/library/language/source/main.php b/library/language/source/main.php index d9c4ce99c..9eb29daa1 100644 --- a/library/language/source/main.php +++ b/library/language/source/main.php @@ -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)'; diff --git a/src/Legacy/BBCode.php b/src/Legacy/BBCode.php index 8c7ad9fd2..84736569d 100644 --- a/src/Legacy/BBCode.php +++ b/src/Legacy/BBCode.php @@ -126,6 +126,8 @@ class BBCode '[/sub]' => '', '[box]' => '
', '[/box]' => '
', + '[indent]' => '
', + '[/indent]' => '
', '[del]' => '', '[/del]' => '', '[clear]' => '
 
', diff --git a/styles/templates/default/css/globals.css b/styles/templates/default/css/globals.css index 2f1525d65..249844a68 100644 --- a/styles/templates/default/css/globals.css +++ b/styles/templates/default/css/globals.css @@ -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 * ---------------------------------- */ diff --git a/styles/templates/default/posting_editor.tpl b/styles/templates/default/posting_editor.tpl index d4b5f271a..446fd6c3f 100644 --- a/styles/templates/default/posting_editor.tpl +++ b/styles/templates/default/posting_editor.tpl @@ -73,7 +73,8 @@ ajax.callback.posts = function(data) {   -   + +   @@ -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;