[TikiWiki-commits] [Git][tikiwiki/tiki][master] [NEW] Add the 'textBelowLoginbox' preference to display custom text below the login box

"Adrien Mbuya Maloba \(@adrienmaloba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a73b4a53193_38166b90c401f@gitlab-sidekiq-low-urgency-cpu-bound-v2-f4b5fb7b6-s6h4r.mail>

Adrien Mbuya Maloba pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
0a337e44 by NasserNgandu at 2026-08-06T00:52:21+03:00
[NEW] Add the 'textBelowLoginbox' preference to display custom text below the login box
---
* [FIX] Code correct

* [FIX] Code correct

* [FIX] Code Correct

* [NEW] Added the 'textBelowLoginbox' preference to display text below the login box

See merge request tikiwiki/tiki!10734

- - - - -


4 changed files:

- lib/prefs/global.php
- modules/mod-func-login_box.php
- templates/admin/include_login.tpl
- templates/modules/mod-login_box.tpl


Changes:

=====================================
lib/prefs/global.php
=====================================
@@ -501,6 +501,15 @@ function prefs_global_list($partial = false)
             'hint' => tra('Go to [tiki-admingroups.php|Admin Groups] to select which tracker and fields to display.'),
             'default' => 'n',
         ],
+        'textBelowLoginBox' => [
+            'name' => tra('Text below login box'),
+            'description' => tra('Text to display below the login box.'),
+            'hint' => tra("Supports Tiki syntax"),
+            'filter' => 'wikicontent',
+            'type' => 'textarea',
+            'size' => '5',
+            'default' => '',
+        ],
         'eponymousGroups' => [
             'name' => tra('Create a new group for each user'),
             'description' => tra('Automatically create a group for each user in order to, for example, assign permissions on the individual-user level.'),


=====================================
modules/mod-func-login_box.php
=====================================
@@ -119,6 +119,7 @@ function module_login_box($mod_reference, &$module_params)
     $smarty->assign('login_text_explanation', $tikilib->get_preference('login_text_explanation'));
     $smarty->assign('EMAIL_2FA', TwoFactorAuth::EMAIL_2FA);
     $smarty->assign('TOTP_2FA', TwoFactorAuth::TOTP_2FA);
+    $smarty->assign('textBelowLoginBox', TikiLib::lib('parser')->parse_data($prefs['textBelowLoginBox']));
 
     $urlPrefix = in_array($prefs['https_login'], ['encouraged', 'required', 'force_nocheck']) ? $base_url_https : $base_url;
     $smarty->assign('registration', 'n');   // stops the openid form appearing in the module, only on tiki-login_scr.php


=====================================
templates/admin/include_login.tpl
=====================================
@@ -161,6 +161,7 @@
                     {preference name=tracker_force_tracker_fields}
                 </div>
                 {preference name=groupTracker}
+                {preference name=textBelowLoginBox}
                 <legend class="h3">{tr}Other login settings{/tr}</legend>
                 {preference name=email_due}
                 {preference name=unsuccessful_logins}


=====================================
templates/modules/mod-login_box.tpl
=====================================
@@ -656,5 +656,10 @@ $(".collapse-toggle", ".siteloginbar_popup .dropdown-menu").on("click", function
         {$close_tags}
         </div>
     {/if}
+    {if $mode eq "module" && ! empty($textBelowLoginBox)}
+        <div class="mt-3 textbelowlogin">
+            {$textBelowLoginBox}
+        </div>
+    {/if}
     {if $mode eq "header"}</div>{/if}
 {/tikimodule}



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/0a337e445ec0f598fe595402e67e1a1951d950c1

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/0a337e445ec0f598fe595402e67e1a1951d950c1
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.