-
Posts
2,769 -
Joined
-
Last visited
-
Days Won
31
Everything posted by Martijn Geerts
-
Hi Joss, the notice is fixed. (you could update the module) Thanks
-
Happy Christmas to all Willie Batenburg was a small anonymous artist with a banjo from Dordrecht until he was discovered by a few employees of Radio Rijnmond. His music was from that moment played regularly on this channel and Willie became a real hero. Thousand guilders could be won by the listener who could exactly tell what words he sang. (nobody has ever won the price )
-
https://github.com/ryancramerdesign/ProcessWire/tree/master/wire/modules/Process/ProcessPageList
-
I've used the 'double loop' in pluimveeweb on the right side with the "Kennispartners" logo's. Now there's only 1 partner but when there are 3 or more (2 logo's always visible) it'll get to the widest value possible for the widest logo. 336px / 2 = 168px. Here's some example code that will explain it better. $compress = 40; // heavier images compress more $x = 400; // box size, reference for image $y = 280; // box size, reference for image $max = 0; // calculation of the widests image, used to scale all others. // calculate max width all images ( settings as wide as possible ) foreach($partners as $partner) { $image = $partner->generic_logo; if($image instanceof Pageimage) { $box = $modules->get("ImageFitBoundaries"); $info = $box->load($image, $x, $y, $compress)->info(); $max = $max < $info['width'] ? $info['width'] : $max; } } $percent = 168 * 100 / $max; // 2 X 168 = 336px width of the column foreach($partners as $partner) { $image = $partner->generic_logo; if($image instanceof Pageimage) { $box = $modules->get("ImageFitBoundaries"); $info = $box->load($image, $x, $y, $compress)->info(); $width = (int) round($info['width'] / 100 * $percent); $height = (int) round($info['height'] / 100 * $percent); $options = array( 'quality' => 100, 'sharpening' => 'none' ); $thumb = $image->size($width, $height, $options); } } I'm really happy how much you've implemented so far and I think you should not over complicate the module. I think you should leave it how it is now. Thanks again for implementing weighten !
-
Don't know if it is already in. But I used ImageFitBoundaries with a 'double' loop. Let me explane - looping several images through the Module and get the widest value. (No images are scaled, only values are returned) - then I search the widest image, and take the percentage it is compaired to the box. - I use that percentage to scale all images up.
-
"Failed to load resource: net::ERR_CACHE_MISS" error is not an actual failure, but rather "misleading error report". Soon this one should be fixed as that is already fixed in Chrome canary. It has nothing to do with ProcessWire and won't effect the behaviour of ProcessWire. ( I do think this error only appears when dev tools is open ) The first thought I had was the same one as Netcarver. Have you tried to re-upload all the files again ?
-
Forget my post , Adrian's way is way better
-
Different images according to languages
Martijn Geerts replied to celinem01's topic in Multi-Language Support
Alternate language fields works for all fields. -
Different images according to languages
Martijn Geerts replied to celinem01's topic in Multi-Language Support
yep, language alternate field values -
The node that contains an image is not there. The images are in a blob of HTML so it's hard to get those out. If you really want to get those out you could build the url to the image your self. The easiest way I see now is: Filter the video id out of the: // 76UvX8EKNZ8 is the ID <guid ispermalink='false'> tag:youtube.com,2008:video:76UvX8EKNZ8 </guid> Then use that id to build the url with: // Default image (small) http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg // high quality http://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg // medium quality http://img.youtube.com/vi/<insert-youtube-video-id-here>/mqdefault.jpg // standard definition http://img.youtube.com/vi/<insert-youtube-video-id-here>/sddefault.jpg // max resolution http://img.youtube.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg Keep in mind that not all images are available so propably you'll need a loop till you have an image and use a fallback if nothing is found. Second way: A second way I see is to search the <description> with PHP DOMDocument.
-
Nice site, lovely write-up!
-
here it works
-
In the netherlands we have https://www.bel-me-niet.nl/ (call me not). We can register our phone number (s) in the call-me-not register. Then companies may no longer approach us for commercial, idealistic or for charitable purposes. Unless they (were) is a customer of the company concerned, or asked for the telephone communications. Companies and organizations need before they call, make sure no one from their call list is registered in the call-me-not register.
-
Something to do with the pyramid, as most people think the Giza pyramid has 4 sides, it actually has 8. That's the probable cause of the issue
-
Language page path prefixes disappeared
Martijn Geerts replied to Andrei K's topic in Multi-Language Support
And what was the cause? -
Kixe, I really appreciated the effort you made here and I'm in total agreement here with Kongondo. Maybe it's even possible to take the lead on a combined Module as I haven't seen geniestreiche for a while.
-
One thing to mention about most CSS grid systems is that they work with floats and row markup. Sometimes you need to clear the float, and always you need to prevent box-collapsing. All this brings extra logic (as seen above) what is not really needed if you ask me unless you've to support IE7 and below. Since a year or so I use inline-blocks for grids. With the use of inline-block, you can rid of the whole row element in your grid system and as a bonus you could align columns vertically with the vertical-align property. 'vertical-align: middle' is particularly usefull for grids of logo's and images. // the float way <div class='container'> <div class='row'> <div class='col-50'> <p>Donec sed odio dui.</p> </div> <div class='col-50'> <p>Donec sed odio dui.</p> </div> </div> <div class='row'> <div class='col-50'> <p>Donec sed odio dui.</p> </div> <div class='col-50'> <p>Donec sed odio dui.</p> </div> </div> </div> // the inline-block way <div class='container'> <div class='col-50'> <p>Donec sed odio dui.</p> </div> <div class='col-50'> <p>Donec sed odio dui.</p> </div> <div class='col-50'> <p>Donec sed odio dui.</p> </div> <div class='col-50'> <p>Donec sed odio dui.</p> </div> </div> One disadvantage of the inline-block grid is that the grid should not contain white space characters as those take up space. There are 2 ways to solve those:1. don't use white-space characters. 2. set the font-size in the grid to font: 0/0 a; I always go for option 1. as option 2 eliminates the right usage of ems for fonts inside the grid. Due to ProcessWire it's really simple to not write HTML at all, never escaping PHP. This is how I build my HTML and why there are no whitespace characters in my HTML where it is not needed. A good example of a inline-block grid systems is Griddle, I never have used that one but the idea is exactly the same as my own handcrafted CSS.
-
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
Martijn Geerts replied to ryan's topic in Modules/Plugins
Don't use the formatter. Why not simply use: <iframe width="560" height="315" src="<?php echo $page->your_field; ?>" frameborder="0" allowfullscreen></iframe> -
I do love plants and the website. Great work Tom.
-
<spam>Lot's of things can be done with AdminCustomFiles. Admin custom files has a lot of info in the JS var config.AdminCustomFiles which can be used to be build upon.</spam> Recently I've ported FontawesomePageListLabel to a standalone JS file and included it with the module.
-
PW is not 'failing' for a dumb reason and it tell you what has gone wrong. You can do a try & catch to handle it.
-
If you place the url of magnific.js in the textarea of the module it should get loaded. Or if you type the process name followed by the url it only loads when the process if active (and selected). example: ProcessPageEdit path/to/magnific.js (relative to templates folder, ProcessPageEdit process must be selected)
-
Hi Macrura, for a full description for the truncate script: follow this guide How the loading works: 1. Select ProcessPageEdit process in the module settings. 2. Add the file starting with ProcessPageEdit in the AdminCustomFiles folder (ie: ProcessPageEditTruncate.js) The AdminCustomFiles should be present in /site/templates/
-
Great !
-
@peter: take a look at InputFieldFile. // usage with a Inputfield file with the name 'your_field': $tpl = new TemplateFile($config->paths->templates . "includes/" . $page->your_field); $tpl->set('current', $page); $markup = $tpl->render(); You then can access al Page fields in the php file with $current, like $current->title or $current->id etc.