Jump to content

Stefanowitsch

Members
  • Posts

    344
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Stefanowitsch

  1. Thanks, I just installed the module an made a redirect. The URL turns out exactly the way as with the .htaccess entry. I still get this malformed redirect URL: https://mywebsite.de/modewelten/women/?it=de/women I still have no clue what is causing this ? I will check if this is a cache-related problem, though.
  2. I created a website in processwire and want to add some 301 redirects due to some changes in the overall structure of the page. In my .htaccess I added some rules like this (I am using the default PW .htacces, starting at Line 164) Redirect 301 /de/women https://mywebsite.de/modewelten/women/ When opening the URL I get a working redirect but the URL suddenly looks like that: https://mywebsite.de/modewelten/women/?it=de/women The page is accessible but I have no Idea why this "it" Parameter is added. Another Problem is this redirect: Redirect 301 /de/bestellungen https://mywebsite.de/kontakt/ When opening the URL i get a redirect which leads to a 404 Page because the URL makes no sense at all: https://mywebsite.de/bestellungen?it=de/bestellungen I have these redirect problems both in my local dev environment and the live server. I found this old thread with the same problem but the solution does not work for me:
  3. Hi! Is there any possibility to make use of this module for background images? I am using it only for normal rendered images so far. The srcset attribute is not usable with background images, I would like to output only one single image based on the viewport width. Something like this: <div class="image-wrapper" style="background-image:url('<?= $page->image->size(<DETECT WIDTH HERE>)->url; ?>')">
  4. Yes you could do the yes/no questionnaire with two radio buttons. In my case I just want a simple fallback value for a non-checked checkbox to be visible inside the e-mail body. This is no problem with the API, my only issue is that the checkbox always will be set to "checked" after submitting - when there are validation errors inside the form. I find this to be solved much easer in "classic" PHP style and I will stick to that instead of the API form solution.
  5. Hi Robin! Thanks but that solution won't work for my case. Let me explain: For my forms I am using a "custom formbuilder" solution made from repeater fields. In the backend I can build my own forms with different elements in any order. After the submit I am iterating through the input values like this and build my email body content from that. foreach($input->post as $field => $val) { // get the $val and use it in e-mail body } Your code example does not work for me, because I am going through the fields one after one and the unchecked box will just be missing in the array. In case of unchecked I want to submit a value with "No" instead of nothing. $greeting = $form->getChildByName('greeting')->value;
  6. I am stuck with a problem: How to handle unchecked checkboxes via api. I have a form with a single checkbox. The value of the checked box would be "yes". When the form is submitted I want the value of the checkbox to be displayed within an email, together with a label text. That works. But we all know that when you don't check the checkbox the value of the checkbox will be missing in the post data. So in that case you can use the "hidden field trick": Create a hidden field that contains the value "no" and name it exactly like the the checkbox. This works perfectly fine with the processwire API like this: // create a hidden input for checkbox $field = $modules->get("InputfieldHidden"); $field->attr('name',$item->form_name); $field->attr('value', 'No'); $field->skipLabel = 8; $form->append($field); // create a checkbox $field = $this->modules->get('InputfieldCheckbox'); $field->attr('name',$item->form_name); $field->attr('value', 'Yes'); $form->append($field); My problem is: When you submit the form and some required fields weren't filled out, the form gets validated and the error messages are shown according to the required fields. So far so good. But in that case the previously unchecked checkbox is suddenly "checked". The reason for this must be the fact that the hidden field is submitted which has the same name as the checkbox that is visible in the frontend. So I guess that the processwire form handler then checks the checkbox automatically. This is not a behaviour that occurs in "normal" PHP post data handling.
  7. Wow that does the trick. Thanks a lot. The skip label markup syntax looks a bit weird at first but now I see that it is a mighty tool. I assumed that you just could write skipLabel = true. So the markup returns a number that the code is then working with. This does the same: $field->skipLabel = 8;
  8. This question is maybe trivial but I found no solution. When generating a form with the processwire API I want to make use of some hidden fields. When generating these fields the corresponding label is always shown in the frontend. Which in my opinion makes no sense (it's a hidden field, though!). This is the code I am using. $field = $modules->get("InputfieldHidden"); $field->attr('name','Name'); $form->append($field); On my form page in the frontend I then see a label called "Name" but no input (which is fine). The only solution that comes to my mind is to hide the label of the hidden field via CSS but that is not a clean solution.
  9. I installed the german language pack long time ago and I want to update it to the new version. What is the correct way to update the language pack? I just can't find the field anymore to drop in the ZIP file with all the data in it so that it will override the existing translations with the new ones.
  10. The problem with the special characters appears both on my local development environment (MAMP PRO) and on live site. I use the default PHP settings on both, nothing special. But this is no dealbreaker for me, I am not displaying any tags on the page.
  11. The content type of the response header says charset=utf-8 However here's the caption the tags are generated from. When printing this caption the special characters are all displayed correctly. •WERBUNG• Da strahlt nicht nur der #Pulli, sondern auch noch unsere liebe Aggi?? #Spaß auf der #Arbeit darf nicht fehlen, oder? #fashionstyle #redhead #redpullover #fun #wilster #wilstermarsch #blackweekend #prozenteaktion #Spaß becomes spa<?>
  12. Thanks! I updated to Version 1.4.3 and checked the code line. Unfortunately the special characters still don't show up correctly ? I refreshed the PW module cache and the cache for the module itself but that did not help. That's not a big deal right now because the client I am working for wants the hash tags to be removed again (for layout reasons) but I think that might be a problem for other users at some point.
  13. Yes, I am outputting the single tags like this: <? foreach($item->tags as $tag) { echo $tag . ' '; } ?> On Line 1048 of InstagramBasicDisplay.module I tried this, but the hashtag is then missing in the array: $tag = $this->wire('sanitizer')->entities1($tag, true); $item['tags'][] = strtolower($tag);
  14. I have a problem: I want to display the hashtags for each instagram post. This is no problem at all. But the encoding seems to be messed up. For example special characters like "ä ü ö ß" turn out as the notorious PHP <?> symbol. When displaying the caption instead (which contains the hashtags) all special characters are displayed correctly, though.
  15. Hello! I was curious what became of padloper 2 and now I found this thread and I am blown away. The quality of this new module seems to be outstanding. I am VERY looking forward to integrate it into my next project. The project will be around winter/spring and I am optimistic that the padloper 2 will be finalized by that time ?
  16. This module rocks! It comes just in time for a recent project I am working on. Is there a way to send you a kind of donation for your work?
  17. Thanks for your reply! I was finally able to get it to work. In fact none of the cryptic steps mentioned here (https://developers.facebook.com/docs/instagram-basic-display-api/getting-started ) was necessary. I was in a rush and just copied this example code from the processwire module page to see what will render in the frontend. The problem was the line where a specific profile "username" was selected (as an example). I did not have an account like that in my module settings and that was the error.
  18. I just installed this module and am trying to authorize the user. Has anybody checked if the process of authorization which is described on the module page has changed? Basically I am stuck a the point where I need to generate a token and place it into the module settings. I have successfully generated a token, entered it but in the processwire logs I still get the message "username is not an authorized user.". Weird: After reloading the settings page in my facebook app the token which was just created seems to be gone. I found this instruction and the process of authorizing a user seems to be super complicated now: https://developers.facebook.com/docs/instagram-basic-display-api/getting-started
  19. Okay I solved this problem. It seems that it was not the modules fault but Processwires $image->size() function was creating terrible artifacts on some gradients. It had to do with the defaultGamma value. I put this into the config.php and now all resized images look great: $config->imageSizerOptions = array('quality' => 100, 'sharpening' => 'medium', 'defaultGamma' => -1);
  20. Hello I have a question about the quality parameter as mentioned here: https://github.com/rolandtoth/MarkupSrcSet/wiki My problem is that I am displaying a picture and I am using the MarkupSrcsSet Module. The picture has a fine color gradient in the background and the final image that is rendered looks very poor - quality wise. It show lots of artifacts in the gradient. The original image that I uploaded in processwire is fine! It is the module itself that is downgrading the quality it seems. When using the quality parameter in my code however it does not affect the rendered image in any way. It still looks bad, even with quality set to 100%. Here's my code: <img data-srcset="<?php echo $image->srcset('original,/1.5,/2,/3',array('quality' => 100)) ?>" src="<?php echo 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='; ?>" data-sizes="auto" class="lazyload img-fluid big-img" alt="<?= $image->description; ?>"/> I attached an image of a part of the gradient.
  21. I just installed the Media Manager on a clean PW installation and encountered a problem: Multiple image upload is not working. I am unter the "upload" tab and drag some images into the field. Then click "start". The upload progress bar is growing for 1 second then suddenly it shrinks back to zero and the image upload list is cleared. No images were uploaded. What is wrong? The image size is lower than the max upload size setting in my PHP.ini so that cannot be the reason. The images are about 3 MB each with a resolution of 5184x3456px. That should not be a problem at all? Second - whenever I alter something in the "settings" tab it is NOT saved. For example: Upload mode -> Single file uploads set to false.
  22. Definately looking forward for WEBP support :-)
  23. I am using PW Version 3.0.98 together with WireMailSMTP 0.4.2. My form code: $mail->to($toEmail); $mail->from('mailer@site.de'); $mail->replyTo($fromEmail); $mail->subject('Neue Nachricht über das Kontaktformular'); $mail->bodyHTML ($message); $mail->logActivity("mail sent"); $numSent = $mail->send(); The variable $fromEmail contains the address that was given in the form. I get this error: Notice: Undefined index: replyToName in /XXX/XXX/Sites/processwire-new/wire/core/WireMail.php on line 319 The mail is sent successfully though. This works fine: $mail->replyTo($fromEmail, 'foo'); But again, the second argument is optional. I don't want to use it.
  24. Hello! I am testing some forms and get an error when using the replyToName() method: Notice: Undefined index: replyToName in /XXX/XXX/Sites/processwire-new/wire/core/WireMail.php on line 319 --- I took a look at the documentation: https://processwire.com/api/ref/wire-mail/reply-to/ From the documentation I get the information that I CAN use a second argument - the "name". But it is optional. In my form code I don't do that. I just use the sender e-mail address as a single argument. But why is this error occuring? When I use a second argument - any string - there are no errors at all.
  25. I am setting up the datepicker via the processwire API. So i think it is a PW related question. The InputfieldDatetime module is looking for different languages in Line 58. So I was wondering if those languages can be set up via a configuration variable. https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.module
×
×
  • Create New...