Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/03/2021 in all areas

  1. Hi! I'd recommend doing it this way, using a single PHP DateTime object: <?php $date = new DateTime(); $days = []; while (count($days) < 7) { $days[] = $date->format('D'); $date->modify('-1 day'); } print_r($days); /* Array ( [0] => Tue [1] => Mon [2] => Sun [3] => Sat [4] => Fri [5] => Thu [6] => Wed ) */
    2 points
  2. This week we have a couple of useful new $pages API methods. They are methods I've been meaning to add for awhile but hadn't found the right time. The need coincided with client work this week, so it seemed like a good time to go ahead and add them. I'm doing a lot of import-related work and needed some simple methods that let me work with more page data than I could usually fit in memory, and these methods make that possible. These won't be useful to everyone all the time, but they will be useful in specific cases. The first is $pages->findRaw() which works just like the $pages->find() method except that it returns the raw data from the matching pages, and lets you specify which specific fields you want to get from them. For more details see the findRaw() documentation page. There's also getRaw() method which is identical to findRaw() except that it returns the raw data for just 1 page, and like get(), it has no default exclusions. The next method is $pages->getFresh(). This works just like $pages->get() except that it gets a fresh copy of the page from the database, bypassing all caches, and likewise never itself getting cached. ProcessWire is pretty aggressive about not having to reload the same page more than once, so this method effectively enables you to bypass that for cases where it might be needed. Again, probably not something you need every day, but really useful for when you do. More details on the getFresh() documentation page. I'm going to likely cover these new $pages API methods in more detail in a future blog post, along with some better examples, so stay tuned for that. I noticed there's some pretty great conversion and examples happening in the posts on page builders here, but have been so busy this week I haven't had a chance to dive in, but I'm really looking forward to doing so. Thanks and I hope you all have a great weekend!
    1 point
  3. For some projects I'm using business hosting from one of the best hoster in Urkaine https://www.ukraine.com.ua/en/business-hosting/. They have one of the most feature-rich control panel that I have ever seen. There is an option to locate your account in a German data centre. So I would recommend it to try.
    1 point
  4. If you don't want to get into server management/installation of lamp stack i'd recommend Ploi, Runcloud, Serverpilot or one those to skip that part. I've alway felt it is worth every penny.
    1 point
  5. So embarrasingly easy. Need to check out more PW basics... Thank you!
    1 point
  6. You can change that through the module settings. In your backend, go to Modules -> Configure -> ProcessLogin. There you'll find the Login Type setting which you can set to allow login with username, email or both.
    1 point
  7. If I needed that spec, cheaply (ie. self-managed), I'd consider Contabo's cheapest plan at ~Euro5/month + tax. Otherwise I've never had trouble with Digital Ocean's droplets or Hetzner's VPSs but the prices are much higher for that spec (US$40/month + tax on DO and ~Euro15/month for Hetzner + tax.) You didn't mention your bandwidth requirements so you'd also need to look at what's included in those plans and budget accordingly.
    1 point
  8. I recently started using EthernetServers based in the UK. Talk with George and he will get you setup quickly. You can also look into ovh (which I believe is based in Sweden???) but like ES have datacenters around the world.
    1 point
  9. Source: https://processwire.com/talk/topic/24925-shetlandorg-welcome-to-the-islands-of-opportunity/ Also Fathom Lite, mentioned by some members of the Forums (sometimes also outside of the ProcessWire Forums).
    1 point
  10. Hi Ryan, thx for the update! Is there any reason why the label field is required? I find that really annoying - I'm leaving that blank most of the time while developing, because I see the name of the field instantly and change/fill the label only if the setup turns out to be working properly. Otherwise removing fields, renaming fields etc. is more work than necessary, because one always has to fill/rename one additional field that does not add any benefit. Would be great to revert this back to optional. I like the new interface, though. But it would be better IMHO to show name | type | label (optional) PS: I saw that the page name fills automatically based on the label - that might be nice for all english speakers, but most of the others I guess will usually have different labels and field names, because the label is in their language while the field name is english...
    1 point
  11. Absolutely love this Ryan! I know this is a very simple example, but take a look at the difference in the execution time and memory usage ?
    1 point
  12. The work on the project got seized so no the need is no longer valid.
    1 point
  13. I think you're talking exactly about the Migrations module from @LostKobrakai and I believe you can use RockMigrations within it without problems. It says it's deprecated but works just fine, I'm using it on latest PW master. I do this exactly with that migrations module having the migrations in version control.
    1 point
×
×
  • Create New...