News:

Join the Facebook Fan Page.

Main Menu

SMF Theme Toggle

Started by shawnb61, June 21, 2022, 09:30:11 PM

Previous topic - Next topic

shawnb61

Link to the mod

Description:

The SMF Theme Toggle mod lets you easily toggle between the forum default theme and an admin-designated secondary theme with a single click.

This mod works with any theme that allows new entries in the main menu.

This mod works whether or not javascript is enabled on the client.

The requested change is persistent; it works by updating the user's requested theme on their profile.  Users must be allowed to select themes.

Note that menus are cached; you may need to clear cache for this mod to take effect.

Releases:
 - v1.0 Initial release
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Steve

Very nifty Shawn.

Can you consider making it so each member can toggle between their two favorite themes in a future version?
DO NOT pm me for support!

shawnb61

Yep, that's a definite maybe!

The other suggestion I've received is placing it on the profile menu vs the main menu, or making the location an option.

The point was to make it easy to switch to dark mode, in one click, as I've seen on some other sites.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

FrizzleFried

I know this is beyond the scope of the current iteration... but would you consider perhaps allowing more than just a toggle between two themes?  My forum runs a total of 5 themes... clicking that button and providing a drop down to select between them would make this mod a 'must have' for my forum...

Just something to consider.

It does work nicely as advertised already.  Thank you.

Steve

That would make the mod a theme changer rather than a toggle between two themes, yes?  :)
DO NOT pm me for support!

FrizzleFried

What is a toggle other than a theme changer but for two themes?

 8)

Arantor

And that's the point, toggling between two things only.

There are theme changer mods out there, either standalone or part of the portal mods.

FrizzleFried

...but none as elegant.  Again...`twas just a suggestion.  FWIW, I run Tiny Portal currently for the sole reason of the theme changer.  Not elegant.

marcosbr

Quote from: shawnb61 on June 24, 2022, 12:55:45 PMYep, that's a definite maybe!

The other suggestion I've received is placing it on the profile menu vs the main menu, or making the location an option.

The point was to make it easy to switch to dark mode, in one click, as I've seen on some other sites.

I like it
Nothing in life is absolute. We are always learning... Did you know that?
https://amigosdaeletronica.com.br

marcosbr

Is there a way to allow visitors to change the themes? I'm alternating between light and dark.
Nothing in life is absolute. We are always learning... Did you know that?
https://amigosdaeletronica.com.br

marcosbr

Quote from: shawnb61 on June 24, 2022, 12:55:45 PMYep, that's a definite maybe!

The other suggestion I've received is placing it on the profile menu vs the main menu, or making the location an option.

The point was to make it easy to switch to dark mode, in one click, as I've seen on some other sites.

I customized a "copy" of the curve2 theme in dark mode.
Original: https://amigosdaeletronica.com.br
Your MOD is excellent and works well on my official forum.
I would just like permission for visitors!
This image is the "tests" forum with change by the portal.
Test: https://amigosdaeletronica.com/

Nothing in life is absolute. We are always learning... Did you know that?
https://amigosdaeletronica.com.br

marcosbr

I forgot the image

You cannot view this attachment.
Nothing in life is absolute. We are always learning... Did you know that?
https://amigosdaeletronica.com.br

shawnb61

I will look into guest support at some point.  I am in the middle of a few other things I'm looking at atm, so it might be a while.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Steve

Quote from: FrizzleFried on June 24, 2022, 03:38:09 PM...but none as elegant.  Again...`twas just a suggestion.  FWIW, I run Tiny Portal currently for the sole reason of the theme changer.  Not elegant.
https://custom.simplemachines.org/index.php?mod=3356 - works perfectly and can be placed at the top or bottom of the forum. A small css change can make it centered as well.
DO NOT pm me for support!

Advertisement: