MyBB Community Forums

Full Version: White or dark theme
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello again,
I search but i didn't find something.
I want a plugin to add a button inthe top of my forum where user can choose between two themes,white or dark.
Should i add a second theme for this?
Can i add a moon button and a sun button.
 When user click the sun it will change the color of my deafut theme and make it white.
When they click the moon it will change to black theme.
Is there a way to do this with one theme or should a add a second theme?
Yes, of course you need to make a second theme, label your theme now as Sun then duplicate it and call the duplicate theme Moon, then restyle the duplicate theme's color for the moon theme,. Then you can just add the dropdown or selection form to the header. So basic, no plugin needed.
You do not need the second theme. You need a second CSS with other colors/styles and several lines of javascript.

So the plugin is OK, but you will still have to (re)write appearance for 'dark mode' because every theme is 'unique'.
I am gonna add the second theme at 15/1/2020 can someone help me with that?
Or is there any tutorial for that?
(2019-12-22, 08:51 PM)Salvation Wrote: [ -> ]You do not need the second theme. You need a second CSS with other colors/styles and several lines of javascript.

So the plugin is OK, but you will still have to (re)write appearance for 'dark mode' because every theme is 'unique'.

Very good answer.
@OP: you can just add a second CSS and not worry about another theme.
Really Thank you guys.. i think to add a color picker if rhere is any tutorial for a second theme
(2019-12-23, 07:51 AM)Mastersly Wrote: [ -> ]Really Thank you guys.. i think to add a color picker if rhere is any tutorial for a second theme

You can basically use a css color invert tool, try these tools
https://goto.pachanka.org/tool/css-color-inverter
https://jalu.ch/coding/css-negative.php

You will also need to tweak it to your liking.

NOTE: I am not endorsing the above projects, these are shared as an example.