[3.2][DEV] 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!
Suggested Hosts
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: 164
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: [3.2][DEV] Dark Mode

Post by Aurelienazerty » Mon Aug 12, 2019 9:56 pm

Yes maybe, and do a F5 for reload the CSS (to be sure)

User avatar
3Di
Former Team Member
Posts: 14352
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 » Mon Aug 12, 2019 11:46 pm

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
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Aurelienazerty
Registered User
Posts: 164
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: [3.2][DEV] Dark Mode

Post by Aurelienazerty » Tue Aug 13, 2019 9:16 pm

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: 23
Joined: Fri Jul 19, 2019 11:10 pm

Re: [3.2][DEV] Dark Mode

Post by xmrdo » Thu Oct 03, 2019 10:39 am

lovely extension! many thanks ! if the ACP would support dark-mode too ...

Dabony
Registered User
Posts: 9
Joined: Tue Oct 01, 2019 3:15 am

Re: [3.2][DEV] Dark Mode

Post by Dabony » Fri Oct 04, 2019 5:41 pm

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: 23
Joined: Fri Jul 19, 2019 11:10 pm

Re: [3.2][DEV] Dark Mode

Post by xmrdo » Sat Oct 05, 2019 9:14 am

file permissions maybe? should be 755

User avatar
david63
Registered User
Posts: 16676
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [3.2][DEV] Dark Mode

Post by david63 » 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"
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

Dabony
Registered User
Posts: 9
Joined: Tue Oct 01, 2019 3:15 am

Re: [3.2][DEV] Dark Mode

Post by Dabony » Sat Oct 05, 2019 2:22 pm

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: 164
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: [3.2][DEV] Dark Mode

Post by Aurelienazerty » Mon Oct 07, 2019 8:24 am

We all make mistakes :-)

User avatar
Aurelienazerty
Registered User
Posts: 164
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: [3.2][DEV] Dark Mode

Post by Aurelienazerty » Thu Oct 10, 2019 6:45 pm

New version : bug fix, and now the dark mode is also in ACP

xmrdo
Registered User
Posts: 23
Joined: Fri Jul 19, 2019 11:10 pm

Re: [3.2][DEV] Dark Mode

Post by xmrdo » Thu Oct 10, 2019 7:22 pm

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: 46
Joined: Fri Feb 10, 2017 8:16 am

Re: [3.2][DEV] Dark Mode

Post by scheccia » Mon Oct 14, 2019 6:57 am

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: 46
Joined: Fri Feb 10, 2017 8:16 am

Re: [3.2][DEV] Dark Mode

Post by scheccia » Mon Oct 14, 2019 9:37 am

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: 164
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: [3.2][DEV] Dark Mode

Post by Aurelienazerty » Mon Oct 14, 2019 3:10 pm

Can you explain the fix ?

scheccia
Registered User
Posts: 46
Joined: Fri Feb 10, 2017 8:16 am

Re: [3.2][DEV] Dark Mode

Post by scheccia » Tue Oct 15, 2019 6:54 am

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}">

Post Reply

Return to “Extensions in Development”