Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/04/2021 in all areas

  1. Hello boys and girls, here's my newest: https://drinkbodegabay.com/ Bodega Bay is a Hard Seltzer drink that's delivered sustainably and contributes to projects to move climate solutions forward and help those less fortunate than ourselves. The website was built with my customary repeater based content blocks solution. The frontend is based on webcomponents built with StencilJS, and as always, it was a pleasure to build. An interesting detail was the processing we had to make on the locations listed in the Where to Buy section. Basically we were handed an Excel list of locations with irregular addresses that had to be geographically located on google maps. Well, maps doesn't really agree with doing that much processing at once, so we had to convert each location's address into coordinates. We built a script that imported everything to pages, then another one that made requests to grab the coordinates from google maps, store them and move on. As Maps defends itself against multiple requests, this script had to wait, pick out the locations that were already georeffed, and repeat a few times until all were processed. In the end, only a couple of locations had to be manually referenced, as Google wasn't able to find them from the way the address was formed. Another detail was the interstitial we have here. Being an alcoholic drink, this must have an age verification popup. It also needed a cookies popup and language selection. So the solution here was to combine all that in an interstitial (languages are disabled now until they translate everything), where the user is redirected on the first time to get that out of the way, but with user agent testing it lets scrapers pass. I'm a bit worried this might cause problems down the line, so we're keeping an eye on it and will reconsider this solution if need be. Hope you like it. I'll have an even better one to show real soon ?
    10 points
  2. You can use the ImageSizer class, rough example assuming you already have saved the image on disk: $fullpath = "/var/www/images/someimage.jpg"; $options = array('upscaling' => false, 'quality' => 100, 'sharpening' => 'soft'); $imageSizer = new ImageSizer($fullPath, $options); $success = $imageSizer->resize(100, 200);
    3 points
  3. I'm so glad to read that @kongondo! I expected the new Padlooper with more ideas for future projects. My support is guaranteed. Thanks for the news and your hard work!
    2 points
  4. When adding/saving Repeater items the sort order is determined by the "sort" value of each Repeater page, not by any order you might apply to the Repeater PageArray. An explanation of sort values is here. You could use the $pages->sort() method to set the sort value of the Repeater page you're adding and it will automatically update the sort values of the sibling Repeater pages. $thatPage->of( false ); $newItem = $thatPage->my_repeater->getNew(); $newItem->foo = 'bar'; $newItem->save(); $thatPage=>my_repeater->add( $newItem ); $thatPage->save(); // Set the sort value of the new item to 0 and adjust sibling sort values $pages->sort($newItem, 0);
    2 points
  5. I honestly don't know why no-one is talking about this. PageHitCounter is already awesome but this in addition to it... WOW! Just installed it a few days ago on a side-project and some client projects, yet everyone is more than happy to see what's going on. AND... it's even GDPR/DSGVO-friendly for those that don't want to use Google Analytics or Matomo (ok... this isn't that detailed but we have trends and at least some insights). (even for low traffic sites a nice addition / running on PW 3.0.188-dev, Multilang)
    1 point
  6. I only used "substr($title, 5)" string and works just fine. ? Thank you R
    1 point
  7. I fixed some typos in my code, by the way, in case you didn't see them ?.
    1 point
  8. Ladies and gentlemen. You have been waiting for a very long time. I am happy to say we are almost there. I am fixing a few loose ends in readiness for the launch. I will create a new thread outlining the way forward with alpha (early beta) testing later this week (barring any show stoppers) or next week at the latest. Thanks.
    1 point
  9. We do not remove regular questions, also not when we have found a solution. We do share the solutions with the community.
    1 point
  10. Same way except I like to put it within the Home page, under a Website Options tab.
    1 point
  11. What about this? $wire->addHookAfter("Pages::added", function($event) { $page = $event->arguments(0); // check for page template if necessary here $page->setAndSave('check', 1); }); PS: Did you see @Robin S module?
    1 point
  12. Hi #1 Do not use the email message textarea in module settings, write your own using php and access the title as you 're used to. 0) $emailMessage = file_get_contens('https://url/to/message.php'); // or include partial etc. $modules->get('SimpleContactForm')->render($array('emailMessage' => $emailMessage)); #2 Just pass an action parameter as option: $modules->get('SimpleContactForm')->render($array('action' => './#anchor'));
    1 point
×
×
  • Create New...