Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/18/2025 in all areas

  1. This week on the dev branch there are some issue fixes and new features. ProcessWire’s modal JS alert functions have been upgraded to use Uikit modals. Previously they were using Vex modals, but it appears that Vex is no longer maintained, so when we ran into an issue with them it just made sense to switch to Uikit for this, at least when AdminThemeUikit is the current admin theme. The JS functions affected are ProcessWire.alert(), ProcessWire.confirm() and ProcessWire.prompt(). All of which can be found in ProcessWire’s main.js file used by admin themes. ProcessWire’s Markup Regions output method was updated this week to support class removal by wildcard or regular expression. When you specify a class attribute with a class name that starts with “-“ that means that you want to remove that class from the element you are overriding/appending/prepending. Previously you had to specify the full class name you wanted to remove. Now you can specify a wildcard like this: <div id="content" class="-uk-width-*" pw-append></div> That would make it remove all classes from #content that start with "uk-width-". You may place the wildcard anywhere in the expression that you want to, enabling you to remove by prefix or suffix. But if that’s not enough, you can also specify a regular expression like this, which would do the same thing as the above: <div id="content" class="-/^uk-width-.*$/" pw-append></div> That's probably overkill for most, but between the “/“ delimiters, you may use any PCRE regular expression. Usually when we add a class to a markup region, we just specify it like a regular HTML class attribute. But if you want to add a class that would match what you are removing, you’ll want to prefix your class name with a plus sign. That tells the Markup Regions processor not to remove it even if it matches your rule. For example, the following would remove all uk-width classes and then add a uk-width-1-4 class: <div id="content" class="-uk-width-* +uk-width-1-4" pw-append></div> Regarding the new ProcessWire website: it’s nearly done except for the homepage. I’m saving the best part for last. I’m not saying the site will launch tomorrow, as there’s still a lot of detail work to take care of too. But I did want to say that a lot of progress has been made and hopefully it won’t be too much longer before we launch it. Thanks for reading and have a great weekend!
    7 points
  2. Just a heads up for anyone using DigitalOcean and sending out emails using SMTP with port 587, DigitalOcean just recently started blocking this port on "new" droplets. I put "new" in quotes because that's not true: I have a droplet from months ago, before their supposed announced change, and it still got blocked. I didn't realize this until one of my clients brought it up. Good job DO! /s I use WireMailSmtp and power it with Mailgun's SMTP credentials with port 587. I've been doing it this way for a long time, although using Mailgun's direct API approach (of which WireMailgun uses) is more preferred and would avoid this issue. I will start taking that approach soon with new and existing sites. Using SMTP is convenient however. Anyway, I'm not the only one that's complaining: https://www.digitalocean.com/community/questions/smtp-587-ports-is-closed An easy fix, for now at least, is to use port 2525 which is not blocked and which Mailgun also supports: https://www.mailgun.com/blog/email/which-smtp-port-understanding-ports-25-465-587/
    3 points
  3. Great video by the DDEV creator that shows how to troubleshoot problems in your codebase by using DDEV with xdebug and breakpoints in his PHP editor. Then he shows how to go deeper by using DDEV and git bisect with a known good git point in the past when everything was working correctly and the current git commit where everything is broken. Then he shows how to take it further and automate all the manual steps he took and instead use a bash script that does the same thing but much faster.
    2 points
  4. Ok I just had that exact need and realised that once you realise it's too late to add a hook, because it will not work for the past, only for future logins ^^ So I support this request 😄 And similar to what @nbcommunication wrote it might be helpful to have two different timestamps: one for the last manual login (done by a real user), one for the last API login (via code like forceLogin() or such)
    2 points
  5. I haven't comprehended this is detail but in case it has any impact on the issue or @ryan's recent fix, please note this code in Tracy: https://github.com/adrianbj/TracyDebugger/blob/ae38175fe29fc7076dfa269145de98667cce76c7/TracyDebugger.module.php#L963-L966
    1 point
  6. Hi All, If there are any Canadians out there looking for full time work please DM me with some details of your PW experience. Experience with systems engineering and security implementation a big advantage. Cheers, Adrian
    1 point
  7. Hi, With the introduction of GDPR regulations, many of our clients with "webuser" systems we've developed need a way to email users that haven't logged-in in a while (18 months seems to be the standard) to ask them if they still want their user account. For most of the systems we've developed, we've added a field to the user template which records the time when the user logs in, so we'll be able to develop this functionality. It got me thinking, would this be a welcome addition to the core, accessed in a similar way to created/modified dates e.g. $user->lastlogin? Were it to be implemented, it would be useful to be able to 'silently login' if using $session->login($username, $pass) or $session->forceLogin($username), in the same way you can bypass save hooks by passing in an option to $pages->save(). Cheers, Chris - NB Communication
    1 point
  8. Hello y'll, I so happy introduce technical template for ai generate templates on Tailwind from ProcessWire fields. How to work: Select templates you want to design interfaces for Copy the generated JSON structure Ask AI to "Create a Tailwind CSS design for displaying this ProcessWire data" Specify any preferences like: mobile-first, card layout, table layout, etc. Push button "Copy Prompt" Insert prompt to Claude AI, ChatGPT or another ai services. How to Setup: Use ftp for transfer lego.php to template folder On ProcessWire create template with same name. Create new page with select template. Enjoy. Note: It is not always possible to generate a template from the first time, but by debugging you can make even more or less excellent variants. On example screenshot finish page with adjusting elements, blocks on Tailwind. If you have questions or wishes ask me below. Thank you. UPDs: 04/14 Update prompt lego.php
    1 point
  9. Hey everyone! Finally I have time to post a detailed developer walkthrough for PAGEGRID. I have the feeling that many people don't know how flexible PAGEGRID actually is as a developer tool. I think this is mainly due to the fact that most videos are showing the no-code features of PAGEGRID. But since these features are completely optional and PAGEGRID has a lot more to offer, I've put together a video walkthrough to show you exactly what I mean. My hope is that it'll give you a clearer picture of how PAGEGRID can fit into your projects and help you decide if it's the right tool for you. Please take a look at the video below! I think you'll be surprised at what PAGEGRID can do. PAGEGRID's core concepts (video summary): Your markup: Unlike many other site builders PAGEGRID gives you complete control over the markup and structure of your frontend. You can use PAGEGRID to build specific sections or parts of your custom coded website or you can use it as a full-blown site Builder that can work without any coding. Everything is a page: PAGEGRID items are ProcessWire pages that are defined through native ProcessWire templates and fields. Control what clients can edit: PAGEGRID offers an intuitive editor experience that's easy to learn for clients. Editing and design features can be controlled through ProcessWire’s native roles and permission system. Your CSS: You can use your code editor to write CSS or you can bring your own CSS framework. PAGEGRID makes no assumptions about your CSS code. And it’s not just for Grids, display properties like Flexbox, Block or Inline-Block are also supported. Nesting: A powerful feature of PAGEGRID is nesting and while this feature is completely optional it's quite useful for a lot of cases. You can define a block as a container and can define what kind of templates are accepted for the children. This can be used for layout purposes or to group items together, another example might be a slider or gallery block that the user can add items to or basically any repeatable content that you might want to put inside a block. Developer walkthrough: Developer Documentation: https://page-grid.com/docs/developer/ How to create a custom block: Documentation for creating blocks: https://page-grid.com/docs/developer/blocks/ Try PAGEGRID for free PAGEGRID is not free. However, you can try PAGEGRID on your local machine or on a test server as long as you need to make sure it is the right tool for your next project. … and when you’re convinced, buy your license. Installation PAGEGRID (FieldtypePageGrid) is listed in the modules directory, you can install it like any other module. See the install guide for more information. Recent Updates (2025) Group Blocks Now Linkable (april) Performance improvements (markup cache integration) (march) Quick add feature (february) Symbols and Patterns (january)
    1 point
  10. First you need to make sure to get the value of the page reference field as PageArray (not a single page object or such). This might depend on your setting of the field and whether output formatting is turned on or off (in the hook it should be off, but just in case...). As ->removeAll() works it should be a PageArray in your case. In my case the field is called "pagelink" and I force the return type to be a pagearray via [] Then from the pagearray you can remove your page via remove("id=...") which is all you need I think
    1 point
×
×
  • Create New...