[PR #206] [MERGED] Add support to load templates from json files #207

Closed
opened 2026-02-28 01:21:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tuxis-ie/nsedit/pull/206
Author: @bartvanhalder
Created: 7/25/2024
Status: Merged
Merged: 3/11/2025
Merged by: @tuxis-ie

Base: masterHead: master


📝 Commits (2)

  • a3ba9ed Add a way to load templates from json files
  • 8e1d003 [.gitignore] ignore json files in templates.d/

📊 Changes

3 files changed (+50 additions, -0 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 includes/misc.inc.php (+21 -0)
templates.d/template.json.example (+28 -0)

📄 Description

Our config.inc.php was getting a bit long and unreadable, so i added support for loading templates from .json files.

For existing installs this changes nothing as templates loaded from files are appended to the existing $templates before the "is this user allowed to use this template" check.

If an error is encountered loading a template a message is logged and the template is skipped.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tuxis-ie/nsedit/pull/206 **Author:** [@bartvanhalder](https://github.com/bartvanhalder) **Created:** 7/25/2024 **Status:** ✅ Merged **Merged:** 3/11/2025 **Merged by:** [@tuxis-ie](https://github.com/tuxis-ie) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`a3ba9ed`](https://github.com/tuxis-ie/nsedit/commit/a3ba9ed45e67ffa1a98d5ae67056d45d2b5764cd) Add a way to load templates from json files - [`8e1d003`](https://github.com/tuxis-ie/nsedit/commit/8e1d0035d3f099aae1e20c4a1eb522479a7be2e1) [.gitignore] ignore json files in templates.d/ ### 📊 Changes **3 files changed** (+50 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `includes/misc.inc.php` (+21 -0) ➕ `templates.d/template.json.example` (+28 -0) </details> ### 📄 Description Our config.inc.php was getting a bit long and unreadable, so i added support for loading templates from .json files. For existing installs this changes nothing as templates loaded from files are appended to the existing $templates before the "is this user allowed to use this template" check. If an error is encountered loading a template a message is logged and the template is skipped. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 01:21:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsedit#207
No description provided.