• Content Count

  • Joined

  • Last visited

  • Days Won


Karl_T last won the day on August 26 2018

Karl_T had the most liked content!

Community Reputation

95 Excellent

About Karl_T

  • Rank
    Sr. Member

Contact Methods

  • Website URL

Profile Information

  • Gender

Recent Profile Visitors

1,566 profile views
  1. Karl_T

    If you want to cache-busting the image, you may add the following to ready.php $wire->addHookAfter('Pagefile::url', 'addTimeStamp'); $wire->addHookAfter('Pagefile::httpUrl', 'addTimeStamp'); function addTimeStamp($event){ if($event->page->template == 'admin') return; $modified = $event->object->modified; $event->return = $event->return . "?v=$modified"; }
  2. Karl_T

    Thanks for pointing me to this. I was using the wrong keyword(modal, popup) to search for this feature. This is the thing I am looking for. Let me back-link your tutorial here for people like me.
  3. Karl_T

    Hi @arjen. Thanks for joining the discussion. I suggest to use modal, as it is decoupled with the UI. In this way, it can be used anywhere inside the admin, not limited to particular modules. ListerPro is one of the best demonstration to this issue, but not limited to it. A more general approach could benefit more Processwire users imho. Some core modules use an approach that redirect to a confirmation page. This happens when we are removing template fields. Comparing with the extra confirmation page approach, I think modal is a better way. We can copy the button's href and form data to the modal, which is easier than changing the button's href to the confirmation page while keeping the action.
  4. Clients occasionally request to have a confirmation for actions such as save pages, delete(trash) pages. This is an extra layer of confirmation that can prevent fault click and add more information of the action. This can also benefit module development as modules may contain some destructive actions or batch actions that may cause troubles once the action executed mistakenly. Here is my personal experience. I use the action feature in ListerPro and developed some actions for batch executions such as sending email and SMS. If the user was using the catch send action and forgot to filter the list, they would turn out sending all emails and SMS, which is a disaster. However, modules like ListerPro has their own user interface, which not every developer is capable of making changes to, like the way AOS do. If we have the confirmation layer, the story could be quite different. After clicking proceed button, a modal will popup telling how much email/SMS they are actually sending. They can then confirm that the action is going the way they want. The implementation could be like the way pw-modal do, adding a pw-confim-modal class to the button. In the module side, developer can make changes to button inputfield so that they can enable confirmation modal and set wanted markup to it. Existing module can make a hookable method for button creation. So other developers can choose to hook to add the markup they want for confirmation modal. I believe this feature should be included in core, with a standardized implementation for everyone to follow.
  5. Karl_T

    Yes, I will use this approach first. Thank you for your time.
  6. Karl_T

    Thanks @dragan. I don't want to off topic much too. I am actually forking the module you mentioned to make it a more robust one. I would share the module once it is completed. It will be working silently and seamlessly with other modules. As Croppable Image 3 is my must use module, I just seek any chance that I can make the integration better.(trying to relate Croppable Image 3 more)
  7. Karl_T

    Yes. I have tried this module. It is working great with normal file, but using this would lose the image inputfiled editor, and the feature of Croppable Image 3, which I am using in my every project.
  8. Karl_T

    For webapp and e-commerce shops, high availability is critical. To achieve this, one of the approaches is using multiple stateless web servers running in parallel, by keeping all assets and database away from the web servers. In this way, we can add or remove as many web server as we need. Assets can be kept safe and synchronized across all web servers. I use AWS's Elastic Beanstalk to achieve this infrastructure. The ec2 servers controlled by Elastic Beanstalk will be terminated and rebuilt from time to time, so stateless servers are needed to use this kind of service or infrastructure.
  9. Karl_T

    Thanks for your suggestion. I have tried what you have suggested before. The problem of this approach is that checking remote asset availability needs an extra round trip and that increases the page loading time a lot. If there are many images in a page, every PageImage call would have to check if the remote image is available or not. This is not feasible. Please correct me if I am wrong. I think of a workaround for handling this module. As page editor will save the page, most likely, after adding new crop, I can hook to page save to sync with AWS S3, although the module does not require hitting save to make changes.
  10. Karl_T

    Yes of course. When the module is cropping an image, a variation image is created in /assets/files/id by CroppableImage3Helpers::renderImage method. I want to hook to the method like this to have treatments on the newly created image. Right now it is not hookable. My use case is to upload the image to AWS S3 if I want to make a stateless webserver. I have made the same request to processwire-request for your information. I think there can be more use cases. One of them always on my mind is generating a small placeholder image for lazy loading.
  11. Karl_T

    Hi @horst, is it possible to have a hookable method that for creation of variation image? I would like to hook it to upload the newly created variation image to somewhere else.
  12. Karl_T

    Hi @Tom.. I remember that you were developing an eCommerce module a year before. Why would you turn out to be using Woocommerce? Could you share any difficulties? I actually developed an eCommerce module for my company and I am now developing the second eshop with it. It is far from perfect, but I would like to see any chance I can make it open source later, because I think Processwire do deserve an open source eCommerce system. I wish we can have a decent eCommerce system in any way. I believe this can attract more talents to join us.
  13. Karl_T

    Thank @dadish for this great module. I liked this post long time ago. I just have a chance to get my hand dirty on it. It turns Processwire to a powerful headless CMS with no pain! I am going to use this in my next project with Vue.js or Nuxt.js. One noob question. Could this module query and mutate session data? I have modules that read/write user, including the unsigned guests, session data. I have no idea how to make it happen using only a GraphQL end point.
  14. Karl_T

    Hi @adrian, I have found an issue regarding page reference field. If the template does not contain title field and the page reference field is listed at the top, i.e. first template field, the module would fail to add/replace the correct value and show empty for that page reference field, while other position is working fine.
  15. Karl_T

    I remember that $this->halt() appears somewhere in the forum too. Just check. This works as well. Thank you!