Leaderboard
Popular Content
Showing content with the highest reputation on 01/29/2024 in all areas
-
Hey there fellow Angeleno, Let's assume you have a bunch of 'video' pages with a 'file' field where the single video gets uploaded and another field called 'file_transcoded' that contains the transcoded/sized-down version. You could create an external script that bootstraps into ProcessWire, loops through each page where 'file_transcoded' doesn't exist (meaning it hasn't been acted upon yet), run ffmpeg on it, take the transcoded file and add it to file_transcoded ($page->file_transcoded->add($transcoded_file)), save and repeat for all the other non transcoded pages. That external script could be run using a cronjob. I believe you can do a background process or queue however I don't have experience with that in the context of ProcessWire yet although it's been discussed. The approach I mentioned keeps all the files in the natural /site/assets/files/(page-id)/ directory. I think the main point here is that where the original video files precisely exist is irrelevant as long as you use the $pages API which will take care of that for you.2 points
-
Hey @Jon sorry for the trouble, but I have a little present for you ? v1.5.0 adds support for directly using fontawesome icon markup like <i class="fa-brands fa-youtube"></i> The release is less than 10 minutes young and ready for download at https://www.baumrock.com/en/releases/rockpdf/ Docs are already there as well: https://www.baumrock.com/en/processwire/modules/rockpdf/docs/fontawesome/ Hope that helps you and many others ?2 points
-
1 point
-
@Jonathan Lahijani many greetz, I would like to look into this bootstrapping idea, it's the first I've come across it. I'll be investigating this further. Your approach makes sense to me in the abstract. If I make progress on it I will share the code I use. Thank you for pointing me towards the PHP-ffmpeg repo as well.1 point
-
No need be concerned but thanks for the notice, I pushed a fix for this. https://github.com/BlowbackAgency/EmailObfuscation/commit/8dd2a3c278b86a36329122aac5d9ef0db78752181 point
-
1 point
-
Have reworked all my projects with Latte and CustomPage classes and the code is more clean, way easier to read and maintain and more structured now. Definitely recommend diving into Latte and CustomPage classes for new projects to anyone. Both techniques were easy to learn and paid off quite soon in my projects.1 point
-
Comments.php isn't loaded automatically. It's only included when FieldtypeComments is loaded. The quickest way to access all the auxiliary classes for this fieldtype is to load the module by calling $modules->get('FieldtypeComments');1 point
-
Imagine you want to display an image on your website. Easy. Imagine you want to open the bigger version in a lightbox. Easy when using UIkit (or any other framework). Imagine you only want to add the lightbox link only if there is actually a larger version than the one displayed. Easy when using LATTE ? <div n:if="$img = $page->image" class="uk-background-muted uk-padding-small uk-text-center" uk-lightbox > <a n:tag-if="$img->width > 800 || $img->height > 400" href="{$img->maxSize(1920,1920)->webp->url}" > <img src="{$img->size(800,400)->webp->url}" alt="{$page->title}" /> </a> </div> This takes care of so many things with so little and clean code: the n:if on the outer div makes sure that we don't get any errors if no image is uploaded the n:tag-if makes sure that the anchor wrapper is only added if the original image is larger than the thumbnail Note that you can assign $img directly in the n:if condition. No need for an additional {var $img = $page->image} at the top. For some that might be too short, but I like it ?1 point
-
When you use file_get_contents with the filename property, there won't be an extra http GET, as it will recognize the local path and use regular file system IO. It's only when the argument to file_get_contents starts with a protocol schema indicator (http(s):// etc.) that it uses the network wrapper.1 point
-
hi, sorry, as it was not said in your first post i assumed you were simply trying to access the svg as an simple image file in the case your httpUrl stays the simplest way despite the get request except from putting the svg code in a textarea field, not very client friendly i must agree ? have a nice day1 point
-
Yeah. The only thing is that other items don't automatically close (assuming you want that). Unfortunately 'name' grouping does not seem to be fully implemented yet.1 point
-
Hi @kongondo any news on this one: I'de run in this error again. Do you have any plans to fix this issue? Greets!1 point
-
Skip Inputfield Label is a tiny module that makes the skipLabel Inputfield option configurable in the admin interface. I'm not entirely sure why this option is not available by default, but I've found it useful for some use cases, as it can reduce the clutter in admin. That being said, it is also potentially problematic, especially when using options that completely remove the label — this is usually a horrible idea due to the accessibility issue it creates. This module is not widely tested yet, so please be careful. Technically it should work with FormBuilder as well, though again that is not something I have tested much. Modules directory: https://processwire.com/modules/skip-inputfield-label/ GitHub: https://github.com/teppokoivula/SkipInputfieldLabel Composer: composer require teppokoivula/skip-inputfield-label1 point
-
I would advice all you that the geocoder API is no longer accessible in the format of the current module. I have an error geocoding address and the return message from nominatim.openstreetmap is: Using the URL /search/ and /reverse/ (with slashes) is no longer supported. Change url from /search/?q=Berlin in /search?q=Berlin Also complete addresses are changed, see below: File not found: API no longer accessible via this URL Using the URL /search/ and /reverse/ (with slashes) is no longer supported. Please use URLs as given in the documentation. Examples how to change the URL: You use: https://nominatim.openstreetmap.org/search/?q=Berlin Change to: https://nominatim.openstreetmap.org/search?q=Berlin You use: https://nominatim.openstreetmap.org/search/US/Texas/Huston Change to: https://nominatim.openstreetmap.org/search?q=Huston, Texas, US See github issue #3134 for more details. See github issue #3134 for more details. Maybe editing ControlGeocoder.js fixes partially the problem? :343 L.Control.Geocoder.jsonp(this.options.serviceUrl + 'search/', L.extend({ change in L.Control.Geocoder.jsonp(this.options.serviceUrl + 'search', L.extend({ :370 L.Control.Geocoder.jsonp(this.options.serviceUrl + 'reverse/', L.extend({ change in L.Control.Geocoder.jsonp(this.options.serviceUrl + 'reverse', L.extend({ I have tested with simple addresses (italian street, number and city) ad it works fine again, both search and reverse. Posted a commit on Github: https://github.com/FriendsOfProcessWire/FieldtypeLeafletMapMarker/commit/63254dffea9bd504eb45b124d64fd5832e38f0131 point
-
I had a problem with PHP 8.1.8 an saving pages containing the field. I got this error: I changed lines 193 and 194 to make sure all values that get rounded are floats: if( ((string) round(floatval($lat), $precision)) != ((string) round(floatval($this->defaultLat), $precision)) || ((string) round(floatval($lng), $precision)) != ((string) round(floatval($this->defaultLng), $precision))) { Maybe this could be included in a future version? Cheers, Flo1 point
-
1 point
-
@bernhard could you please add PHP 8 as dependency for the latest Version 2.1.0. Thank you. Was updating a website today that still runs on 7.4 and got composer errors because mpdf requires PHP>=8.0.1 point