ERC Website – reorganised folder structure Keep these at the project root: - index.php - run-local.bat - README.txt - includes/ shared PHP header, footer and functions - assets/ CSS, JavaScript and images - data/ publication data Content PHP pages are grouped by purpose: - about/ About ERC, establishment, Europe, global advocacy, leadership - values/ Justice, Dignity, Rights, Peace - work/ Our Work - publications/ Publications - events/ Events - get-involved/ Get Involved - contact/ Contact When adding a new PHP page inside one of these one-level folders, use: $basePath='../'; include dirname(__DIR__).'/includes/header.php'; ... include dirname(__DIR__).'/includes/footer.php'; Run locally: Double-click run-local.bat, then open http://localhost:8080 ERC ADMIN (Phase 1) ------------------- 1. Run the website normally. 2. Open /admin.php. 3. On the first visit, type Password + Confirm Password (minimum 5 characters). 4. After saving, log in at /admin.php with username admin and your password. 5. The eye buttons show/hide the password while typing. Admin Phase 1 includes: - Publications in English and Burmese - Hero News for the square homepage Hero box - External Hero News article fetch (headline, source name and main image) - Hero News history and "Make current" - All Publications list/delete - Admin password change - 3 failed login attempts -> 30 minute lockout Hero News behaviour: - The current Hero News is read from data/hero-news.json. - Homepage shows Headline + Source name + Picture only. - Clicking the headline or picture opens the full external article. - No separate resource/read-more link is displayed in the Hero box. - External image is copied into uploads/hero-news when possible. HERO / FEATURED CONTENT UPDATE ------------------------------ The homepage square Hero box can now show: - External news articles - ERC Statements - ERC Press Releases - ERC Articles - ERC Announcements - ERC Op-Eds - ERC Reports - ERC Messages For ERC publications: - Select an existing publication from Admin -> Hero News, OR - Tick "Also show this publication in the homepage Hero box" while publishing. - If the publication has no image, assets/images/erc-logo.png is used automatically. - Clicking the Hero headline or Hero image opens the full ERC publication page. For external news: - Paste the external article URL. - ERC Admin tries to fetch the article headline, source name and main image. - Clicking the Hero headline or Hero image opens the original external article. LOCAL ADMIN TEST MODE --------------------- - Open /admin.php directly. - No username or password is required in this temporary local-test build. - /admin-setup.php now redirects to /admin.php. - Restore secure authentication before uploading the site online. ADMIN UPDATE ------------ - Hero News / Featured is now grouped under Publications. - Every publication has Edit beside Delete. - Every Hero / Featured item has Edit beside Delete. - Image selection applies to ERC publications and external Hero News. - If no image is selected or detected, the ERC logo is used automatically. - Existing items with no image are also migrated to use the ERC logo. ADMIN PASSWORD - LIVE BUILD --------------------------- This build no longer needs PHP to edit config.php. On the first visit to /admin.php: 1. Enter a new password. 2. Confirm it. 3. The secure password hash is saved in data/admin-password.json. 4. You are logged in immediately after saving. To change it later, use Change Password inside ERC Admin.