Jump to content


Popular Content

Showing content with the highest reputation on 06/24/2017 in all areas

  1. 4 points
    This week’s core version on the dev branch includes a lot of small fixes and improvements. We’ve also got a new multi-language URL field available this week as well. https://processwire.com/blog/posts/processwire-3.0.65-core-updates/
  2. 3 points
    On the edit page of the title field, go to input tab, open the pattern field, there you can add a regular expression pattern ( [-+]?[0-9]*[.,]?[0-9]+ (for numbers with or without decimals)). Or you can add a hook and check the title before saving. https://processwire.com/api/hooks/
  3. 1 point
    I'm trying to create a module that - among other things - provides a function to edit and add new fields. Instead of just linking to the regular field-editor, I want to open it in a modal window, so the user stays on my page rather than being redirected to the field-editor. I found the «AdminThemeDefaultHelpers» which look like they'd provide a way to do this, but when I try to implement that in my module, I get all sorts of errors... (Call to a member function get() on null in /web/wire/modules/AdminTheme/AdminThemeDefault/AdminThemeDefaultHelpers.php on line 15) This is the code I'm using to call the helpers: require_once(wire('config')->paths->modules. "/AdminTheme/AdminThemeDefault/AdminThemeDefaultHelpers.php"); $helpers = $this->wire(new AdminThemeDefaultHelpers()); The module itself is a backend module (extends Process implements Module, ModuleConfig) I'm pretty sure I'm doing something wrong... Any guidelines available on this topic?
  4. 1 point
    If you're using the processwire variables within a function, you could reference them using the wire() function such as: wire('pages')->find('selector'); wire('users')->get('selector');
  5. 1 point
    I'm not really sure if it's worth the hassle to care for own servers' email reputation. Especially when running on a shared hoster or any cloud service your ip is shared with others – on cloud services some other customer might have had the ip before yourself – so the reputation is not only in your own hands. And even if that' not the case it might be easier to pay a service than to spend hours trying to get to the cause of the bounces.
  6. 1 point
    Hello, A friend posted a question about how obtain the markdown code for a image when you are using the markdown editor. Here I created a module just for that. You can download it here. https://github.com/NinjasCL/InputfieldImageMarkdownCodeAdditionalFields cheers.
  7. 1 point
    Posting in the hope this helps someone out of a hole! Having built 20+ sites on PW in the last couple of years (and loving it...) I came across a really odd situation recently. The client's IT company and I 've been battling for a couple of weeks and today, finally, we have an answer! The site is built and temporarily housed on a shared hosting account we have for development. All tested well here so Access was granted to the client to start adding content. The next day I get a call from the client to say the admin side of the site is logging them out every 30-40 seconds and they have to log back in again each time to continue. I tested again from our office with their login but all worked as expected. Other browsers, PCs etc. were all tried by the client but the problem persisted. So, I get in my car and drive to the client's site. Sure enough, I see the issue on one of their iMacs. So I open up my MBP, connect to their network, log in as them and the problem is there. So, next, I came off of their network and onto my tethered iPhone on 4G. Bingo! The problem goes away. So it's their network that's the issue. Their IT company were called and, with us helping them wherever possible, they worked on it for 2 weeks to find the problem. I captured the port numbers in use by PW admin (60992, 60993, 61000, 61001, 61002, 61003 by the way) and the IT company opened those ports on the router but still, the problem remained :-( And then the breakthrough... They have two VDSL lines into the building that feed their router through a load balancer. It seems that their setup meant that responses to outbound traffic did not necessarily come back in via the same line. Processwire admin does not like this! So, the IT company put in a rule to direct all traffic from the IP of the shared hosting through the same route in and out of the building and BOOM! it all works as expected. Phew! All's well that end's well but it certainly put us through the wringer tracking it down. Actually, I think it's pretty cool that PW does this. A good extra security measure. Several other CMSs (no names...) worked just fine with this scenario but not PW. Anyway, happy client, happy me. Hopefully, this story helps someone else here too.
  8. 1 point
    or if($users->get($username)){ // username found } not sure what you're doing exactly as always to give simpler solutions This would also work, foreach ($users as $u){ echo $u->name; } And if in an function scope where $users is not available: foreach (wire("users") as $u){ echo $u->name; }
  9. 1 point
    Thanks Arjen. But I seem to be getting "Error call on a non-object" whenever I try to access $users?
  • Create New...