Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 04/16/2026 in Posts

  1. This week I've been doing a major overhaul of the /wire/core/ directory structure aimed at improving and adding documentation. Now all core classes that will receive their own API.md documentation also have their own directory. The /wire/core/ directory kind of resembles the /wire/modules/ structure now. In addition, new API.md files have been created for the Pages, Page, PageArray, Modules and Module, all of which also improve the online API reference documentation too, which is what those links are linking to. We'll continue adding more API.md documents every week. Every time a new API.md file is completed, it gets sent over to the WireTests module to verify that everything documented in the API.md works exactly as stated. So new tests have been committed to that module as well, and more will be getting added every week. In addition, ProcessWire now has a CLI (command line interface) installer. Installing ProcessWire is as simple as typing this from the command line: php install.php When you do that, it'll present you with the installation options (see below). For human users, the "Standard usage" option is likely to be best, while AI agents will likely prefer the "Alternate usage" option: Standard usage: php install.php --generate Generate ./install-config.php for you to edit php install.php --config install-config.php Install from settings in ./install-config.php Alternate usage: echo '{"dbName":"mydb",...}' | php install.php Install from settings in JSON string php install.php --json '{"dbName":"mydb",...}' Install using an inline JSON string Other: php install.php --help Display all options That last option "--help" displays a giant screen of options, so I won't repeat it here, but take a look if you are interested. New versions of FieldtypeTable, FieldtypeCustom, FieldtypeCombo and FieldtypeRepeaterMatrix next week. Lots more in progress here too so stay tuned! Thanks for reading and have a great weekend!
    26 points
  2. Thanks for all the feedback, this is great. I just wanted to say ProcessWire has always been "back", never left. It's always been a long term project and never a fad project, so periods of rapid development and periods of slow development are normal, and I'm sure that cycle will always be the case. I've always been careful about making sure the project doesn't get bloated with short term things. So to make sure the quality is high over the long term, it's good to know when to go into rapid development, and when to let things simmer slowly. There's room for both. The other factor is that sometimes I have client work deadlines that I've got to give priority to because that's what keeps me in business, and able to keep investing in ProcessWire. I mention all this just because I don't want folks to be disappointed when there are weeks without any commits, etc., because that's unavoidable. For me this has always been a lifetime project, so ProcessWire isn't leaving or coming back, it's here to stay, as has always been the case.
    26 points
  3. There has been a lot of ProcessWire work covered this week! Here's a summary: 1. AgentTools module has been upgraded with "Site Engineer", an AI agent now built into your admin, and you can ask it questions, create migrations, or have it make other web development updates to your site by going to Setup > Agent Tools > Engineer. To enable the Engineer, you need an Anthropic API key, an OpenAI API key, or an OpenAI compatible API key (apparently several others use the OpenAI key standard). You can optionally put Engineer in "read-only" mode, which is what I do for production sites. In read-only mode, it answers questions and provides you with code for making updates yourself. But if read-only mode is not enabled, then it can act as your web developer and make changes directly, which is what I use with development sites. AgentTools provides full context to Engineer on your site's pages, fields and templates. If using ProcessWire 3.0.258 (or newer) it also provides the new API.md files to help AI know how to best work with all of ProcessWire's Fieldtypes. If you are having Engineer create or manipulate Fields on your site, it's a good idea to have 3.0.258 for the API.md support. Engineer also supports prompt caching for up to 1 hour in order to limit token usage. 2. The AgentTools now has JSON site-map generation features for AI agents. This enables an AI agent to see the full scope of your site. A second site-map feature focuses on all your site's templates and fields, essentially providing the full site schema to the AI agent. 3. In the core, we've added API.md files for all 18 of ProcessWire's core Fieldtypes, except for the comments and cache Fieldtypes, so far. In order to facilitiate this, and to facilitiate AI agent accessibility, all of ProcessWire's Fieldtypes now have their own directories as well. 4. After looking at all the API.md files, it became clear that there was plenty of room for improvement in the APIs of several Fieldtypes, so there have been major core updates to several Fieldtypes, as well as the Fields, Templates and Fieldgroups classes. 5. A Fieldtype testing framework has been built, which tests the full scope of 20 ProcessWire Fieldtypes (all the core ones, plus FieldtypeRepeaterMatrix and FieldtypeTable). It tests field creation, manipulation, traversal (where applicable), sorting (where applicable), searching with selectors, and more. I'll be uploading the testing framework to GitHub soon as well. 6. The new testing framework identified some bugs, which have been fixed. Most notable were selector matching bugs in FieldtypeFloat and FieldtypeDatetime. 7. There has been some refactoring in ProFields FieldtypeRepeaterMatrix and FieldtypeTable, plus API.md files have been generated for both. New versions should be ready soon. In fact, that applies to all of the ProFields, and I hope to cover FieldtypeCombo and FieldtypeCustom next week. 8. ProcessWire 3.0.258 has a whole lot of improvements, changes and fixes in it. Here's the commit log: https://github.com/processwire/processwire/commits/dev/ 9. Back to working on PagesVersionsPro (and have been for a few weeks) but more on that later. 10. There's probably more, but that's all I can remember at the moment. 🙂 Thanks for reading and have a great weekend! Basic examples of using Engineer for migrations:
    23 points
  4. Hi everyone, I've been running this module in production a spirits catalog with 12,000+ products — for several months. Today I'm releasing it publicly. GitHub: https://github.com/mxmsmnv/Collections The problem ProcessWire's page tree is brilliant for site structure. It's painful for data management. When you have thousands of pages as records — products, listings, vacancies, menu items — you hit the same walls on every project: no table view, no inline filters, no bulk actions, no export, no REST API, no role scoping per dataset. Every PW developer has solved some version of this. Collections solves it once. Screenshots What it does Gives any ProcessWire template a configurable admin table — live search, dropdown filters, inline status toggles, bulk actions, CSV/JSON export, and a REST API — all configured through a UI, without writing code. Admin UI: Configurable columns per collection with custom labels Live search with 300ms debounce across multiple fields including Page references Dropdown filters for FieldtypePage and FieldtypeOptions fields Inline publish/unpublish toggle via AJAX Bulk actions: publish, unpublish, delete with CSRF protection CSV and JSON export with active filters preserved Role-based permissions matrix — scope each role per collection "View in Collection" button injected into the page edit form REST API: Bearer token, query param, HTTP Basic, and PW session auth API key management with expiration dates and per-key capability scopes SHA-256 hashed keys, usage tracking, rate limiting (100 req/min) WireCache support for GET responses ProFields support: Table, Textareas, Multiplier, Repeater Matrix, Combo — including dot-notation for subfields (address.city, blocks.hero.title, prices.*.amount) Field types: Text, Textarea, Integer, Float, Checkbox, URL, Email, Date, Image, File, FieldtypeFileB2, FieldtypePage, FieldtypeOptions, MapMarker, Color Requirements: ProcessWire 3.0.244+, PHP 8.2+ There's a thread from 2013 asking for exactly this: Module Idea: Flat Listings — here it is, 12 years later. Known issues are tracked on GitHub — the module is stable for production use, active development continues.
    22 points
  5. AgentTools updates (v12) New AgentTools Page Engineer Fieldtype: provides a page editing assistant with the ability to make page edits like writing or summarizing text, importing data from external sources, generating image descriptions, managing child pages, and more. To use it, create a new PageEngineer field, add to a template and edit a page. You get an in-page assistant where you can ask for page editing help. The PageEngineer comes with full knowledge and expertise of your entire site, built in. Also new to AgentTools this week is an upgrade to the migrations system. Now you can copy/paste migrations between dev and production sites. Just check the box next to one or more migrations and click export. Transferred migrations are encrypted with unique salt values from your /site/config.php file. So for security, it's not possible for import a migration that wasn't generated by AgentTools. Lastly, AgentTools also gained a "tattletale" feature. When enabled, if you ask the agent to do something that could compromise security or is otherwise suspicious, it triggers a special tool in AgentTools that blocks the user from making further requests for an hour. It also emails you (the admin) to let you know what specifically the agent found suspicious. Core updates (3.0.261) ProcessWire 3.0.261 is on the dev branch this week and continues with our reorganization of core classes for documentation purposes. New API.md documentation files were added for: $session, $config, $files, $database, $input, $sanitizer, and PagesRaw ($pages->raw). Because most classes are getting their own directories and API.md files, I'm thinking that the WireTests module might be merged into the core, and classes and modules will come with their own tests file (i.e. Class.tests.php and ModuleName.tests.php). It just seems to make sense that tests live alongside the class they test, so that they can be easily updated with the class. All of this core recorganization is leading towards ProcessWire 4.x. LazyCron was updated with CLI support for running jobs (with option to disable http running), and $modules was updated to now have its own CLI tools (visible when typing "php index.php"). Many more API variables will be getting their own CLI tools as well. I'm now using both Claude Sonnet 4.6 and GPT 5.5 Codex to do code reviews and write API.md documentation for the core. I find they each have their upsides so am trying to put them both to good use as much as possible. This week GPT 5.5 covered several core classes, and the entire /wire/core/Pages/ set of classes. For more details on this week's updates see the full commit log here. New versions of the following ProFields have also been released this week: FieldtypeTable, FieldtypeCombo, FieldtypeCustom and FieldtypeRepeaterMatrix. In addition to new features and fixes, these all have gone through AI code reviews and now have their own API.md files as well. More modules on the way too. I think that covers everything updated this week but it's late and I'm probably forgetting something, so I'll reply with more if it comes up. Thanks for reading and h ave a great weekend!
    19 points
  6. Hi guys, I've been working on a full EditorJS integration for ProcessWire and it's reached a point where I'd like to share it and get some testing feedback before calling it stable. GitHub: https://github.com/mxmsmnv/FieldtypeRapid This is a development preview. The core functionality works, but I'm looking for testers on different server configurations and ProcessWire setups before a stable release. Please report issues on GitHub. Why EditorJS instead of CKEditor or TinyMCE? CKEditor and TinyMCE are document editors — they produce a single blob of HTML. That HTML is hard to restructure, style consistently, or repurpose for different output targets (web, mobile, PDF, API). EditorJS is a block-based editor. Every paragraph, heading, image, and quote is a separate JSON object with a type and structured data. This means: Content is stored as clean JSON, not tangled HTML Each block type can be rendered differently per context Easy to add, reorder, or remove blocks without breaking surrounding content Output is fully controlled server-side via PHP renderers — no frontend JS required It's closer in concept to Notion or Gutenberg than to a traditional WYSIWYG. What Rapid does: 17 block types: paragraph, header (h1–h6 with auto anchor IDs), quote, nested lists, table, code, delimiter, warning, checklist, raw HTML, image (WebP convert + resize), file attachments, YouTube/Vimeo embed, alert (8 color variants), toggle/accordion, link preview with OG metadata Inline tools: bold, italic, underline, inline code, marker, link Template API: echo $page->body; // render all blocks echo $page->body->toText(); // plain text for meta/search echo $page->body->renderWith($renderer); // custom renderer 4 CSS frameworks — Vanilla, Tailwind, Bootstrap 5, UIkit 3 Frontend editing — inline editor on frontend for authorized users No build step needed — pre-built js/dist/editor.js included. Requirements: ProcessWire 3.0.200+, PHP 8.2+ Any feedback on installation, rendering edge cases, or block behaviour is welcome!
    16 points
  7. This week we have ProcessWire 3.0.259 which includes several improvements, but my favorite is the addition of a new module type called "CliModule" which is short for "Command Line Interface Module". CliModules are those that provide the option for running from the command line. To list the available actions from command line modules, you can type "php index.php" in ProcessWire's installation directory. If "php" is not in your path, you'll have to type "/path/to/php index.php" instead, or add it to your path. Here's example output on my installation: As you can see above, I've got AgentTools, WireTests and an example "Hello World" CliModule showing the available command line options. If I want to execute one of the commands, then I just type what it indicates. For example, here I will run `php index.php test FieldtypeText` and here's the output: Here's a simple example of a CliModule: <?php namespace ProcessWire; class HelloWorldCli extends WireData implements Module, CliModule { public static function getModuleInfo() { return [ 'title' => 'Hello World CLI module', 'description' => 'Just an example', 'version' => 1, 'cli' => 'hello', // Example: php index.php hello ]; } public function executeCli(array $args) { $command = $args[0] ?? ''; $name = isset($args[1]) ? $args[1] : 'friend'; if($command === 'hi') { echo "Hello there $name!"; } else if($command === 'bye') { echo "Goodbye $name, see you later!"; } else { echo "Specify 'hi' or 'bye' optionally followed by a name"; } } public function getCliCommands() { return [ 'hi' => 'Say hello', 'bye' => 'Say goodbye', ]; } } For more details on the CliModule format, see wire/core/CliModule.php Improvements have continued with the AgentTools module. This week we added: New multi-model support: You can now configure multiple different agents in the module, and choose which one you'd like to use from the Engineer screen. Details New agent-memory support: Now when you make a request of the Engineer, it remembers it for follow-up questions and changes. It keeps a conversation history for context of what you are working on. Details New support for subagents: This enables any of the agents to launch additional agents when/where it helps to do so. For instance, specialist agents, or lower cost agents for simple jobs, and who knows what else. Claude requested the feature and also implemented it, so I'll be interested to see how it gets used. Details New agents configuration screen where you can define up to 10 agents (that's plenty, right?). Details Also new this week is a new WireTests module testing suite for ProcessWire. This first version focuses on testing all of ProcessWire's Fieldtype modules (including a few ProFields ones as well), but it's easy to add tests for any kind of module type. So we'll be adding more tests and improving existing tests as this module moves forward. For details head on over to: WireTests Thanks for reading and have a great weekend!
    14 points
  8. Check out what @Jonathan Lahijani sent me in the mail. This is so cool!
    13 points
  9. Hi everyone, Every site I've launched eventually had a database incident — corrupted table, failed migration, bad deploy. Having a reliable backup system that runs automatically and stores offsite is non-negotiable. This module is what I use in production. GitHub: https://github.com/mxmsmnv/ProcessDbBackup What it does: Three independent backup types — Regular, Weekly, Monthly — each with its own LazyCron schedule and retention count Admin home widget — shows status (🟢 OK / 🟡 Outdated / 🔴 No backups) per type with "Create now" buttons Backblaze B2 upload — optional offsite storage after every backup, keep or delete local copy Chunked upload — upload .sql.gz from your computer in 2MB chunks, bypasses upload_max_filesize entirely Streaming restore — reads .gz line-by-line, flat memory usage regardless of dump size Partial restore — select individual tables from a backup Pre-restore auto-backup — safety backup of current DB before any restore Backup integrity verification — gzip check + SQL structure validation Lock file — prevents concurrent backup processes Exclude tables — skip cache, sessions etc. from all backups Storage protected with .htaccess deny-all Backup methods: mysqldump (preferred, InnoDB-safe hot backup) with PHP PDO fallback. Restore via mysql CLI with PHP PDO streaming fallback. Requirements: ProcessWire 3.0+, PHP 8.0+, zlib, PDO. mysqldump/mysql CLI optional but recommended for large databases. MIT License.
    12 points
  10. This week on the dev branch we have around 35 commits that cover mostly minor bug fixes. Most of them were submitted by @adrian and several others were found by Claude and GPT 5.5 Codex using the WireTests framework. Claude and Codex seem to work well together, each having different strengths, and they are always complimenting one another. Codex seems to be more accurate with the technical stuff, so is reviewing everything before it gets committed, often finding and fixing details along the way. Claude usually writes better commit messages, so Claude is handling most of the commits. A couple new API.md files were added this week also: WireCache ($cache) and WireMail ($mail). We're getting close to having all the API variables covered, and all the Fieldtype modules have already been covered. Some new tests were added and updated in the WireTests module as well. WireTests has also been updated with the ability to support external tests. This enables you to specify a different directory or php file to run for tests, rather than the default. This will come in handy as we start moving the test files into the core. But the majority of this week was actually spent setting up a new computer. I got a M5 Macbook Air to replace my 2017 iMac, and it's taken most of the week to get things setup the way I want, and I'm still working on the details. It's been so long since I've had a new computer that I forgot how much work it is to get things just right. 🙂 Thanks for reading and have a great weekend!
    11 points
  11. Hey everyone! I'd like to share Start - a module that replaces the default ProcessWire admin home screen with a configurable personal dashboard. The problem it solves As your ProcessWire install grows, the Setup menu gets long - on smaller screens it overflows and you end up scrolling just to reach the tools you use every day. Start is the fix: think of it as the Windows Start button for your PW admin. Pin exactly what you need - modules, pages, whatever - and get to it in one click from the home screen. The result Features Two view modes - list and icon grid, preference saved per-browser Visual drag-and-drop editor at /setup/start/edit/ - reorder groups and links without page reloads Font Awesome 6 icons - 1887 icons with a searchable popup picker PagePicker - browse the full page tree directly from the URL field Example button - auto-populates with your installed Process modules and their FA icons Widget on the default admin home page Access control via start-dashboard permission Fully translated editor UI — 20 languages including RTL support for Hebrew and Arabic Supported languages English, Russian, German, French, Spanish, Polish, Ukrainian, Italian, Dutch, Portuguese, Chinese, Japanese, Turkish, Czech, Finnish, Korean, Hindi, Hebrew, Arabic, Hungarian. Installation Install like any other module — upload or place in /site/modules/, then install via Modules → Refresh. A Start item will appear under Setup in the admin menu. Make Start your admin home screen (optional) By default Start lives under Setup. To make it open whenever you click the admin logo or navigate to /admin/: Go to Pages in the admin menu Find the Admin page and click Edit In the Process field, select Start from the dropdown Save Links GitHub: https://github.com/mxmsmnv/Start
    11 points
  12. Hi all, a small confession from the frameless corner of the PW universe: in the last 15 years we've spent way too many evenings doing the same FTP-shuffle on shared hosting. Delete everything in site/, drop the DB via phpMyAdmin, re-upload, run install.php, log back in, find out the bug we were chasing only reproduces after a reset, sigh, repeat. The reason we do this on real hosting at all is that the gnarly bugs in modules-under-development never show up locally — AllowOverride, mixed file ownership, mod_security, you know the drill. But "let's test cleanly on the real server" and "no SSH access" don't combine well. So we built ProcessWireReset: a module that wipes a PW install back to clean profile state from inside the admin. No SSH, no FTP, no phpMyAdmin. Click the button, log back in, you're at a freshly installed PW with your superuser intact and any modules you marked as keep re-installed automatically. A few things worth knowing, since destructive modules deserve some care: Modules to keep + Directories to keep. Two fields in the config: one picks which modules survive (transitive dependencies included), the other is a free-form list of paths under site/ that should be spared by the cleanup — handy for things like templates/RockIcons or assets/backups that live outside the module directories. Custom tables go into a snapshot. After the reset you can pick which module-specific tables to restore. Auto-restoring everything turned out to fight with re-installed schemas more often than we liked. The reset can crash mid-way — a kept module's install() can fatal in surprising ways. The confirmation modal hands you a one-time recovery URL with a 256-bit token. If the worst happens, that URL gives you a clean reinstall with your original credentials. Belt, braces, and one extra strap. It's interactive only. No cron triggers, no CI hooks. The destructive button has a real human in front of it, on purpose. Pairs nicely with GitSync: If you're already using our GitSync module, ProcessWireReset is the missing other half. GitSync pulls a fresh module version from your GitHub repo into the live install at the click of a button — but it doesn't touch the DB or re-run install(). After a GitSync pull that changed schemas, fields, or admin pages, the previous install state and the new code drift apart. Hit Reset, the module is removed and re-installed cleanly from the freshly pulled code, and you're testing what you actually shipped instead of a frankenstein of old DB state and new files. That GitSync → Reset → test loop is what we use daily on shared-hosting test installs where SSH isn't an option. Repo (MIT): https://github.com/frameless-at/ProcessWireReset Modules Directory: https://processwire.com/modules/process-wire-reset Caveat the obvious: this thing is for development, not for production. Treat it accordingly. Curious to hear what you build/break with it. Bug reports and pull requests welcome. Cheers, Mike
    10 points
  13. Hi everyone, I’ve released a new module: ProcessLegalDocs GitHub: https://github.com/mxmsmnv/ProcessLegalDocs ProcessLegalDocs generates legal documents directly from the ProcessWire admin, including: Privacy Policy Terms of Use Cookie Policy Data Processing Agreement CCPA Notice Refund Policy Disclaimer It currently supports 93 jurisdictions and 44 languages, with jurisdiction-aware language selection and document requirements. This is also the first module built on top of my new Context module: https://github.com/mxmsmnv/Context Context acts as the AI/site-analysis base layer. ProcessLegalDocs uses it to understand the site structure, installed modules, fields, pages, and configured AI gateway, then uses that context to generate more relevant legal documents. The module can still work without Context, but in that case it falls back to more generic templates. For best results, Context should be installed and configured with AI. Main features: Generates Markdown legal documents with YAML frontmatter Stores files in /site/assets/legal/ Includes dashboard, preview, download, validation, regenerate, delete, and ZIP export actions Supports many privacy/data protection regimes, including GDPR, UK GDPR, CCPA/CPRA, COPPA, PIPEDA, LGPD, APPI, PIPL, DPDP, PDPA variants, and many US state privacy laws Includes settings for owner/company data, DPO, business audience, data categories, processors, analytics, payments, email/marketing tools, cookies, refunds, subscriptions, review status, and optional ProcessWire page publishing Uses ProcessWire admin UI conventions / AdminThemeUikit Requirements: ProcessWire >= 3.0.255 PHP >= 8.3 Context module optional, but recommended for AI generation Let’s take a look at the module interface: Install: Clone into /site/modules/ProcessLegalDocs/ Refresh modules Install ProcessLegalDocs Open Setup → Legal Docs GitHub: https://github.com/mxmsmnv/ProcessLegalDocs Context module: https://github.com/mxmsmnv/Context This is an early release, so feedback, testing, issue reports, and ideas are very welcome.
    10 points
  14. I am now playing with HTMX for building something like that
    9 points
  15. Holy... this feels like a bit of Christmas and Easter on the same day during summer holidays. Just plugged Z.AI GLM-5.1 into this and ... From the side notes:
    9 points
  16. You won't believe how these changes make my day(s) now! Moving away from ProcessWire to NextJS/AstroJS/HonoJs/WhateverJS just to be able to prove a concept and go live within a super short time using AI/LLMs/Agents was hard but I got things done. I was able to test things, to experiment, to explore, to fail, to succeed. Well... now ProcessWire is back. Back in my preferred stack of tools. Back on #1. I've already moved 2 big projects back from HonoJS and NextJS to ProcessWire. The RSS Monitoring Tool and another one. Cloudflare Workers and Vercel were great hosts with pretty awesome free tiers, yet... at some point I scratched limits big time. Now everything is hosted on H*stinger for a few dollars a month with full CI/CD pipeline, no limits on reads/writes to the database, just a 5GB size limit per database and some other weird limits those projects will never reach. It's unbelievable how fast things turned around and back to a language (PHP) I actually can read and understand and a framework I kind of know how to work with.
    8 points
  17. The memory feature is now active in AgentTools and it's enabled by default. I have to say it makes the experience a whole lot better. Also, we've updated it so that agents can now decide what API.md files they want to receive, and whether or not they want sitemaps/schema, rather than is sending stuff the may or may not need. So the "Include extra context" setting in engineer is now removed since it's no longer necessary. More coming by Friday.
    8 points
  18. I can't wait to play with all this stuff. I love that ProcessWire was envisioned over 2 decades ago, yet is adaptable with the cutting edge in web development. This just speaks to how well it was architected when it was publicly released. This feels like the next era of ProcessWire!
    8 points
  19. @wbmnfktr Thanks! This is great to hear, this kind of feedback makes my day. 🙂
    7 points
  20. This will retire my whole set of ProcessWire skills... and I love it! I really enjoy the pace and direction you, @ryan, and ProcessWire are going now. Let alone AgentTools in a fresh installation of ProcessWire does some magic with LLMs (from super cheap Mistral, Deepseek, to great models like Kimi 2.6, MiniMax 2.6, and to Opus 4.6/7 and Codex 5.4/5) which was NOT possible in that way 6 weeks ago. 🥰
    7 points
  21. Support for sub-agents has been added in version 7, now posted to GitHub. Your primary agent can now delegate to other agents when it deems it worthwhile. They can be more instances of the same agent, or instance of other agent models you've defined in the module configuration. More details further down. This version also adds a public API method for sharing agent configuration with other modules, which was requested by @psy. To get agent configuration use $at->getAgents(); (to get all) or $at->getPrimaryAgent() to get the primary agent. See the README file (near the bottom) for instructions on how to use it. Each of the returned $agent objects also includes an ask() method, for when you want AgentTools to handle the request/response process for you as well: $agent = $at->getPrimaryAgent(); $answer = $agent->ask('What is the capital of France?'); echo $answer; Claude Code both requested and developed the sub-agents feature and I asked it to describe some examples of when/where it might be used:
    7 points
  22. I made a little update to 1.3.7, bringing it to the current PHP8+ and PW3+ standards. Changes in 1.3.7 (2026-04-22) Updated for ProcessWire 3.x and PHP 8.x compatibility Declared class properties explicitly to fix PHP 8.2 dynamic property deprecation Fixed nullable type hints on render() signature (?array, ?Page) required since PHP 8.0 Replaced global wire() calls with $this->wire() for correct PW3 multi-instance scoping Replaced new PageArray() with $this->wire(new PageArray()) for proper instance binding Replaced object identity comparisons (===) with ID-based comparisons (->id ===) for $is_current and $is_root Replaced loose null comparisons (!= null) with strict (!== null) throughout Fixed misleading single-line if/else in xtemplates block with proper braces Removed unused $v_unformatted variable in parsePlaceholders() Replaced $this->fields / $this->users magic access with $this->wire('fields') / $this->wire('users') Updated getModuleInfo(): added icon, requires (PHP>=8.0, ProcessWire>=3.0.0), updated href to https Bumped version from 1.3.6 to 1.3.7 I only tested it on a site I'm currently working on, and it still works the same. But if you encounter any issues please let me know.
    7 points
  23. Well, it's been about a year in the making, but v5 is finally available. I have upgraded a lot of sites to it now without issues, but I would still caution you to be ready to revert (or delete module) files if the namespace changes cause any issues - there were a lot early on. The two new banner features are: the console panel can now run very long running scripts (there is a one hour limit just so that broken scripts don't run forever) which is great for massive batch modifications or the like. The dumps recorder panel (either manually loaded or via Enable Guest Dumps) now live polls for new dumps so you don't need to continually load the page to see the entries as they are logged. Have fun! Breaking Changes - Minimum requirements bumped to ProcessWire 3 and PHP 7.1 - Removed legacy Tracy 2.5.x core branch and FireLogger support - Panel DOM IDs now include `ProcessWire-` prefix — update any custom CSS/JS targeting panel IDs Namespace Support - Full `namespace ProcessWire` support across all panels and POST processing files - Autoloader bridge for seamless non-namespaced to namespaced module migration - Third-party panels bridged automatically via `class_alias()` Security - Comprehensive security hardening: XSS sanitization, CSRF protection on all panels, directory traversal fixes, CSP nonces on all inline scripts, cookie SameSite enforcement, and input sanitization New Features - Console — long-running scripts automatically switch to background polling, surviving gateway timeouts; session locks released so you can continue browsing while scripts run; storage migrated to IndexedDB - PW Version Switcher — extracted into its own class with automatic version reverting on failure - Dumps Recorder live polling — live-polls for new dumps from other users and guest sessions - File Editor BlueScreen integration — exception page links open in the built-in file editor - Various smaller additions across Diagnostics, API Explorer, Request Info, and PW Info panels Bug Fixes - PHP 8.x compatibility fixes for `htmlspecialchars()`, `trim()`, and `isset` null handling - Fixed Console panel snippet and polling issues, including cache-busting for CDN/proxy environments - Fixed File Editor not opening files linked from BlueScreen exception pages - Fixed Adminer URL/namespace issues and thumbnail viewer path handling - Fixed Debug Mode panel to use modern API methods instead of deprecated ones - Fixed API Explorer "What's New" section and reflection errors for hooked methods - Fixed "unsaved changes" false positive when saving pages in PW admin - Windows path and line ending fixes Performance - Session lock contention reduced - Various loop and query optimizations
    7 points
  24. Okay multi-model support is now ready and in the current posted version (v5) of AgentTools: Multi-model support — configure additional AI providers/models beyond the primary; each uses its own API key and endpoint Additional models textarea in module config accepts one model per line in pipe-separated format: model | api-key, model | api-key | endpoint, or model | api-key | endpoint | label; provider is auto-detected from the key prefix (sk-ant-* = Anthropic, all others = OpenAI-compatible); whitespace around pipes is optional; lines beginning with # are ignored Control room collapsible fieldset in the Engineer form with model selector and context options; auto-expands when non-default settings are saved Context selector radio in Control room: All (site maps + API docs), Custom (choose individual items), or None (no extra context, useful for general questions or token-limited providers) There's still about 2-3 hours left on the memory feature, which I don't have today, so that'll be in a day or two. If anyone wants a free AI tool (api key) to use with AgentTools, Groq ("groq" not "grok") seems to do fairly well with ProcessWire: https://console.groq.com/home -- note however that on the "Engineer" screen in AgentTools, you'll want to select "Extra content to include: None" because the free Groq doesn't not accept a lot of data in the submitted prompts. But it can still query your ProcessWire installation for all of that info, so it works just fine.
    7 points
  25. Btw, one feature that wasn't quite ready this week for AgentTools was Engineer memory. Currently every prompt is like a new thread. But next week we'll enable memory, so that it has context of all your previous prompts.
    7 points
  26. Hi everyone I've started a new module called SEO NEO It's a new SEO module built for today's SEO, on today's ProcessWire. I hadn’t planned another module, but I keep returning to the same niggling thought: SEO is too important to our clients' sites (and businesses) to depend on modules that are not being actively developed keeping pace with how SEO works today. So that's pretty much it. SEO NEO will be free. An Ultra/Pro version will follow and include genuinely useful additions for industry professionals. I'll have more soon, but if you have any SEO requests, my DMs are open. Cheers Peter
    6 points
  27. Hey everyone I'm pleased to report that MediaHub 1.16.0 has been released. Here's a breakdown of the changes. The next release will optimise bulk upload and crops. I will also add integrated focus points cropping. 1.16.0 Changelog Admin navigation Optional MediaHub link in the admin top bar. A new module setting (Show MediaHub link in main navigation) adds Media Hub to the admin top bar. Custom label for the top-bar link. When the top-nav option is on, a new Custom label field lets you override what appears in the top bar. Useful when the localised "Media Hub" string is verbose or when your team prefers a different term (Media, Assets, Library, DAM). Leave blank to keep the localised default. Setup → Media Hub label is unaffected. Library and inputfield Drag-to-reorder thumbnails in MediaHub fields. Just like the native InputField, you can reorder thumbnails to take advantage of first() and last() etc. Works across any view mode (grid, proportional, detail). Master "select all visible" checkbox in the table view header. Tick the column header to select every row currently rendered; untick to clear. "Add more" button now matches stock InputfieldFile Font, colour, hover state, and icon spacing across AdminThemeUikit, Reno, and Default are more consistent Bug fixes Library search now covers Alt/Description, Labels, and Collections. Previously search only matched the asset title and filename. Searching by exact ID is also now reliable. Renamed filename and title in the upload queue are now applied on upload. Editing the filename stem or title in the upload queue rows had no effect; the values were not transmitted to the server. Both fields are now picked up and saved with the new asset. Duplicating an asset preserves its Collections and Labels. Cloned assets were losing the page-reference fields. Both are now copied explicitly to the new asset. The duplicate confirmation message also clarifies that crops are not copied (they can be re-generated on the duplicate). Cleaned up a stray PHP warning in the library view left over from the v1.15.0 Tags → Labels rename. PHP 8.5 deprecation notice in the MediaHub inputfield resolved (explicit nullable parameter typing). Defensive changes Server-side upload batch limit now matches the configured browser-side limit. Previously the server hard-capped to 50 files per request even if Maximum upload batch had been raised higher; both ends now read the same setting. Bulk-import requests are now capped at 500 selections per request. Selecting thousands of existing site images at once was holding a single PHP request open for many minutes with no progress feedback and no resume path on failure. Larger jobs now surface a clear message asking you to import in batches. Upload temp-file cleanup window extended from 60 seconds to 5 minutes, to avoid deleting an in-flight temp file mid-write on slow connections. Container pages at the site root reinforced as hidden + system on upgrade, so the data-tree containers (Media Hub, Labels, Collections, Assets, Crops) cannot accidentally appear in front-end navigation. Security Import-by-URL is now safer on shared and self-hosted servers. Imports from external URLs are now hard-capped at 5 MB per file and refuse URLs that resolve to private or reserved IP ranges (mitigating server-side request forgery), and reject any non-HTTP(S) protocol on the initial request and on any redirect. Cheers Peter
    6 points
  28. Working with AI in PageGrid Inspired by projects like AgentTools, I began investigating how well an AI could handle PageGrid’s native PW structure (Pages, Templates, and Fields). The results were surprisingly good and with a few targeted optimizations, the workflow has become remarkably solid. With the latest updates, an AI agent is reliably able to create and design PageGrid layouts, create new block templates, or perform content updates. To teach AI how to "speak PageGrid", I created a small AGENTS.md file that acts as a central hub. I’ve then added specific "skills" in separate .md files for various tasks ensuring the AI only loads the documentation it actually needs. This approach is highly optimized to minimize token consumption, allowing even "smaller" models like GPT-4o mini or Claude Haiku to produce error-free migrations. To make this possible, I also introduced dedicated Migration Functions that allow the AI to programmatically add items or set styles. For CLI-based projects, I highly recommend the AgentTools Module to streamline the integration. Beyond CLI support, AgentTools also provides a native AI interface directly within the ProcessWire backend editor. Getting Started Install the lastest version of the FieldtypePageGrid module (try for free). Tell your AI agent to read the PageGrid agent guide first: That file gives the agent everything it needs to understand PageGrid and routes it to the right documentation for your task. What You Can Ask the AI to Do Build or modify a layout Create pages with blocks, apply styles, set up responsive layouts using CSS grid columns. Example prompts: "Create a landing page with a full-width hero section and a 3-column feature grid below it." "Add a text block and an image block side by side inside the first group on my homepage." "Make the hero block have a dark background and white text, with 60px padding on desktop and 24px on mobile." The core advantage here is that the AI doesn't write your frontend code from scratch. The HTML and logic are already defined in your PageGrid Block Templates. The AI simply acts as an orchestrator, assembling these blocks and applying styles. This ensures the output remains clean, semantic, and easy to maintain via drag-and-drop later on. Create a custom block template Define a new block type with custom fields and register it with a PageGrid field. Example prompts: "Create a custom block called pg_testimonial with a quote text field and an author name field." "Create a custom card block with a title, description, and link field, and add it to my homepage PageGrid field." Write a site template Render a PageGrid field inside your own PHP template file. Example prompts: "Show me how to render my PageGrid field inside my home.php template using markup regions." "Generate a site template for pagegrid-page that includes the PageGrid output between the header and footer." Docs Documentaion
    6 points
  29. Reading through the commits log is like never before. I guess we are going to have a lot of cool stuff we were waiting for happening soon.
    6 points
  30. Hi everyone, Built this for a financial news site that needed live stock quotes embedded inline in editorial content. Drop a ticker into any text field and it renders as a live badge with price, change, and direction - clicking opens a full detail popup. GitHub: https://github.com/mxmsmnv/Stocks What it does: Live price badges - ticker, price, change amount/%, direction arrow; click opens a popup with open/high/low, 52-week range, P/E, volume, market state Three data providers - Yahoo Finance (free, no key needed), Finnhub, Alpha Vantage TextFormatter with three parse modes: Explicit [stock:AAPL] tags Cashtag/hashtag - $AAPL, #TSLA Auto-detection by company name and aliases in text Company Manager - tracked companies with names, aliases, enable/disable toggles, bulk CSV import Four CSS frameworks - Vanilla CSS (built-in), Tailwind, Bootstrap 5, UIkit 3; auto-detected or manually set File-based cache with configurable TTL and per-ticker clear from admin Circuit breaker - pauses API calls after repeated failures, serves stale cache with ~ marker Custom provider API - add any data source by extending StocksProviderBase $stocks = $modules->get('Stocks'); echo $stocks->renderBadge('AAPL'); echo $stocks->renderBadgeAs('TSLA', 'bootstrap'); Requirements: ProcessWire 3.0+, PHP 8.2+ MIT License.
    6 points
  31. Yes, I know it well — great Dashboard module! I've used it on almost every project to keep the admin from feeling bare. But as projects grew, I kept hitting the same wall: customizing Dashboard meant writing PHP for each install, and the widget lists got unwieldy. Start (and its companion module Collections) came out of that frustration — the goal was a fully visual, no-code editor where you just drag, drop, and pick icons without touching any config files.
    6 points
  32. Got my vote. I've implemented https://github.com/php-enqueue in a couple projects. @ryan Nice to se the Cli interface, just wanted to give a heads up of wire-cli and rockshell. These have been around from quite a while, something could be inspired from these libraries or maybe pick up from the current state of the libraries to work on things like scheduling/queue/agenttools
    6 points
  33. CLI modules sound great, can't wait to play around with that! Two things I hope ProcessWire will eventually tackle natively (and also the things I currently think are kind of its weak points) are scheduled tasks and queues. For reference: https://laravel.com/docs/13.x/scheduling (or, pardon my french, https://developer.wordpress.org/plugins/cron/ and https://developer.wordpress.org/cli/commands/cron/) and https://laravel.com/docs/13.x/queues. I would assume that Jonathan was thinking of something similar, but I won't try to speak for him 🙂
    6 points
  34. Wow. These "ProcessWire as a web application framework"-type updates are coming in strong! Migrations, CLI, Tests, AI. One can wish for a maybe first party queue system too. 😄
    6 points
  35. Welcome to the dedicated MediaHub community support and discussion forum. Big thanks to @ryan for setting this up. Really appreciate it! 🙏 This will be the main home for MediaHub support, discussion, feature requests, and general chat. If you have a question, spotted a bug, or simply want to share how you're using it, please post here. I hope that it'll help build up a searchable knowledge base for everyone. Other ways to get support: Private email (for anything sensitive or account-specific) GitHub issues (coming soon - dedicated repo for confirmed bugs and feature requests you'd like tracked) Looking forward to the conversations ahead. And thanks to everyone who's been testing and giving feedback so far.
    6 points
  36. I like that idea, maybe a select/drop-down under the engineer prompt box where you can select the model to use? And we should be able to share memory between them too, once it's added.
    6 points
  37. TextformatterFontAwesome A Textformatter module for ProcessWire that converts text shortcuts into Font Awesome icons. Features ✅ Converts shortcuts like :fa-star: into Font Awesome icons ✅ Flexible icon mapping configuration ✅ Support for Font Awesome 6+ (solid, regular, brands) ✅ Automatic asset loading from CDN ✅ HTML or SVG output ✅ Cache for improved performance ✅ Easy configuration from the ProcessWire admin Installation Download or clone this module into /site/modules/TextformatterFontAwesome/ Go to Modules > Refresh in the ProcessWire admin Install the TextformatterFontAwesome module Configure icon mappings as needed Configuration Icon Mappings Define your text shortcuts and their corresponding Font Awesome classes: :fa-star: = fa-solid fa-star :fa-heart: = fa-solid fa-heart :fa-home: = fa-solid fa-house :fa-user: = fa-solid fa-user :fa-email: = fa-solid fa-envelope :fa-facebook: = fa-brands fa-facebook :fa-twitter: = fa-brands fa-twitter Configuration Options Output Format: HTML (CSS) or SVG Load Assets: Automatically include Font Awesome from CDN CDN Version: Font Awesome version to load (default 6.5.1) Custom CSS: Optional URL for custom CSS Enable Cache: Cache mappings for improved performance Usage 1. Apply to Fields Go to Setup > Fields > select your text field and in the Details tab: Under Applied Textformatters, select Font Awesome Icons Save the field 2. Use in Templates // The textformatter is automatically applied when rendering the field echo $page->body; // Shortcuts like :fa-star: are converted automatically // Or apply manually $textformatter = $modules->get('TextformatterFontAwesome'); $text = "I like this page :fa-heart: It's great! :fa-star:"; $textformatter->format($text); echo $text; // Output: I like this page <i class="fa-solid fa-heart"></i> It's great! <i class="fa-solid fa-star"></i> 3. Shortcut Examples Shortcut Result Description :fa-star: <i class="fa-solid fa-star"></i> Solid star :fa-heart: <i class="fa-solid fa-heart"></i> Solid heart :fa-home: <i class="fa-solid fa-house"></i> Solid house :fa-facebook: <i class="fa-brands fa-facebook"></i> Facebook logo :fa-email: <i class="fa-solid fa-envelope"></i> Email envelope Content Usage Examples In a Text Editor Welcome to our site! :fa-star: Contact us: - Email: info@example.com :fa-email: - Phone: +1234567890 :fa-phone: Follow us on social media: - Facebook :fa-facebook: - Twitter :fa-twitter: - Instagram :fa-instagram: Thanks for visiting! :fa-heart: HTML Output Welcome to our site! <i class="fa-solid fa-star"></i> Contact us: - Email: info@example.com <i class="fa-solid fa-envelope"></i> - Phone: +1234567890 <i class="fa-solid fa-phone"></i> Follow us on social media: - Facebook <i class="fa-brands fa-facebook"></i> - Twitter <i class="fa-brands fa-twitter"></i> - Instagram <i class="fa-brands fa-instagram"></i> Thanks for visiting! <i class="fa-solid fa-heart"></i> Advanced Customization Custom Mappings You can create your own shortcuts: :my-icon: = fa-solid fa-custom-icon :company: = fa-solid fa-building :product: = fa-solid fa-box Custom CSS If you use Font Awesome Pro or have custom icons: .fa-custom-icon::before { content: "\f123"; } Programmatic Usage // Get the module $fa = $modules->get('TextformatterFontAwesome'); // Format text $content = "Text with icons :fa-star: and :fa-heart:"; $fa->format($content); echo $content; // Configure dynamically $fa->set('outputFormat', 'svg'); $fa->set('loadAssets', false); Performance The module includes cache for parsed mappings Assets are loaded only when needed Smart detection of content with icons Compatibility ProcessWire 3.0+ Font Awesome 6.0+ PHP 7.4+ Support To report bugs or request features, visit: GitHub Issues License Mozilla Public License v2.0 Credits Based on TextformatterEmoji by Ryan Cramer.
    6 points
  38. I feel the same way when things I'm used to change. E.g. the switch from XD to Figma a few years ago felt unfamiliar at first and it slowed me down. Mainly because I had a lot of things stored in my head that turned out to be different. Now it's the other way around and I could never go back to working with XD. I was also pissed at apple when they updated the OS to use the new Liquid Glass design system, now everyone seems to love it and designers copy it (still not the biggest fan, but I can live with it now) 🙂. I hope the new theme will grow on people. The simpler color scheme (compared to the original Uikit theme) and CSS variables make theming much easier. You can quite easiely customise it to your taste if you don't like the defaults. And it shares some concepts with AdminThemeCanvas like the fixed header and a more minimal modern aesthetic that fit very well for a web app like PW in my opnion. I am using the Konkat theme for all my new projects. @diogo has already sent detailed documentation for the Konkat theme to Ryan, which he will hopefully publish on the site soon. The new docs are especially interesting for module developers. @maximus has also done a great job with the style system guide. I think that will also help demonstrate the benefits of the new theming system. The theme now also supports UIkit components out of the box. We will have to wait a bit for Ryan to decide where those docs will be published. AdminTheme Canvas has served me well for many years, and I’m glad so many of you have used it! If anyone wants to take it over, feel free to send me a DM. But I think it’s better to use the core theme as a replacement.
    6 points
  39. Hi everyone, I’ve uploaded an updated version of the module. It is now called NativeAnalytics. This should be treated as a new module release, not just a small update of the earlier test versions. Important: If you previously tested PW Native Analytics, please uninstall the old module first and then install NativeAnalytics as a fresh install. I did not add a migration path from the old module to the new one, because the module name and structure changed during development. A clean install is the safer option. The main idea behind NativeAnalytics is simple: to provide a useful analytics dashboard directly inside ProcessWire, without relying on external analytics platforms, third-party scripts, or external APIs. Everything is handled natively inside the CMS, which makes it a good fit for projects where you want a simpler, self-contained analytics solution. The module currently tracks and displays things like: page views unique visitors sessions current visitors top pages referrers devices and browsers 404 hits engagement events such as form submits, downloads, tel/mail clicks, outbound clicks, and custom CTA events It also includes: charts and trend views comparison between periods custom date range filtering page-level analytics inside the page edit screen exports to CSV, PDF, and DOCX helper examples and a small snippet generator for custom event tracking ! In this latest version I also added several privacy and usability improvements: optional cookie-less visitor/session mode improved consent-based tracking helper functions for custom consent integrations optional PrivacyWire localStorage consent helper support cleaner behaviour when global tracking is disabled improved admin theme compatibility and spacing polished dashboard layout and panel alignment added a shortcut button to the module settings from the analytics dashboard The reason I built this module was that I wanted something that feels natural inside ProcessWire itself, instead of just embedding another analytics service into the admin. For many sites, it can be useful to have core traffic and engagement data available right where content is managed, with no need for external integrations. Multi-site analytics is not included yet, but it is something I am looking into. It would need proper per-site separation in the stored analytics data, so I want to approach that carefully rather than adding a quick workaround. (Also I don't have any multisite testing environment atm ...) Download it Here: NativeAnalytics_1_0_19.zip Enjoy!
    5 points
  40. Hi, team. Lately, Claude and I 😁have been working on a series of modules for a new project at my company. This set includes a module for queue management. They aren't finished or ready for production yet; in fact, I’ve had few opportunities to test some of them, as I haven't reached those specific stages of the project yet. With these implementations, I’m not aiming to create anything overly complex—after all, there are already plenty of libraries available for that purpose. The idea is for them to be easy to use, free of external dependencies, and equipped with the basic functionality required for the tasks at hand—always adhering to the language and philosophy of ProcessWire. Would you be interested in having me upload some of them to GitHub for a look?
    5 points
  41. A lot of things changed in the world. I do not quite like many of them... But this what is happening here right now with ProcessWire is just amazing! Ryan finally found himself a companion to work with and they both are doing really well! I was kind of concerned about PW development, but not anymore.
    5 points
  42. I tried integrating Columns, but it had issues with drag-and-drop blocks. So I released the beta version without it. The most important thing now is the stability of the beta version so we can move on to adding other features. Roadmap: Dark theme - there is a bug now, you need to change the reverse colors Localizing text in the editor so that it looks native on websites with a different language set in the admin panel Multilingual support - for example, for websites from Switzerland and Belgium, this is more relevant. Gallery (Slider) - the ability to upload multiple photos at once Textformatter support to allow connection to other text processors Columns plugin for adding column view If you know what works poorly or doesn't work at all, and would like to add something, I'd be happy to hear your suggestions!
    5 points
  43. @AndZyk OpenRouter is already supported. Here's how you'd configure it in the AgentTools module configuration (as an example): google/gemini-2.0-flash | sk-or-YOUR_KEY | https://openrouter.ai/api/v1 | Gemini via OpenRouter anthropic/claude-sonnet-4-6 | sk-or-YOUR_KEY | https://openrouter.ai/api/v1 | Claude via OpenRouter @HMCB Thanks! 🙂
    5 points
  44. Btw, in addition to the memory/conversation history feature coming in the next version, we're also adding a sub-agent feature, so that your selected agent can launch other sub-agent instances of itself or other agents you've defined. Like maybe you've got different agents that specialize in one thing or another, or cost less for specific tasks, it can launch the best agent for the job. In this case, you've got a main agent that's in charge, but it can delegate tasks to other agents. Example would be using Claude Opus 4.7 for main agent but it delegates to Haiku or Groq or another for tasks that don't need as much horsepower, though that may be just scratching the surface on what's possible.
    5 points
  45. @wbmnfktr Okay we've got support for multiple models now. I'm just working out some details, but should have the AgentTools version updated today with that feature.
    5 points
  46. @szabesz TinyMCE support is on the list! CKEditor conversion was the first priority since it's still widely used, but TinyMCE is the logical next step given it's now the default RTE. I'll add it in an upcoming version. @Sergio Great suggestion! A /md/ URL segment or .md extension that returns the Markdown version directly would make the module much more useful for static site generators, AI pipelines, and content migration workflows. Added to the roadmap.
    5 points
  47. What about being able to configure multiple models and then selecting the one for each specific task? Planning: Opus 4.x (or GLM 5.1, Kimi K2.5) Workload: MiniMax, Qwen, ... Most plans (I use) support Anthropic-, OpenAI-compatible, and custom endpoints. Right now we have Anthropic and OpenAI available (should cover 90% i guess).
    5 points
  48. Thanks Jonathan! I appreciate the kind words. I also feel like this is the beginning of the next era of ProcessWire, so much fun stuff lately on the way! Really cool project you are working on there! Also, I'm thrilled to see the AgentTools module working with another AI Agent. I've only been able to test with an Anthropic API key so far, so nice to see it's working well with Z.ai.
    5 points
  49. TrackingScripts Module Manage and inject tracking scripts (Google Analytics, Google Ads, Facebook Pixel, custom code) into site pages, with optional PrivacyWire consent integration and robots.txt/llms.txt file management. Features Google Analytics (GA4) — inject gtag.js with Measurement ID Google Ads — inject gtag.js with Ads conversion ID Facebook Pixel — inject Pixel tracking code with noscript fallback Custom code — free-form textareas for any third-party scripts (head and/or body) PrivacyWire integration — when enabled, scripts are injected with data-category attributes and type="text/plain" so they only load after user consent robots.txt & llms.txt — edit and auto-generate both files from the admin; content is written to the site root on save Per-service controls — enable/disable, position (head or body), and consent category for each service independently ID validation — regex validation for GA (G-), Ads (AW-), and Pixel (numeric) IDs before injection Admin-only exclusion — scripts are never injected on admin or form-builder templates Files site/modules/TrackingScripts/ ├── TrackingScripts.info.php ← module metadata ├── TrackingScripts.module.php ← main module (hooks, script injection) ├── TrackingScriptsConfig.php ← module configuration (ModuleConfig) ├── ProcessTrackingScriptsConfig.info.php ← Process module metadata └── ProcessTrackingScriptsConfig.module ← admin UI for non-superusers Installation Copy the TrackingScripts folder into /site/modules/ In the admin go to Modules → Refresh, then install TrackingScripts Optionally install ProcessTrackingScriptsConfig — this adds a Setup → Tracking Scripts page that allows non-superuser roles to edit the configuration. Assign the tracking-scripts-config permission to any role that needs access. Configuration Go to Modules → Configure → TrackingScripts (superuser) or Setup → Tracking Scripts (any user with permission). Google Analytics Field Description Enable Activate/deactivate injection Measurement ID GA4 ID, e.g. G-XXXXXXXXXX Position Inject in <head> or before </body> PrivacyWire Category Consent category (default: Statistics) Google Ads Field Description Enable Activate/deactivate injection Ads ID e.g. AW-XXXXXXXXX Position Inject in <head> or before </body> PrivacyWire Category Consent category (default: Marketing) Facebook Pixel Field Description Enable Activate/deactivate injection Pixel ID Numeric ID, e.g. 123456789012345 Position Inject in <head> or before </body> PrivacyWire Category Consent category (default: Marketing) Custom Tracking Code Two free-form textareas for any additional third-party code: Custom Code — Head: injected before </head> Custom Code — Body: injected before </body> PrivacyWire Integration When enabled, all tracking scripts are rendered with PrivacyWire-compatible attributes: <script type="text/plain" data-type="text/javascript" data-category="statistics" class="require-consent" src="..."></script> This ensures scripts only execute after the user gives consent for the corresponding cookie category. Requires the PrivacyWire module to be installed and active. Robots.txt & LLMs.txt Edit the content of both files directly from the admin. On save, the files are written to (or removed from) the site root: /robots.txt — search engine crawler directives /llms.txt — LLM/AI bot directives If a textarea is left empty, the corresponding file is deleted from the site root. How It Works The module hooks into Page::render (priority 100) to inject scripts via str_replace on </head> and </body>. This means: No template modifications required Works on all front-end pages automatically Runs before PrivacyWire (priority 101), so consent attributes are in place when PrivacyWire processes the page The robots.txt and llms.txt files are written via a hook on Modules::saveConfig, triggered whenever the module configuration is saved from either the module config screen or the Process admin page. ProcessTrackingScriptsConfig (Admin UI) A Process module that mirrors the full TrackingScripts configuration under Setup → Tracking Scripts. Purpose Allows non-superuser roles to manage tracking scripts without access to the Modules admin. Permission The module registers the permission tracking-scripts-config. To grant access: Go to Access → Roles Edit the desired role Check tracking-scripts-config Save How it works Reads and writes the same configuration data as TrackingScripts via $modules->getConfig() / $modules->saveConfig() Changes from either location (Modules → Configure or Setup → Tracking Scripts) are reflected in both Saving triggers the same Modules::saveConfig hook, so robots.txt/llms.txt files are written automatically Requirements ProcessWire 3.0.110+ PHP 7.2+ PrivacyWire (optional, for consent integration) License Licensed under the MIT License.
    5 points
×
×
  • Create New...