Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. Ryan is not using a markdown parser for field descriptions/notes as they're only supporting a small subset of markdown (I think links/bold/italic and that's it) and it's faster this way, but that's probably the reason, why escaping doesn't work.
  2. It's not. The module does use the chosen library. I just wrote the wrapper to include it in processwire.
  3. The file/image field is not really a field to "select" a file/image, but it's a storage field. You can select these file via the processwire api in your code or you can use the CKEditor plugin to add the link via the backend to a textarea field. What's currently not possible in the core is selecting a file/image in a field. Since a few days there's a community module, which does try to solve the latter part: https://processwire.com/talk/topic/10009-image-field-select-image-from-another-page/
  4. I'm not sure why you'd need sql for that. Sql queries cannot supply you with a datastructure like you suggested it, it can only return data in a tabular structure, so you need to build up the array no matter how you tackle the problem. $usersWithOrders = $users->find("orders.count>0"); $orders = $pages->find("template=order"); $byUser = array(); foreach($usersWithOrders as $u){ $byUser[$u->id] = $orders->find("id=$u->orders"); }
  5. You certainly need to keep mysql connections and mysql queries apart. The first one is causing your db to crash, whereas the latter ones are using these connections. If 30 visitors are causing 400 (I'd expect concurrent) connections I'd check if mysql connections are properly closed.
  6. Set it to unpublished and on first login publish the user? But you'd probably need to detect this before the call to the actual login does happen.
  7. You wouldn't want to optimize images multiple times. You'd rather want to hook into some point, where you you'd get the images, which are added successfully and just optimize those newly added ones. For details on which hook might be fitting you'd have to wait for other answers.
  8. You mentioned your pages having different urls, while having the same name supplied: /home/contact/ vs. /contact. The /home part is probably because of the name settings of the homepage. It lets you choose if you want all multilanguage pages to be under the same url or namespaced as /en/…, /es/… or whatever name you want to be there.
  9. I'm really curious about the forms module. I've tested nette forms last week and it's probably the best forms framework I've ever used. Especially the combination with client side validation makes it's really mighty.
  10. You're mentioning exactly the point, which does prevent that. It would need some kind of standard about language naming and that one is simply not existing in processwire (and even might not in the future). Languages (besides default) can be named however the admin does feel like. You could always implement a custom function into the install() method to check for languages named correctly and if so install any files. Other people would need to install them manually. Also a point about the default language. This one can be any language, but it's always named default. That's a problem as well.
  11. id!=$page->myPageFieldWithPagesNotToBeLoaded Like that?
  12. You'd probably mix WillyC's code with the option to run the PageAction on a batch of pages if you want to circumvent memory issues.
  13. Looks great. I'd just give the header navigation a bit more contrast to the background. Maybe I'll give it a listen later.
  14. PageActions can easily be called from the api and with the IftRunner you can even queue them for later (or external) processing. wire('modules')->get("SendEmail") // Get PageActionModule ->set("email", "registration") // Set config values (if needed) ->action($page); // Run action on $page
  15. @WillyC Why would one shovel all the data from mysql into the memory if the db can calculate the sum on it's own? And it's probably faster, because it's querying pages only once.
  16. The best thing about your stylesheet is that it's stateless and therefore cacheable. Using php to generate it dynamically would deny exactly that. For stateful styles inline-styles are perfectly fine if you need dynamic files.
  17. I'd also suggest taking a look at this topic: https://processwire.com/talk/topic/2089-create-simple-forms-using-api/ It's essentially a community driven "what you need to know about the forms api". I wouldn't call it documentation, but you can learn a lot from the examples. Also attr() is essentially meant for those html attributes, which are not input specific, which type is.
  18. Caddy is another webserver like apache or nginx. It's not meant to be a all-in-one dev environment.
  19. This part of the domain is set in the settings tab of the homepage on the name field(s).
  20. You could use WireArray's functionality, but it's not as easy as simply passing in an array. You'd need at least a class extending WireData, which holds those productsData.
  21. And again the GEMA blocks it for germany. It's so great to hide content in order to "make money for their artists".
  22. Afaik the header is just a convention. The usage of it in libraries might vary.
  23. Related to this: https://github.com/ryancramerdesign/ProcessWire/issues/1728 ?
  24. That looks really great and is certainly a quick and easy solution for websites, which need a overseeable amount of globally shared assets.
×
×
  • Create New...