From 07ba4f179dba6dfd4e4e3839cbef2cdd9034780b Mon Sep 17 00:00:00 2001 From: Ribas160 Date: Sat, 19 Jul 2025 13:24:37 +0300 Subject: [PATCH 1/3] Set bootstrap5 template as default --- README.md | 2 +- cfg/conf.sample.php | 10 +++++----- lib/Configuration.php | 2 +- lib/TemplateSwitcher.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2ef2fcfb..18e7cb0a 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ file](https://github.com/PrivateBin/PrivateBin/wiki/Configuration): * File upload support, image, media and PDF preview (disabled by default, size limit adjustable) -* Templates: By default there are bootstrap CSS, darkstrap and "classic ZeroBin" +* Templates: By default there are bootstrap5, bootstrap CSS and darkstrap to choose from and it is easy to adapt these to your own websites layout or create your own. diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php index 449feebd..63bcd027 100644 --- a/cfg/conf.sample.php +++ b/cfg/conf.sample.php @@ -42,7 +42,7 @@ defaultformatter = "plaintext" ; size limit per paste or comment in bytes, defaults to 10 Mebibytes sizelimit = 10485760 -; by default PrivateBin use "bootstrap" template (tpl/bootstrap.php). +; by default PrivateBin use "bootstrap5" template (tpl/bootstrap5.php). ; Optionally you can enable the template selection menu, which uses ; a session cookie to store the choice until the browser is closed. templateselection = false @@ -56,12 +56,12 @@ availabletemplates[] = "bootstrap-dark-page" availabletemplates[] = "bootstrap-compact" availabletemplates[] = "bootstrap-compact-page" -; set the template your installs defaults to, defaults to "bootstrap" (tpl/bootstrap.php), also -; bootstrap variants: "bootstrap-dark", "bootstrap-compact", "bootstrap-page", +; set the template your installs defaults to, defaults to "bootstrap5" (tpl/bootstrap5.php), also +; bootstrap template (tpl/bootstrap.php) and it's variants: "bootstrap-dark", "bootstrap-compact", "bootstrap-page", ; which can be combined with "-dark" and "-compact" for "bootstrap-dark-page", -; "bootstrap-compact-page" and finally "bootstrap5" (tpl/bootstrap5.php) - previews at: +; "bootstrap-compact-page" - previews at: ; https://privatebin.info/screenshots.html -; template = "bootstrap" +; template = "bootstrap5" ; (optional) info text to display ; use single, instead of double quotes for HTML attributes diff --git a/lib/Configuration.php b/lib/Configuration.php index fc3c4305..17fc9815 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -46,7 +46,7 @@ class Configuration 'syntaxhighlightingtheme' => '', 'sizelimit' => 10485760, 'templateselection' => false, - 'template' => 'bootstrap', + 'template' => 'bootstrap5', 'availabletemplates' => array( 'bootstrap5', 'bootstrap', diff --git a/lib/TemplateSwitcher.php b/lib/TemplateSwitcher.php index 99dd317b..22c65b08 100644 --- a/lib/TemplateSwitcher.php +++ b/lib/TemplateSwitcher.php @@ -25,7 +25,7 @@ class TemplateSwitcher * @static * @var string */ - protected static $_templateFallback = 'bootstrap'; + protected static $_templateFallback = 'bootstrap5'; /** * available templates From 273b11e1b4685046cce5d85c3883e671775a14d0 Mon Sep 17 00:00:00 2001 From: Ribas160 Date: Mon, 21 Jul 2025 09:30:30 +0300 Subject: [PATCH 2/3] Fix bootstrap template fallback in unit tests --- tst/TemplateSwitcherTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tst/TemplateSwitcherTest.php b/tst/TemplateSwitcherTest.php index 482f23a1..16aec6b0 100644 --- a/tst/TemplateSwitcherTest.php +++ b/tst/TemplateSwitcherTest.php @@ -10,7 +10,7 @@ class TemplateSwitcherTest extends TestCase { $conf = new Configuration; - $defaultTemplateFallback = 'bootstrap'; + $defaultTemplateFallback = 'bootstrap5'; $existingTemplateFallback = 'bootstrap-dark'; $wrongBootstrapTemplateFallback = 'bootstrap-wrong'; $wrongTemplateFallback = 'wrong-template'; @@ -38,7 +38,7 @@ class TemplateSwitcherTest extends TestCase public function testGetTemplate() { - $defaultTemplateFallback = 'bootstrap'; + $defaultTemplateFallback = 'bootstrap5'; $customTemplate = 'bootstrap-dark'; $customWrongTemplate = 'bootstrap-wrong'; From f584d38f87b259a1f6a6c6c62317801e4e496c8c Mon Sep 17 00:00:00 2001 From: Ribas160 Date: Mon, 21 Jul 2025 09:39:35 +0300 Subject: [PATCH 3/3] CHANGELOG.md update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 955f987f..c9c41cda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * CHANGED: Jdenticons are now used as the default icons * CHANGED: Upgrading libraries to: jdenticon 2.0.0 * CHANGED: Minimum required PHP version is 7.4, due to a change in the jdenticon library +* CHANGED: Set bootstrap5 template as default for PrivateBin (#1572) * FIXED: Name mismatches in attached files (#1584) * FIXED: Unable to paste attachments from clipboard (#1589)