Jump to content

Krlos

Members
  • Posts

    180
  • Joined

  • Last visited

Everything posted by Krlos

  1. Hi, I have a client who wants to offer file downloads (PDF, Word, Excel, etc.) to some of their clients. However, he have emphasized that the files must be highly protected. Specifically, the files should: 1. Be accessible only to users with the appropriate role.(different roles for different files) 2. Not be directly accessible from the internet. 3. Remain unreadable or encrypted even if the web server is hacked. Is there any way to achieve this with ProcessWire? I’ve only built standard websites before, and I’ve never worked on something like this. To be honest, I feel unsure about how to implement this. I would greatly appreciate any advice or recommendations. Thank you!
  2. I totally get where you’re coming from and appreciate your support for open-source values. Personally, I keep renewing my Pro module membership even when I don’t need the new features. For me, it’s a way to back Ryan for all the amazing work he does. Plus, having access to support has been a lifesaver a few times when the forum couldn’t help. Maybe reach out to Ryan directly through the ProcessWire website to see if there’s a way to donate. I’m sure any support would go a long way for the project! Another idea could be setting up something like a Patreon or similar platform where the community could collectively fund updates to specific modules or even new features that aren’t currently on the ProcessWire roadmap. That might be a cool way for everyone to contribute in a more focused way!
  3. I highly recommend KnownHost.com. I have a fully managed VPS with them, and in seven years, I’ve had zero issues.
  4. Me too, there are no compatibility issues on any of my sites, some on version 2.5 and 3.
  5. I always recommend pwtuts.com, it has great content for beginners.
  6. In your site/config.php file, ensure that the $config->httpHosts is properly updated with only the domain you're currently using, which is plant-directory.something.edu. Since you've switched addresses, you don't need the old domain unless you're maintaining multiple environments (like a dev or staging environment). You can try this configuration: $config->httpHosts = array('plant-directory.something.edu'); If you have a development or staging site (e.g., dev.plants.something.edu), you can include both: $config->httpHosts = array('dev.plants.something.edu', 'plant-directory.something.edu'); ProcessWire sometimes caches configuration files. You can clear the cache by doing the following: Log in to your ProcessWire admin panel and navigate to Modules > Core > Clear compiled files (if you can log in).
  7. I did something similar using image tags. I placed all the photos in an image gallery and assigned the 'cover' tag to the desired photo to be used as the cover. Then: $image = $page->images->find("tags=mytag")->first(); My client actually loved this approach because we created new tags, and they can now assign them according to the position where the photo will be used
  8. Interesting, does this module work similarly to the Token module in Drupal?
  9. @Tiberium, Wow... just wow. Thank you so much for providing the code! I really appreciate your help. I’ll give it a try later today and let you know how it goes. Thanks again for your support!
  10. Hi everyone, I'm working on a multilingual site in ProcessWire with three languages: Spanish (default), English, and Portuguese. I've already implemented a manual language switcher that works correctly, but I would like the site to automatically detect the user's browser language and redirect them to the specific language version. Users with their browser language set to Spanish should be redirected to mysite.com Users with their browser language set to English should be redirected to mysite.com/en Users with their browser language set to Portuguese should be redirected to mysite.com/pt Users with any other browser language should be redirected to mysite.com/en Can anyone guide me on how to achieve this? I would appreciate any advice, code examples, or modules that could help me implement this functionality. Thanks in advance!
  11. I recommend checking out PW Tuts pwtuts.com. There, you can find basic concepts that will help you understand the fundamentals and allow you to create quite advanced websites.
  12. I'm glad you found the solution, and I appreciate you coming back to post it to help others. There's nothing more annoying than when someone says, 'It doesn't matter, I already solved it.'
  13. @TomPich welcome to Processwire! There are two modules that could solve your need https://processwire.com/modules/settings-factory/ https://processwire.com/modules/process-general-settings/
  14. Hi @Macrura, I just found your amazing module, how can I enable multilanguage support for fields? Thanks.
  15. It's a remote server, not related to my PW site. The API works from postman. He advised to use jquery or similar to query the API, but I don't know how to do the query in curl and then send the PDF report to jquery to download the PDF file. Basically he explained to me that the problem is that if I try to open the file from my PW site the problem occurs, but if I consult the API and pull the report URL and serve it via Ajax or other method it should work.
  16. Hi, I don't use much curl and I need to do the following: I have a template in PW, with the following code: userid, reportID are received from a form in this same page. $url = 'https://path.to.API.endpoint'; $ch = curl_init( $url ); $data_string = '{ "userid": "' . $userid . '", "reportID": "' . $reportID . '" }'; curl_setopt( $ch, CURLOPT_POSTFIELDS, $data_string ); curl_setopt( $ch, CURLOPT_HTTPHEADER, array( 'Authorization: AUTHORIZATION KEY', 'Content-Type:application/json' )); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch, CURLOPT_POST, true ); $result = curl_exec($ch); curl_close($ch); $obj = json_decode($result, true); if($obj[0]['status'] === "validated") { $pdf = $obj[0]['reportURL']; header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="report.pdf"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($pdf)); ob_clean(); flush(); readfile($pdf); exit; } The problem I have is when I run the code above I get this error: {"statusCode":400,"error":"Bad Request","message":"Invalid cookie value"} The API developer tells me that the error occurs because when making the query using POST I am injecting my server's cookies into his server and that is why it gives that error and the call does not go through. He told me that the solution is to take the response from the API and use ajax to deliver the PDF report, but I don't understand how to do all this in Processwire. Any help is very welcome.
  17. Hi @da², The provider confirms that the cookie has not changed. We have found that in the normal flow it gives us the mentioned error, but if we force delete the cookies using "clear browser cookies" in the network tab of the chrome inspector and I hit submit the form again then everything works.
  18. Hello, This may not have to do with processwire, but I have a website built with processwire that was working normally. There is a form where users download xray scans, the user enters his ID and an id code for the exam, then using curl we call an api to authenticate and serve the pdf file. Now when filling out the form, the result of the call to the server where the API is located returns: {"statusCode":400,"error":"Bad Request","message":"Invalid cookie value"} The strange thing is some combinations of browser - operating system the error does not appear, but in most it does. Any ideas that help me to be able to solve this problem are very, very grateful.
  19. Hello, A client informed me that his website was giving error, I went to check and everything was ok. I then went to check the processwire logs and found the following: Many of this: 1 hora antes 27-06-2023 12:59:48 - ? SQLSTATE[HY000]: General error: 1021 Disk full (/tmp/#sql-temptable-3dd889-8a7ab0-0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") In /wire/core/WireSaveableItemsLookup.php line 68 And many of this: 1 hora antes 27-06-2023 13:04:32 - ? SQLSTATE[08004] [1040] Too many connections In /wire/core/ProcessWire.php line 494 About 50 Exceptions in a 2 hours span. Then I checked if there was space in Cpanel and there was no hard drive problem in cpanel. What has happened here?
  20. Hi @nbcommunication, yes I'm using: <section class="about-section pt-48 pb-48" style="background-image: url(<?php echo $page->images->render(); ?>); background-repeat: no-repeat; background-size: cover; background-position: center;"> I'm doing it wrong? I thought it was enough to define the sizes in the module configuration.
  21. Hi, @Stefanowitsch, can you please explain how you managed to use the module for background images? I have tried to use, but I only get the code for <img> and I'm trying to add my background images using inline css to make it work with Tailwindcss. Thank you.
  22. Hola, puedes postear el código? para poder ayudarte.
  23. Same as you, deploy and forget. I've noticed that when hosting providers update something, the log file starts growing with warning logs. I usually realize months later. I love PW?
  24. I'm trying to use Urlsegment + combo field, but have this problem I can't solve: I have a combo field with some fields and one category field based on a page reference field. When I try to filter content using the first url segment urlSegment1, I get no data, but if I use the page reference page ID it works. Code to filter: $segmento1 = $input->urlSegment1; (in this case "domo") $filter = $pages->find("template=alojamiento, alojamiento_combo=$segmento1, sort=random, limit=20"); This wont work: template=alojamiento, sort=random, alojamiento_combo=domo, limit=20 This works: 1184 being the ID of the page reference field. template=alojamiento, sort=random, alojamiento_combo=1184, limit=20 I also tried, but don't work: template=alojamiento, sort=random, alojamiento_combo.categoria=domo, limit=20 Any help is appreciated.
×
×
  • Create New...