-
Posts
4,077 -
Joined
-
Last visited
-
Days Won
87
Everything posted by horst
-
Admin multi-sort / initial sort setting for Drag and Drop
horst replied to Mikie's topic in Wishlist & Roadmap
+1 for the multi-sort! -
Clear way to ifentify default image variation thumbnail ?
horst replied to happywire's topic in Getting Started
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. -
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.
-
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!
-
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", }
-
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.
-
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']);
-
Admin multi-sort / initial sort setting for Drag and Drop
horst replied to Mikie's topic in Wishlist & Roadmap
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) -
Error in WireHttp: RAW data with CURL not supported for PATCH
horst replied to horst's topic in General Support
Tested and it doesn't work too. ? -
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?
-
Can I disable Publishing of a particular page?
horst replied to OrganizedFellow's topic in General Support
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. -
-
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. ?
-
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.
-
@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
-
Not a completly serious tip for listening during developing, but maybe a good one for listening before starting. ? or
-
@Brian Peat welcome. One thought regarding the module: what version is the AOS module? When going in admin under modules site adminonsteroids, there is a feature to directly check for newer versions. Maybe you are not running the latest version, where these issues are already fixed? At least there is no harm with updating AOS to the latest.
-
OT: I'm really missing that ninja-emoji from the old invision forum.
-
@szabesz the invision board software has eaten your link! Please add it again and add a new line after it.
-
Have you tried your code with the filename, not the image object? ->add($image->filename)
-
Best approach for text substitution across different fields
horst replied to Karinne Cyphers's topic in Getting Started
Just a idea: build a textformatter module, attach it to all desired fields, plaintext and ckeditor fields. In the textformatter method, check what type the calling field is of, (HTML or plaintext). If plaintext, use the php function strip_tags() on your replacement content, otherwise leave as is. -
I have developed a site as freelancer for an agency and set it up without the additional www. (And nobody told me that it is needed) when going online, it comes out that they have sent out invitations per email and post with the additional www. in front. So I need to fix it ASAP. ?
-
Hi, I encountered a problem with my default .htacces rewrite conditions and rules when having multiple domains to rewrite them to one final domain. Usually I use something like this: <IfModule mod_rewrite.c> RewriteEngine On AddDefaultCharset UTF-8 RewriteCond %{HTTP_HOST} ^www\.example\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.example\.de$ [OR] RewriteCond %{HTTP_HOST} ^example\.de$ RewriteRule ^(.*)$ https://example.com/$1 [L,R=301] RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> Now I'm faced with the situation that I have a subdomain.example.com and www.subdomain.example.com with a wildcard SSL certificate for example.com (*.example.com). With my below htaccess directives every input of subdomain.example.com www.subdomain.example.com http://subdomain.example.com http://www.subdomain.example.com get redirected correctly to https://subdomain.example.com But when I enter explicitly the www. url with a https:// (https://www.subdomain.example.com), my rewrite conditions are ignored, resulting in a warning about insecure SSL certificate. RewriteCond %{HTTP_HOST} ^www\.subdomain\.example\.com$ RewriteRule ^(.*)$ https://subdomain.example.com/$1 [L,R=301] Does someone know why it does not work? I also tried combined conditions like this: RewriteCond %{REQUEST_SCHEME} https RewriteCond %{HTTP_HOST} ^www\.subdomain\.example\.com$ RewriteRule ^(.*)$ https://subdomain.example.com/$1 [L,R=301] RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^www\.subdomain\.example\.com$ RewriteRule ^(.*)$ https://subdomain.example.com/$1 [L,R=301] Any hint? UPDATE: In a call with the hosters support team, they told me that it is not possible to catch these explicitly entered https://www.subomain.example.com from within the .htaccess file. As a workaround we now have taken a standard SSL certificate for the explicit domain "www.subdomain.example.com". There was an inclusive cert without extra costs available.
-
Very nice site! May I ask how you realized the calendar.ics part? I'm currently building the same. I created two templates, a parent container and the ics-calendar children. Every calendar event will be build as a childpage. The childpages will be embedded per pagereference field where needed. The URL is included, and when downloading the type is text/calendar. Have you experiences if the compact vcalendar format you uses is suffient with different MS-Outlook applications? I found some examples in the web with additional X-MS-OLK- and X_Microsoft-... Params.
-
in Here you call it on a var that is not a pageimage but a boolean! First check if you REALLY have an image, before you call ->getCrop() on it. And which PW version and module version you are using?