Leaderboard
Popular Content
Showing content with the highest reputation on 03/17/2025 in all areas
-
Visit the GitHub repository or module directory for usage instructions. I believe there might be an issue with the module directory structure, as I'm unable to add the module. echo vite(['assets/css/app.css', 'assets/js/app.js']); Important Notes: For bug reports, feature requests, or contributions, please use the GitHub repository. The module is under active development, and updates may be frequent. Make sure to check the repository regularly for the latest version and improvements.6 points
-
With regard to the documentation, it would be quite good to have newer features that have been mentioned in this weekly update or blog posts incorporated in the main documentation. Possibly also some of the pro modules stuff, as at the moment documentation is scattered around either in the forum or on the shop pages to purchase the pro modules. While it makes sense for discussion to be in the forum for people with up to date subscriptions, having documentation in one place might be a help, and might even convince people to buy pro modules if documentation for how they can use them is available. I notice with Lister Pro, there is some documentation in the API reference under Lister with core lister methods and properties and Lister Pro methods listed together but pro methods and properties identified.3 points
-
Hey translators and polyglots! v2.1.1 has been released to address a bug introduces in 2.1.0 that affected some, but not all, users. If you are experiencing issues please reference this Github issue that may provide more information. If you haven't experienced any bugs, upgrading is still recommended to prevent any oddities in the future. Unlikely, but safer than sorry. 2.1.1 is available via the modules directory and can be upgraded from the module config page in your ProcessWire admin. Thank you to @jacmaes, @ryangorley, and others contributing in the Github issue for reporting and assisting with debugging!2 points
-
@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 🙂2 points
-
There isn't anything major to write about this week, so I'm just checking in to say hello and I hope that you are having a nice week, and tell you what I'm working on here. Time this week has been split mostly between working on the new PW website, working on an API project for a client, and researching and interviewing companies to replace our HVAC systems. That last one probably took the most time, as I didn't know much about HVAC before our maintenance person said it's time to replace the the heating and air conditioning systems. So I've been trying to learn all I can about HVAC in order to go about it in the most informed fashion possible. This is the sort of thing most might only do once or twice in a lifetime (it's a big expense). Usually I'm more DIY with this kind of stuff, and a lot of it is approachable. But when you get into the A/C side of things with refrigerants (R410A, R454B, R30), condensers, compressors, and coils, that's where my head spins, it's way beyond my DIY range. It really is a job for the professionals. So I'm going to leave that to the experts so I can focus on web development. On the PW website I've been working on the API reference this week, along with some final details on the modules directory. Next week I'm hoping to finish the API reference and start working on the homepage. Following that, I'll be writing a lot of new copy for the Features section (thanks for all your feedback there). Then we should be nearly finished. So it's still a few weeks out, but progress is good. Thanks for reading and have a great weekend!2 points
-
Regarding the API reference, I always wondered if there could be a way for you to add links to pages that reference a particular method and go in deeper details about its usage. One such case could be to link the blog post about output formatting in the $page->of() documentation. Maybe there’s already something in place like this and then it may just be a question of adding/updating links. Thanks and I’m (we’re all!) looking forward to seeing the new website! (and I hope all goes well for your HVAC installation)2 points
-
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
-
Hello everyone! 🙂 I’ve been using ProcessWire for well over a decade now, so I've been reading here forever, but never actually posted! I recently launced simplesignature.email and once again was delighted how great ProcessWire works for me, so I decided to share this one here! We’re a creative duo (Michael, and Stefan) from Switzerland working at and for many creative and branding agencies over the years. One thing often comes up: we need to create consistent email signatures for our clients. After trying many unsatisfying solutions, we decided to build our own. Goals: Clean, very minimal and easy to use, targeted mostly at designers Work reliably across email clients Possibility to easily share a signature with team members or clients Free of the common issues (PNG logos, font inconsistencies, broken layouts) So we built Simple Signature! Technical Stuff / ProcessWire Architecture Each user gets one ProcessWire page that stores all their signature configurations as JSON We bypassed ProcessWire's user system for a simpler magic link authentication (most users don’t need to login) Technical Features Client-server synchronization with signature configs stored in localStorage first and then pushed to the server, with debounced synchronization to do this efficiently Pure vanilla JavaScript with modular components for real-time preview rendering Server-side image processing using Imagick for different image shapes (circle, square, rectangle) “Business” Model Free for individual use (one signature) Pro plan enables multuple signatures and sharing them via a link - useful for agencies creating signatures for clients Simple Lemon Squeezy checkout overlay integration for payment processing While we’re not primarily revenue-focused - we built it for our own needs and as a free tool – a few paid users might help support operation and hosting costs for free tier Let me know if you happen to have a use for Pro features – happy to send you a discount code! Third Party Modules used: MarkupCloudflareTurnstile to make sure users requesting to create a login magic link are human WireMailSmtp to send emails As primarily a frontend developer, I found ProcessWire to be (again!) the perfect backend solution for this project, even without extensive PHP experience. It’s just super flexible, easy to use and robust. Visit simplesignature.email/signature-editor/ to see the tool it in action. Happy to answer any questions! Best, Michael1 point
-
Hi @bernhard, thanks for your explanations. I will made my best trying to follow those suggestions.1 point
-
Hey @Cybermano glad it was helpful! That's what I've been using before I had the idea of hooking into WireMail::send. Everything in life has pro's and con's... So I'd not say it's a bad practise. But what I like about the solution is that it fits my credo "simple things should be simple". Sending a beautiful thing should be simple. And what you show might look QUITE simple it's not as simple as my version. If you only have one mail it won't matter or your version would even be easier (because you see everything that is going on). But if you are sending mails from different places in different occasions (eg on registration, on a new post, on a schedule, etc...) then my version keeps your code DRY (don't repeat yourself) whereas your version either tempts the dev to copy and paste those lines of code or be too lazy and just send out an ugly 90s style email. Both is not ideal in my opinion and investing a little more time to setup the hook will be beneficial in the long run. Also, while it's just a few lines of code, when your codebase grows every line of code that is not instantly and easily understandable matters. Your brain has to read the code, understand it, interpret it and remember it. With your str_replace that might be QUITE easy, but things add up and suddenly it might make the difference between easy to read code and a bloat of spaghetti code. It's about building a habit. Another problem with your solution is that if you copy&paste this to 3 spots, for example, and later you add another replacement tag, you have to do a search&replace and you might miss one spot and you introduce a bug. If you have it on a central place this can not happen. On the other hand if you want to render different files or you want different tags for different emails your approach might be the better one. And for someone not familiar with your codebase it might be easier to understand your version vs. the hook, because only seeing the $mail->send() somewhat hides how the mail gets sent with nice HTML and your version makes that obvious.1 point
-
I totally forgot to do this. Sorry about that. If you are trying to set up something like this, I have uploaded a small zip that gives an example of how a few things could be done. _theme-options-tabs.php - this is my main settings configuration page. You can see I call a function file and then several tabs files. I broke out the tabs into separate folder/configs because it makes it easier for me to stay more organized as I add more features. _theme_fn.php - this is where my various functions live that construct a number of select options: getImageFields() - I use this in other places in my layout to determine where the main images for content types are to be found in a generic way - this way I can pick and choose which image fields I have on which templates and have a central source of truth to determine what order to grab a primary SEO image from. getEntities() - I use this to get a list of possible owners for the site - this setting gets used all over the place to trigger markup variation. getFontFiles() getFontFamilies() getFontSelectOptions() - I use these to look for fonts in a central font share and also look for font's added through either my Chroma backend theme or via RockFrontend, deduplicate families and provide a simplified options layout that include the css path for compilation into LESS elsewhere. If you look at the tab folders with configs, you can see how I call these functions to populate dropdowns. settings.zip1 point
-
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