Jump to content

maximus

Members
  • Posts

    17
  • Joined

  • Last visited

  • Days Won

    1

maximus last won the day on April 14

maximus had the most liked content!

Contact Methods

  • ICQ
    711064

Profile Information

  • Location
    Pittsburgh

Recent Profile Visitors

2,214 profile views

maximus's Achievements

Jr. Member

Jr. Member (3/6)

21

Reputation

  1. i find it, after 2 hours with AI .. @ryan could you move this field in up of the operators? @elabx thank you for help me. I also found the time when you wrote your reply.
  2. I found it, but I need it in the admin panel and for the field.
  3. Hello, i not understand have to retrive data from Notes filed on template on Page Auto Complete field on another page. i upload video. does anyone know how to do that? selector.mov
  4. So, haha. I’m look you using x-cloak crutch 🩼 also..
  5. i update prompt, it should be generating better now.
  6. Hello y'll, I so happy introduce technical template for ai generate templates on Tailwind from ProcessWire fields. How to work: Select templates you want to design interfaces for Copy the generated JSON structure Ask AI to "Create a Tailwind CSS design for displaying this ProcessWire data" Specify any preferences like: mobile-first, card layout, table layout, etc. Push button "Copy Prompt" Insert prompt to Claude AI, ChatGPT or another ai services. How to Setup: Use ftp for transfer lego.php to template folder On ProcessWire create template with same name. Create new page with select template. Enjoy. Note: It is not always possible to generate a template from the first time, but by debugging you can make even more or less excellent variants. On example screenshot finish page with adjusting elements, blocks on Tailwind. If you have questions or wishes ask me below. Thank you. UPDs: 04/14 Update prompt lego.php
  7. Hello everyone, I’m excited to share with you a project I’ve recently developed – a URL shortener site and profile. Github/Profile: https://github.com/mxmsmnv/site-lqrs Demo https://lqrs.org/
  8. Yes, it creates files. But it creates from source files and want it to create a square WEBP file based on an existing square JPG file.
  9. Hello, i have question how to make square images. I am developing an alcohol online storefront and in it I need to implement square images of bottles - so that they visually all look the same. Right now I am using the following code to position and create the images. <div class="fotorama p-4 bg-white w-full lg:w-2/5 lg:pr-4 hidden lg:block pt-16" data-nav="thumbs"> <?php if(count($page->get('images'))): foreach($page->get('images') as $image): $thumbSize = 500; $largeSize = 1000; // If image already 500x500 or less, don't do any scaling if($image->width <= 500 && $image->height <= 500) { continue; } // If image is not square else if($image->width != $image->height) { if($image->height > $image->width) { $thumb = $image->size(0, $thumbSize); $large = $image->size(0, $largeSize); } else { $ratio = $image->width / $image->height; $newWidthThumb = $thumbSize * $ratio; $newWidthLarge = $largeSize * $ratio; $thumb = $image->size($newWidthThumb, $thumbSize); $large = $image->size($newWidthLarge, $largeSize); $differenceThumb = $thumb->width - $thumbSize; $differenceLarge = $large->width - $largeSize; $thumb = $thumb->crop($differenceThumb / 2, 0, $thumbSize, $thumbSize); $large = $large->crop($differenceLarge / 2, 0, $largeSize, $largeSize); } if($thumb->width < 500 || $thumb->height < 500 || $large->width < 1000 || $large->height < 1000) { $imagickSmall = new Imagick($thumb->filename); $imagickLarge = new Imagick($large->filename); $canvasSmall = new Imagick(); $canvasLarge = new Imagick(); $canvasSmall->newImage(500, 500, new ImagickPixel('white')); $canvasLarge->newImage(1000, 1000, new ImagickPixel('white')); $canvasSmall->compositeimage($imagickSmall, Imagick::COMPOSITE_OVER, ($canvasSmall->getImageWidth() - $thumb->width) / 2, ($canvasSmall->getImageHeight() - $thumb->height) / 2); $canvasLarge->compositeimage($imagickLarge, Imagick::COMPOSITE_OVER, ($canvasLarge->getImageWidth() - $large->width) / 2, ($canvasLarge->getImageHeight() - $large->height) / 2); $canvasSmall->writeImage($thumb->filename); $canvasLarge->writeImage($large->filename); } } // The image is square else { $thumb = $image->size($thumbSize, $thumbSize); $large = $image->size($largeSize, $largeSize); } ?> <a href="<?=$large->url?>"><img src="<?=$thumb->url?>" class="pt-2" alt="<?=$page->title?>" width="64" height="64"></a> <?php endforeach; ?> <?php else: ?> <img src="<?=urls()->templates?>images/notfound.png" width="64" height="64" alt=""> <?php endif; ?> </div> The code works great and generates square images. BUT! When I try to add webp support <a href="<?=$large->webp->url?>"><img src="<?=$thumb->webp->url?>" class="pt-2" alt="<?=$page->title?>" width="64" height="64"></a> <?php endforeach; ?> code nothing works. There is a crop image function, but no function to position the image centered with the background added. How to implement this as simple as possible, using core functions and adding webp support ?
×
×
  • Create New...