Jump to content

Craig

Members
  • Posts

    377
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Craig

  1. Craig

    Wireframe

    Like RockDatetime? ? Yeah - if it's mostly site-specific, I'd put it in a utility class. Multiple sites - probably a module ?
  2. Craig

    Wireframe

    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.
  3. Craig

    Wireframe

    I use Utility Classes in these cases ? Or you could maybe use PHP traits and use them in the controller classes?
  4. 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));
  5. 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?
  6. 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.
  7. 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?
  8. 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}");
  9. Ah OK! Thanks. All's well that ends well :)
  10. Hi! Glad you've got it updated (in the end)... is the problem you had with PW Upgrades, or something I've done (or not done!) with the LoginPersist module?
  11. @Klenkes I've updated the module to version 0.0.2 now which uses InputfieldRadios when InputfieldToggle isn't available. Please give it a go and let me know if that's solved it for you!
  12. No problem! I'll try to work around the lack of Toggle inputfield (rather than make it required), just so it's usable on more versions of PW :)
  13. Hi @Klenkes - it's because the modue is using InputfieldToggle, which only arrived in PW 3.0.139 - sorry! Feel free to update your site to .139 or later if you're able or want to, but I'll update the code to use checkboxes when the toggle input isn't available.
  14. Thanks for checking it out & reporting the error details Klenkes! Not sure why that is yet but I'll try and re-create and fix. Bear with me :)
  15. I've been using Fathom Analytics for a while now and on a growing number of sites, so thought it was about time there was a PW module for it. WayFathomAnalytics WayFathomAnalytics is a group of modules which will allow you to view your Fathom Analytics dashboard in the PW admin panel and (optionally) automatically add and configure the tracking code on front-end pages. Links GitHub Readme & documentation Download Zip Modules directory Module settings screenshot What is Fathom Analytics? Fathom Analytics is a simple, privacy-focused website analytics tool for bloggers and businesses. Stop scrolling through pages of reports and collecting gobs of personal data about your visitors, both of which you probably don't need. Fathom is a simple and private website analytics platform that lets you focus on what's important: your business. Privacy focused Fast-loading dashboards, all data is on a single screen Easy to get what you need, no training required Unlimited email reports Private or public dashboard sharing Cookie notices not required (it doesn't use cookies or collect personal data) Displays: top content, top referrers, top goals and more
  16. That's a great-looking and fast site! Nice work :)
  17. Products would be added in PW and you can use various gateways. As someone new to Snipcart you should check out: Read what Snipcart is. Processwire E-Commerce Tutorial: Adding a Full Store to the PHP CMS SnipWire Module
  18. There isn't, because they are a one person, who is busy working hard on Padloper at the moment to make sure it's a great solution when it's ready to be released. And probably has other things going on, too. Estimated timescales have been mentioned a few times, but the thing with estimates is that they're not concrete dates, and nor should they be. I trust that what is being built is a great module. As it is a commercial offering, I also trust that the support will be there, if or when it is needed. I've also started the groundwork for a commerce project - I had planned to use Snipcart, but Padloper might be better - I won't know until it's released and I'm happy to wait until it is to make that choice.
  19. Do you just want to get the first item? This seems to do the job for me: $alert = $page->cblock_alerts->findOne("type=alert"); if ($alert) { echo "Notice: {$alert}"; }
  20. Hi there, thanks so much for working as hard as you have been/still are on this module! I'm testing it out at the moment, and have come up against the error that was previously reported: Having dug into the code, I think I found the cause. My test PW installation is in a subdirectory - not its own host - and snipWireRootUrl returns the full path include the folders: /misc/pw-snipwire/processwire/setup/snipwire/ In the installer, as this variable is only used to set the parent page for custom-cart-fields, could ExtendedInstaller.php be updated to use the path instead of full URL? I updated it like this, re-installed, and it worked: // In ExtendedInstaller::__construct(): $this->snipWireRootPath = rtrim($this->wire('pages')->findOne('template=admin, name=snipwire')->path, '/') . '/'; // in _installPage(): // Page "parent" key may have "string tags" $parent = \ProcessWire\wirePopulateStringTags( $item['parent'], array('snipWireRootPath' => $this->snipWireRootPath) ); // In SystemResources.php 'parent' => '{snipWireRootPath}',
  21. We've all been there ? Thanks for your perseverence on this! ?
  22. Just wanted to let you know that I just tried this. It failed to log in as 'Craig A Rodway', so changed my name on the forum to just 'Craig' and it worked fine ?
×
×
  • Create New...