Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/11/2026 in all areas

  1. @mattgs This is a very friendly community as a whole. But to be fair, both of you guys posted kind of unfriendly messages. And both of you make good points too. There are some big challenges in the world right now, none of us are perfect, and we've all got to do the best we can, where we can. So I think it's good that you guys have these environmental concerns, and we all should, and it's good to communicate these, share and learn, while also being friendly.
    7 points
  2. This week on the dev branch we've got several commits with various core improvements and fixes. @adrian has been using Claude Code to suggest core optimizations (focused mostly on the PageFinder) and so he sent the suggestions to me. (PageFinder is the brains behind the $pages->find() method, and many others). I took the suggestions and coded them into our PageFinder, but didn't want to mess with what was already working well, so put them in a new class named PageFinder2, at least temporarily. If running the latest dev branch, you can enable PageFinder2 by adding the following to your /site/config.php: $config->PageFinder('version', 2); The most significant changes are: using subqueries for subselectors rather than separate independent queries; Reusing PageFinder instances (keeping a pool of typically 1-3 PageFinders rather than creating a new one for each $pages->find() operation); and lots of in_array() calls have been converted to isset() lookups, which should technically be faster (still the case in PHP8?, I'm not sure). There were some other changes as well. Theoretically these changes should make PageFinder even faster than it already is. I did quite a bit of testing and found that for the most part it performs the same as PageFinder v1. But then I came across a rather complex selector that translated to a much faster PageFinder operation, nearly twice as fast, and that convinced me it was worthwhile. While PageFinder v2 is not consistently faster than v1, there are some situations where it can be a lot faster. I'm not totally clear on what those situations are just yet, but I'll be doing more testing. In other situations it also can use a lot fewer queries, though that doesn't necessarily translate to a performance difference. But on the whole, all of Claude's suggestions were quite good, regardless of performance improvements. I was pretty impressed with what Claude Code had suggested, so decided to install it on my computer too. I've found it's particularly good at finding bugs. I'll ask it to do a code review on a core file, and it always has good suggestions. It uses ProcessWire terminology too. For instance it pointed me to an object that wasn't properly "wired to the ProcessWire instance", and that's something you'd only ever hear in ProcessWire land. Claude code also helped with improvements to our DatabaseQuery* classes, PagesVersions module, Wire base class, NullPage class, and minor updates to the PagesLoader* classes. I'm not having it write any code just yet, but am having it suggest where improvements can be made. I like to code. I asked it how it knew so much about ProcessWire, and it said that it stays up-to-date with the forums, the website, API docs, and GitHub repo. Thanks to @adrian and @Jan V. for recommending it to me (Jan V. uses it to manage this webserver), I can see how it's going to be a big help to ProcessWire with its suggestions and ideas, I'm already learning a lot from it. And if you get a chance to try the updated PageFinder, please let me know how it works for you. Thanks for reading and have a great weekend!
    2 points
  3. @mattgs Like Adrian, I also consider myself very environmentally conscious. I've not spent much time learning AI in part because I thought it was problematic for a lot of reasons. But I don't think we're likely to stop these AI companies so that's why I thought I should try things out with a company that seems to have more ethics than the others. Anthropic seems to have a mission for AI safety and sustainability. I hope it's legit. And as far as I can tell, the other companies don't, which I find concerning. But I'm also not as up-to-speed as you are on the on the issues you brought up, so I'll have to look closer as well as check out the video you mentioned (do you have a link?). I'm also aware that a project like ProcessWire gets executed millions upon millions of times every month (or day?) throughout the world, and every execution consumes energy. So I've always been very interested in optimization and making ProcessWire use as little time and energy as possible to do its work. The updates that we've been focusing on here are aimed directly at that. So perhaps AI is using a little energy to find optimizations and bugs in PW, but that single brief code review session reduces the energy usage of every ProcessWire execution going forward. This is a case where AI is likely saving a lot more energy than it consumes, indirectly by making ProcessWire use less energy. Some of the optimizations and bugs its found have been there since the beginning, and likely would have never been identified otherwise.
    2 points
  4. Hello @Mikel, thanks for your words. Of course I can only report on my experience, but people don't go shopping for fonts. The don't buy different fonts of many font-families. They just stick with one family or some styles of that family. 🙂 I know, at last, it's the same and doesn't change anything since a Stripe Payment Link was just made for one product and not 10. I thought about that limitation a bit and had some research about Stripe, and it’s API possibilities. I thought about to possibly rewrite the module to accept payments via a Checkout‑Session with dynamic line_items and metadata and a bundled download page for the buyer. Goal is that the buyer could just select more than one font style of a font family and then click to buy them. With the click it will be sent to Stripe with a checkout-session with line_items and metadata. A cart system could be added, to. After payment, the data that comes back from stripe is analysed and the buyer get its downloads. Well, I have to think about that. 🙂 I know it’s quite unusual, but we don't need a full e-commerce shop with a cart and anything. So, the bottle would be perfectly adequate for hitting the nail. 😉 Cheers, Thomas
    1 point
  5. Like you said a TextFormatter formats on output and thus should leave the original data intact (otherwise this could lead to unexpected behaviours). Best would be to create a module and hook before Pages::save for example to sanitize and convert those safe links
    1 point
  6. Thanks for the detailed bug report! Both issues are fixed in v1.1.5: getMatrixTypes() error - Fixed array iteration (was treating integers as objects) Default settings - Added __construct() to apply defaults on install The module is now available on GitHub. Please update and let me know if everything works correctly.
    1 point
  7. [Update] Free Access Display Support (v0.1.7) Hi everyone! Following the latest release of StripePaymentLinksv1.0.23, we've updated this module to match the new free product access — so manually granted product access now shows up properly in all portal views. When a user has products assigned via spl_free_access, those products appear in the portal almost like purchased ones: Grid view: Free-access products render as full active cards instead of grayed-out "not yet purchased" ones. Table view: Free-access rows get a cyan "Free access" badge in the status column. The date column shows a dash (—) since there's no purchase timestamp involved. This makes it immediately clear which products came through Stripe and which were granted manually. Cheers, Mike
    1 point
  8. [Update] New Feature: Free Product Access (v 1.0.23) Hi, everyone! We just released v1.0.23 with a new feature based on a real client use case: A client using StripePaymentLinks wanted to grant certain high-value customers bonus access to additional products — no Stripe transaction involved, just a manual override. The solution: a new spl_free_access field (AsmSelect, multi-page) on the user template. Pages selectable in the dropdown are automatically restricted to the configured product templates, so editors only see relevant products — every user in the backend gets a "Free Product Access" field where additional products can be assigned directly. Access granted this way is recognized by hasActiveAccess() — the same internal check SPL uses for all content gating — so it integrates transparently with the existing module logic. The field is created and updated automatically by ensureUserFields(), including template restriction syncing when the product template config changes. Thanks for the request and feedback that led to this improvement! Cheers, Mike
    1 point
  9. Hi everyone, Well, I finally have a version of Tracy which is ProcessWire namespaced. This has not been easy, although the last issue (which was breaking sites on upgrade from an old non-namespaced version) finally seems to be resolved thanks to some AI help. Unfortunately because this version took so long I lost patience with maintaining separate branches so it also includes a move to IndexedDB instead of LocalStorage for Console data (since I added the multiple tabs if you dumped a lot of content across several tabs it was possible to hit the 5MB LocalStorage limit). It also includes a lot of other random fixes and security improvements (although I think mostly hypothetical given the access restrictions to it). I have also dropped support for PHP < 7.1 (inline with PW). If anyone would be willing to test the upgrade from https://github.com/adrianbj/TracyDebugger/archive/refs/heads/namespaced.zip I'd really appreciate it. Please only test on a dev site and if you do run into any issues, the best way to recover is to delete TracyDebugger folder from /site/modules folder and go back to the admin and reinstall, but hopefully this is no longer a problem. Thanks, Adrian
    1 point
  10. One of the reasons I no longer use ChatGPT for anything - I don't want to get political here, but IYKYK. I would love to boycott Google and Amazon completely as well. I do my best on these fronts, but it's basically impossible.
    1 point
  11. And I created an almost identical blog post about the module using the module, without opening the CMS admin once. That's the demo/use case right there.
    1 point
  12. Hey, if anyone is using Cursor for AI development, I just added some interesting functionality to the MCP module, including full 360 local/remote sync.
    1 point
  13. @Peter Knight — if someone could fully take it over (along with any other modules that matter), that'd be the most ideal scenario. Imo, forking may as well be a new project… Larger PRs are a no-go I'm afraid, unless someone is willing to fully test them, in which case they may as well take a leap and become maintainer 🙃.
    1 point
  14. Generate image placeholders for smoother lazyloading. Currently supports ThumbHash, BlurHash, and average color placeholders. I've been using the wonderful ImageBlurhash module for this in the past, but unfortunately it's no longer in active development. This new module adds ThumbHash and Average Color placeholder algorithms, improves performance by caching generated placeholders, fixes an issue when replacing images, and allows regenerating and clearing placeholders via the admin interface. Try it out using the installation instructions below or check out the GitHub repo for details. Why use image placeholders? Low-Quality Image Placeholders (LQIP) are used to improve the perceived performance of sites by displaying a small, low-quality version of an image while the high-quality version is being loaded. The LQIP technique is often used in combination with progressive lazyloading. How it works This module will automatically generate a small blurry image placeholder for each image that is uploaded to fields configured to use them. In your frontend templates, you can access the image placeholder as a data URI string to display while the high-quality image is loading. See below for markup examples. Placeholder types The module supports generating various types of image placeholders. The recommended type is ThumbHash which encodes most detail and supports transparent images. ThumbHash is a newer image placeholder algorithm with improved color rendering and support for transparency. BlurHash is the original placeholder algorithm, developed at Wolt. It currently has no support for alpha channels and will render transparency in black. Average color calculates the average color of the image. Installation Install the module using composer from the root of your ProcessWire installation. composer require daun/processwire-image-placeholders Open the admin panel of your site and navigate to Modules → Site → ImagePlaceholders to finish installation. Configuration You'll need to configure your image fields to generate image placeholders. Setup → Fields → [images] → Details → Image placeholders There, you can choose the type of placeholder to generate. If you're installing the module on an existing site, you can also choose to batch-generate placeholders for any existing images. Usage Accessing an image's lqip property will return a data URI string of its placeholder. $page->image->lqip; // data:image/png;base64,R0lGODlhEAAQAMQAA Accessing it as a method allows setting a custom width and/or height of the placeholder. $page->image->lqip(300, 200); // 300x200px Markup Using a lazyloading library like lazysizes or vanilla-lazyload, you can show a placeholder image by using its data URI as src of the image. <!-- Using the placeholder as src while lazyloading the image --> <img src="<?= $page->image->lqip ?>" data-src="<?= $page->image->url ?>" data-lazyload /> Another technique is rendering the placeholder and the original image as separate images on top of each other. This allows smoother animations between the blurry unloaded and the final loaded state. <!-- Display placeholder and image on top of each other --> <div class="ratio-box"> <img src="<?= $page->image->lqip ?>" aria-hidden="true"> <img data-src="<?= $page->image->url ?>" data-lazyload> </div>
    1 point
×
×
  • Create New...