Shows 20 posts at a time with 'Näytä lisää' button. Search also filters by author/category and resets pagination.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove HALLINTA link from nav, add subtle footer gear icon link.
Hide admin UI content until successful login (display:none by default).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allows reassigning posts to registered users via submittedBy field.
Shows validated badge and bold author name for linked posts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Applied sortSubcategories() to submission form picker, admin category
list, and admin subcategory checkboxes. Added the helper function to
admin.html since it's a standalone file.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Categories now show their subcategories as tags with remove buttons,
plus an input field to add new subcategories directly from admin.
Added Kala and Liha as default subcategories for Reseptit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Admin panel: new "Käyttäjät" section showing all registered users with
post count, likes count, email and join date.
Posts: submissions by logged-in users show a green "Vahvistettu" badge,
while guest submissions show a random code (e.g. #L01U51) for tracking.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- api.php: lisätään 'Muut'-alikategoria Resepteihin, Neulomiseen ja Vinkkeihin
- api.php: getOrInitCategories() lisää puuttuvat alikategoriat automaattisesti
- admin.html: poistetaan emoji-kenttä (emoji tulee kategoriasta automaattisesti)
- admin.html: alikategoriat checkboxeina → voi valita useamman samanaikaisesti
- script.js: subcategory tallennetaan aina taulukkona
- script.js: filterPosts tukee pilkulla eroteltuja alikategorioita (postSubs.includes)
- script.js: renderCards kirjoittaa subcategory-arrayn pilkulla eroteltuna data-attribuuttiin
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- upload.php: ob_start()+error_reporting(0) estää PHP-varoitusten
sekoittumisen JSON-vastaukseen; ob_clean() ennen jokaista echoa
- script.js + admin.html: lue vastaus ensin tekstinä, yritä sitten
JSON-parsinta ja näytä tarkka virheviesti (HTTP-koodi + raakavastaus)
jos JSON ei onnistu
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>