Jump to content

Stefanowitsch

Members
  • Posts

    103
  • Joined

  • Last visited

  • Days Won

    1

Stefanowitsch last won the day on February 12 2019

Stefanowitsch had the most liked content!

Contact Methods

  • Website URL
    https://www.thumann-media.de

Profile Information

  • Gender
    Male
  • Location
    Germany
  • Interests
    Web Design, Web Development, Music

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Stefanowitsch's Achievements

Sr. Member

Sr. Member (5/6)

42

Reputation

  1. Thanks for your replies. I think I will stick to this solution: 1. Crate a Template for the Ajax Page 2. Create a Page with that template and call it via Ajax
  2. Hello! I want to make use of a JS modal that contains a form. Then the user submits the form I want to handle the submission via ajax and display a "success" message within the modal. I am wondering what is the best practice to handle ajax calls within processwire in general? Usually I would create a static PHP file that handles all the form validation which is then called via ajax after pressing the "submit" button. My question is: Where do I place such a static file within the PW folder structure? I want to create a custom "ajax" folder and place that file there: Then make the ajax request. This is a JS file that handles all functions for the site and sits somewhere within the "scripts" folder. $.ajax({ type: "POST", url: "/site/templates/ajax/form-submit.php", data: formData }).done(function (data) { console.log('form submitted'); console.log(data); }); This call results in a 403 (forbidden) error. The URL that is called looks like that: https://mywebsite/site/templates/ajax/form-submit.php So my question is: Do I need to create a custom template file (=form-submit) within the processwire backend first and then create a page with that template to make it accessible through an ajax request?
  3. I'm getting excited! When will Padloper 2 be released "officially"?
  4. I find this module really useful. Editing a template directly from the page it is using saves a lot of time.
  5. The features are awesome. That's a really inspiring project! How did you approach your custom "Repeater Matrix" solution? I made a custom form builder solution by myself to easily create any kind of formular with the help of Processwires "classic" repeater fields. Instead of those fancy repeater matrix buttons (they look really good) you can select your form element via a dropdown. When you have a content-heavy site I think such a repeater matrix like yours is the best solution.
  6. Thanks for your reply! When testing on my local machine I can verify that the -srcscet variants are not regenerated after a focus change. I can confirm that by looking directly at the file system too: The -srcset images still have the old date and the old focus. Even when opening the page with a different browser (or deleting the cache) I still see the old image versions.
  7. Wow it seems the world is getting smaller and smaller 😉 I never thought that there are people around here who know this company. But it seems people who like processwire have a good taste overall 🙂 The hosting service is Domainfactory. I work on a freelance base and am hosting multiple sites via a reseller hosting solution that Domainfactory offers. The server performance you get there is a little bit better that the usual hosting package you would chose when running a single site only. I am running a few other processwire sites on other servers and can confirm that everything - even the backend - is really fast on this one. Can't wait to put the next site online.
  8. Hello! I wanted to share my latest website with you. https://www.reese-moden.de It's called "Reese Modehäuser" (beware! It is a german speaking website...) which loosely translates to "Reese Fashion Boutiques". A translator is not needed at all. The whole content is "picture-heavy" and there is not much text. I wanted to create a fashion boutique site that has a very crisp and clear look with huge magazine-like images that showcase the current fashion trends that are for sale. The page also features a simple blog/news system for posting new content. Because there are lots of large pictures I wanted to keep those loading times small. So the whole site makes full use of the processwire WEBP image support. In order to make responsive images in WEBP format available this site makes use of @nbcommunication fantastic PageimageSrcset module: https://github.com/nbcommunication/PageimageSrcset I can highly recommend this module! Nowadays everyone has an Instagram page. So I included an Instagram feed directly to the site, again with the help of @nbcommunication and his Instagram Basic Display Api Module: https://processwire.com/modules/instagram-basic-display-api/ This is another fantastic module which I am looking forward to use on other pages. Other modules I used on this site (als recommended): - AIOM+ (https://github.com/matjazpotocnik/ProcessWire-AIOM-All-In-One-Minify) for the compression of all JS and CSS files - Wiremail SMTP (https://processwire.com/talk/topic/5704-module-wiremailsmtp/) for sending mails. I am using a custom form builder system I created myself with some repeater fields. - Redirects (https://processwire.com/talk/topic/148-release-redirects/
  9. EDIT: So this here is my final workaround: I wrote a hook that deletes the image variations (only those with the -srcset suffix) for one specific image when the page is saved after a focus change. $wire->addHookAfter('InputfieldImage::processInputFile', function($event) { if ($event['return']) { $pagefile = $event->arguments('pagefile'); $suffix = 'srcset'; $dir = new \DirectoryIterator($event->object->destinationPath); foreach($dir as $file) { if(strpos($file->getFilename(), '-' . $suffix . '.') !== false && strpos($file->getFilename(), pathinfo($pagefile->name, PATHINFO_FILENAME)) !== false) { $this->wire('files')->unlink($file->getPathname()); $this->message("Focus Changed. Image variations deleted for $pagefile->name."); } } } });
  10. I have a question about the correct workflow for changing focus on images. When changing the focus of the image in the PW Backend new image variations with that focus point are generated. However it seems that the *-srcset variants of those images are not generated new again. So in the frontend you will still see the old image variation. In order to refresh those images I have to make use of the "remove variations" option in the module settings. I find that this is some kind of overkill because I simply want to create new variations of one specific image for example, not every image.
  11. I found the solution as it seems. In my config I had to change httpHosts configuration. From this: $config->httpHosts = array('mysite.de'); To this: $config->httpHosts = array('www.mysite.de');
  12. 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.
  13. 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:
  14. 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; ?>')">
×
×
  • Create New...