flag

2026-02-13 Development Log - SQLite Migration

SQLite Migration & Date Fixes



Today, I verified and finalized the migration from JSON files to SQLite. This change ensures better scalability for the blog.

Key Changes


  • Database: Switched to data/blog.db (SQLite).

  • Date Handling: Fixed the issue where editing a post would reset its creation date. Added a separate updated_at field.

  • Admin UI: the Admin panel now shows both created and updated dates.


  • All systems are go!




    Development Log: Layout & Banner Implementation


    Date: 2026-02-13
    Author: Seon-Bi V (Assist by AI)

    Overview


    This session focused on overhauling the blog's layout to a dense, information-rich "Wiki-style" and implementing a robust banner management system.

    Key Changes



    1. 3-Column Layout


  • Structure: Transitioned from a single centered column to a full-width 3-column layout:

  • - Left Sidebar: Navigation, Language Selector, Theme Toggle.
    - Center: Main Content.
    - Right Sidebar: Banners and Ad Content.
  • Responsiveness:

  • - Desktop: All 3 columns visible. Left sidebar togglable.
    - Mobile: Left sidebar hidden (hamburger menu), Right sidebar moves to bottom.

    2. Navigation Improvements


  • Mobile Header: Moved the hamburger menu button ($\equiv$) to the left side for better UX.

  • Desktop Toggle: Added a toggle button for the left sidebar on desktop, saving the state in localStorage.

  • Language Switcher: Fixed an issue where switching languages reset the URL parameters. Now preserves the current page/post ID.


  • 3. Banner Management System


  • Admin Interface:

  • - Replaced the simple text area with a Dynamic Banner List.
    - Support for adding/removing multiple banners.
    - Image Upload: Integrated image upload functionality directly into the banner settings.
    - Link Support: Images can have clickable destination URLs.
    - HTML Mode: Fallback to raw HTML for AdSense or scripts.
  • Frontend:

  • - Banners render stack vertically in the right sidebar.
    - Images are automatically resized to 100% width for responsiveness.

    4. Code Refactoring Update


  • admin/settings.php: extensively modified for banner logic.

  • components/sidebar_right.php: wrapper logic for banner rendering.

  • assets/css/style.css: styling for the new layout and components.


  • Next Steps


  • Monitor user feedback on the dense layout.

  • further condense the post list view if needed.



  • 2026-02-13 Update



  • Parallel Translation Optimization: Introduced curl_multi to dramatically reduce multilingual translation speed from over 1 minute to 3-5 seconds.

  • Added Related Posts Feature: Added a feature to display the 5 latest posts in the same category in a list format at the bottom of the post.

  • AI Hallucination Prevention: Strengthened prompt rules to prevent the AI from fabricating facts when modifying the text.

  • Editor UX Improvement: Modified the editor height to automatically adjust to the browser window size, allowing for comfortable writing on wide screens.

  • Bug Fixes: Fixed PHP 8 compatibility errors (500 error) and other minor style issues.

  • Comments

    No comments yet. Be the first to share your thoughts!

    © 2026 My Blog. All rights reserved.