This codebase creates BookGram, a flat-file, PHP-based collaborative wiki or content management system themed after IBM OS/2 Warp 3.0.
It allows administrators and invited editors to create, edit, organize (in folders), and manage web pages using Markdown and basic HTML. Content is stored in .json (metadata) and .txt (revisions) files, eliminating the need for a database.
Key features include:
.edit-button-small, .delete-button-small) for a tighter fit.public/css/print.css to hide non-content elements and optimize styling for printing.<link> for print.css in header.php.page.php using window.print()..page-actions-bar and .print-button.header.php HTML and style.css..SELF_FIRST to ::SELF_FIRST) in uuid_migrate.php.rtrim() in functions.php (get_directory_contents and delete_folder_recursive). Replaced with substr().require_auth checks in index.php's admin-action route (later reverted in v2.05.1).index.php; move, rename, delete actions are admin-only again. Updated browser.php to hide buttons based on admin role.UUID_INDEX_FILE constant and UUID management functions (generate_page_uuid, load_uuid_index, save_uuid_index, update_uuid_index) to functions.php.get_page_data, save_page_content, delete_page, delete_folder_recursive, rename_item, move_item to handle UUID assignment and index updates.uuid: link parsing (preg_replace_callback) to page.php.page.php metadata.uuid_migrate.php script.fix_revisions.php script.move_item() function to functions.php.move-item action to index.php.moveItem() function to browser.php.UPLOADS_DIR constant and handle_image_upload() function to functions.php.save_page_content and update_user_profile to accept image URLs.index.php (save and profile-save routes) to handle uploads and select final URL.enctype and file input fields to edit.php and profile-edit.php.header.php OG image logic to prioritize feature/profile images..profile-photo-preview style to style.css.@media queries in style.css.header.php.home.php with browser.php.functions.php: Added sanitize_path, path_to_flat_slug, get_directory_contents, create_folder, delete_folder_recursive, rename_item, search_pages. Updated page functions to use paths instead of slugs.index.php: Rewrote routing for path-based access, added browser actions (create folder, delete, rename), added /search route.search.php template.edit.php to handle paths and slugs.page.php links.admin.php.style.css.main.js) and localStorage persistence. Changed window title bars and Launchpad header to purple. Changed footer to a purple "Taskbar".USERS_FILE constant definition from auth.php./profile-edit).profile-edit.php template.profile-edit and profile-save routes to index.php.update_user_profile() function to functions.php.profile.php to display new fields.style.css.?rev=timestamp).delete_page() and delete_revision() to functions.php.index.php.page.php.admin.php.style.css.Parsedown.php internal method call error by replacing the file.header.php.validate_csrf_token() in auth.php.login.php and 404.php templates.content/revisions dirs and setting permissions).load_template() in functions.php.isset($page) warning in header.php by changing to !empty($page).index.php front controller, .htaccess).setup.php, login/logout, roles: admin/editor, password hashing).