roomgal_serv — installation 1. Load roomgal_serv.css and roomgal_serv.js once in the admin page. Dependencies: existing jQuery, unchanged anacta(), Bootstrap 4 collapse JS, existing Fancybox (only for image previews). No additional libraries. 2. roomgal_serv.php has TWO integration parts: A. Everything BEFORE the example switch goes before your existing switch, BEFORE any $action = $_POST['action'] assignment. $uplPath, $username, $admArr, $modx must already exist. B. Copy the THREE cases INSIDE the example switch into your existing switch. Do not introduce a nested switch. Keep your common die($res) tail. 3. Add a fixed container:
4. Default folder, no previews: roomgal_serv(24, 'filezHld_serv'); Default folder, previews: roomgal_serv(24, 'filezHld_serv', undefined, 1); Explicit folder: roomgal_serv(24, 'filezHld_serv', '/uploads/gal/g24', 1); Physical directory under DOCUMENT_ROOT is accepted too. Default folder is $uplPath + 'gal/g' + rid (not $urlB). Behavior - Files only, no recursion; every extension; case-sensitive alphabetical order. - File dates are filemtime in the server time zone. - Inputs contain only stems, extension badges are read-only. - on change calls unchanged anacta(). val contains two paths WITHOUT extensions. Example: /uploads/gal/g24/old|/uploads/gal/g24/new - The action is roomgal_serv_rename:webp (original extension URL-encoded). The tiny pre-switch normalizer converts this to roomgal_serv_rename and stores the extension. This avoids ambiguity when old.jpg and old.webp both exist. - Existing destinations are rejected, not intentionally overwritten. Assumes no simultaneous external writer racing the existence check. - Rename updates that row's path, input, image, link, date and sort position. Deletes remove successful rows; failures remain, including partial batch failures. - One-file deletion uses a Bootstrap 4 mini collapse. Batch deletion uses explicit checkboxes plus Delete selected, with no extra browser confirm dialog. - Select visible affects only filtered rows. Checked hidden rows stay selected; the total selected count shows how many files Delete selected will remove. - Folder realpath must be strictly below realpath($uplPath), never uploads itself. Symlink directories escaping uploads are rejected. Symlink files are displayed read-only and cannot be renamed/deleted by these handlers. - No changes to TV, order, picscr, thumbnail pairs or anacta(). - No new HTTP headers, no sleep, no image processing. Previews use the original image URL with loading=lazy (not newly generated thumbnail files). - A filename containing | cannot be renamed with the required two-path protocol; it is still listed and can be deleted. Unicode and spaces are supported.