• Content Count

  • Joined

  • Last visited

  • Days Won


LostKobrakai last won the day on January 29

LostKobrakai had the most liked content!

Community Reputation

4,787 Excellent


About LostKobrakai

  • Rank
    Hero Member
  • Birthday 11/29/1991

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Munich, Germany

Recent Profile Visitors

15,902 profile views
  1. LostKobrakai

    Relying on .htaccess is not really uncommon for php cms's out there. Some are more minimal on utilising apache, processwire is probably more on the "take what we can get"-side. Having php serve everything – especially static assets – is just not performant enough in any way. That's the reason for needing to rely on the webserver in front of php in the first place. The reason for apache specifically is because of .htaccess. Other webservers are usually only statically configurable, which is a deal-breaker for any shared-hoster, where a (global) webserver cannot be restarted whenever a single user needs to change his configuration. So if you only support one webserver, it better be apache.
  2. Maybe just add your hook in some hook of ProcessPageEdit, which is executed before your hook shall be triggered.
  3. LostKobrakai

    Looks great. The only thing I negatively noticed is that the page loads seem to be slow even though you seem to be using procache:
  4. LostKobrakai

    It's probably for the same reasons mentioned here:
  5. LostKobrakai

    I'm mostly guessing. I've seen quite a bunch of tutorials using laravel, but never actually used it, so I try: I'm expecting that laravel uses reflection to know the type hint you put for the parameter and depending on the result do some boilerplate code you could've written on your own to retrieve the project and call the controller action with it.
  6. LostKobrakai

    Github is the bigger platform (potential for collaboration), it's interface is quite a bit faster and more productive than gitlabs and it has a better history in terms of availability. Also there are quite a lot of addons like linters, bots or CI options, which directly integrate with the github interface. All in all it's imho the more polished product in almost all areas. The only place I feel Gitlab is ahead is with it's integrated CI/CD tools.
  7. This is an infinite loop you're causing. You hook after the render of a field named a specific name and in the hook you render another field of the same name, which again triggers your hook to replace and so on. You'd either need to find a hook, which won't be triggered again by what you're doing inside the hook execution (like @Martijn Geerts tried) or you need to find a way to differenciate the first call to your hook from the ones triggered by your code within the hook.
  8. LostKobrakai

    Reverse the second part?
  9. LostKobrakai

    I'd simply combine the two options.
  10. LostKobrakai

    It's been some time since I read the blog-post, but I really need to ask if we need the magic functions for the sanitizer, especially the grouped ones. They're hard to document, harder to be used for automated setups – where used sanitizers are aggregated by some coded means – compared to having them as parameters and I would say they're hardly simpler for manual usage over proper parameters. Personally I'd really vote for one clear way instead of having even more ways to do the same. For me there's also the reason that I find it way cleaner to work with data a.k.a. an array of sanitizer names vs. some magic naming, but that may just be me, but I think we really need to be aware of the backdraws of having to many options to do a thing in general.
  11. LostKobrakai

    Why would there if you need a "current" page to be able to do all of that?
  12. LostKobrakai

    https://processwire.com/api/ref/page/next-all/ / https://processwire.com/api/ref/page/prev-all/
  13. You can do it to the degree forums do it. Like track users activity somewhere in a database whenever communication happens and take some amount of timeout at which you consider a person without activity offline. What you cannot easily do is online users to the degree you would expect it from e.g. a chat platform, where you actually want to detect if someone is leaving without waiting 15 minutes and without them needing to communicate to your server constantly. This is the realm of websockets. I may be biased, but if you want a really proper (and scalable) solution for that problem take a look at: https://dockyard.com/blog/2016/03/25/what-makes-phoenix-presence-special-sneak-peek
  14. LostKobrakai

    This is certainly nothing, which can be answered in absolute terms. File system speed depends on the filesystem. A RAM disk is way faster than some old-ish HDD. The database might be local and mostly in RAM, but could be on another machine with network latency to consider. You'd need to test this on the actual machine you're working with under the expected load you're working with. If you're already doing much filesystem IO WireCache might perform better. If you filesystem IO is not saturated, but your db is queried a ton, then adding even more load to the db might not be the best choice. The latter is probably the more usual case for ProcessWire usage. Attention seems like one of the worst metric to judge the usefulness of features by. Afaik WireCache was added to allow for caching of actual data (like pagearrays), which is something MarkupCache simply could not do and cannot do. If you don't need that as a feature performance would be the only thing I would care for.
  15. LostKobrakai

    That only works well for a single currency. If you need to support any currency you should really use decimals, as different currencies are differently subdivided.