Leaderboard
Popular Content
Showing content with the highest reputation on 03/17/2026 in all areas
-
I made a small module called ProcessSiteSettings and thought I’d share it here in case it’s useful to someone. ProcessSiteSettings is a lightweight ProcessWire module for storing and editing global site values in one place. There are already similar modules available, so this is simply another free option with a focus on quick setup, usability, and helpful template snippets. It adds a Settings item to the ProcessWire admin menu and creates one central page for global site values like: copyright text footer content contact info social links SEO / AI summary text images repeaters Repeater Matrix page references other regular PW fields Ofc. add your own fields of choice to it, or delete the ones you don't need! It uses a normal template + page approach instead of a fake config form, so it works much more naturally with ProcessWire fields. It also includes a small helper box on the settings edit screen that shows ready-to-use template snippets for each field. It tries to generate smarter examples depending on the field type, including more complex fields like images, repeaters, matrix items, multi-value fields, etc. Example usage on templates: <?= siteSettings('ss_copyright_text'); ?> <?= siteSettings()->ss_footer_text; ?> <?= $siteSettings->ss_contact_email; ?> The admin is in English and the module is translation-ready. Just install the module, and that's it! Just sharing it here in case someone finds it useful. Download Here: ProcessSiteSettings.zip3 points
-
Contrary to Chrome's preload feature, it only fetches pages from the current site, and you can disable it: mu.init({ prefetch: false, });3 points
-
Hey everyone, I've been building a e-commerce project and needed to show personalized content based on visitor location — shipping availability, regional pricing, state-level compliance notices. Nothing like this existed in the PW ecosystem, so I built it. What it does Detects country, region and city from the visitor IP using MaxMind GeoLite2 databases (free). Result is cached in session. Exposes $geoip as a wire variable — available in every template automatically, just like $page or $user. // That's it. No setup, no require, just use it. if ($geoip->inCountry('US')) { echo $page->us_content; } API // Boolean checks — accept single value or array $geoip->inCountry('US') $geoip->inCountry(['US', 'CA', 'GB']) $geoip->inRegion('GA') // ISO 3166-2 subdivision code $geoip->inRegion(['GA', 'NJ', 'NY']) $geoip->inCity('Atlanta') // Inline conditional with optional fallback echo $geoip->showIf('countryCode', 'US', $page->us_block, $page->global_block); echo $geoip->showIf('regionCode', ['GA', 'NJ', 'NY'], $page->northeast_promo); echo $geoip->showIf('continent', 'Europe', $page->eu_gdpr_notice); // Single field $geoip->getField('countryCode') // "US" $geoip->getField('regionCode') // "GA" $geoip->getField('city') // "Atlanta" $geoip->getField('timezone') // "America/New_York" // Full array $geo = $geoip->detect(); // ip, country, countryCode, continent, region, regionCode, // city, zip, lat, lon, timezone, corrected, status Combining conditions // Country + region if ($geoip->inCountry('US') && $geoip->inRegion('CA')) { echo $page->california_prop65_notice; } // Logged-in + location if ($user->isLoggedIn() && $geoip->inCountry('US')) { echo $page->us_member_block; } // Time-of-day in visitor's timezone $tz = $geoip->getField('timezone') ?: 'UTC'; $hour = (int) (new DateTime('now', new DateTimeZone($tz)))->format('H'); if ($geoip->inCountry('US') && $hour >= 9 && $hour < 17) { echo 'Our US office is open right now.'; } // Pre-select shipping dropdown (Vivino-style) $selectedCountry = $geoip->getField('countryCode') ?: 'US'; $selectedState = $geoip->getField('regionCode') ?: ''; User location correction Frontend widget lets visitors fix incorrectly detected location. Stored per-IP in DB, applied on subsequent requests. You can also build your own UI — just POST to /?geoip_action=correct with country_code, region_code, city. Setup Composer package and databases live in site/assets/GeoIP/ — not in the module directory, so they survive updates. cd /path/to/site/assets/GeoIP/ && composer require geoip2/geoip2 Then drop GeoLite2-City.mmdb (or GeoLite2-Country.mmdb) in the same folder. Free download from maxmind.com. The module config page shows the exact path and command for your server. Admin panel Setup → GeoIP — lookup log with country/region/city, corrections manager, manual IP lookup tool. GitHub: https://github.com/mxmsmnv/GeoIP License: MIT Requires: ProcessWire 3.0.200+, PHP 8.2+ Feedback welcome — especially if you're doing anything geo-based with ProcessWire. Maxim3 points
-
I think it depends what ProDrafts features you are using. But in general ProDrafts can be installed and uninstalled easily, so having it installed doesn't make any permanent changes to your site or anything. The primary drawback in ProDrafts is repeater support, particularly nested repeaters.1 point
-
I don't have an ETA just yet but this is one of my main projects currently.1 point
-
Thanks @robert! You support is lightning fast ⚡! I was just writing the 2nd issue in github when the 1st one was resolved)))1 point
-
Did you all notice that hovering menu items on their website preloads the content? Not sure that's a great idea. It makes things feel snappy, but it makes me think of Chrome's preload feature and its privacy concerns: https://www.malwarebytes.com/blog/product/2026/02/chrome-preloading-could-be-leaking-your-data-and-causing-problems-in-browser-guard1 point
-
Just released V1.4, here's what has changed/was added in the last versions: 1.1: Added companion Lister Pro (https://processwire.com/store/lister-pro/) action to translate pages using page actions. 1.2: Added backwards compatibility with PHP 8.1 1.3: Bug fixes only 1.4: Added support for the option to choose the current user language as source language, and made sourceLanguage and targetLanguage(s) hookable to allow altering them at runtime if needed1 point
-
I've been working on sites where the standard sitemap setup started showing cracks: XML generated on every request eating memory, no way to regenerate automatically without writing custom hooks, and no visibility into what actually ended up in the file. So I built Sitemap — a module that generates static XML files to disk, splits output by template name, and handles the full lifecycle from generation to search engine notification. What it does differently: Writes files to disk instead of rendering in memory — no RAM spike on large sites Pages are fetched in chunks of 500 with uncacheAll(), so memory stays flat regardless of page count Each template gets its own named file: sitemap-product.xml, sitemap-blog.xml, etc. — the index at sitemap.xml references them all Auto-regeneration via LazyCron with a configurable interval; the LazyCron hook slot is chosen dynamically to match what you configured (every hour, every 6 hours, daily, etc.) rather than always using everyHour A needs_regen flag is set whenever a page is saved, trashed, or deleted — visible in the admin dashboard IndexNow support: after generation, all URLs are submitted to api.indexnow.org in batches of 10,000 Sitemap: directive written directly to the physical robots.txt on save and on generate Lock file prevents concurrent generation Admin dashboard at Setup > Sitemap showing file count, URL count, total size, and last generated time Settings stored in a dedicated DB table (sitemap_settings, name/value, MEDIUMTEXT) rather than the module's data field — avoids the serialized config size limit when template settings grow large. Image sitemap extension and hreflang alternate links for multilanguage sites are both supported. GitHub: https://github.com/mxmsmnv/Sitemap Screenshots: Still v1.0.0, so feedback is very welcome — especially from anyone running it on a site with 10k+ pages.1 point
-
Wish I had more time to put into this, but for now just a few random thoughts, sorry in advance for the long rant: I, too, do see the issues that AI is causing (or at least some of them). But this train is not easy to stop. Programming is just one area it is affecting, but in this context I am personally leaning towards the conclusion that AI may well decimate the whole concept of humans writing code for a job. And if things continue to evolve at this pace I don't think it is going to be a decades long process. A few years ago I tried to create a module for ProcessWire from scratch using ChatGPT, and it was a miserable failure. Now Claude is at a stage where I don't think I can truly justify writing code myself from a productivity (or quality) point of view. AI has also made the devops part of my work quite different from what it used to be, and I see no evidence of things slowing down in the near future. For us who work in IT and more specifically programming / development, it seems to me that in the big picture there are a couple of options: get a new job that isn't (yet) as tightly coupled with AI, or keep up with the changes. Also, I wholeheartedly agree with a lot of what Ryan has written in this thread; it's quite a bit easier to influence things positively from the inside 🙂 There will no doubt be some cases where AI is not going to be as prominent, at least for a while. But it seems to me that those are either somewhat niche, or specialized cases. Gamers and the game industry, for example, have been pushing hard against using AI, which I completely understand. ... and of course I may be wrong, and this whole thing may come crashing down any moment. Predicting the future is not easy. By the way, it would be interesting to hear about ways to make AI use less of a problem. A co-worker mentioned https://github.com/rtk-ai/rtk, which is a Rust tool that claims to reduce AI token consumption by as much as 60-90%. Someone correct me if I'm wrong, but e.g. cutting your token use to half should also cut your energy consumption to half, right? (For the record, I have not yet tested RTK properly, so can't say if it works that well.)1 point
-
@adrian Thanks for bringing this up. It seemed like x-user came here to troll with an expectation that ProcessWire should ignore and blacklist anything having to do with AI. That doesn't seem realistic. But it did make me wonder, are there any other CMS projects that are taking this approach? It seems unlikely. I imagine we're not too many years away from the point where a CMS project can't compete if it's not involved in the AI space in some way or another. I also think that the AI changes are coming whether we like it or not. So we can either jump on and grow, and make things better, or get left behind, and perhaps get left without a job. If it's only the people that dismiss environmental concerns using AI and voting with their wallets, then there's no incentive for these companies to do better. X-user would make a greater difference to the world by being an AI user that cares and chooses companies based on their values. And I think that's what we all should do. Whereas abandoning anything having to do with AI does nothing to improve the direction of AI and seems a little like self-sabotage. In the future, and with users that care, there will be pressure on AI companies to do things right. For example, when they build that next data center, they will also build a giant solar array or wind farm to power it. Depending on coal and gas plants for electricity is not sustainable, and now it's more costly than solar. Coal and gas is EOL'd. It may be that the power demands of AI push us towards sustainable solutions faster than otherwise, and we need that as quickly as possible. My opinion: We can't dismiss AI and complain. We have to participate and push for better solutions when there are opportunities to do so. If we sit out, there will be no such opportunities. The environmental problems were here long before AI. As I understand, the root of it is power generation. The US (at least) is not solving the power generation problem in a way that can overcome the politics, corruption and outright stupidity. But I also think that it's very likely AI that will be in some way responsible for the solutions for these problems. There are so many problems to solve that are bigger than any of us have answers for. And if there are solutions for these problems, I have no doubt they'll be coming with the help of AI in some fashion. From my perspective blacklisting AI solves nothing and instead is abandoning the problems and giving up.1 point
-
You actually can use the 'sort' property, but you'll want to perform the sort after you've assigned it to all your items, because PW will write them out in the order that they appear. For instance, here is how we might reverse the order: $cnt = count($page->images); foreach($page->images as $image) { $image->sort = $cnt; $cnt--; } // now tell it to sort by the field 'sort' $page->images->sort('sort'); // you may not need to do this, but putting it here just in case $page->trackChange('images'); $page->save(); Avoid calling $page->images->remove() just because that will queue an actual file to be removed when the page is saved. Another way you might accomplish reversing the order: $myImages = new Pageimages($page); foreach($page->images as $image) { $myImages->prepend($image); } $page->images = $myImages; $page->save();1 point