Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. You might want to take a look at this or other resources on the topic: https://www.smashingmagazine.com/2011/11/how-to-set-up-a-print-style-sheet/
  2. The most taken way to do that is probably using Amazon's S3.
  3. I've used all sorts of different styles in my projects, so really it depends on how flexible your markup does need to be and how you want to pass data to your partials.
  4. Can you show us the code where the images are used in your template and/or the markup, which does get rendered?
  5. Only the native include() function does implicitly share variables with included php files. Any userland functions/methods cannot do that, which is why $files->include() cannot do it as well. $files->include() is there, because it's aware of processwire's filecompiler, if you don't need that you can simply use include() as well.
  6. Adding the setlocale statement is not a hard requirement, but you'd need to live with the pw notice each time you log in. It's been added not because of anything related to multi-language sites, but because of issues with file handling of processwire involving utf-8 characters like cyrillic ones. These can happen on all processwire sites not just multi language ones.
  7. Advanced mode is mostly meant to be toggled on just to edit the named settings and disabling it again (or at least for the live version).
  8. https://processwire-recipes.com/recipes/resetting-admin-password-via-api/
  9. These are such micro performance improvements, that I doubt these causing the cpu spikes.
  10. There are various topics around this exact use case on the forums. The short version: there's no obvious solution, but things you can do.
  11. The thumbnail generation does run when this code is executed and the file corresponding to the thumbnail does not exist at that time.
  12. If you mean "per individual email" then it works like that for all WireMails $mail->header("Reply-To", $emailAddress);
  13. You might want to use this instead of a hardcoded id: $config->http404PageID
  14. That's not correct. It's not populated by json data – which by the way is not really a standard or alike – but only by data formatted in application/x-www-form-urlencoded or multipart/form-data. Both is what a <form> can send, but ajax can also send data in that format. It's just that ajax libs nowadays favor json (, it's not like it's name would include xml :D).
  15. I'm not sure this is the issue, because you're experiencing it locally as well as in production, but setlocale() can only work if the locale is actually installed on the running machine. If not it will silently refuse to change.
  16. To be honest I've no idea where the error message did come from. It's certainly highlighting a some different thing.
  17. // Page > Page > Page > PageArray > children() // There's no PageArray::children() method $result = $page->parent()->parent()->children('template=event-tickets')->children(); // Use this: $result = $page->parent()->parent()->child('template=event-tickets')->children(); // Or even $event = $page->closest('template=event'); $tickets = $pages->find('has_parent=$event, parent.template=event-tickets');
  18. @Martin Muzatko Could you please share the code you're using.
  19. There are various pages in the admin, which do not have the "admin" template. These are generally not accessable as backend page per se, but really checking for the rootParent is the most future prove way of handling that even if updates to processwire would change something with the templates. The backend parent page will more likely stay with it's id of 2.
  20. Then you might want to try: $event->wire('page')->… I'm not sure, but page::render should not be called before ProcessWire::ready.
  21. It depends on when you call that. Before processwire's ready state the current page might not yet be determined.
  22. $isAdmin = $this->page->rootParent->id == 2
  23. The PW Backend is basically a highly-specialized frontend to your data, so if you set your permissions correctly you can let whoever you want have access to it.
  24. Redis is often not available in shared hosting environments and we have lots of users, where this kind of tech / performance gain doesn't make a real difference. It's certainly a really nice to have module, but it always depends on the use-case.
  25. Try it you'll quickly find out if it does support that. Also these requirements are only applicable to apache/lighttpd. There are also nginx rules somewhere on the forums, which do the same.
×
×
  • Create New...