Jump to content

Jonathan Lahijani

Members
  • Posts

    716
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Jonathan Lahijani

  1. Another question: In Mystique, you are able to detect the page requesting the field, and as a result, modify the fields that actually get displayed. This is very useful because it allows you to have one Mystique field but have it "morph" depending on the context. On my sites, I typically only have 1 Mystique field called 'options'. I then assign that to various templates that need it (even specific matrix-types like for my page builder). Then when the field is loaded when editing a page or a matrix-type, I can "build" the field based on what template requested it because the $page variable is available. My 'gallery' matrix-type/page builder block will have fields that are gallery configuration related, my 'video' block will have video configuration fields, but they are all still technically the single Mystique 'options' field. @ryan So in your example of /site/templates/custom-fields/contact.php, is it able to determine what page requested it?
  2. As others have mentioned, this is quite similar to the Mystique field which I'm a fan of and has the feel of how custom fields work in WordPress (more "on the fly"). I use Mystique for my matrix-based page builder block options which is a great fit. Will consider switching to this since it will be first-party and more integrated. Does it store the saved input data in json as well? I'm guessing this doesn't work with repeaters or images, correct?
  3. @ryan In my original reply to this post I mentioned making PW a bit stronger for web application development. After reading these replies, it seems that a lot of the more intricate techniques that would be desired for advanced use cases are already possible natively, but even those of us here that I would consider highly experienced with PW and OOP are still picking up a few crucial nuggets of information that go a long way in structuring a web application with PW (at least it seems that way). So to elaborate on what I stated originally, I think demonstrating how you would approach some of these advanced techniques natively in PW (showing that a feature request to make it "nicer" is not necessary / technically problematic) in a real working app would be very helpful. I believe you attempted this with the site-invoices profile and building it out further with more web-application-y type techniques would really be great.
  4. @ryan Assuming one were to take this approach, what is the proper/recommended way to load the ProductPageTools.php class file?
  5. With regards to SEO related features, I think that being natively built in to ProcessWire is not the best choice as it goes against the unopinionated nature of ProcessWire. If one were to develop a webapp where SEO is not necessary, those fields would cause bloat. But if this were to be an official Profield, it would be wonderful. Personally, I use the FieldsetGroup Pro field (I gave SEOMaestro a try but it didn't work the way I liked), but since that's now legacy, I will have to switch my approach at some point in the future. It looks like this (note: it used to have XML sitemap fields as well, however when WireSitemapXML came out, I removed them and let that module handle it): If there were to be an new SEO module similar to my screenshot (meaning it supports fields for X, Facebook and other social networks), I would hope it's not officially called "FieldtypeSEO" but rather something like "FieldtypePresence" (ChatGPT helped me with that one) since it's more fitting (it helps improve your site's "presence" via search engines and social media networks). Personally I dislike the word SEO as it represents a lot of what's wrong with the internet and the snake-oil behind it.
  6. Reviving this thread. Let's say I quickly opened 3 different pages in new browser tabs to edit in the admin that each take 10 seconds to load (assume they are pages with a lot of related data and repeater items). Because of session locking, it must load the first page, then after that is completed loading, it will load the second page, and so on. This means there is considerable lag. I believe this is not an issue with ProcessWire itself (regardless if using SessionHandlerDB or file-based sessions), but how PHP does session locking in general to prevent issues. So there's no problem-free way around this... is that still correct?
  7. Making ProcessWire stronger for full-stack web application development, allowing it to become an unassuming alternative to Laravel and Rails but from the origins as a CMS. ProcessWire is the perfect CMS (there's no doubt in my mind about that), and it's actually already quite good for web application development (both natively and with 3rd party modules), but with some enhancements to make it more "batteries included", enhancing page classes and some tooling, ProcessWire can have its feet in both the CMS and full-stack framework buckets in a way that's perhaps unique. I can elaborate on this further as that sounds a little too generic, but I've been developing a web application with PW for over 9 months (it's a very complicated project and it's replacing an existing, in-production system which makes it even more tricky and high-stakes) and when it's done I can share some ideas. This one enhancement alone moved the needle quite a bit in making ProcessWire more web application friendly.
  8. Is this related to the recent polyfill.js supply-chain attack? https://news.ycombinator.com/item?id=40791829 https://sansec.io/research/polyfill-supply-chain-attack
  9. Yes, this is my preferred way to keep Windows around once I fully switch. A better alternative to using Windows in a VM or dual booting. Hardware is cheap!
  10. The larger picture of why I'm doing this is to overall De-Google, De-Microsoft and De-Apple my life as much as possible (surely there will be exceptions). It's not about saving money or privacy (those are very very minor points), but personal optimization, control, me being ready for it, Linux desktop having become really great in the last X years, and taking a stronger liking to FOSS and self-hosting.
  11. Going back to finding the best file manager, I think I'm going to settle on Konqueror (I tried about 7 different ones). I'd prefer to stick with a GTK app, but all the GTK file managers are just too simplistic. I need my tab state saved and none of them do that except for Konqueror (well maybe some do but it's outweighed by other things I prefer to skip like dual-pane file management). KDE apps tends to be advanced user oriented, and in this case, the deep customization capability of the app really shines for what I need. As for TUI and CLI apps, one route I've long considered is switching to terminal-based apps for almost everything and being as mouseless as possible. Before I do that though, I would first want to become comfortable with Neovim and Vim-style key bindings. The problem with that however is I don't type "correctly" (fingers on home row, etc.) so fixing that after 30 years of typign my own way will be... fun. Small incremental steps for now, but after many years of experimenting, I think the "year of the Linux Desktop" has arrived for me.
  12. I wrote about it here to an extent: Indeed. While I don't use laptops, I did have a Intel NUC for a while and that totally drove me insane with the fan whizzing. However a new era is now upon us with Qualcomm Snapdragon X, the non-Apple alternative Apple Silicon. When Framework laptops get this chip and Linux support is 100%, I'm making the switch and saying goodbye to X86 (and Windows).
  13. Yea I was thinking if that was native functionality, it would feel seamless.
  14. Yes yes, DHH's journey is part of what's pushing me as well. I'm following the repo and picking out various tools Omakub is using that seem to fit my way of doing things (ex: Pinta).
  15. Oftentimes I'll have little scripts that bootstrap ProcessWire and do various things. These scripts usually echo out information. However, I'm beginning to start using the Console feature of TracyDebugger as somewhat of a replacement. One thing I'm wondering is if a snippet can work nicely whether I run it with the php command vs. the TracyDebugger console. So for example, I have this in /site/templates/TracyDebugger/snippets/test.php: <?php namespace ProcessWire; if(!defined("PROCESSWIRE")) include(dirname(__FILE__).'/../../../../index.php'); d($pages->get(1)); If I run that in TracyDebugger Console, it outputs nicely due to the d() function. However if I run it with php directly like this: php site/templates/TracyDebugger/snippets/test.php ... it won't output anything. I'm guessing this is because (a) TracyDebugger doesn't run in CLI mode and (b) TracyDebugger is disabled in this state given my settings and (c) the d() function doesn't run in CLI mode. Is there some slick way to do this, or some alternative best practice?
  16. Nice to see Linux users here. As for KDE, even though it's more advanced user oriented (my opinion), I like the polish and feel of Gnome more. Also, I want to avoid the whole ricing thing altogether. My need to tweak is very minimal... just a few changes to satisfy my muscle memory with Windows. The feel of the mouse alone without any tweaks is already a huge win (I abhor macOS mouse acceleration). When System76's new Cosmic is done, I will definitely give Pop_OS! a try (it's based on Ubuntu which is good for me). I bought Affinity Designer last year, so I will try to run that in Wine. In the meantime I've installed a bunch of other graphics programs like Photopea, Vectorpea, Gimp, Krita, Inkscape, Pinta. I'm going to install every graphics software I find! ? I also installed the Segoe UI font and enabled it as the default font for Gnome. Segoe UI is a Microsoft font which is the default font for the Windows 11 UI. This change makes me feel more at home and it still looks great with Gnome (sorry Ubuntu Sans). Seriously, not having to adjust my eyes to a new font is a huge win for me. https://github.com/mrbvrz/segoe-ui-linux One other piece of software that is absolutely great on Windows is XYplorer. It has a bunch of features, but one that I really miss is the ability to tag files with colors (similar to how macOS allows it in Finder). Any file manager recommendations? I've tried many but maybe I'm missing something important.
  17. Over the years there's been a growing part of me that's wanted to be a full-time Linux user. I've been using Windows from the beginning and attempted to switch to macOS a few years ago (given the excitement of M1) however I gave up after 8 solid months because I came to dislike some issues that I couldn't circumvent in macOS. Due to some fear, impatience and most importantly, software compatibility, I have not made the switch to Linux, but times have changed. I've played around with the big distributions (Ubuntu, Debian, Fedora, etc.) in some way or another. I've grown extremely comfortable with Bash, the command line and have the confidence in working my way out of issues (a lot of this is due to the hardware business I was involved with for 7 years which sharpened by skills). I've dealt with installing Nvidia drivers in every which way too (if you know, you know). Whenever Ubuntu releases an LTS version, I tend to experiment with it and I did so last night with 24.04. Really annoying things like not being able to move the taskbar from the left to the bottom without having to use extensions that could break, are now natively supported (IIRC you couldn't do this so easily before). That sounds like a minor nit-pick but if there's something I know about myself, it's that if I don't have to reprogram my muscle memory, I will have an easier time. The mouse movement feels Windows-like (this truly annoyed me with macOS despite trying every program and tweak in existence) and font rendering doesn't seem to bother me as much as macOS. Again these seem like minor nit-pick type things but to me they matter. At this point, it comes down to software compatibility. I'm not some hardcore Office user and I barely use it beyond basic word processing, so that's not an issue. The only other software suite is Adobe CC. I do rely on Photoshop and Illustrator, but not for "creating" but rather tweaking. I've built some muscle memory with those apps as well but I can't let them hold me back. I know Photopea exists which many have raved about being a great Photoshop alternative and which supports PSD quite well from what I've heard. So that's always an option combined with Gimp or Krita if I don't have to deal with actual PSD files. Maybe I'll set up a VM with Windows to help ease the transition. So at this point, there's nothing holding me back. I installed Ubuntu 24.04 on my main system along-side Windows (dual boot). In a couple months, I will try to switch. Any other desktop Linux users here? BTW, I'm sticking with Ubuntu because I like how it's Debian-based. I know there's some disagreements with snaps being used, etc., but because it's the most popular Linux distro and feels polished enough and similar to Windows, it's the best place to start (and maybe stay).
  18. I've created a GitHub issue here: https://github.com/processwire/processwire-issues/issues/1938
  19. I want to set up one of the many self-hosted project management systems that exist, but I haven't really thought about this since the late 2000s (I experimented with Redmine a long time ago). My needs are not intense. It's mostly ticket creation and tracking. What's a good, preferably PHP-based, system that you recommend? Some options: https://github.com/awesome-selfhosted/awesome-selfhosted?tab=readme-ov-file#software-development---project-management
  20. Something I was thinking about today was what are the pros and cons of ProcessWire being "dependency-free" in the sense that it doesn't rely on a separate web application framework? For example, Craft CMS is built upon Yii. Drupal, if I understand the history correctly, switched from their home-grown approach from v7 to Symfony in v8. WordPress is home-grown. ProcessWire is home-grown as well, right? I would imagine the biggest pro is that ProcessWire doesn't have to "answer" to anyone, follow a separate web application framework's opinions and update schedule and things like that. Would ProcessWire be what it is today if it had such a large separate dependency? Of course, pulling off a home-grown way of doing things is a monumental task that requires great skill, but Ryan seems to have pulled it off (which is probably why we're all here). I've come to appreciate this decision but wanted to get the opinions of others here as well.
  21. Hey man, I coined that term! (patent pending! j/k) I would really love to hear your Laravel/ProcessWire experience and comparison in terms of web application development. I too have been working on a very large webapp with ProcessWire over the last 6 months using ProcessWire, Alpine and HTMX (no need for Tailwind since it's completely admin side, although I did nearly completely develop AdminThemeBootstrap as an experiment during this project which I may or may not use in the future on it).
  22. @Robin S Thanks for that detailed example. I actually did experiment with that hook before my post as well, and as your example demonstrates, you kind of have to hack it to show grandchildren in-line with their parents. Sorting then becomes weird because they are technically at different depths. This isn't the best UX. Ideally, if you expanded/opened the "Colors" child page, then it would show it's children "contained" inside of it, in a way that's somewhat similar to nested repeaters without repeaters. I was wondering if native support for the approach I described would be too much of a stretch given how PageEditChildren is currently programmed.
×
×
  • Create New...