Darkmode Plugin Inverted Pictures (Fixed)

minim
Darkmode Plugin Inverted Pictures (Fixed)
minim@8545f1c2 Saturday 5th April 2025, 02:15:24

If you use the dark mode plugin, here is some updated code provided by our friendly AI that fixed the inverted pictures. I am still going to tweak this plugin some more to try and clean up the colors of the fonts to make it a more black and white theme. The colors tend to make it look a little busy.

The file you need to edit is located in the Pluginst/darkmode folder and is named: darkmode.php You need to completely replace the code block starting with: /**
* On charge la minification avant
**/
function darkmode_head()
{

Here's the updated code block that will fix the inverted images.
function darkmode_head()
{
$plugin = 'darkmode';
# Lecture des données
$data = flatDB::readEntry('plugin', $plugin);
$config = flatDB::readEntry('config', 'config');
$out = '';
$assets = HTML_PLUGIN_DIR . $plugin . DS . 'assets' . DS;

if ($data[$plugin . 'state']) {
$out .= ' ' . PHP_EOL;
// Add custom CSS to prevent image inversion
$out .= ' ' . PHP_EOL;
}
return $out;
}

Last modified by minim@8545f1c2 on Saturday 5th April 2025, 02:20:00

Replies 2
Fred
Fred  Friday 11th April 2025, 23:56:34

Thanks minim, I just updated the plugin by integrating your css into the minifier file.
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • My last project Fast⚡︎CMS, a Flat-File cms.
  • I am currently busy 😫.

JPRuehmann
JPRuehmann  Saturday 12th April 2025, 08:00:22

After Install the darkmode plugin a big blue arrow appears in the left Side.
But only in dark mode.
How can I repair this?