Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/22/2023 in all areas

  1. This week updates continued with various .js files in the core (for jQuery 3.6+ compatibility). A few external libraries were also updated to the latest versions, including jquery-tablesorter, jquery-ui-timepicker, magnific-popup and vex. And finally, InpufieldTinyMCE has been added to the core! That's a lot of updates, but there's not a lot more to write about these updates because we covered the jQuery updates last week, and InputfieldTinyMCE has been the topic of several past posts. But now we've got everything together and running smoothly in ProcessWire 3.0.216. I think we're now ready to focus on getting the next main/master version out in the coming weeks. There likely won't be an update next week because I'll be traveling for a few days, but will be back to a regular schedule the following week. Thanks for reading and have a great weekend!
    9 points
  2. I did my first talk ever yesterday @ PHP Meetup Vienna!! Once more everything was a lot more work than I first thought, but I'm quite proud of the result ? What do you think? Did I forget something important? It was really hard to put 10 years into one hour... The recording was not planned at first, but I thought I'd just give it a try and everything worked quite well ? If you like what you see please share it with others so that ProcessWire gets the attention that it deserves ? Special thanks to @gebeer for showing me ProcessWire in 2013 ?
    7 points
  3. He is so right with this! A few days ago I saw someone mentioning ProcessWire in a comment under a WordPress-related ad on Instagram.
    2 points
  4. https://news.ycombinator.com/item?id=35659963 which one of you is this? ?
    2 points
  5. Thanks. I'll look into this and have a go at replacing it. In my usage scenario this isn't really an issue. I have some very small non-profits who don't want to pay much but have images and documents they want to host, and storing them locally on my VPS isn't really cost effective if they have a lot. If they're paying a low price and don't have to worry about storage, I don't think they're going to object if there's a temporary outage. I really appreciate you making this available. It's something I'd been thinking about for a while, and having a working module to modify will be so much easier than starting from scratch. I'd imagine my usage scenario may be useful to others too, so I'll be sure to update any modifications I make.
    2 points
  6. Great stuff! Good to stay up to date!
    2 points
  7. Extends Pagefile to use Cloudflare Images, Stream and R2 storage to serve files. https://github.com/nbcommunication/CloudflareAssets The main purpose of this module is to allow ProcessWire to be used in an auto-scaling multi-instance environment. By serving file assets from Cloudflare, it is not necessary to have all file assets copied to all instances and we also get the benefits of serving assets from a CDN. How it works When a Pagefile is added in the admin or via the API, it is uploaded to Cloudflare's R2 storage service. Additionally, if the file is an image, it is uploaded to Cloudflare Images, and if the file is a video it is uploaded to Cloudflare Stream. When a URL for the Pagefile is requested e.g. $pagefile->url(), the appropriate Cloudflare URL is returned. As ProcessWire's admin still requires the file to be available locally, in a multi-instance setup if a file is not available it is downloaded from the 'master' copy in R2. This module is not yet being used in production. There may be changes to how Images work in the coming months as features are still being rolled out to this Cloudflare service. Cheers, Chris
    1 point
  8. Great talk and very good comparison towards Laravel and Symfony. I wish I could have seen the faces or read their thoughts the moment you said See here: https://youtu.be/ncS36UqaBvc?t=400
    1 point
  9. Great Talk! And thanks for the mention ? Very well structured introduction to PW. I like the clean aesthetics. This surely will get some people interested in PW. Please everyone go and like/comment this on YT.
    1 point
  10. During the showcase of Latte, you mentioned VSCode doesn't support Latte colorization. It might now. ? https://marketplace.visualstudio.com/items?itemName=Kasik96.latte I don't use Latte so I couldn't test it, but the star rating looks good. Out of the entirety of the video, the only tiny issue was the one slide where your live video overlay was covering up the demonstration of accessing fields via code (page | template | fields). It was shown later so it was still covered - I'm being very critical here, which means overall it was very well done for a live-code recording! Thank you for sharing!
    1 point
  11. Thanks for all of the work, Ryan! I hope you enjoy your travels!
    1 point
  12. Great talk - thank you for sharing it with the community, Bernhard!
    1 point
  13. Hi @Pretobrazza, Currently this is not possible but will be possible with the next version mentioned in this post above. Best
    1 point
  14. I'm only dealing with video, but this is the latest I used: <?php // greatest common divisor function gcd($a, $b) { return $b ? gcd($b, $a % $b) : $a; } $padding = $video->height / $video->width * 100; $padding = str_replace(",", ".", $padding); // css doesn’t like commas $ratio = gcd($video->width, $video->height); $ratio = $video->width / $ratio . " / " . $video->height / $ratio; echo "<div class='video' style='aspect-ratio:$ratio; padding-top:$padding%;'>$video->html</div>"; CSS: .video { aspect-ratio: 16 / 9; width: auto; max-width: 100%; height: auto; max-height: 100%; padding-top: 56.25%; } .video > iframe { display: block; width: 100%; height: 100%; position: absolute; left: 0; top: 0; } /* if aspect-ratio is supported */ @supports (aspect-ratio: 16/9) { .video { padding-top: 0 !important; } .video > iframe { position: static; } } Constraining things in the y-axis has always been one of my biggest pain in CSS... but aspect-ratio goes in the right direction in that you can just go ahead and set the max-width/height to 100% and it will adapt nicely within its parent Wait actually some testing goes against what I just wrote, I have to test further ? It does work but as always with CSS there will be weird edge cases. I wasn't using it much before but now the support is quite reasonnable.
    1 point
  15. Hi @Kiwi Chris, The admin needs the local copy, from what I can see it is mainly for the file size displayed beside the filename in the admin. I did look at hooking InputfieldFile::render() to replace this but I eventually decided that it made sense to keep the original file in place when uploaded, and if it didn't exist to download from the R2 copy. I was thinking here of worst case scenario where Cloudflare Images has a major service outage. In a multi-server environment I could perhaps query each server to see which has the most files and switch off the rest of the servers, and switch off the CF integration on the chosen server. That way a site could continue to function. A very unlikely situation but I'd like that option. What it doesn't do (or shouldn't do, haven't fully tested it yet) is create the size variation image locally. Calls to Pageimage::size() should just create a variant in Cloudflare Images if it doesn't already exist. Unfortunately there is a limit of 100 variants (which can be applied to every image upload, it isn't a limit of 100 actual images), which while sufficient for a single development, means that the service cannot be used for multiple sites, unless they are creating the same variants. I did expect to keep this and the other modules I posted at the start of the week internal as they are somewhat specific to our needs, but after consideration I figured it would make sense for them to get other eyes on them and some differing perspectives - if you do go down the route of Cloudflare Images with your own integration please use this work as reference and please do share any solution you reach! Cheers, Chris
    1 point
  16. I just pushed a new release adding a new option I needed: the ability to automatically convert relative urls into absolute ones. You can also choose the host to prepend or any query parameters to append. More infos in the settings.
    1 point
  17. Thank you for investigating @wbmnfktr ? I had tried re-saving in different formats without success. It was only when I made one image bigger and it uploaded that I realised the file size was triggering the issue. @netcarver's suggestion of a ModSecurity issue with the web host was 100% and nothing to do with PW.
    1 point
  18. It didn't take long for the changes to the Images implementation - it turns out that image options are available for named variants, just not documented. The module now uses named variants instead of flexible variants. More notes etc to be added to the README in the next month or so.
    1 point
  19. @ryan Are you using this in your tool chain? If so, could you update the repo with any additional tests you've added, like the subfield test you mentioned above? Thanks.
    1 point
  20. If you want to set this on a per-field basis, you can go to the Input tab for your Textarea field, and under Custom Config options you can put enterMode:2
    1 point
×
×
  • Create New...