Jump to content

horst

PW-Moderators
  • Posts

    4,077
  • Joined

  • Last visited

  • Days Won

    87

Everything posted by horst

  1. Hi, here is a very useful tool that check your images in websites against responsiveness: https://github.com/ausi/respimagelint
  2. @rayorg: currently only the method ->watermarkText() has a param opacity (0-100%). For overlaying images, there isn't a configurable option currently.
  3. @Mackski: please refer to the RFCs for email! https://tools.ietf.org/html/rfc2822#section-2.2
  4. Tinifying images is ONLY useful on the final variations. Tinifying an original source image is completly WRONG. This tinifying is often misunderstood. You can resize an image on upload to variuos varirations and also tinify them, if you exactly know which variations you will need around in your site. Here is an example how to hook into upload and process something with the image:
  5. @ank I updated my above post with an example. ;-)
  6. In the modules config screen you can set it under "sender_reply". Also a "sender_errors_to" is available. If you need to set it dynamically, you must go the workaround with modifying module config-settings via API. If so, you will find examples here in this thread or the forums in general. you can use this: $data = wire('modules')->getModuleConfigData("WireMailSmtp"); // or, regarding on scope, $data = $modules->getModuleConfigData("WireMailSmtp"); than modify the reply adress: $data["sender_reply"] = "you@example.com"; after modifying, you can write it back: wire('modules')->saveModuleConfigData("WireMailSmtp", $data); // or $modules->saveModuleConfigData("WireMailSmtp", $data);
  7. High Performance Browser Networking © Ilya Grigorik the complete book is online now for free reading: https://hpbn.co/
  8. @tpr there seems to be an option to collect those too:
  9. @szabesz but the files are there. You have to look at uikit/src/scss/variables.scss or less instead of scss.
  10. maybe you can find some posts here in the forums already. I remeber very vague that this has been discussed already. google search or
  11. you are running PHP 7? or what PHP version?
  12. Ok, no, that wasn't exactly what I suggested. But if this works too, it is a good alternative.
  13. You need to manually install pim2 under site/modules/, and UN-install pim. Than you can use pim2load. You can read about it in the very first post of this thread: https://processwire.com/talk/topic/4264-page-image-manipulator-1/ right at the top of that post.
  14. You definetly have to check the user rights. If you prviously used apache module, and afterwards changed to cgi mode, I bet that this are different users on the server. Common usage on shared hosts is, that php as apache module is a user something like wwwrun. As cgi version, mostly it is identical with your own ftp user. So, after you switched to cgi, all messages that say you don't have the access rights to the assets directory totally make sence!
  15. you need to use ->filename instead of ->url $pdf = $homepage->pdf_marketing->filename;
  16. ..., and you should enable the IMagick Imagesizer Engine if your server supports it! (under PW 3) ..., and additionally to the quality-value, you can try out differend sharpening values (none, soft, medium, strong)
  17. Have you cleared all sort of caches after you played in the dump?
  18. Hi, welcome to PW forums. Looks like you have not the right PHP syntax. Try this: public function init() { // you need a condition that will result to true if($this->page->template->name == 'templateName') { $this->addHookAfter('save', $this, 'example1'); } }
  19. in another thread I had posted some useful links to this too: https://processwire.com/talk/topic/15886-different-styles-for-results-of-an-array-page-grid/#comment-141785
  20. I can second what @MuchDev said, but want to add that, for me, the cache field is/was yesterday. Today I only use the Textareas and Repeater Matrix from ProFields I try to keep the amount of fields as less as possible. Results in quick fulltext search without the need of a cache field, what would double the content size in DB. Really worth to use. Saves time too.
  21. It is not when the property has empty values, it is when there isn't a key available. Your request return multidimensional array. If there is, for what ever reason, not set a key 'Make' or 'Model' for example, PHP will throw a notice when you simply try to use $myArray['availableKey']['notAvailableKey']. So, if you are 100% sure that all images that you ever will use with that code will have all requested EXIF-fields, let out the validation.
  22. @Cengiz Deniz Yep, it works very well, but only until you request a key that is not available in an image, than it will throw notices or warnings. The new module I linked to, lets you do the exact same as you does, but without the redundant hassle of validation. So, you can use your code, but I suggest to add a check for available keys: $image="http://cdeniz.com/".$img->url; $exif = exif_read_data($image, NULL, true, true); $tarih = isset($exif["EXIF"]["DateTimeOriginal"]) ? $exif["EXIF"]["DateTimeOriginal"] : 'N/A'; // or anything you want, like '', null, ... $kamera= (isset($exif["IFD0"]["Make"]) ? $exif["IFD0"]["Make"] : '') . " " . (isset($exif["IFD0"]["Model"]) ? $exif["IFD0"]["Model"] : ''); ... ... ... Personally I find this to unreadable and redundant, therefore I prefer the new modules way: $options = array('keys' => array('DateTimeOriginal', 'Make', 'Model'), 'toObject' => true); $exif = $image->getExif($options); // now I can access like this: $tarih = $exif->DateTimeOriginal; $kamera = $exif->Make . ' ' . $exif->Model;
  23. There is another module here: It has more configurable methods to get out what you want.
  24. Very interesting, that CSS-Grid stuff. I'm thrilled. Here is a short list of usefull links: (must read) http://jensimmons.com/post/feb-27-2017/learn-css-grid http://gridbyexample.com/examples/ (some specs and technical info) http://gridbyexample.com/browsers/ https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_and_Progressive_Enhancement https://drafts.csswg.org/css-grid/#grid-containers (some more) https://css-tricks.com/css-grid-one-layout-multiple-ways/ PS: you also can support older browsers with different fallbacks, there are tuts over that too.
  25. Using filebased sessions is slower, and for every DB record, you will get a file in filesystem. This would be fighting the symptoms and not the reason! To be honest, a monitoring service that sends 7-15 requests in one second, each starting a new session is not what I would expect from professionals. At next step, I would drop that service and see how it comes with the total amount. Or maybe there are config options with that service? One request every five minutes would be enough, maybe?
×
×
  • Create New...