Jump to content

szabesz

Members
  • Posts

    2,869
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by szabesz

  1. I recommend uninstalling it as it has more problems than features. See : https://processwire.com/talk/topic/23457-functionality-clash-with-system-notifications/#comment-215415
  2. https://hamy.xyz/labs/2024-01_htmx-vs-alpine Quote: "Low-js tools like HTMX and AlpineJS are the future of the web. They allow us to build modern web apps without the bloat of popular SPA frameworks." What perplexity.ai says: https://www.perplexity.ai/search/explain-the-pros-and-cons-of-l-IrCeVWXSTAWsWJEv_GuNIA Let's think forward...
  3. I use a mixture of calls to run various initializing code, depending on what to initialize, e.g., copied from a Product page's custom class: /* * Called when the page is requested on the frontend. * Called from _init.php via include_once(config()->paths->templates . 'path/to/this/_init_once.php'); * so that it only runs once per request: * page()->requested(); */ public function requested() { $this->request_ws = "\ProcessWire\RqtProduct"; parent::requested(); } /* * When initialization of object properties is required right from the beginning. */ function __construct(Template $tpl = null) { parent::__construct($tpl); $this->factsAy = new Arrayy([]); } public function ___loaded() { parent::___loaded(); // Either building a structured array of all product data and caching it in a variable or reading that from memory. if (empty($this->facts)) { $this->encodeFacts(); } else { $this->factsAy = Arrayy::createFromJson($this->facts); } } /** * Product page specific hooks. This method is called from site/init.php from my custom loop * that runs for each frontend template based page. * if (in_array($templateName, config()->noneFrontendTemplates)) { * if ($templateName === "user") call_user_func_array("{$namespace}{$className}::initiate", []); // UserPage needs special treatment. * continue; * } * if (class_exists($namespace . $className)) call_user_func_array("{$namespace}{$className}::initiate", []); // Page classes register hooks in their initiate() method this way. */ public static function initiate() { parent::initiate(); wire()->addHookBefore("Pages::saveReady(template=product)", function ($event) { ... more hooks go here ....
  4. I'd love to see an "officially supported and recommended (and even documented) way" of initializing custom page class objects, discussed and requested by us over the years: https://github.com/processwire/processwire-requests/issues/456 https://processwire.com/talk/topic/30138-page-classes-diving-into-one-of-processwires-best-features/?do=findComment&comment=242737 https://processwire.com/talk/topic/25342-custom-classes-for-page-objects-the-discussion/
  5. How to initialize a "custom page" object has also been discussed here before: https://processwire.com/talk/topic/25342-custom-classes-for-page-objects-the-discussion/ and is also discussed in this request at Github: https://github.com/processwire/processwire-requests/issues/456 I'd love to see an "officially supported and recommended way" of doing this.
  6. Sure, I also do that ? Thanks a 1000000 for sharing one of your modules again!
  7. Important to note that that module is no longer being maintained in favor of its commercial follow-up: https://processwire.com/store/login-register-pro/ Note that Ryan's modules are worth their price, and they are also secure. One can save a significant amount of time and receive quality support for the price. Compared to almost all other PHP CMS/CMF options out there, ProcessWire requires the least amount of time and effort when upgrading the system and its modules. You can keep a ProcessWire site online "forever" without the fear of it not being updated. The only driving force to update a ProcessWire site that is running fine is to keep up with PHP deprecations. Other than that, there are no maintenance tasks to perform if you are okay with a particular ProcessWire site. By purchasing the most important modules from Ryan (modules most important to you), you also support the continuous development of the system. At least that's how I look at it ?
  8. My recommendations for those who might be wondering...: I can also recommend even the free and public content of this site: https://refactoring.guru/design-patterns/php And if you have an actual task to solve, ask chat ChatGTP 4+ what it can recommend. And always ask it for more design pattern "ideas" since the random first one it recommends might not be the one that solves a particular problem best. After you have discovered the possibilities then sites like refactoring.guru and others can help with concrete implementation examples.
  9. @ryan That sounds promising, quote: TinyMCE for Open Source We recognize that the GPL may not align with the needs of certain free and open source (FOSS) projects. In response, we are introducing the TinyMCE for Open Source program that will provide a custom license to qualified open-source projects. This custom license will permit the use of TinyMCE 7+ in open-source projects with a license that is incompatible with GPLv2+. To apply for the Tiny for Open Source Program, please fill out and submit an application "there".
  10. I wonder what you exactly mean by that...
  11. Just a wild guess, but did you also try it with a different PHP version? Newer or older main PHP version?
  12. Perhaps it's not that it "does not get assigned" at all, but rather that it isn't assigned when your code expects it to be, because it hasn't been assigned yet?
  13. Hello Ivan, What do you mean by that? See: https://nativephp.com/docs/1/digging-deeper/databases
  14. https://nativephp.com/docs/1/getting-started/introduction "NativePHP is not a GUI framework. We don't want to tell you how to build your app. You can choose whatever UI toolset makes you and your team feel most productive." "#What's in the box? NativePHP comes with a bunch of useful features out of the box, including: Window management Menu management File management Database support (SQLite) Native notifications" What can I build with NativePHP? Honestly, anything you want. The only limit is your imagination. Now for building Windows apps too: https://github.com/orgs/NativePHP/discussions/278
  15. I would put it over here, on its on page: https://processwire.com/docs/start/install/ I put it on my todo list but I cannot promise anything as I hardly have free time these days.
  16. It would be nice to have a documentation page that lists all possible causes and fixes for this general error message. The forum is littered with requests for help regarding this issue, but I think in development mode there could be a link to a ProcessWire documentation page that actually helps to resolve it. There isn't an infinite number of things that can go wrong, and I think it would be possible to list them all, or at least almost all.
  17. I developed my first websites using SilverStripe. I did like it, but if a site was complex, upgrading to a new main version was not straightforward at all, and one had to thoroughly test everything to make sure all was good. I am glad I found ProcessWire afterward.
  18. If anyone sticks to using a version of PHP that old, I think they should also be okay with not upgrading modules.
  19. https://weekly.pw/polls/ Which PHP version are you hosting your ProcessWire sites on? (December 2020) PHP 5.6 or anything older than that (3.1%, 4)
  20. @netcarver Thanks! How about also adding robots.txt with User-agent: * Disallow: / plus <meta name="robots" content="noindex"> to head?
  21. Bad news for all of us: https://github.com/tinymce/tinymce/discussions/9496 "....we have decided to release TinyMCE 7 under the GNU General Public License Version 2 or later, abbreviated as GPLv2+..." To see why this is pretty bad news, read: https://github.com/BookStackApp/BookStack/issues/4908 BTW, I am a happy admin user of BookStack which is highly recommended! Now BookStack and ProcessWire share the pain of TinyMCE moving away from MIT :(
  22. Cross reference: https://github.com/processwire/processwire-issues/issues/1882
×
×
  • Create New...