-
Posts
4,088 -
Joined
-
Last visited
-
Days Won
88
Everything posted by horst
-
@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?
-
The properties are set as protected. You need public accessible setter method(s) like with every PHP class. Something like this: public function setMyName($val) { $this->myName = $this->sanitizer->text($val); } public function __set($var, $val) { if(isset($this->$var)) $this->$var = $this->sanitizer->text($val); } Theoretically also direct public accessible properties can be set directly from the outside, but this is bad code, a NoGo.
-
Definetly a typo here, but is it a missing "t" or a missing "y"? ?
-
I think the best explanation is directly above that method: So, as I understand this, it tries to rebuild variations. But limited variations, 0 = without suffixes, without crops, etc. (read on above). But to know which variations are belong to an image, the variations have to exist! (It gets all variations and then try to determine how they were build, what seems to be simple for mode = 0, but becomes more and more special and indefferent with higher modes). HTH ?
- 3 replies
-
- 2
-
-
- variations
- images
-
(and 3 more)
Tagged with:
-
@Jonathan Lahijani Hmm, there is no fast fix possible ATM. BUT you may use this code, passing the options array as second param to pim2Load, what works as expected: $image1->pim2Load('i1')->setOptions(['outputFormat'=>'jpg'])->pimSave(); // FAILES (with outputFormat, all other settings work as expected) $image2->pim2Load('i2', ['outputFormat'=>'jpg'])->pimSave(); // works!! Summary: all option settings work in both ways, BUT changing the outputFormat only works correctly when passed as options argument into pim2Load(). (I think it needs a massive rewrite to fix that properly, for that I have no time atm ?)
-
Hi Jonathan, sorry, I completly missed that one. ? Will looking into it next week. ? And thanks for showing the issue by video, what makes it very clear to follow!
-
Using or building? ?
-
I personally never would redirect visitor-users to the backend. But I use user roles and access rights a lot. So, I thought there is already a FE login / logout module available? Otherwise I think it is not reinventing the wheel everytime, as you may build custom modules or reusable template / field systems.
-
Building extensible display options with Selectable Option fields
horst replied to MoritzLost's topic in Tutorials
Definetly worth a try! ?- 7 replies
-
- selectable options
- fields
-
(and 1 more)
Tagged with:
-
Building extensible display options with Selectable Option fields
horst replied to MoritzLost's topic in Tutorials
Hi Moritz, big thanks for this one too! ? I use a similar setup, but with page references instead of option fields.- 7 replies
-
- 3
-
-
- selectable options
- fields
-
(and 1 more)
Tagged with:
-
Have you done a quick test with adding the templatename to the portrait-cropsetting? Does this behave different? portrait,300,500,project ?
-
Pushing local development to production development
horst replied to ZionBludd's topic in Getting Started
I always do a quick install on unknown servers with the blank site profile, pull in the modules for Diagnostics and the ProcessDatabaseBackup, do a proper check of server, database (charset collations etc.), filesystem, PHP, image support, etc, and if all is well or changed to be well, I install the initial database dump and switch to the site profile. The times before I switched to that approach, I several times run into issues that could be ommitted with my current approach, and it took me much more time to find out what was not setup right or missing. - Sure, if you already know the server you deploy to, it can be done without the initial install and diagnostics step. But also on a known server, someone may set the wrong database charset, wrong file access rights, or bind a account to the wrong PHP version, or what ever. Do a fresh install and check with diagnostics modules all together takes 10 minutes max., to see if everything is as it should be. ? -
Pushing local development to production development
horst replied to ZionBludd's topic in Getting Started
https://processwire.com/blog/posts/introduction-migrations-module/