Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Karl_T last won the day on August 26 2018

Karl_T had the most liked content!

Contact Methods

  • Website URL

Profile Information

  • Gender

Recent Profile Visitors

2,315 profile views

Karl_T's Achievements

Sr. Member

Sr. Member (5/6)



  1. I experienced the same issue. My case was about permission issue. Adding the SSH user to apache group fixed the issue.
  2. I found the solution. By amending this line in LanguageSupportPageNames module, we can set any template to bypass the language segment of the URL. It would be great if this can be editable in the module setting. Right now, we can just copy the module to /site/ and override the module inside /wire/. Hope this help somebody looking for the same api approach for multilingual sites.
  3. I want multiple api endpoint setups and have their own templates. I want to use them by some custom modules, each having their own endpoint under /api/. And I don't want to mess with other templates. Thanks for your suggestion!
  4. I would like to make a template for API Endpoint, i.e. www.domain.com/api/. The issue is that most of my sites are multi-lang. The URL will become like www.domain.com/en/api/ or www.domain.com/de/api/, which make some issues when calling ajax from the frontend. What I want to achieve is to remove the language part of the URL, which is exactly the www.domain.com/processwire/ looks like. The admin URL does not contain the language part. I look into the Admin's edit (The admin root), it does have the language name enabled, but its children, e.g. Admin>Pages, all the language names are showing /processwire/pages, instead of /en/processwire/pages/. I want to replicate this to /api/ and its children pages, which are also api endpoint like /api/login/. I have tried to disable the template multi-language support, but, unfortunately, the /en/ part is still there.
  5. 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"; }
  6. 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.
  7. 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.
  8. 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.
  9. Yes, I will use this approach first. Thank you for your time.😉
  10. 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)
  11. 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.😭
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  • Create New...