Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. Add a "X-Requested-With: XMLHttpRequest" header to the ajax call and $config->ajax will work.
  2. This should work, if the field is properly submitted with the contact form data.
  3. Just like you're comparing it for the login: hash the "current password" and compare it with the database entry. But pw does have you covered: $user->pass->matches($inputPass);
  4. It's the goto way of implementing responsive video or iframes.
  5. It's not about the rel, but the parenthesis: https://processwire.com/api/selectors/#or-groups I just chose rel for "relationship", which is what you're dealing with.
  6. I'm also on current chrome (mac). I just noticed that I had to reload once yesterday before the content was displayed as xml and not text. Not sure why that happened. Scrap that. Logged in I'm getting application/xml. Logged out I'm also getting text.
  7. Maybe your Accept header does not allow application/xml? For me it's this:
  8. parent is not a field in the traditional sense, but a native field and might therefore function a bit different. You could try: rel=(parent=$page), rel=(secondary_category=$page), …
  9. Seems like for that specific hook admin.php is called to late in the bootstrap process. But other than the timing there's no disadvantage in using admin.php to hold admin related hooks.
  10. admin.php works just fine as well if the hook should really only run on admin pages.
  11. Two page arrays result in this: date 1 | date 2 - 1 - 2 - 3 1 2 3 4 Or the other way around. It's not merging the dates. But if all pages are fetched no matter what (no pagination) it works like that: foreach($myPages as $p){ $p->set('sortDate', $p->date1 ?: $p->date2); // Runtime field } $myPages->sort("sortDate");
  12. For me it's delivered as Content-Type: application/xml; charset=utf-8;
  13. That's a fact that nobody can rely on, therefore it's not present in the processwire selector api. You could however do in with raw mysql or in memory with php.
  14. If you're using the api in classes or functions these variables are not available as such. You'd need to use $this->wire('pages') or wire('pages') depending on the current scope.
  15. The sort selector does only fallback to the second parameter for items, where the first sort parameter is the same value. It's not combining both field values to sort afterwards – they might even be not comparable because of different types.
  16. kongondo's module is basically what I suggested in module form, so I'd suggest trying that at first.
  17. You can hook ProcessPageEdit::buildForm to dynamically add custom fields (e.g. InputfieldMarkup) to page edit forms based. Is that what you're looking for?
  18. Srcset and picturefill or if it needs to be super simple just a 2x low-quality image.
  19. https://processwire.com/talk/topic/9730-get-pages-used-by-a-pagefield/
  20. Even guests have page-view access. Shouldn't this therefore deny the backend access control. Essentially I don't want all editors to be able to batch geocode addresses, but I'd like to use the module to geocode single instances in my templates.
  21. With pages it's possible to circumvent access control manually in templates, but I've an page action module I'd like to control the access to in the backend. But this does prevent me from triggering the page action from my templates via the api, as users might not have enough access rights to use it. Is there any way around this?
  22. There's one logically missing peace. How is the selector supposed to know which parent.marker does correspond to which mark. What's the correlation of markers and marks?
  23. My current grid system is this, based on inuit.css's layout object: Include the mixins and some media queries (99% only for updating the width) and most grids are done.
  24. Multi-instance support is only for instances sharing the same wire folder via the multi-domain-configuration. Otherwise it won't work.
×
×
  • Create New...