feat: auto-extract color from logo + PHP extension check

Added extractDominantColor() JS function that picks the dominant
color from uploaded logo and suggests it as theme color.
Updated gdcheck.php to show all needed extensions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 17:19:08 +02:00
parent 9797fda7b7
commit d2ca790e32
2 changed files with 87 additions and 6 deletions

View File

@@ -1,6 +1,15 @@
<?php
echo "GD: " . (extension_loaded('gd') ? 'KYLLÄ' : 'EI') . "\n";
echo "Imagick: " . (extension_loaded('imagick') ? 'KYLLÄ' : 'EI') . "\n";
if (extension_loaded('gd')) {
echo "GD info: " . json_encode(gd_info()) . "\n";
echo "PHP " . PHP_VERSION . " (" . php_sapi_name() . ")\n";
echo "php.ini: " . php_ini_loaded_file() . "\n\n";
$check = ['pdo', 'pdo_mysql', 'gd', 'imagick', 'fileinfo', 'mbstring', 'curl', 'openssl', 'json', 'session', 'mysqli', 'imap', 'zip', 'xml', 'dom', 'simplexml'];
echo "=== Tarvittavat laajennukset ===\n";
foreach ($check as $ext) {
echo ($ext . ': ' . str_pad('', 15 - strlen($ext)) . (extension_loaded($ext) ? '✅ KYLLÄ' : '❌ EI')) . "\n";
}
echo "\n=== Kaikki ladatut ===\n";
echo implode(', ', get_loaded_extensions()) . "\n";
echo "\n=== Lisätietojen ini-polut ===\n";
$scanDir = php_ini_scanned_files();
echo $scanDir ?: "(ei skannattu lisä-ini-tiedostoja)\n";