Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/07/2023 in all areas

  1. You would think that Stripe could come up with at least one web design/development related category. After all, they have "Alcohol", "Marijuana-related products", "Weapons Or Munitions", and "Betting Or Fantasy Sports", but absolutely nothing for folks like us… no web design, development, or any kind of design or programming topics. The only one that mentions anything online/internet related would be "Online gambling", so maybe that's the closest one?
    2 points
  2. It's nice to see a ProcessWire site that's close to home!
    2 points
  3. I'm quite sure you did, but just in case: Did you check if there is a plugin that can fix your issue? ?
    2 points
  4. You all are such professional designers that I hesitate sharing my site here, but it might show what Processwire can do even for 'average' users. I created this site with Processwire for the County of Ventura's Assessor's Office. It is a redo of the previous site done in ASP that was showing it's age. The goal was to provide a more modern design that would work with desktop or mobile while at the same time providing more features for the taxpayers to access data and communicate with us. While most of the County Government sites use WordPress (or similar) they graciously allowed me to give Processwire a try. I think it performs admirably, is easy to maintain, very fast, and actually fun to work with (most of the time....?). http://assessor.countyofventura.org Most of the site is handled by two main templates, one for the summary pages, and one for the detail pages. I also created a 'dummy' template to act as a folder to hold the pages for each category (to make a manageable hierarchy) . This made it easier for me to find things on the back end and mimics the front end nicely. On the back end there are several templates that hold things like forms (pdf downloads), links, glossary terms, frequently asked questions, form responses, and more. All of these are dynamically included into the front facing pages based on their content and how they relate to the individual pages. Fillable forms were the hardest part for me. I tried working with some of the free modules for this sort of thing but I could never wrap my head around them. In the end, I just did it by hand with standard PHP forms combined with using the Processwire API to save the results to the database. It works fairly well but I'm sure there is a better way. A big thank you to everyone on this forum for their help and tips both directly and indirectly, and to Ryan who makes this fabulous software available to us. Any suggestions on the site are welcome.
    1 point
  5. I have a module that I created which I am installing and then running a method on via the command line (although this issue still occurs when running in the script in my browser as well). My script looks like this (I've heavily simplified it here to demonstrate the issue precisely): <?php namespace ProcessWire; include(dirname(__FILE__).'/../index.php'); // bootstrap processwire wire('modules')->install('MyModule'); wire('modules')->get('MyModule')->setupDemo(); MyModule's ready() method contains various hooks, many of which do things on page save. MyModule's setupDemo() method does a bunch of stuff like creating pages and fields. The problem is, when doing those two things back-to-back as shown above, the ready() method doesn't get executed for some reason and therefore the hooks do not get applied! As a result, the various things that rely on hooks in setupDemo() do not execute. If I were to split the two method calls into two different scripts and ran them one after another, this issue does not occur. What am I doing wrong? I've tried wire('modules')->refresh(); between the two calls and several other things but no luck. Note: if I call the ready() method explicitly, it causes problems as well.
    1 point
  6. Also keep in mind that ChatGPT is not deterministic, meaning you may get different answers for the same prompt.
    1 point
  7. ChatGPT has blown my mind countless times from a programming point of view. It's ridiculously helpful and has given me superpowers (ie, less reliance on poor Google results, which in turn helps with learning faster). It's also very helpful in providing a starting point on topics I have low experience in (for example, doing some advanced things with ImageMagick). My prompt was literally copy/paste of my original post. Pretend ChatGPT is a human that knows basically everything about everything. I have a bunch of other code in ready() which was causing errors given the context. But I should investigate that further (I was losing patience debugging for 2 hours). Will try what Ryan mentioned, but for now I refactored my hooks into their own method.
    1 point
  8. If you want to add hooks in your ready() method, you could probably call the ready() method at the end of your install() method?
    1 point
  9. In the meantime I figured out in which installation the error occured. I upgraded 3.0.210 to 3.0.226. It works well now, running php 8.2.
    1 point
  10. Interesting. I know IT blocks our office from getting out to foreign addresses, but I didn't know it went the other way. Thanks for trying to visit anyway. ?
    1 point
  11. Hello, I made this little experiment, maybe useful for someone. YAWS (Yet Another Webserver) is a HTTP 1.0/1.1 webserver which is completely written in Erlang. YAWS has been noted well suited for dynamic-content web applications in many cases. Because Yaws uses Erlang's lightweight threading system, it performs well under high concurrency. A load test conducted in 2002 comparing Yaws and Apache found that with the hardware tested, Apache failed at 4,000 concurrent connections, while Yaws continued functioning with over 80,000 concurrent connections. Mixing Erlang and PHP is a powerful combination. PHP has a vast web development ecosystem and Erlang has more than 30 years of production ready concurrency solutions that scale well. https://github.com/joyofpw/pwyaws/ Cheers.
    1 point
  12. Your experiment showcases the impressive capabilities of YAWS (Yet Another Webserver), a web server written entirely in Erlang. YAWS's utilization of Erlang's lightweight threading system enables outstanding performance under high concurrency, as demonstrated in a 2002 load test where it outperformed Apache by continuing to function with over 80,000 concurrent connections. This highlights YAWS as a robust choice for dynamic-content web applications. Moreover, your mention of the potential synergy between Erlang and PHP emphasizes the power of combining PHP's extensive web development ecosystem with Erlang's three decades of proven concurrency solutions, offering scalability and versatility for web development projects.
    1 point
  13. OMG, thanks so much. Apparently I skip this (closed) option.
    1 point
  14. I asked ChatGPT and it gave me what I needed to know: Therefore, I've moved the relevant hooks into a method outside of ready() and am attaching the hooks explicitly now in my script.
    1 point
  15. Happy 1st of September! Now that we've got the new main/master version out and running smoothly, I've been catching up with some client work this week. I'll need to do some of that next week too. But we'll also be fine tuning the core and fixing anything that comes up in issue reports. We may have have another master version out with these kinds of minor updates before digging into more major updates, feature requests and PRs on the dev branch this month. If you've not yet upgraded to 3.0.226 yet, I'd encourage you to give it a try. So far all reports have been positive and I've not heard of anyone running into any upgrade issues yet. Thanks and have a great weekend!
    1 point
  16. After 8 months in development we are excited to bring you ProcessWire 3.0.226 main/master. This version has a ton of great new features, improvements and optimizations, plus more than 100 issue fixes. This post takes an in-depth look at highlights from this great new version. While there's even more in this version than is covered fully here, we hope this gives you a good taste of what you'll find in 3.0.226! https://processwire.com/blog/posts/pw-3.0.226/
    1 point
  17. What about we make this some kind of universal profile which works with webpack, bun, npm, yarn, vite... whatever. Or at least use this a guide for setting up all of those different setups. I never really used any of these tools - at least six months or so ago - right now I use NPM due to other tools I use now and therefore kind of started to like it (and as it's super portable through all OS I use, have to use or play around with). As soon as I am back at home I could provide a NPM/TailwindCSS/AlpineJS/browser-sync setup. Pre-Version of the mentioned above can be found here: https://github.com/webmanufaktur/processwire-addon-tailwindcss-alpinejs-barbajs
    1 point
  18. I just had this problem as well, using a path hook like this: wire()->addHook('/my/path', function($event) { /*…*/ }); In conjunction with a form like this: <form method="POST" action="/my/path/"> ProcessWire redirects the version with the trailing slash to the path matching the hook. I presume the same thing happens with normal pages and url segments as well, depending on the template settings. So if your redirect goes from /action_page to /action_page/ or vice versa, just request the exact url directly.
    1 point
×
×
  • Create New...