Jump to content

Craig

Members
  • Content Count

    356
  • Joined

  • Last visited

  • Days Won

    5

Craig last won the day on May 21 2020

Craig had the most liked content!

Community Reputation

600 Excellent

About Craig

  • Rank
    Distinguished Member

Profile Information

  • Gender
    Male
  • Location
    Gateshead, UK

Recent Profile Visitors

9,866 profile views
  1. Fantastic site all-round and a great write-up here. Well done on the project, and thanks! πŸ™‚
  2. 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 πŸ™‚
  3. 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
  4. 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.
  5. 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! πŸ™‚
  6. Like RockDatetime? πŸ˜‰ Yeah - if it's mostly site-specific, I'd put it in a utility class. Multiple sites - probably a module πŸ™‚
  7. 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.
  8. I use Utility Classes in these cases πŸ™‚ Or you could maybe use PHP traits and use them in the controller classes?
  9. I got this too, and it seems to happen when passing fraction values to getBlurhashDataUri() - these were calculated for an image ratio (e.g. $height = $width * 0.35). If you're doing this, try passing whole numbers, or rounding the calculated dimension first (using floor, round, ceil functions): $image->getBlurhashDataUri(95, floor(95 * $ratio));
  10. You might be interested in the ReachPHP project. (Not to be confused with the React from Javascript land). It also sounds like your setup could do with some caching layers, workers, or some abstractions to manage the data you're dealing with from different services?
  11. I've used PW in mostly headless mode for a recent project at work. A new client needed to add a map of case studies to an existing bespoke site that was built by another party, and an easy way to manage them. I set up a new PW site to manage the case studies, added a basic JSON API as the only bit of front-end, and made a simple Vue app (to be embedded on the client's site) to fetch the data, filter items, and render the map/markers and detail view. Didn't take all that long to build, and the client is happy with the functionality. Each case study is associated with other bits of information, like contacts, keywords, sectors, location - and PW really made this easy.
  12. Good spot, yes. I was typing quickly πŸ™‚ What version is your MySQL server, and is there a fulltext index on the field_page_information.data column?
  13. Can you try using Sanitizer first? E.g. $search = "customer_email: {$data->customer->email}"; $value = $sanitizer->selectorValue($email); $warranties = $pages->find("template=page-warranty, page_information*={$value}");
  14. Ah OK! Thanks. All's well that ends well :)
Γ—
Γ—
  • Create New...