Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/13/2026 in all areas

  1. Hi everyone! I am currently developing a new module for a client project and wanted to quickly reach out to see if there is broader interest in the community for a solution like this. The Use Case My client needed an appointment booking system similar to "Calendly". However, they had specific requirements: Zero external dependencies: No third-party SaaS for GDPR/DSGVO compliance and to avoid monthly fees. Full Design Control: It had to fit seamlessly into their custom design. Lightweight: No heavy bloat. The Solution: WireBooking is a native ProcessWire module that handles appointment slots and bookings using standard ProcessWire pages. Current Features: Frontend Wizard: An interactive, step-by-step booking process built with AlpineJS and Tailwind CSS. Native Storage: Bookings are saved as standard ProcessWire pages (booking-entry), allowing you to use the full power of PW selectors and hooks. Backend Management: Simple interface using the native ProcessWire Admin Theme (UIkit) to view bookings. Notifications: Sends confirmation emails to the customer and admin, including generated .ics calendar files for Outlook/Apple/Google Calendar. Availability Management: Manually block specific time slots or entire date ranges via the module settings. AJAX Driven: Dynamically loads available slots via JSON to keep the initial page load light. The "Catch" (Requirements) To keep the module lightweight and modern, it is opinionated regarding the frontend stack. It assumes you are already using (or are willing to include): Tailwind CSS (Utility classes) for the styling. Usage Example: Using it in a template is extremely simple: <?php echo $modules->get('WireBooking')->renderWizard(); ?> I need your feedback! The module is currently functional for this specific use case (Consultants/Service Providers). Before I invest time into generalizing it for a public release on the modules directory, I have two questions for you: Is this something you would use? Is there a need for a native "Calendly" alternative? Is the dependency on Tailwind a dealbreaker? Since the markup relies on Tailwind utility classes, it might be hard to style if you use Bootstrap or custom CSS. Looking forward to your thoughts and suggestions! Cheers, Markus
    2 points
  2. Dear Community Members, I am new to ProcessWire and web development. I have just finished basic web development (frontend) and PHP. And now I am exploring ProcessWire. I want to develop a portfolio project for my uncle's business. He wants an e-commerce website with the following features: All the common e-commerce functionalities. B2B and B2C features. CRM. Some custom workflow implementation. Some custom requirements like: An email verification feature for the clients. For registering a b2b client, they need to submit a registration form where they are supposed to upload a business document. The admin (shop owner) looks at the document and categorises the client as a b2b wholesaler or b2b retailer. Wholesalers and retailer sees different prices for products, and similarly do the B2C clients. Appointment scheduling for consultation with payment for booking an appointment. I am doing my best to explore all the resources in the ProcessWire website and documentation. It has been over a week I am looking for a perfect solution and I have come up to the following solutions: The basic e-commerce functionalities can be handled by Modules like ProcessWire Commerce or RockCommerce. Workflow implementation can be done using the hooks. I am not experienced with the above solutions; I just looked at the website, the docs and found them from those resources. If my choices are wrong, please correct me with proper guidance. You may have already crossed the problems and issues that a new developer faces while implementing these modules. For other functionalities, I am still actively looking for some solutions. If you are familiar with such cases, please guide me. I have a dream of starting my own digital agency, and I am selecting ProcessWire as my primary CMF for delivering the websites and web applications to my clients. Thanks in advance!! A big Thanks to the ProcessWire team for such a powerful and valuable open-source CMS framework!!!!
    1 point
  3. Some site-wide JS? // Get the current URL const currentUrl = window.location.href; // Convert to lowercase const lowercaseUrl = currentUrl.toLowerCase(); // Only update if there are uppercase letters if(currentUrl !== lowercaseUrl) { // Use replaceState to update URL without reloading the page window.history.replaceState(null, '', lowercaseUrl); }
    1 point
  4. Hello everyone, I’m happy to share a new module I’ve been working on: WireMagnet. We often face the requirement to offer "gated content" (like Whitepapers, PDFs, or Zip files) where users need to provide their email address to receive a download link. While there are external services for this, I wanted a native, privacy-friendly, and lightweight ProcessWire solution. What does WireMagnet do? WireMagnet handles the entire flow of capturing leads and delivering files securely. It intercepts form submissions, logs the lead, and sends an email with a unique, temporary download token. It prevents direct access to the files (assets are not just sitting in a public folder). Key Features: Secure Delivery: Generates unique download tokens (valid for 24 hours) and serves files via wireSendFile(). Double Opt-In (DOI): Optional support for DOI to verify email addresses before sending the file. Automated Emails: Automatically sends the download link (or attaches the file directly if preferred). AJAX Ready: Comes with built-in Alpine.js support for seamless, reload-free form submissions. Lead Management: Logs all subscribers (Email, IP, Timestamp) to a custom database table (leads_archive). Admin Interface: View leads and export them to CSV directly from the ProcessWire backend. Easy Integration: Render the form with a single line of code. How to use: Install the module. Create a page (e.g., using a lead-magnet template) and upload your file to a file field. Output the form in your template: // Render the subscription form (default field: 'lead_file') // The module automatically handles success/error messages and styling. echo $modules->get('WireMagnet')->renderForm($page); // OR: Render for a specific field (e.g., if you have multiple magnets or custom field names) echo $modules->get('WireMagnet')->renderForm($page, 'my_custom_file_field'); // OR: Override the button text manually echo $modules->get('WireMagnet')->renderForm($page, 'lead_file', 'Send me the PDF!'); Configuration: You can configure the sender address, email subject, DOI settings, and styling preferences (like button text) in the module settings. Download & Source: GitHub: https://github.com/markusthomas/WireMagnet Modules Directory: https://processwire.com/modules/wire-magnet/ I'm looking forward to your feedback and suggestions! Cheers, Markus
    1 point
  5. Awesome! Yes, Opus 4.5 is really good now with PW. It also helps a lot that they have implemented the LSP in Claude Code directly. Honestly, at this stage I don't think we even need to feed docs to it anymore. Just instructions to explore the relevant API methods for a task itself itself in the codebase. Is there a specific reason why you implemented that as MCP and not as Skill? MCPs eat a lot of context. Depends on the implementation, of course. So dunno about how much context Octopus occupies. ATM I have some basic instructions in CLAUDE.md that explain how to bootstrap PW and use the CLI through ddev for exploration, debugging, DB queries. That makes a big difference already. Opus is great at exploring stuff through the PHP CLI, either as one-liners or as script files for more complex stuff. Here's my current instructions: ## PHP CLI Usage (ddev) All PHP CLI commands **must run through ddev** to use the web container's PHP interpreter. ### Basic Commands ```bash # Run PHP directly ddev php script.php # Check PHP version ddev php --version # Execute arbitrary command in web container ddev exec php script.php # Interactive shell in web container ddev ssh ``` ### ProcessWire Bootstrap Bootstrap ProcessWire by including `./index.php` from project root. After include, full PW API is available (`$pages`, `$page`, `$config`, `$sanitizer`, etc.). **All CLI script files must be placed in `./cli_scripts/`.** **Inline script execution:** ```bash ddev exec php -r "namespace ProcessWire; include('./index.php'); echo \$pages->count('template=product');" ``` **Run a PHP script:** ```bash ddev php cli_scripts/myscript.php ``` **Example CLI script** (`cli_scripts/example.php`): ```php <?php namespace ProcessWire; include(__DIR__ . '/../index.php'); // PW API now available $products = $pages->find('template=product'); foreach ($products as $p) { echo "{$p->id}: {$p->title}\n"; } ``` ### PHP CLI Usage for Debugging & Information Gathering Examples **One-liners** — use `ddev php -r` with functions API (`pages()`, `templates()`, `modules()`) to avoid bash `$` variable expansion. Local variables still need escaping (`\$t`). Prefix output with `PHP_EOL` to separate from RockMigrations log noise: ```bash # Count pages by template ddev php -r "namespace ProcessWire; include('./index.php'); echo PHP_EOL.'Products: '.pages()->count('template=product');" # Check module status ddev php -r "namespace ProcessWire; include('./index.php'); echo PHP_EOL.(modules()->isInstalled('ProcessShop') ? 'yes' : 'no');" # List all templates (note \$t escaping for local var) ddev php -r "namespace ProcessWire; include('./index.php'); foreach(templates() as \$t) echo \$t->name.PHP_EOL;" ``` **Script files** — preferred for complex queries, place in `./cli_scripts/`: ```php // cli_scripts/inspect_fields.php <?php namespace ProcessWire; include(__DIR__ . '/../index.php'); $p = pages()->get('/'); print_r($p->getFields()->each('name')); ``` ```bash ddev php cli_scripts/inspect_fields.php ``` ### TracyDebugger in CLI **Works in CLI:** - `d($var, $title)` — dumps to terminal using `print_r()` for arrays/objects - `TD::dump()` / `TD::dumpBig()` — same behavior **Does NOT work in CLI:** - `bd()` / `barDump()` — requires browser debug bar **Example:** ```php <?php namespace ProcessWire; include(__DIR__ . '/../index.php'); $page = pages()->get('/'); d($page, 'Home page'); // outputs to terminal d($page->getFields()->each('name'), 'Fields'); ``` ### Direct Database Queries Use `database()` (returns `WireDatabasePDO`, a PDO wrapper) for raw SQL queries: ```php <?php namespace ProcessWire; include(__DIR__ . '/../index.php'); // Prepared statement with named parameter $query = database()->prepare("SELECT * FROM pages WHERE template = :tpl LIMIT 5"); $query->execute(['tpl' => 'product']); $rows = $query->fetchAll(\PDO::FETCH_ASSOC); // Simple query $result = database()->query("SELECT COUNT(*) FROM pages"); echo $result->fetchColumn(); ``` **Key methods:** - `database()->prepare($sql)` — prepared statement, use `:param` placeholders - `database()->query($sql)` — direct query (no params) - `$query->execute(['param' => $value])` — bind and execute - `$query->fetch(\PDO::FETCH_ASSOC)` — single row - `$query->fetchAll(\PDO::FETCH_ASSOC)` — all rows - `$query->fetchColumn()` — single value **Example** (`cli_scripts/query_module_data.php`): ```php <?php namespace ProcessWire; include(__DIR__ . '/../index.php'); $query = database()->prepare("SELECT data FROM modules WHERE class = :class"); $query->execute(['class' => 'ProcessPageListerPro']); $row = $query->fetch(\PDO::FETCH_ASSOC); print_r(json_decode($row['data'], true)); ``` ### ddev Exec Options - `ddev exec --dir /var/www/html/site <cmd>` — run from specific directory - `ddev exec -s db <cmd>` — run in database container - `ddev mysql` — MySQL client access
    1 point
  6. Hello there! Since I started creating sites with ProcessWire I wished there was a central media management option. You know - a place where you can upload all sorts of data (well, mostly images) to use them throughout the whole website. It is something that nearly every other CMS offers and many clients of me which used Wordpress or Typo3 are used to this kind of media management and it's kind of hard to tell them that this is not possible (in that way) with ProcessWire. I know from the past that there was a Media Manager Module from @kongondo but this module seems not to have been updated in years. Are there any other solutions or techniques that you developers use?
    1 point
  7. Ever felt like your ProcessWire emails look like they're stuck in 1999? You know the drill - sending emails is super easy with WireMail: $m = new WireMail(); $m->from('foo@bar.com'); $m->to('xxx@yyy.com'); $m->subject('Hello there!'); $m->bodyHTML('<h1>This is great!</h1><p>I am an ugly mail...</p>'); $m->send(); But let's be honest - they look about as pretty as a website built with Microsoft FrontPage! 😅 🪄 Enter the Mail Pimp Hook! Drop this magical hook into your /site/ready.php (or even better Site.module.php), and watch your emails transform from ugly ducklings into beautiful swans: <?php $wire->addHookBefore('WireMail::send', function(HookEvent $event) { // double check that we got a wiremail instance // this also tells the IDE what $mail is (to get IntelliSense) $mail = $event->object; if (!$mail instanceof WireMail) return; // get current mail body $html = $mail->get('bodyHTML'); if (!$html) return; // get email layout markup $layoutFile = wire()->config->paths->templates . 'mails/default.html'; if (!is_file($layoutFile)) return; // replace ##content## with actual mail content $html = str_replace( '##content##', $html, wire()->files->render($layoutFile) ); // write new body to mail $mail->bodyHTML($html); }); The HTML Just create a beautiful MJML template at /site/templates/mails/default.mjml, put ##content## where your email content should go, convert it to HTML and BOOM! 💥 Every email gets automatically wrapped in your gorgeous template. No more CSS wrestling matches, no more "Why does this look different in Outlook?" headaches. Just pure email beauty, automagically! ✨ Now your clients will think you spent days crafting those emails, when in reality, you're sipping coffee while your hook does all the heavy lifting. Work smarter, not harder! 🚀 #ProcessWire #EmailMagic #NoMoreUglyEmails PS: This is the MJML template that I used: <mjml> <mj-head> <mj-attributes> <mj-all font-family="Tahoma" /> <mj-text line-height="140%" /> </mj-attributes> </mj-head> <mj-body background-color="#efefef"> <mj-section background-color="#ffffff" background-repeat="repeat" padding-bottom="30px" padding-top="30px" text-align="center" > <mj-column> <mj-image align="center" padding="25px" src="xxx" target="_blank" width="200px" alt="Logo" ></mj-image> <mj-text>##content##</mj-text> </mj-column> </mj-section> <mj-section> <mj-column> <mj-text font-size="10px" color="#a0a0a0" align="center" > powered by <a href="https://www.baumrock.com/" style="color: #158f66" >baumrock.com</a > </mj-text> </mj-column> </mj-section> </mj-body> </mjml> VSCode has an extension to get a live preview and export MJML to HTML: And here are some other free templates: https://mjml.io/templates I use https://www.base64-image.de/ to add the logo to my mail template as src="data:image/jpeg;base64,/9j/4QAWRXhpZgAATU0AKgAAAA..." to avoid headaches with image paths, remote assets blocking etc.
    1 point
  8. AI, Cursor, Windsurf, Claude Code... you name it. In terms of ProcessWire they all need a strong hand that guides them through different tasks, ways, and whatever its in the way. You need to oultine your part in ProcessWire in great detail. You need to define hooks, the solutions to use - from ZIP to TempDir. You have to outline the forms it needs to render and the fields to use from start to finish. You could give an existing module as baseline, but beware it knows what to do then. But extending existing modules works pretty good - see my fork here of GUID/UUID Generator Whatever tool you use, it knows the baseline I knew 2 weeks into ProcessWire back in 2014 after doing the tutorials and reading the forums. Hint: Let Composer/Cascade finish the tutorials - it's wild! And let them create rules, workflows and memories from it. You will reach a junior-junior grade PW-dev this way. BUT (big time)... it's great and even superior in terms of PHP. Do the outline, from start to finish, do what you know in terms of ProcessWire. Let the AI/IDE/Agents do the PHP part, including docs, and you will be happy. Sure... not that much fun as people have that use NextJS (13, and maybe 14, but not 15) or AstroJS (2,3, and parts of 4, but not 5)... but hey... that's still only JavaScript (maybe Typescript) those AI/IDE/Agents are good at - the concepts still need either docs or a solid foundation. In the JS-world everything is a pattern, everything is JS or TS, the concepts are the same. But framework-specific... is another story. Laravel works great. Ok, maybe not the latest version, and maybe not all the extensions, like Forge and Filament. But yeah, it works. Even migrations. Depending on the database. And don't try Supabase or Neon. That's super wild. But... older versions with just *.blade.php - works! Flux, InertiaJS, VUE, React? meh I am still not a coder/developer/programmer BUT... I know how to write a technical concepts and know how to outline modules, hooks, whatever in ProcessWire. The moment I realised that those tools are great at PHP, and s*ck at ProcessWire - I understood what to do. A new project I work on, a NextJS/AstroJS/ProcessWire-combo, has already 50+ documents to outline which tool does what and how to do it. And I didn't even really start to outline anything in terms of modules or hooks. The ProcessWire part, or at least a big part, is already outlined here: https://github.com/webmanufaktur/pwai/tree/windsurf Which is the latest commit with most of the stuff needed - for my projects. But yes... those AI/IDE/Agents only see patterns and try to match up - in frameworks. To give a bit more helpful details here: AutoTemplateStubs is a great addition to help your tools to understand what's happening. In case you hate to do everything yourself: RockMigrations has some nice .vscode snippets that help and most AI/IDE/Agents understand it and can create templates and fields right from migrate.php. Noice!
    1 point
  9. @Cybermano you could also use this module I made https://processwire.com/modules/page-mjml-to-html/, though you lose the ability to see your changes live in VSCode. Pros and cons like @bernhard says 🙂
    1 point
×
×
  • Create New...