3.2.x Extensions Database 3.2 / 3.3Light-Dark Extension

<span class="qte-attr qte_32_33-qte">3.2.x & 3.3.x</span>
Post Reply Previous topicNext topic
User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6466
Joined: 13 Jan 2014, 21:45
    Windows 10 Chrome

Light-Dark Extension

Post by dmzx »

Extension Name: Light-Dark Extension
Author: dmzx & martin

Extension Description:
By the idea from martins's Dark / Light style changer.
This extension will change brightness for now, It can be adjusted to whatever style you need in file:
ext\dmzx\lightdark\styles\all\theme\lightdark.css
ACP control included.

dmzx/Light-Dark-Extension

Screenshots:
Image

Image

Extension Download:
Download-link
Light-Dark v1.0.0
Installation:
  1. Download the latest release.
  2. Unzip the downloaded release, and change the name of the folder to `lightdark`.
  3. In the `ext` directory of your phpBB board, create a new directory named `dmzx` (if it does not already exist).
  4. Copy the `lightdark` folder to `/ext/dmzx/` if done correctly, you'll have the main extension class at
    (your forum root)/ext/dmzx/lightdark/composer.json
  5. Navigate in the ACP to `Customise -> Manage extensions`
  6. Look for `Light-Dark Extension` under the Disabled Extensions list, and click its `Enable` link.

User avatar

NAPWR
Donator
Donator
Posts: 47
Joined: 21 May 2017, 14:30
    Windows 7 Chrome

Re: Light-Dark Extension

Post by NAPWR »

Great work DM & MM :tumbsyes:
My name is Dave I, and all things are out there, and we are in here :mml:

User avatar

ivailo95
Users
Users
Posts: 918
Joined: 02 Feb 2018, 12:04
    Android Chrome

Re: Light-Dark Extension

Post by ivailo95 »

Good work :thumbup: :mml:
Feed like a disease
And bring them to their knees
They'll pay for their deceit

User avatar

martin
Admin
Admin
Posts: 5105
Joined: 06 Apr 2014, 16:12
    Android Chrome

Re: Light-Dark Extension

Post by martin »

I got a nice update for this il post it when i get out of hospital.
Image

User avatar

raykai
Users
Users
Posts: 12
Joined: 28 Jun 2016, 08:24
    Windows 10 Chrome

Re: Light-Dark Extension

Post by raykai »

Not working in phpBB v3.3.0

User avatar

martin
Admin
Admin
Posts: 5105
Joined: 06 Apr 2014, 16:12
    Linux Chrome

Re: Light-Dark Extension

Post by martin »

raykai wrote: 29 May 2020, 09:57 Not working in phpBB v3.3.0
The hint is this part here in the tittle 3.2

try this one for 3.3
dmzx_lightdark_1_0_0.zip
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

raykai
Users
Users
Posts: 12
Joined: 28 Jun 2016, 08:24
    Windows 10 Chrome

Re: Light-Dark Extension

Post by raykai »

martin wrote: 29 May 2020, 10:19
raykai wrote: 29 May 2020, 09:57 Not working in phpBB v3.3.0
The hint is this part here in the tittle 3.2

try this one for 3.3
dmzx_lightdark_1_0_0.zip
it's working now for phpBB v3.3.0.
Thanks

User avatar

raykai
Users
Users
Posts: 12
Joined: 28 Jun 2016, 08:24
    Windows 10 Chrome

Re: Light-Dark Extension

Post by raykai »

This extension has a conflict with Reading progressbar Reading progressbar The bar stops working if dark mode is turned on on your account.

User avatar

max-ima
Users
Users
Posts: 139
Joined: 25 Mar 2022, 07:11
    Windows 10 Firefox

Re: Light-Dark Extension

Post by max-ima »

Checked on 3.3.7 and it works. Thanks

User avatar

max-ima
Users
Users
Posts: 139
Joined: 25 Mar 2022, 07:11
    Windows 10 Firefox

Re: Light-Dark Extension

Post by max-ima »

Light-Dark Extension_1.0.0-Slovenian.zip
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

ramboagent
Users
Users
Posts: 6
Joined: 25 Oct 2023, 17:44
    Windows 10 Edge

Re: Light-Dark Extension

Post by ramboagent »

Bei der version 3.3.11 wird nix angezeigt kommt auch keine Fehlermeldung

User avatar

Sniper_E Online
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Light-Dark Extension

Post by Sniper_E »

I was working on an extension last year that was based off of martin's dark style css.
I asked dm if he could help me make the index button change to dark style with just a click without having to go to ucp.
I gave up on that and just created a dark style. Now I found this ext and here it is. Just what I was asking help for.

I just installed this on my test site but it's acting weird.
In db when lightdark_status is set to '0' I see the dark style. In db when lightdark_status is set to '1' I see the light style.
That does not look like it is working correctly.

I even changed the codes in the navbar_header_user_profile_prepend.html to this:

Code: Select all

<i id="favIcon" class="icon fa fa-{% if S_LIGHTDARK_DARK %}sun{% else %}moon{% endif %}-o fa-fw" title="{% if S_LIGHTDARK_DARK %}{{ lang('LIGHTDARK_LIGHT_STYLE') }}{% else %}{{ lang('LIGHTDARK_DARK_STYLE') }}{% endif %}"></i>
These codes were backwards in the index. When in dark style the moon showed with the 'Dark style' title.
Switching the codes around took care of that issue.

I'll have to look into this deeper to see why it's functioning the way it does. Anyone else see what I see with your install?
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

Sniper_E Online
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Light-Dark Extension

Post by Sniper_E »

Sniper_E wrote: 20 Dec 2023, 20:39In db when lightdark_status is set to '0' I see the dark style. In db when lightdark_status is set to '1' I see the light style.
That does not look like it's working correctly. It's backwards.
I found the problem. In dm's event/main_listener.php

Code: Select all

'S_LIGHTDARK_DARK' 	=> $this->user->data['lightdark_status'] ? false : true,
It needed to be written as...

Code: Select all

'S_LIGHTDARK_DARK' 	=> $this->user->data['lightdark_status'] ? true : false,

Post Reply Previous topicNext topic