[CDB] Dark Mode

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Aurelienazerty
Registered User
Posts: 190
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: [3.2][DEV] Dark Mode

Post by Aurelienazerty »

Yes maybe, and do a F5 for reload the CSS (to be sure)
User avatar
3Di
Former Team Member
Posts: 15886
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [3.2][DEV] Dark Mode

Post by 3Di »

Aurelienazerty wrote:
Mon Aug 12, 2019 9:56 pm
Yes maybe, and do a F5 for reload the CSS (to be sure)
I mean, in your code.

Try calling the $this->cache->purge(); method at every switch.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
Aurelienazerty
Registered User
Posts: 190
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: [3.2][DEV] Dark Mode

Post by Aurelienazerty »

Ok, but the switch (Dark / Light mode) doesn't need a cache purge : Javascript put a class on top element (body tag) that's apply CSS.

The purge is for seing the hot fix discribed here.
xmrdo
Registered User
Posts: 58
Joined: Fri Jul 19, 2019 11:10 pm
Location: B'ham, UK

Re: [3.2][DEV] Dark Mode

Post by xmrdo »

lovely extension! many thanks ! if the ACP would support dark-mode too ...
User avatar
Dabony
Registered User
Posts: 9
Joined: Tue Oct 01, 2019 3:15 am
Name: Emily Figgins
Contact:

Re: [3.2][DEV] Dark Mode

Post by Dabony »

This is probably me being stupid, but I can't find the Dark Mode extension in the ACP extensions menu. I downloaded the .zip from github, extracted it, and put it into a folder called "Aurelienazerty". So the config and event folders are all placed at /ext/aurelienazerty/darkMode/. But for some reason they're not showing up. Any idea why?
xmrdo
Registered User
Posts: 58
Joined: Fri Jul 19, 2019 11:10 pm
Location: B'ham, UK

Re: [3.2][DEV] Dark Mode

Post by xmrdo »

file permissions maybe? should be 755
User avatar
david63
Registered User
Posts: 18104
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: [3.2][DEV] Dark Mode

Post by david63 »

Dabony wrote:
Fri Oct 04, 2019 5:41 pm
are all placed at /ext/aurelienazerty/darkMode/
That should be /ext/Aurelienazerty/darkMode - note the capital "A"
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
User avatar
Dabony
Registered User
Posts: 9
Joined: Tue Oct 01, 2019 3:15 am
Name: Emily Figgins
Contact:

Re: [3.2][DEV] Dark Mode

Post by Dabony »

david63 wrote:
Sat Oct 05, 2019 9:21 am
Dabony wrote:
Fri Oct 04, 2019 5:41 pm
are all placed at /ext/aurelienazerty/darkMode/
That should be /ext/Aurelienazerty/darkMode - note the capital "A"
Now I feel stupid, lol. Thanks for the help! It worked. :)
User avatar
Aurelienazerty
Registered User
Posts: 190
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: [3.2][DEV] Dark Mode

Post by Aurelienazerty »

We all make mistakes :-)
User avatar
Aurelienazerty
Registered User
Posts: 190
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: [3.2][DEV] Dark Mode

Post by Aurelienazerty »

New version : bug fix, and now the dark mode is also in ACP
xmrdo
Registered User
Posts: 58
Joined: Fri Jul 19, 2019 11:10 pm
Location: B'ham, UK

Re: [3.2][DEV] Dark Mode

Post by xmrdo »

Aurelienazerty wrote:
Thu Oct 10, 2019 6:45 pm
..the dark mode is also in ACP
This is EPIC, god bless you mate <3
scheccia
Registered User
Posts: 53
Joined: Fri Feb 10, 2017 8:16 am

Re: [3.2][DEV] Dark Mode

Post by scheccia »

i have a iusse with quick reply ext, when active the dark mode the reply box (that is floating) remain fixed in the page.
dark.jpg
light.jpg
scheccia
Registered User
Posts: 53
Joined: Fri Feb 10, 2017 8:16 am

Re: [3.2][DEV] Dark Mode

Post by scheccia »

i fix... i assign class to html tag but i had to add a template var in my theme.
User avatar
Aurelienazerty
Registered User
Posts: 190
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: [3.2][DEV] Dark Mode

Post by Aurelienazerty »

Can you explain the fix ?
scheccia
Registered User
Posts: 53
Joined: Fri Feb 10, 2017 8:16 am

Re: [3.2][DEV] Dark Mode

Post by scheccia »

Aurelienazerty wrote:
Mon Oct 14, 2019 3:10 pm
Can you explain the fix ?
yes, it's work with chrome and edge, have problem with firefox (tell me)

theme/darkmode.js
replace:

Code: Select all

$("body").addClass("darkmode");
with:

Code: Select all

$("html").addClass("darkmode");
event/listener.php
replace:

Code: Select all

$this->template->append_var('BODY_CLASS', $class);
with:

Code: Select all

$this->template->append_var('HTML_CLASS', $class);
theme/darkmode.css
replace:

Code: Select all

body.darkmode {
with:

Code: Select all

html.darkmode {
in my template template/overall_header.html
replace:

Code: Select all

<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
with:

Code: Select all

<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" class="{HTML_CLASS}">
Locked

Return to “Extensions in Development”