Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by ukyo

  1. For caching children or paginated pages you can use a solution like this. <?php $children = $page->children("limit=10"); $cacheName = 'MyCache_children' . (string) $page . (string) $children; // If you have multilanguage website you can add (string) $user->language to your cache name // $cacheName = 'MyCache_children' . (string) $page . (string) $user->language . (string) $children; $cacheExpire = "parend_id|id=" . (string) $children . "|" . (string) $page; cache($cacheName, $cacheExpire, function() use($children) { $output = ""; foreach($children as $item) $output .= "<h2>$item->title</h2>"; return $output; });
  2. v.0.1.4 : Fix issue FontIconPicker inside repeater
  3. v.0.1.3 : FontAwesome updated to 4.7.0
  4. * updated : PhpMailer 5.2.22
  5. * updated : PhpMailer 5.2.21
  6. * updated : PhpMailer 5.2.19 module updated also in githup repo and module directory
  7. I updated my module on my local works, didn't update repo yet. I will update module as soon as possible.
  8. @horst Step by step what i made : 1- removed module folder completely and copied downloaded module (from github) files to module folder 2- i replaced @adrian codes 3- Admin > Modules > Refresh 5- uploaded images to page 4- when i over mouse to my crop variation button there is no preview image for cropped version 6- after save page i can see cropped image on preview, when i hover crop variation button
  9. @adrian @horst I test this replacement on my side and tried to upload images by using CroppableImage3 input and there is no error, but i don't know is there a side effect ?
  10. I unchecked checkbox and saved module settings, tested to open crop modal there is no error. Its look like need to go FieldtypeCroppableImage3 settings and click to save button before use module.
  11. Yes, after installation I opened FieldtypeCroppableImage3 config screen but didn't make any changes on this screen. Do you offer to disable quality selector ? With this settings i don't have error when i open modal cropper.
  12. @horst I used class name from this module page : http://modules.processwire.com/modules/croppable-image3/. Also yesterday i downloaded the module files directly from github repo. I corrected suffix, renamed it "fullwidth" deleted old created files, result not changed (have error). I applied these : if(property_exists($globalOptions, 'manualSelectionDisabled')) if(property_exists($globalOptions, 'useImageEngineDefaults')) to error lines like @adrian advice for my other issue with this module. I don't have error for the moment, but I don't know is this a really solution ? For the moment continue to work just applied quick fixes.
  13. I applied @adrian advice. Also I applied same solution for other issue with CroppableImage3 module. if(property_exists($globalOptions, 'manualSelectionDisabled')) if(property_exists($globalOptions, 'useImageEngineDefaults')) After applied these i don't have error module look like work, but i don't know is this really a true solution? But for the moment its look like ok for continue to work.
  14. I updated TracyDebugger from 3.3.4 to latest version 3.3.8 and enabled Tracy Debugger for backend. And tested to upload images again, everything worked. Upload done, images refreshed after upload, debug result is ok. Also i checked my other CroppableImage3 module issue, don't have this issue, if TracyDebugger enabled for backend. bd($pagefile); bd($suffix); bd($pagefile->getCrop($suffix)->url); If i disabled TracyDebuger again for backend, my problem appeared again. I uninstalled TracyDebugger for make test, i have same problem also witout TracyDebugger.
  15. I understood what you say @horst, but if i use core imagefield, don't have any error with CustomUploadNames module everything working well. When i try to use it with CroppableImage3 module i have this error. With CroppableImage3 module, file upload is ok, but after upload progress javascript callback not working, Because there is an error : Notice: Trying to get property of non-object in /website/site/modules/CroppableImage3/InputfieldCroppableImage3/InputfieldCroppableImage3.module on line 139 like i said if i refresh the page, images uploaded and i can use CroppableImage3 module for resizing.
  16. Here is step by step screenshots. Created new field, added crop settings added this field to custom upload names module settings and tried to upload files result is same on my side. If i remove this field from Custom Upload Names module settings there is no error. Upload is done without error.
  17. Sorry for early post before check console errors. Its look like error causing from Croppable Image 3 module. When i check ajax request there is an error: Notice: Trying to get property of non-object in /website/site/modules/CroppableImage3/InputfieldCroppableImage3/InputfieldCroppableImage3.module on line 139 File: site/modules/CroppableImage3/InputfieldCroppableImage3/InputfieldCroppableImage3.module $attr['data-image'] = $pagefile->getCrop($suffix)->url; I think the module can't get data, because name is changed. Here is custom upload names module filter settings :
  18. @horst also can you check this error : I can't use croppable image 3 module with custom upload names module together.
  19. Hi @adrian can you add support for CROPPABLE IMAGE 3 module. If i add croppable image 3 field to custom upload names filter, when i want to upload file upload progress not finishing. Also i will put this problem link to Croppable Image 3 module post, because i don't know which module causing this error. When i refresh page without save page, i can see these pictures names changed and uploaded.
  20. @horst thanks for your great module. Today i installed your module via module panel by class name and changed my image field with croppableimage field and i setted a size (full-width,1425,434) for this field. After click this size from images field i have below errors on opened modal box, i can see image and preview image. Notice: Undefined property: stdClass::$manualSelectionDisabled in /Users/user/Sites/site-folder/site/modules/CroppableImage3/ProcessCroppableImage3/ProcessCroppableImage3.module on line 47 Notice: Undefined property: stdClass::$useImageEngineDefaults in /Users/user/Sites/site-folder/site/modules/CroppableImage3/ProcessCroppableImage3/ProcessCroppableImage3.module on line 48 Notice: Undefined property: stdClass::$manualSelectionDisabled in /Users/user/Sites/site-folder/site/modules/CroppableImage3/ProcessCroppableImage3/ProcessCroppableImage3.module on line 120 I am using ProcessWire 3.0.36 version, I made fresh module installation.
  21. ukyo


    I tested it and its look bad idea, if you add width and height for img tag, responsive display not working well. I removed my changes. and can you test this image tag in chrome browser & safari : <img src="http://placehold.it/400x300" data-srcset="http://placehold.it/400x300 480w, http://placehold.it/667x515 768w, http://placehold.it/385x290 960w, http://placehold.it/490x370 1220w" data-sizes="(max-width: 1220px) calc(100vw - 20px), 1220px" class="lazyload uk-width-1-1"> This tag generated by your module just images replaced with placehold.it, this tag working only in firefox. I am loading js files manuelly do i need to add extra javascript codes ? <?php $lazySizes = array( 'styles/bower_components/lazysizes/lazysizes.min.js', 'styles/bower_components/picturefill/dist/picturefill.min.js', 'styles/bower_components/lazysizes/plugins/attrchange/ls.attrchange.min.js', 'styles/bower_components/lazysizes/plugins/bgset/ls.bgset.min.js' ); echo "\n\t\t<script src=\"" . AIOM::JS($lazySizes) . "\"></script>"; ?> Picture tag working much better, i was has same problem when i frist try lazysizes js, if you check post there is funtion i made for lazysizes with picture tag, i wll try to add picture mode also. This is working for me, for all browsers : <picture> <!--[if IE 9]><video style='display: none;'><![endif]--> <source srcset='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' data-srcset='http://placehold.it/400x300' media='(max-width: 479px)' /> <source srcset='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' data-srcset='http://placehold.it/667x515' media='(max-width: 767px)' /> <source srcset='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' data-srcset='http://placehold.it/385x290' media='(max-width: 959px)' /> <!--[if IE 9]></video><![endif]--> <img src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' data-srcset='http://placehold.it/490x370' alt='' class="lazyload uk-width-1-1" /> </picture>
  22. ukyo


    @tpr thanks for module, can you add support for width and height attribute support for <img> tag ? Width and height attribute values could come from src attribute. // My custom hook for $image->alt() function $this->addHook("Pageimage::alt", function (HookEvent $event) { $image = $event->object; $return = ($image->description != '') ? $image->description : pathinfo($image->filename, PATHINFO_FILENAME); $event->return = " alt='{$return}'"; }); // Json array { "list": [ [400, 300], [687, 515], [385, 290], [490, 370] ] } // my usage <img <?php echo $image->srcset('list', 'lazyload'), $image->alt(); ?>> // result <img src="/site/assets/files/1072/peoplelikeus-antifouling-001.400x300.jpg" data-srcset="/site/assets/files/1072/peoplelikeus-antifouling-001.400x300.jpg 480w, /site/assets/files/1072/peoplelikeus-antifouling-001.687x515.jpg 768w, /site/assets/files/1072/peoplelikeus-antifouling-001.385x290.jpg 960w, /site/assets/files/1072/peoplelikeus-antifouling-001.490x370.jpg 1220w" data-sizes="(max-width: 1220px) calc(100vw - 20px), 1220px" class="lazyload" alt='peoplelikeus-antifouling-001'> // for this result width and height attributes must be 400x300, because our src image size is 400 x 300 <img src="/site/assets/files/1072/peoplelikeus-antifouling-001.400x300.jpg" width="400" height="300" data-srcset="/site/assets/files/1072/peoplelikeus-antifouling-001.400x300.jpg 480w, /site/assets/files/1072/peoplelikeus-antifouling-001.687x515.jpg 768w, /site/assets/files/1072/peoplelikeus-antifouling-001.385x290.jpg 960w, /site/assets/files/1072/peoplelikeus-antifouling-001.490x370.jpg 1220w" data-sizes="(max-width: 1220px) calc(100vw - 20px), 1220px" class="lazyload" alt='peoplelikeus-antifouling-001'> For the moment i edited you module line 180 (don't like custom adds) $markup = 'src="' . $fallbackImgSrc . '" width="'.$fallbackImg->width.'" height="'.$fallbackImg->height.'" ' . $markup;
  23. css section is only for styling, you need to tell module what is your list of icons names ? You need hook beforeRender event like on example. https://github.com/trk/FieldtypeFontIconPicker You can create a file like : https://github.com/trk/FieldtypeFontIconPicker/blob/master/Icons/Ionicons.php and you can include this file in your hook function, after include you can return your custom icons.
  24. @ryan updated module, now you can update module directly from admin panel
  25. Added pull request for this issue : #14 If you want, you can apply my changes to your files or you can directly download applied version. I added 2 option for FieldtypeMapMarker module settings, api key and url parameters.
  • Create New...