Peter Knight

  • Content count

  • Joined

  • Last visited

  • Days Won


Peter Knight last won the day on May 16 2016

Peter Knight had the most liked content!

Community Reputation

826 Excellent

About Peter Knight

  • Rank
    Hero Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Dublin, Ireland.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Peter Knight

    Yep. Same here and usually the same types of questions re. Images. Lately I’ve started to save some code snippets as Github Gists
  2. Peter Knight

    I think he means a place where new members can introduce themselves.
  3. Peter Knight

    Yep I agree. Initially I was reluctant to start using Slack and slow to adopt it. Last year I had to use it permanently as part of a contracting gig I was doing and it's a really nice messaging App. I don't see it replacing the forums at all and actually it doesn't work as a forum replacement. Slack is great for immediate conversational type comms. The forums are great for searchable and persistent content that gets archived (and indexed by Google). It's just another useful medium.
  4. Peter Knight

    @matt.bryant Welcome to PW world. All great and topical points. On the subject of Slack. I would love to see an official Processwire Slack channel. Interesting - I thought there was one but can't find it now. I think that's a great idea though. Maybe it's something @Pete might consider?
  5. Peter Knight

    Oops - I'm contradicting my earlier original post here. Page A contains a mix and page B doesn't.
  6. Peter Knight

    Thanks everyone. @dragan I did think about the isotope / masonry route but in my use case, the images are not mixed on any single page (right now). Lets say there's Page A which has all wide images and page B which has all tall images. They're both baed on the same template though and that's where the issue is. But I do hope UIKit 3 do introduce their dynamic grid soon as it's badly missing from v3. In the end I'm kicking around this with the help of ukyo's suggestion. On a side note, If the images field doesn't have an image in it, my code still throws an error. I thought my first image check at the start stopped that happening but seemingly not. In plain English, this is what I *think* I am doing Create a variable called products for each child page If the images field isn't empty, set image as a variable Output a html wrapper with an image at the top and some text below In no. 3 if the image is wide, apply a class prod-preview. If the image is tall, apply a class prod-preview-tall <?php $products = $page->children(); foreach ($products as $prod) { if ($prod->images) // Check that images field is poulated { $image = $prod->images->first(); //Create variable from first image in field } ?> <?php echo" <div> <div class='prod-ov-wrapper'>"; // If image is wide (width greater than height) if($image->width > $image->height) { echo " <a href='$prod->url'> <img src='{$image->url}' class='prod-preview'> </a>"; } else { // If image is tall (height greater than width) echo " <a href='$prod->url'> <img src='{$image->url}' class='prod-preview-tall'> </a>"; } echo" <div class='prod-ov-text'> <span class='preview-title'><strong>Part No:</strong> {$prod->title}</span> <br/> {$prod->prod_summary} <a href='$prod->url' class='uk-icon-button icon-linky' uk-icon='icon: chevron-right'></a> </div> </div> </div> ";} ?>
  7. Peter Knight

    I have a lot of product overview pages and each of these pages features a grid of wide thumbnails like this... Although the images are not exactly the same size, I am using the CSS max image height of 150px to keep things tidy and it works well assuming all the product photos are wide format. Even though there are about 50 of these overview pages, they're all based on the same template. However, my client has one product overview page that features tall / thin images and these need to be displayed on the overview at 500px high. When my CSS max-image height is applied to these images, they are too small in a grid format. I could create a separate template for this tall/thin grid and that would solve my issue but I was wondering if there was a better way to do this and keep the single template. Would you recommend doing an if/else statement on the images like this <?php if ($page->rootParent==1128) { echo" <img src='{$image->url}' class='image-wide'>"; } else { echo" <img src='{$image->url}' class='image-tall'>"; } ?> I'm just not sure if I should be basing the if/else on a selector examining a page title or a rootParent ID or maybe even using a more modern image sizing trick. Any thoughts appreciated.
  8. Peter Knight

    Yes it’s only for year 1. But a good deal if you’re intending on a paid plan anyway.
  9. Peter Knight

    If you're considering a paid plan, there's 90% off for the first year here That's not my affiliate link but probably MacWorlds
  10. Peter Knight

    Started using iDrive after CrashPlan announced the end of their Consumer plans. Not a bad product at all and they often have great discounts on the Macworld newsletters. I'm a bit of a backup junkie and have been through (or am still using) Syncplicity Sugar Sync Crash Plan DropBox Google Drive Amazon Backup Drive Amazon S3 storage oDrive and probably more However realising this is a ridiculous setup I am going to consolidate soon Just discovered a really nice app called pCloud recently and it works a little different. It creates a virtual cloud drive on your machine so that any files you put in there don't take up space on your local machine. Worth a look as the Apps and website based account ar every nicely done. As much as I like iDrive and others, some of the interfaces are awful. iDrive looks like something from the 90s.
  11. Peter Knight

    Very nice. Seems like a nice mix of the Repeater Matrix (Pro Fields Module) and Page Table Extended.
  12. Peter Knight

    I'm getting the error below The mention of filesize is odd because this site is a 1 page holding page with 4 medium images. Other than that it's the usual 3.0.96 files. This is on a server which I don't have complete control over. Otherwise I'd get you better server info.
  13. Peter Knight

    No, that’s very helpful. Thanks
  14. Peter Knight

    Just a general question but has anyone tried integrating Processwire with HubSpot's API. If so - how did you generally find it? Anything to be aware of?
  15. Peter Knight

    Hi @nikoka If you're running A2 Hosting on a Lite, Swift or Turbo plan OR Reseller plan then external SMTP servers won't work. Here's the full support page I had just started using A2 for my hosting and was about to migrate about 10 sites from a VPS. Really glad I discovered this early when I had just moved the first site. FYI I moved to Hostinger. I've had a few setup issues but they do allow external SMTP processing.