Jump to content

szabesz

Members
  • Posts

    2,913
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by szabesz

  1. A combustion engine does not need to be overly complicated either. It is not a ProcessWire, but it used to do its job as well (and if needed, my father could fix it on his own while on the road). https://www.trabant-szene-fuerth.de/Fahrzeuge/Trabant/trabantmotor.htm https://www.bhlingual.com/east-germanys-trabant-peoples-car-a-reprieve-blog
  2. I'm pretty sure Ryan could arrange a trip around Europe without paying a cent for accommodation. Here are some photos of our little town: https://kepguru.hu/hatterkepek/cimke/tata just in case they start to think about such a trip :P
  3. Happy birthday! Now that you remind me, next week I will also turn one year older, (ugh) :P
  4. @kongondo I recently bought my son a used M2 Air, which was not too expensive and is in pretty good condition and a lot faster than my getting-old 2019 Intel MacBook Pro. Have you ever considered the UNIX experience without all the hassle? Just my two pence... Personally, I am waiting for the M4 Mac mini: https://buyersguide.macrumors.com/#Mac_Mini And sorry for being somewhat off-topic, macOS is not Linux, but it feels similar in many ways and is a lot easier to tame.
  5. @Robin S I am sorry for the confusion, the issue is related to the Custom Logs module for sure. I mixed up the modules because both support threads were open in my browser, and I picked the wrong one. I use the modules in tandem, as that is the most obvious way to have the best log viewing experience. As for the issue: "Do you have a custom log named 'my-log' defined in the module config?" Yes, I did set the file's name (without the extension) in the module config. The good news is that it has now "started to work". I'm not sure what I did right this time, but renaming it in the config and in my code fixed the issue. Maybe some invisible character was involved, I don't know (that's just my best guess), as I had definitely tried to make it work before I reported my issue. Thanks for both modules and your support as well!
  6. @Robin S Hello, Thanks for sharing the module! This is the first time I am using it, and I find that contrary to this, quote: "$cl->save('my-log', $my_data);" If I use hyphen in the specified filename then this kicks in: // Return early if this log is not configured as a custom log As soon as I use underscores instead, all is good.
  7. Hello, I'm glad you find the issue. Instead of echoing long strings, why don't you simply mix HTML and PHP this way (written in the browser, so it might contain typos): <?php namespace ProcessWire; $blogger = $pages->find("template=blog_entry,featured_post=1"); // my template ?> <?php if (wireCount($blogger)) : // Check if there are any bloggers ?> <?php foreach ($blogger as $bloggers) : ?> <?php if (wireCount($bloggers->blog_entries)) : // Check if there are any blog entries ?> <?php foreach ($bloggers->blog_entries as $blog_entry) : // my repeater field ?> <div> <a href="<?= $blog_entry->url ?>"> <h1 class="text-xl"><?= htmlspecialchars($blog_entry->title) ?></h1> </a> <a href="<?= $blog_entry->url ?>"> <img src="<?= $blog_entry->blog_main_image->getCrop('blogsmall')->url ?>" alt="<?= $blog_entry->blog_main_image->description ?>"> </a> <?= $sanitizer->truncate($blog_entry->blog_text, 100, ['type' => 'sentence', 'keepFormatTags' => false]) ?> <p class="test_to_show_value_of_featured_filed"><?= $blog_entry->featured_post ?></p> </div> <?php endforeach; // End of blog_entries loop ?> <?php endif; // End of blog_entries check ?> <?php endforeach; // End of bloggers loop ?> <?php endif; // End of bloggers check ?> Which is much more readable, I think. You can even add else blocks to display something when nothing is found. And don't forget <?php namespace ProcessWire;. While ProcessWire has a built-in compiler that adds the namespace for you, there may come a day when that compiler is removed from ProcessWire. Additionally, specifying the namespace helps IDEs understand the context of the code.
  8. Hi, Same topic at PW's GitHub issues: https://github.com/processwire/processwire-issues/issues/1588
  9. If you need to do it even earlier than using init.php: https://processwire.com/talk/topic/26875-page-classes-with-traits/?do=findComment&comment=222333 also see: https://github.com/processwire/processwire/blob/3cc76cc886a49313b4bfb9a1a904bd88d11b7cb7/wire/config.php#L1756
  10. Hello, Just a few hints, as I do not have more time right now, but I hope this helps: Use URL hooks: https://processwire.com/blog/posts/pw-3.0.173/ an to generate unique URLs, you can get inspiration from this helper method I use, for example: public static function getNewRandomUID(): string { $token = new Password(); $hash = $token->randomPass(["minLength" => 20, "maxLength" => 20, "maxSymbols" => -1]); return self::PREFIX_STRING . $hash . Tools::timestamp(); } Such a function can be enhanced by using uniqueNumber() from WireNumberTools: https://processwire.com/blog/posts/pw-3.0.213/ . I would save them in a database table row as text beforehand, so that they can be looked up when a visitor hits a given URL.
  11. @bernhard Just a small note regarding the label "On months". It would be grammatically correct to use "In months," in my opinion. https://langeek.co/en/grammar/course/567/on-in-month It is because "on" would be correct only if the word "month" were used with a specific day, as the linked article explains. Since the months stand alone in this case, "In months" seems to be the correct choice.
  12. FYI: A catalog of hypermedia-driven websites built with HTMX, Unpoly, Turbo or Twinspark: https://hypermedia.gallery/ Aside from the JS tech behind these sites, eTransfer seems worth trying.
  13. To be honest, I am just loosely following the conversation, but it might be worth taking a look at BusyCal's GUI (busymac.com). I know that the interface in a browser and in a desktop app are two different beasts, but BusyCal might inspire Bernhard, if it hasn't already. Anyway, I am a happy user of BusyCal, and I highly recommend it to any macOS users.
  14. I decided not to use that approach for this issue. It would be quite odd to inform the customer "randomly" with a message like, "Hey, the owner of the store is currently editing your cart!" My client and I believe that customers should not be notified in the same way that other backend users are. Such a level of transparency is not what my client wants. Therefore, I opted for the "simplest" solution: locking the cart. However, even locking the cart is not entirely straightforward. In my code, I address not only quantity and price-related issues but also other validation concerns, like this: When a customer loads the cart on the frontend, the system detects all invalid items (it contains outdated prices or product configurations, for example), logs them, and presents the list to the customer before automatically removing them. Based on this log, the backend administrator will receive a daily digest, while customers can optionally request the system to send the list to their registered email address. When a customer loads a cart that is locked by backend users, they are notified that their cart is temporarily locked by the shop owner. They are also presented with a button to click, which will send an automated request email to customer service. The customer will not have to write anything, as the email will contain all the information needed for customer service to unlock the cart. When a backend user accesses a cart edit page, they are presented with any invalid item errors. In this case, we do not want to automatically remove invalid cart items, as the backend user may be working on them, and we cannot determine their intentions. Because of this, no automatic action can be taken, except for one: the cart will be automatically locked if any invalid items are detected. It is then up to the backend user to resolve all issues to make each order item valid again. The backend user must click the 'Save + Unlock Cart' button to make it available for the client again. For editing the cart when there are initially no invalid items, backend users should start their editing session by using the 'Save + Lock Cart' button before proceeding with their edits. As long as no backend user is editing carts, there should be no instances of the cart being locked. Any unfinished tasks by backend users related to editing items should never occur, but they will probably happen a lot of the time. Backend users will receive red error messages that provide clear explanations about invalid items. As long as they do not unlock the cart, the last red error message instructing them to unlock it will remain visible. However, no one is perfect, so backend users will receive an email digest of any carts that may have been left locked accidentally. Our backend users rarely edit cart items, so I believe this relatively simple solution will suffice.
  15. So far, I've been working on the locked-down part of the site that I am using Unpoly for (so I cannot showcase that), but this will change in the near future. In the meantime, here are some great examples that other developers using Unpoly have started to share with each other: https://github.com/unpoly/unpoly/discussions/666
  16. I hope so! It is always sad to think about those (used to be) active members who no longer visit the forum.
  17. Isn't there one already? ;)
  18. Welcome to the Forum! In addition to what @Krlos wrote above, it is always a good idea to install a clean ProcessWire instance on the server you need to migrate to before actually doing the migration. This way, you can take note of any possible issues or requirements that arise during the installation process. You can save the clean instance's config file or simply save all the files and the database for further reference. Next, you can remove the installed instance by deleting all files and clearing the database, and then proceed to migrate the site you need.
  19. Currently, I am using the paid version of Bito.ai in PHPStorm for chatting and Supermaven free for "coding completion." They work well side by side. Bito's GUI and the generated results are quite impressive (as they include clear explanations of what was suggested and why, as well as the assumptions made by the AI engine (also known as LLM)). Even Bito's web account features are nice and informative. Bito indexes the whole codebase and one only needs to tell it to use that, but in my prompts I always tell the engine what classes and what methods to deal with (if appropriate, of course). Since it looks up the whole codebase, sometimes it might creatively pick classes/methods form other off topic places but in that case it is usually enough to guide it to back to topic. The only strange thing about Bito is the subscription scheme: a monthly subscription starts at the beginning of the month. Since I subscribed a week ago, I only had to pay for the remaining days of August, which was fine for me, as I did not have to pay for a full month just to test it. @dotnetic Sourcegraph Cody looks cheap, so thanks for the tip! I will test that as well.
  20. Great news, thank you @ryan! For FormBuilder, it will be a nice improvement. Even though it is a nice improvement for template fields and repeaters as well, I think I will still use @Robin S's visual aid: https://processwire.com/modules/template-field-widths/ Which is even faster to work with, as it provides a wireframe look, reducing the need to guess what the final layout will look like.
  21. BookStack: MIT-licensed, easy-to-use, yet feature-rich documentation system with built-in diagrams.net integration. I use it to document everything. https://www.bookstackapp.com/ Kodi TV: Completely free home theater app running from our QNAP NAS. We only watch our own collection; online services are a big no-way in this area... https://kodi.tv/
  22. I have no idea. Some forum members have started Discord channels over the years, but those channels have never been actively used, so I just quit. Also, keeping Discord (or any other app like that) open all the time is a big time killer that prevents me from focusing on work or anything else, for that matter. The forum's "Live Topics" feature can turn the discussion of an "event" into a separate forum topic (or optionally into separate topics), preserving what was discussed. Chat rooms and similar discussion board solutions cannot be searched nor bookmarked properly and cannot be indexed by search engines either. Maybe I am old school, but a classic forum like this is the best for discussions that provide information to be kept for later reference.
  23. I think "Live Topics" would be nice to have: https://invisioncommunity.com/news/invision-community/introducing-live-topics-r1276/ For example, we could organize monthly "virtual meetups" where each event has a predefined main topic, announced well before the event so that those who have something important to say can prepare in advance. Each event could end with informal conversations about any other topics in mind (where the forum rules should still apply, of course).
  24. I would certainly be interested in that. After all, the developers of TinyMCE need to make a living from it as well, so a well-balanced win-win situation would be welcome.
×
×
  • Create New...