Files
discourse/script/import_scripts
JsBergbau a225da4fd3 DEV: Enhance MyLittleForum importer (#34696)
This extends the **MyLittleForum (MLF) importer** with several optional features to make migrations more complete and reliable.

### New Features (optional via environment variables)
 **Uploads import**: supports attachments and images from the MLF uploads table.  
  - Imported uploads are stored with relative links, ensuring they continue to work even if the forum domain changes.  
- **Legacy link rewriting**: absolute links (`index.php?id=...`) are converted into working Discourse permalinks.  
  - Rewritten links are also created as relative links, so they remain valid after a domain move.  
- **Parent category option**: all imported MLF categories can be placed under a chosen existing category.  
- **Upload repair pass / incremental imports:** already-imported posts can be rescanned to fix broken or newly available upload references, allowing the importer to be run again later with a more up-to-date dataset.  
- **Relaxed upload constraints**: temporarily increases file size limits and allows all extensions during the import step.  

### Other Improvements
- Adjusted for MyLittleForum 2.x schema changes (e.g. `user_location` instead of `user_place`).  
- User import now respects already staged users; avoids errors that would otherwise occur when trying to create them again.  
- Improved BBCode → Markdown conversion: lists and quotes are converted more reliably.  
  - Especially improves handling of quotes at the beginning of posts and ensures following text is not mistakenly included in the quoted block.  
- Thread interlinking restored: legacy links between threads are now rewritten to point to the correct Discourse topics.  

### Environment Variables
- `PARENT_CATEGORY` – import all categories under an existing Discourse category.  
- `REWRITE_LINKS` – rewrite absolute legacy links.  
- `UPLOADS_DIR` – path to the MLF uploads directory (flat namespace).  
- `REPAIR_UPLOAD_LINKS` – repair pass for already-imported posts with links.  
- `LOOSEN_UPLOAD_CONSTRAINTS` – relax upload size/extension checks during import and increases file size limits and allows all extensions during the import step.
2025-10-13 21:23:34 +02:00
..
2023-07-04 21:37:45 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00
2025-09-24 12:00:22 +02:00