Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update auth.php and theme_handler.php to us ea bootstrap 5 admin theme and comply to use BS5 as it should. #5373

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Alex-e107nl
Copy link
Contributor

@Alex-e107nl Alex-e107nl commented Dec 25, 2024

Motivation and Context

Without it you cannot use the bootstrap5 theme as admin theme and the tabs in the theme config (front and admin) does not give real tabs.

Description

admin/auth.php

if($adminTheme !== 'bootstrap3'/* && $adminTheme !== 'bootstrap5'*/) to
if($adminTheme !== 'bootstrap3' && $adminTheme !== 'bootstrap5')

theme_handler.php

<li class='active'><a data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-configure'>".LAN_CONFIGURE."</a></li>";
To
<li class='nav-item active'><a class='nav-link active' data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-configure'>".LAN_CONFIGURE."</a></li>";

$text .= "<li><a data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-customconfig'>".LAN_PREFS."</a></li>\n";
To
$text .= "<li class='nav-item'><a class='nav-link' data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-customconfig'>".LAN_PREFS."</a></li>\n";

text .= "<li><a data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-help'>".LAN_HELP."</a></li>\n";
To
$text .= "<li class='nav-item'><a class='nav-link' data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-help'>".LAN_HELP."</a></li>\n";

How Has This Been Tested?

On a live server: e107 - Version 2.4.0 (git) - Server - Apache/2 - PHP Version - 8.1.30 - MySQL - 10.5.27-MariaDB - PDO: Enabled
Mode: NO_ENGINE_SUBSTITUTION - Charset - utf-8 - Server Time - Wednesday 25 December 2024 - 21:33

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist

Free the use of a admin theme with the name bootsrap5, it works perfectly when this is changed!
The front theme config does not give real tabs when you use bootstrap 5, it is really a not working as it should without..
@CaMer0n
Copy link
Member

CaMer0n commented Jan 2, 2025

Happy New Year @Alex-e107nl ! Thank you for this. I didn't want to allow BS5 until the bootstrap5 theme was fully compatible with the admin area. I believe there's quite a few javascript components in e107_web/ that would need to be upgraded to also work properly with bootstrap5. If it's something you wish to work on, I could set up a debug flag you could use while developing?

@Alex-e107nl
Copy link
Contributor Author

Dear Cameron,. also for you a good and healthy 2025, what matters to me is that the auth.php is adjusted, the rest is no longer necessary, by applying an admin_theme_library.php I have it 90% done now, and believe me if you have worked with the new admin theme you do not want to go back...

I still have to solve some small things and then everything is functional, Jquery and BS5 work fine together, eventually everything has to be converted to Vanilla but I think there is someone with good knowledge of javascript to tackle this together :-)

Teasers...... :-)

teaser_1_02012024
teaser_2_02012024

@CaMer0n
Copy link
Member

CaMer0n commented Jan 4, 2025

Nice work! I sent you a DM. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants