Jump to content

Craig

Members
  • Posts

    363
  • Joined

  • Last visited

  • Days Won

    6

Craig last won the day on February 2

Craig had the most liked content!

Profile Information

  • Gender
    Male
  • Location
    Gateshead, UK

Recent Profile Visitors

10,129 profile views

Craig's Achievements

Sr. Member

Sr. Member (5/6)

619

Reputation

14

Community Answers

  1. Hi Marcel! I think this is a small mistake in the module code. I'll release an update soon, but for now, you can change it manually as follows: In WayFathomAnalytics.module.php, at line 150, change it to this: private static function getEmbedConfig(array $data) (add the word 'static' after private).
  2. Hi Dan! I'm a part-time freelance PW developer (full-time employed elsewhere working on bespoke SaaS), based in the UK, and would be happy to take a look at the issues on the TKP site. Feel free to message me on the forum, or you can reach me on email: craig (@) onhover.co.uk.
  3. When processing a booking, you could include the current number of available spaces that the user was shown. Before finalising or saving the booking, you can check if the number sent through matches the current live value. If the live value is the same, and you have available spaces for the requested quantity, you are fine to decrease the amount. If the live value is lower, then someone else has grabbed them, so you can handle this situation as you please.
  4. I've got accounts with Fathom and Plausible, which are both great.
  5. 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 ) */
  6. Fantastic site all-round and a great write-up here. Well done on the project, and thanks! πŸ™‚
  7. I had a .me domain for an still-in-progress side project, but the high renewal price prompted me to look elsewhere. I ended up getting a .xyz for a much better price πŸ™‚
  8. Unfortunately, PW only supports one dimension for arrays when using the API to process data. There's been some discussion on this topic at GitHub: https://github.com/processwire/processwire-issues/issues/387
  9. I've been using RunCloud for a couple of years now, both at work and for my own/clients use. I originally wanted to go with Ploi, but unfortunately the features I needed just weren't ready at the time, so have stuck with RunCloud. I'm also invested in using the RunCloud API to automate the setup of some projects, so there's that too. I have two wishes for RC, and that is that they introduce third party backup destinations (i.e. your own S3 buckets) and have fewer WordPress-only features.
  10. SSH and FTP won't be affected by .htaccess, as it's only the web server (Apache, usually) that processes the directives in that file. If it's failing, it could be due to the import tool trying to validate the web-accessible presence of the files it sees via SSH/FTP by making a typical web request (that is handled by Apache) - and it's those requests that PW could be blocking. Another reason could be if the directories it isn't finding is done by some sort of symlink, or there are some permission issues preventing it from working. Without any detailed logs or knowledge of the import tool, I can't suggest anything other than that! πŸ™‚
  11. Like RockDatetime? πŸ˜‰ Yeah - if it's mostly site-specific, I'd put it in a utility class. Multiple sites - probably a module πŸ™‚
  12. Something like that, yes! Use it in controllers and/or components as and when you need to πŸ™‚ If I needed more, or different, date or time functions than just "local()", I'd maybe call it "DateTimeHelper" and have various functions inside all related to date/time calculations or formatting, as I like to group similar things together. I also like to use these for getting pages for sections of the site that are repeated in different places - like news or events - and have functions like findRecent() or findByCategory(), which can accept parameters for limit, category, etc. These can then be used on homepages, sidebars, main news/events pages, or RSS. The functions interpret the parameters, set some defaults (parent, template), and make some pages()->find() calls to return the requested pages.
  13. I use Utility Classes in these cases πŸ™‚ Or you could maybe use PHP traits and use them in the controller classes?
Γ—
Γ—
  • Create New...