Jump to content

szabesz

Members
  • Posts

    2,920
  • Joined

  • Last visited

  • Days Won

    17

szabesz last won the day on January 9

szabesz had the most liked content!

1 Follower

Contact Methods

  • Website URL
    http://szabesz.hu

Profile Information

  • Gender
    Male
  • Location
    Hungary

Recent Profile Visitors

11,884 profile views

szabesz's Achievements

Hero Member

Hero Member (6/6)

3.5k

Reputation

3

Community Answers

  1. ProcessWire's Page constructor: https://github.com/processwire/processwire/blob/3cc76cc886a49313b4bfb9a1a904bd88d11b7cb7/wire/core/Page.php#L594 public function __construct(Template $tpl = null) { parent::__construct(); if($tpl !== null) { $tpl->wire($this); $this->template = $tpl; } $this->useFuel(false); // prevent fuel from being in local scope $this->parentPrevious = null; $this->templatePrevious = null; $this->statusPrevious = null; } So in extending custom page calsses I do this: function __construct(Template $tpl = null) { parent::__construct($tpl); // my initializations go here... } I had no issues with it so far.
  2. 2D or 3D in PHP? PHP-GLFW (https://phpgl.net/) GameDev and Real-Time Applications in PHP 3D example: https://phpgl.net/examples/opengl/10-sponza.html Cross-Platform PHP-GFLW works on Window, MacOS and Linux. We also support standalone & portable binaries for MacOS and Windows.
  3. https://www.oreilly.com/library/view/php-8-objects/9781484267912/ https://www.oreilly.com/library/view/php-8-solutions/9781484271414/
  4. Yeah, that would be nice to have for sure. Since all M4 Mac Minis come with 16-core Neural Engine cores, I guess* they will be equal in this regard. Checking out M3 Mac reviews available out there might help you determine which M4 chip variant can be good enough for running local LLMs. *Edit: I could be mistaken, and other cores are also important to have. Having an Intel CPU based Mac, I have not yet dived into this topic just yet.
  5. Good question. Actually, yesterday I started to consider getting the 20-core GPU version (the most expensive one), but only if I decide to get into 3D seriously once and for all. I'm giving myself some time to think about that, as it would mean a lot less web development work, which I love with ProcessWire. As long as Ryan is around, I don’t think I will ever leave PW, but if I switch my main focus, then obviously I won't have as much time to work on ProcessWire-based projects. As for web development, I am pretty sure that even the cheapest M4 Mac mini would be just fine. My daughter's original base model M1 MacBook Air is at least twice as performant as my current 2019 Intel MacBook Pro in almost all respects, and the latter is still perfectly fine for DTP and web development. So why spend the extra money on features I do not use? However, I still want to replace my current Intel Mac, as I would like to make more homemade videos from our family footage recorded over the years, and any M series Mac is a lot better for that than my aging Intel CPU based laptop.
  6. That was my thought too. Since the machine fits in a pocket (well, you need a large coat for that, but there are such pockets...) if I buy a small keyboard and a small screen, I can easily temporarily relocate my office when I need to. I have no idea which keyboard and small monitor to buy just yet, but I will definitely purchase them in the end. BTW, here is a quick review for those interested: https://www.youtube.com/watch?v=KxgnSiK5qBA
  7. There you go, the M4 Mac mini: https://www.apple.com/mac-mini/ Mine will be configured as: Apple M4 chip with 10-core CPU, 10-core GPU, 16-core Neural Engine 16GB unified memory 512GB SSD storage 10 Gigabit Ethernet Three Thunderbolt 4 ports, HDMI port, two USB‑C ports, headphone jack Should you want to install Linux on it: https://asahilinux.org/2024/10/aaa-gaming-on-asahi-linux/ But probably a better option: https://eclecticlight.co/2024/01/01/virtualise-linux-on-apple-silicon-with-liviable-beta-4/
  8. 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
  9. 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
  10. Happy birthday! Now that you remind me, next week I will also turn one year older, (ugh) :P
  11. @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.
  12. @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!
  13. @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.
  14. 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.
  15. Hi, Same topic at PW's GitHub issues: https://github.com/processwire/processwire-issues/issues/1588
×
×
  • Create New...