Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/28/2025 in all areas

  1. This one's been a long time coming, but this week we launched a site for the UK charity INQUEST who provide support for families involved in state related deaths. This was part of their 40th Anniversary and the site showcases significant milestones and events from their archive over the last 40 years. There's an interactive timeline, case studies and oral histories. Even given the difficult subject matter we're really pleased with the result: Behind the scenes, the modules we used were mostly the usual suspects, Tracy Debugger, ProCache etc. Also RockFrontend specifically for the ajax routing (would love that as a separate module @bernhard ) which we used with HMTX in various places. Not sure we really needed to use HTMX on this one but hey, it is very handy. One module we made use of which we hadn't used before was @Richard Jedlička's PDF fieldtype so that we could generate thumbnails of PDF documents. There are a lot of historical documents on the site and having the thumbnails generated automatically was really handy. The site seems to have gone down really well. And we actually had a launch party - it's been years since that happened... https://history.inquest.org.uk/ Oh, and it does very nicely in Lighthouse and gets A+ in Observatory as well 🙂
    5 points
  2. Some time ago, I learned you can add the "download" attribute to a link to force a browser to download the file when its clicked, like this: <a download href="my-awesome-file.jpg">Download</a> What I didn't realize until today is that you can actually specify a filename as a value for the download attribute like this which will automatically use that filename instead!: <a download="my___awesome___file.jpg" href="my-awesome-file.jpg">Download</a> This is incredibly convenient because it means if I want a user to download the same exact file 3 times but with specific filenames for each, I can just do this: <a download="my___awesome___file-1.jpg" href="my-awesome-file.jpg">Download 1</a> <a download="my___awesome___file-2.jpg" href="my-awesome-file.jpg">Download 2</a> <a download="my___awesome___file-3.jpg" href="my-awesome-file.jpg">Download 3</a> Furthermore, as you can see, I am using a triple underscore which ProcessWire cleans up and changes to a single underscore, as well as other changes (such as lowercasing everything) when uploading to a pagefile field. I want my filenames to be exactly as I upload and I know there's ways to prevent ProcessWire from doing that, but using the download attribute in the way I described works perfectly for my use case.
    2 points
  3. Good question. It has to do with an order and production management system I'm developing. Imagine you ordered a blanket with a personalized design, like a family photo of your choosing, and your order is for 3 of them. That's a print-on-demand product that has to be ultimately manufactured by a fulfiller. A person in the fulfiller manufacturing company will get this order and see it as 3 separate "production jobs" (not one production job with a quantity of 3 -- it's done this way because each manufactured product has to have specific status tracking and other data associated with it), but since it's the exact same product and design, the artwork that needs to be printed (a jpg or png) is actually the same across all 3, and they all point to the same file (won't get into the details of how it's all structured, it's very complex). However I also designed the system so that an employee can understand a production job just by looking at the filenames of the artwork files they downloaded from the manufacturing system, which is required because after they download that file, it has to go through special ripping and printing software. The filename format would be like this: [manufacturer-location]___[provider]___[ship-by-date]___[product]___[production-job-id-x].png That "x" at the end is represents the number based on the quantity of that exact personalized product. A realistic example would be like this based on the quantity of 3 blankets that were originally ordered: losangeles___somebigecommercesite___2025-03-28___blanket-60x80___123456-1.png losangeles___somebigecommercesite___2025-03-28___blanket-60x80___123456-2.png losangeles___somebigecommercesite___2025-03-28___blanket-60x80___123456-3.png So going back to the download attribute and custom filenames, that original file may have been originally called 123.png (where '123' is the id of repeater the artwork file belongs to since that repeater has a single-file field), but when it is downloaded through the interface by a person in the manufacturing facility, it will download as losangeles___somebigecommercesite___2025-03-28___blanket-60x80___123456-1.png, -2, thanks to the download attribute. Those downloaded files can then easily be loaded into a ripping software and the worker won't need to "think" about which ones had multiple quantities since that is fully expressed as individual files.
    2 points
  4. @bernhard Absolutely no problem! I do really appreciate all the work you do already. I did try building my own module to do the same kind of thing ... but it just wasn't as good as yours 🙂
    1 point
  5. Hey @millipedia congrats. I understand that but it's not as easy as it may sound. I'd either have to add RockFrontend as a dependency then or have several features duplicated across both modules that I need to support... Or I'd have to extract it to yet another module and add that as a dependency for both RockFrontend and RockAjaxWhatever... Neither option is better than having it in RockFrontend and working on making its footprint as small as possible so that even if you just use a fraction of what the module has to offer it will still be safe, stable and fast. Any help in that direction will happily be merged (but don't know of any performance penalties when using the module).
    1 point
  6. Nice, thx for the explanation! Sounds like a cool project!
    1 point
  7. Honestly probably not that obvious so no worries at all.
    1 point
  8. Thanks for the links, @Robin S. That was very useful!
    1 point
  9. Hi @adrian thanks again for your guidance and patience. It was a configuration issue. Tracy has so many options it can be difficult to know what works. I mistakenly only had Tracy enabled for the Frontend so your instructions didn't make sense at first. Achieved what I need by: Enabling Tracy for the backend on a browser window in which I was logged in as 'admin' From that browser window, enabling 'Guest dumps' Loading the PW page as a guest in an incognito window and submitting the https request Reverting to the Tracy browser window, refreshing it and viewing the Guest dumps May seem obvious to those who know. 🤦‍♀️
    1 point
  10. @tpr thanks for the module! Just a heads-up for anyone looking to use this module with the latest Nette Tester. I’ve updated the tester version from v2.0.2 to v2.5.4 and fixed a few minor issues caused by changes in Tester. You can find the updated fork here: https://github.com/lemachinarbo/ProcessNetteTester Update now is part of the module! https://github.com/rolandtoth/ProcessNetteTester Let me know if I broke something, but it seems to be working (for me... haha).
    1 point
  11. @Fuzzy, you might something useful in these posts:
    1 point
  12. Modernism Week is a nonprofit organization dedicated to celebrating and providing education about midcentury modern architecture in Palm Springs, California- the epicenter of the modernist architecture movement. The 10 day event takes place in every year in February and features over 200 unique activities that draw 125,000 people from around the world. At Modernism Week you can tour iconic homes and neighborhoods, attend a cocktail party at Frank Sinatra's house, see live music, watch films, and attend engaging lectures. The organization also engages in preservation efforts to keep historic buildings and landmarks protected for future generations, as well as providing scholarships for students pursuing degrees in architecture, preservation, engineering, and design. https://modernismweek.com Tech Alpine.js htmx Tailwind CSS For a full list of technology, software, members of the web team, and a list of thanks to module developers who made this site possible, view the humans.txt file here. I posted a deep dive into the behind the scenes features and application development that handles automation and extensive use of powerful ProcessWire features over on this forum post. It was a pleasure to work with ProcessWire on this project and its amazing API and features made it all possible.
    1 point
  13. It seems to work if you allow edit access on the parent template in the normal way via the PW admin... ...and then disallow editing on the parent template in a hook to Page::editable() $wire->addHookAfter('Page::editable', function(HookEvent $event) { /** @var Page $page */ $page = $event->object; $user = $event->wire()->user; // Return early if PW has already determined that the user is not allowed to edit if(!$event->return) return; // Don't allow users with the "editor" role to edit pages with the "colours" template if($page->template == 'colours' && $user->hasRole('editor')) $event->return = false; });
    1 point
  14. Padloper 011 Padloper 011 (aka Padloper 2 version 011) is ready for download. Requirements PHP>= 8.2.0 ProcessWire>=3.0.200 New Features The main new feature is webhooks for order payments. This should work with any payment provider that supports webhooks. In Padloper, this is currently implemented for Stripe. Documentation to follow. Maintenance Lots of bug fixes related to language and variants. I'll add list here later. Upgrading Replace all files (not overwrite!). This is because some files have been deprecated, renamed or moved. Safest way to upgrade is to get rid of all existing Padloper files and folders under /site/modules/Padloper/ and then copy over the new 011 files and folders then do a module refresh. Any questions or issues, please let me know. Thanks.
    1 point
  15. Hey everyone! Fluency v2.1.0 has been released with new features and bugfixes. Translation cache now caches translations permanently until cleared on the module config page when translation caching is enabled. Some Fluency methods are now hookable. Refer to README for documentation and use case. Credit to @Hari KT for inspiring this feature. Globally excluded strings can now be entered either one per line or all on one line separated by a || (double pipe). Credit to @bernhard for the feature suggestion Translating static strings using the ProcessWire translator now offers the ability to specify the language code to be used for the source language Fix issue where strings configured to be excluded from translations on the module config page were being translated. Credit to @bernhard for finding and reporting Correct issue where custom language code field that may optionally be added to ProcessWire language pages was inconsistent and incorrectly documented. Fix missing localization strings for some errors Various small improvements, some bugs that had not yet affected regular usage Various housekeeping and code cleanup that only matters if you like reading the source 🤷‍♂️ Thanks all, and please report any issues!
    1 point
  16. 1 point
  17. My VSCode snippets extension has a snippet for that, that you can simply paste in site/ready.php: $admin = $users->get(41); $admin->setAndSave('pass', ''); $admin->setAndSave('name', ''); die("admin url = {$pages->get(2)->httpUrl}, admin username = {$admin->name}");
    1 point
  18. @adrian I just added my two newbie cents to the Github thread. A slightly cleaner and more "additive" solution would be this, I guess: $repeaterItem->addStatus(Page::statusUnpublished); $repeaterItem->removeStatus(Page::statusOn); However, that's still a rather ugly workaround for PW's confusing behavior.
    1 point
×
×
  • Create New...