From edad5ba1e04bea1cd8e68b05452dacdcb178b981 Mon Sep 17 00:00:00 2001 From: ribas160 Date: Sat, 8 Feb 2025 21:49:27 +0200 Subject: [PATCH] Config documentation update --- cfg/conf.sample.php | 24 ++++++++++++++++++++---- lib/Configuration.php | 10 ++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php index 39ed7504..c6c6b5f7 100644 --- a/cfg/conf.sample.php +++ b/cfg/conf.sample.php @@ -42,13 +42,18 @@ defaultformatter = "plaintext" ; size limit per paste or comment in bytes, defaults to 10 Mebibytes sizelimit = 10485760 -; template to include, default is "bootstrap" (tpl/bootstrap.php), also +; by default PrivateBin use "bootstrap" template (tpl/bootstrap.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 + +; set the template your installs defaults to, defaults to "bootstrap" (tpl/bootstrap.php), also ; available are "page" (tpl/page.php), the classic ZeroBin style and several ; bootstrap variants: "bootstrap-dark", "bootstrap-compact", "bootstrap-page", -; which can be combined with "-dark" and "-compact" for "bootstrap-dark-page" -; and finally "bootstrap-compact-page" - previews at: +; which can be combined with "-dark" and "-compact" for "bootstrap-dark-page", +; "bootstrap-compact-page" and finally "bootstrap5" (tpl/bootstrap5.php) - previews at: ; https://privatebin.info/screenshots.html -template = "bootstrap" +; templatedefault = "bootstrap" ; (optional) info text to display ; use single, instead of double quotes for HTML attributes @@ -146,6 +151,17 @@ plaintext = "Plain Text" syntaxhighlighting = "Source Code" markdown = "Markdown" +[available_templates] +; List of available for selection templates when "templateselection" option is enabled +bootstrap +bootstrap-page +bootstrap-dark +bootstrap-dark-page +bootstrap-compact +bootstrap-compact-page +bootstrap5 +page + [traffic] ; time limit between calls from the same IP address in seconds ; Set this to 0 to disable rate limiting. diff --git a/lib/Configuration.php b/lib/Configuration.php index 9fad6267..5fe2ac61 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -46,7 +46,7 @@ class Configuration 'syntaxhighlightingtheme' => '', 'sizelimit' => 10485760, 'templateselection' => false, - 'templatedefault' => 'bootstrap', + 'templatedefault' => '', 'info' => 'More information on the project page.', 'notice' => '', 'languageselection' => false, @@ -79,12 +79,14 @@ class Configuration 'markdown' => 'Markdown', ), 'available_templates' => array( - 'page', 'bootstrap', - 'bootstrap-compact', - 'bootstrap-dark', 'bootstrap-page', + 'bootstrap-dark', + 'bootstrap-dark-page', + 'bootstrap-compact', + 'bootstrap-compact-page', 'bootstrap5', + 'page', ), 'traffic' => array( 'limit' => 10,