Jump to content

horst

PW-Moderators
  • Posts

    4,088
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by horst

  1. Hi @androbey many thanks for pointing me to this. I add it to my todo list with an urgent flag. ?
  2. Maybe this helps a bit to test and understand? https://stackoverflow.com/questions/10909911/php-setlocale-has-no-effect
  3. Also worth a look for new projects:
  4. @ryan, I want to test the new blacklist support with WireMail and WireMailSmtp, but on both configurations I get error of missing method isBlacklistEmail() Error: Exception: Method WireMail::isBlacklistEmail does not exist or is not callable in this context (in G:\VHOSTS\_PW-REPOSITORY\wire-3.0.latest\core\Wire.php line 519) (I took the latest DEV branch 3.0.130 this morning) My code is like in the blog example: $mail = wireMail(); $to = ['info@nogajski.de']; $result = $mail->isBlacklistEmail($to, [ 'why' => true ]); if($result === false) { echo "<p>Email address is not blacklisted</p>"; } else { echo "<p>Email is blacklisted by rule: $result</p>"; } Also if I use the to() method of the WireMail base class with WireMailSmtp, I need to adapt the cc() and bcc() methods of it to support it too.
  5. horst

    PW Review

    WOW! ❤️ Many thanks Charles.
  6. Hey @WillyC, nice to read from you again. (Long time no see.) ?
  7. If you need the Croppable Image Field, you may install the CroppableImage3. But with the newer PW versions there is the feature focuspoint with or without zoom. If you not already know it, it is well worth a test.
  8. and with AdminOnSteroids installed in the backend, you can switch the admin language on the fly and independent from your selected language in the user profile:
  9. The imagesizer engines act as follows: If "something" requires a variation of an image, it checks if this variation already exist in filesystem and, if yes: deliveres the cached version, and if no: creates it before delivering. So, it doesn't matter if you install or uninstall modules or do api calls or what else. It is the simple rule: is it already there, serve it. Is it not there, create it and then serve it. If you need to overwrite already existing images, you can pass the param "forceNew" => true in the options array to any of the pageimage size methods. Or you call the method removeVariations() on the original to delete ALL existing variations at once. (Maybe sometimes useful during development with images). This all is handled internally by processwire when you work with pageimages and its sizing methods. If you want to do something besides that, maybe creating your own variations outside of processwire and you don't want them to be get touched / controlled by PW, then you should not use the pageimages naming conventions. But you will loose a lot of comfort then. So, pageimages are basically all the images you added to PW using an image field attached to a page.
  10. Yes, if you need this on multiple differend hosts, - or as learning lesson. ? Otherwise, when only needed once, you are good to go with your custom code in a template or function.
  11. Hi @daniels, thanks for the quick response! Now, when so say it, maybe I have added a bug by myself when editing the module to add the logger. I've also wonder why not the other send method was invoked. I will check / resolve that and post here again with the new results before friday!
  12. Hi @daniels, on a site, where I had installed and used the module since its first release, the subscribe method doesn't work anymore. To clarify: The module is upgraded to the last master version. Could it be, that there was a change introduced by MC, maybe two months ago? Since then it seems not to work anymore. I setup a logger at these two points: A) https://github.com/danielstieber/SubscribeToMailchimp/blob/fd5039ec94e2b4ad49458ce090a240ba2d3979d6/SubscribeToMailchimp.module#L53 and B) https://github.com/danielstieber/SubscribeToMailchimp/blob/fd5039ec94e2b4ad49458ce090a240ba2d3979d6/SubscribeToMailchimp.module#L62 The responses are now all the time: A) (status) 401 B) { "type":"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/", "title":"Resource Not Found","status":404,"detail":"The requested resource could not be found.", "instance":"c31XXX66-XXXX-XXXX-XXXX-47c61XXX89eb" } Do you know about any changes? EDIT: This only happens when I try to subscribe a NEW user. When I send a already known user, I get back correct responses, like before: A) (status): unsubscribed or subscribed B) { "id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "email_address":"mctest13@xxxxxxxxxxx.xxx", "unique_email_id":"xxxxxxxxxxx", "email_type":"html", "status":"pending", "merge_fields":{"FNAME":"","LNAME":""}, "stats":{"avg_open_rate":0,"avg_click_rate":0}, "ip_signup":"xxx.xxx.xxx.xxx", "timestamp_signup":"2018-04-25T14:56:05+00:00", "ip_opt":"xxx.xxx.xxx.xxx", "timestamp_opt":"2018-04-25T15:11:24+00:00", "member_rating":2, "last_changed":"2019-04-04T08:15:30+00:00", "language":"", "vip":false, "email_client":"", "location":{"latitude":0,"longitude":0,"gmtoff":0,"dstoff":0,"country_code":"","timezone":""}, "marketing_permissions":[], "source":"Unknown", "tags_count":0, "tags":[], "list_id":"xxxxxxxxxx", }
  13. My thoughts and experiences on this are: A) Screenshots are captures from individual content, displayed on a devices screen. <-- So, screenshots do not have a large amount of white space by its nature. (I can show you a lot of mine, where in fact is no whitespace at all. ?) B) Example: If you send a 4 times to large image, also as a retina-variation, to a device with none retina display, you send 8 times to much data without any positive effect for the user. Only negative effects! (If you can do a good compression to a large image, you also can do a good compression to smaller variations.) C) Using html scrset or picture elements do NOT send multiple bitmaps, they once send the variation that best fits to the devices screen.
  14. A) there are no negative implications using CURL instead of WireHttp, if you handle your sent and received files / data correct. B) WireHttp itself makes use of CURL. Besides "CURL" It also uses "fopen" and "socket". The default usage is set to "auto", but you can explicitly tell it which one you prefer, by passing an options array as fourth param to its send() method. For example, this setting want to use "fopen" with a fallback to "socket": $response = $http->send($url, $data, 'POST', ['use' => 'fopen', 'fallback' => 'socket']); This one only would use CURL: $response = $http->send($url, $data, 'POST', ['use' => 'curl']);
  15. This is possible by 3party module AOS, Admin On Steroids. (On mobile, so please search in the modules directory or the modules forum for it. Author is @tpr)
  16. Tested and it doesn't work too. ?
  17. Hi, I get this error message when trying to communicate with a mailchimp server: Exception: Raw data option with CURL not supported for PATCH (in .../wire/core/WireHttp.php line 670) This will be triggered from this code: $http = new WireHttp(); $http->setHeaders([ 'Content-Type' => 'application/json', 'Authorization' => 'Basic '.base64_encode('user:'.$this->api_key), ]); $response = $http->send($api . '/' . md5($email), json_encode($param), 'PATCH'); Can somebody tell me what this mean and how I can avoid it? OR: On other servers I use the same module / code without any errors. How can I find out what is differend here?
  18. If you created and assigned a single template whithout a template file to that page, setting it published should be no harm, I think, as it isn't viewable then on the frontend.
  19. The modules configscreen now is aware of overrides from the site/config.php
  20. Announcement: I've created a new branch on github with the requested feature by @felix. Please can you and / or anybody else try this out and give some feedback. If everything is working as expected, I will push this to the master branch. Short introduction: You can specify how many and what ever params you want into an array that is called $config->wirmailsmtp. Every valid key of this array will override the key of the stored modules config setting. // example entry in site/config.php $config->wiremailsmtp = array( "smtp_host" => "smtp.example.com", "smtp_port" => 587, "smtp_ssl" => 0, "smtp_start_tls" => 1, "smtp_user" => "yourusersname", "smtp_password" => "youruserspassword", "extra_headers" => array("Organization" => "Horst Nogajski - Fotografie & Webdesign", "X-Header" => "Some Content") ); To see your resulting (merged) settings you can var_dump the output of the method getSettings(): // debug example in a template file $mail = wireMail(); echo "<pre>"; var_dump($mail->getSettings()); I tested it here myself and it seems to work fine. EDIT: I forgott to mention that I removed the required flags from the modules config settings for smtp_host and smtp_port. This way, both settings now may stay empty in the config screen, but can be set via the $config->wiremailsmtp array. The downside would be that the modules config screen isn't that robust anymore in regard of misconfiguration. Is this acceptable, or should there also be a required setting in the modules config screen? This is open for discussion. ?
  21. Hi @felix, I don't want to enable plain text files with server & password settings, but going with the already needed and available site/config.php, as @adrian suggested, seems to be fine. (As it already stores the DB-credentials). I try to look into it and implement it this weekend. I think this can be useful for a lot of us.
  22. @flydev I just found this (https://www.phpclasses.org/package/10950-PHP-Compress-files-and-create-archives-in-Zip-format.html), maybe it is of interest for you? zipfly-2018-12-21.zip
  23. Not a completly serious tip for listening during developing, but maybe a good one for listening before starting. ? or
×
×
  • Create New...