Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by jens.martsch

  1. I understand thats it's crucial to save bandwith. That's why we have webP now, finally. But there is one line in PagefileExtra.php that delivers the normal image url instead of the webp version, if the webp filesize is larger. In my case and I think on other sites too this is an unwanted behaviour, as quality and colors are different if you compare a jpg and a webp image. To illustrate this I attached this image, where you can see that the first three products which are being delivered as JPGs because the filesize is smaller are really different looking than the next 3 which are in webp format , especially in the logo area. This is somewhat hard to see here, but on my development site it looks really bad and is a showstopper for me to use webp. What I ask for is an option to skip the filesize check and maybe the option to enter a treshold value when to use the smaller image. Could you pls add your thumbsup for my issue "make the fallback optional if pagefile->url is smaller than webp"?
  2. What exactly do you mean with adding it with the API? Do you mean a file upload? Do you mean output? I think you are mixing input/upload and output here?!
  3. Hey @Macrura I haven't tested "dynamic domains" because I don't use them, but the region setting for "EU" domain and also tracking for message open and clicks, which are working fine. I also committed another patch for strange display behaviour in outlook: https://github.com/chriswthomson/WireMailMailgun/pull/14
  4. Damn, I am very sorry. I mislead you. I thought it returns false, if the count fails, but it turns out, it really returns the number. Sorry. I updated my example above, which is basically the same as @Autofahrn's
  5. @elabx You are also correct with your statement, that integer 0 loosely evaluates to false. But as @Autofahrn said, the original poster @hollyvalero wants to work with the product array afterwards. But as my query does only return false or the integer number, that is not what he needs. So something like $products = $pages->find("template=news, limit=9, sort=sort" ); if($products->count > 3) { echo $products->each(function($product) { return "<p>$product->title</p>"; }); } would be correct
  6. Even shorter: $products = $pages->find("template=product, limit=9, sort=sort")->count(3); if ($products) d($products);
  7. @nbcommunication Thanks for your work on this module. Maybe @Macrura could merge your latest changes? Would you create a pull request for this? As far as I can see everything is working fine here. I use this module in conjunction with @ryan's ProMailer module to send out newsletters. I even used the tags method, to enable analytics.
  8. Turn on $config->debug in your site/config.php, then you get a better error message, that says what the problem is. Look under details of your image field and then "formatted value". Is it set to automatic? Is "Maximum files allowed" set to 0? If so, try <img src="<?php echo $page->header->first()->url; ?>" alt="<?php echo $page->header->first()->description; ?>" /> That is because an array is returned if "Maximum files allowed" is 0.
  9. @wish-fulfillment In your site tree look for the root page and in the settings tab look which URL it has for russian (your default). It should be (ru) However, I noticed that it is a bad practice to modify the default language (english) with language files. Instead you should add russian as an ADDITIONAL language and then set the guest user to this language (for the frontend) and also your admin user, so the PW admin is also in russian. Made the same mistake as you on a big site (although it works) and now it is too much work to change it.
  10. Just want to thank @horst for all his work on the WebP integration and the effort for explaining many things (of which I am aware, because I also have a background in image retouching and stuff, but most people do not).
  11. LOL. This is because I have far more domains on the live server and didn't want to write them all. Most of my dev server settings could also be omitted; I only use one dev domain ATM.
  12. Hi @bernhard Here is my solution which uses the server name instead of a directory structure. So you are safe if you are changing paths or the OS where paths are different. $base_url = $_SERVER['SERVER_NAME']; $config->base_url = $base_url; switch ($base_url) { case "p-jentschura.localhost": case "p-jentschura.acemanpc": case "p-info.localhost": case "p-info.acemanpc": $config->dbHost = 'localhost'; $config->dbName = 'dbname'; $config->dbUser = 'root'; $config->dbPass = 'dbpass'; $config->dbPort = '3306'; $config->debug = false; $config->httpHosts = array( 'p-jentschura.localhost', 'p-jentschura.acemanpc', '', '', 'localhost.p-jentschura' ); break; default: // LIVE CONFIG $config->dbHost = ''; $config->dbName = 'dbname'; $config->dbUser = 'dbuser'; $config->dbPass = 'dbpass'; $config->dbPort = '3306'; $config->debug = false; $config->httpHosts = array( 'p-jentschura.com', 'www.p-jentschura.com', 'p-jentschura.de', 'www.p-jentschura.de', 'p-jentschura.nl', 'www.p-jentschura.nl', 'p-jentschura.shop' ); }
  13. Thanks @horst. Hopefully @ryan will include this quickly into the core.
  14. I also love to see some progression on WebP. @Tom. Glide also utilizes GDLib or Imagick, so I don't know, if it will be an enhancement, as PW already does this too. Do you have any examples of the reduced image quality? I did not notice quality loss, in terms of blur or oversharpening yet. Are you also aware of the different settings for ImageSizer like sharpening or upscaling? You can change these settings in your site/config.php $config->imageSizerOptions = array( 'upscaling' => true, // upscale if necessary to reach target size? 'cropping' => true, // crop if necessary to reach target size? 'autoRotation' => true, // automatically correct orientation? 'interlace' => false, // use interlaced JPEGs by default? (recommended) 'sharpening' => 'soft', // sharpening: none | soft | medium | strong 'quality' => 90, // quality: 1-100 where higher is better but bigger 'hidpiQuality' => 60, // Same as above quality setting, but specific to hidpi images 'defaultGamma' => 2.0, // defaultGamma: 0.5 to 4.0 or -1 to disable gamma correction (default=2.0) );
  15. I have this option in my site/config.php file: $config->imageSizerOptions = array_merge( $config->imageSizerOptions, // all items from wire/config array( // overwrite specific items 'defaultGamma' => -1, ) ); I think the cause was something similar to what you experience with the colors, but I am not sure. Maybe try this setting.
  16. @Hurme @wbmnfktr Regarding setlocale, pls read my post The message @Hurme described, is most likely this one https://github.com/processwire/processwire-issues/issues/732 correct?
  17. I only used the module FieldtypeRuntimeMarkup for now and it works, but has one big disadvantage (which maybe not applicable to all users): You can not use the runtime markup fields in a ListerPro to sort because PW is looking for a database table and throws an error.
  18. Thanks @Violet for marking the thread as [SOLVED], this helps keeping the forum cleaner, so one can see if answers are still needed or not. I am glad, that you have a solution now
  19. What @Autofahrn said is correct in this case. No need to transfer anything. Just change the domain name and enter it in the config.
  20. @Violet With "migrate to another domain name" you mean another server, right? If so, I also recommend copying the database via adminer or PHPMyAdmin. For copying the files, use rsync over SSH (because of direct connection between old and new server and use of compression). If you don't have access to SSH I recommend downloading all the files via FTP and upload them on the new server also via FTP.
  21. Useful tools: Design email in browser for free: https://mosaico.io @elabx Preview your email in different clients before sending: https://emailpreviewservices.com/
  • Create New...