Jump to content

d'Hinnisdaël

Members
  • Posts

    165
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by d'Hinnisdaël

  1. Untested code, but along those lines: wire()->addHookAfter('ProcessPageEdit::buildForm', null, function (HookEvent $event) { $form = $event->return; $statusField = $form->find("name=status")->first(); if ($statusField) { $statusField->collapsed = Inputfield::collapsedHidden; } });
  2. I think the correct way of doing it is a bit different with newer ProcessWire versions. Try this one: require $config->paths->core . 'admin.php';
  3. @adrian I went ahead and added very basic tab support. Thanks for the nudge. If you want to give it a try, feel free to check out the tabs branch of the repo. Theoretically it supports nesting tabs inside groups and vice versa, however it's largely untested so let me know if you run into trouble. I'd like to do some more testing before releasing a new version. wire()->addHookAfter('Dashboard::getPanels', function ($event) { $panels = $event->return; $tab1 = $panels->createTab(['title' => 'Lorem ipsum']); $tab1->add(/* add panels here */); $tab2 = $panels->createTab(['title' => 'Dolor sit amet']); $tab2->add(/* add panels here */); $panels->add($tab1); $panels->add($tab2); });
  4. Good point about making charts styleable via CSS. My experience has been that most clients and most dashboards don't need charts at all, so frankly I don't think I'll be investing too much time here, but if or when I decide to revamp the chart panel I'll keep that in mind. Adding tabs is definitely on my list. Groups are already supported, so adding tabs should be somewhat trivial. There's possible performance issues to keep in mind when rendering too many panels at once but that shouldn't be a blocker.
  5. @markus_blue_tomato I've noticed that blurhashes aren't regenerated when images are replaced via drag-and-drop in the admin. Have you run into this or is this a known limitation of the module? Best way to reproduce is: clone a page with a populated single-image field, drag a new image into the image field of the cloned page and save. The blurhash still looks like the old image from the page it was cloned from.
  6. Thanks @Robin S, I managed to narrow it down to a specific module. Will file an issue on the repo.
  7. The admin page list seems to be hiding the content of page labels inside square brackets. For a page titled Some Title [old], it will display as Some Title, removing the content inside the brackets. Oddly enough, a page titled Some Title [old content] displays correctly as Some Title [old content]. My guess is that ProcessWire is trying to interpret the part in square brackets as dot-field notation and trying to access a field value. Since there's no field named 'old', it will drop the brackets and everything inside entirely. Is this documented behavior? Can this be turned off? (Tested on latest dev branch, 3.0.171 and 3.0.181)
  8. Accepting arbitrary pages sounds like a nightmare to support. There's really no upside to it that I can see. Linking existing pages via page reference fields sounds much more doable and logical. You'll avoid all those problems you already recognized.
  9. I think your reasoning is sound. Especially for blocks that are re-used across pages (which I didn't have in mind).
  10. I see. In that case creating a custom field would probably be best and have little overhead if it's autoloaded. What's the reasoning behind storing the data on the parent and not on the children? Performance? Storing it on the children, you could use the `$page->meta()` api and avoid the need for hooks since that should be cloned alongside the page. It currently only allows associative arrays and might have a performance penalty as well.
  11. Shouldn't it be enough to associate the styles with the block page's id and make sure cloning a page also clones its associated styles? If you assign a unique id (pgrid_id) to each block but keep that around after cloning, you won't be able to edit the cloned page's styles without it affecting the original page's styles. Or maybe I'm missing a part of the picture here.
  12. It's working great, we're not missing much in terms of features. I think ploi did at some point offer Apache + Nginx but scrapped the option. We're running ProcessWire on Nginx now. It requires some extra work here and there but is running smoothly overall.
  13. Having a sanctioned way for creating "dynamic" routes would definitely be a worthwhile addition to the core. I've settled on creating JSON endpoints as separate templates and implementing the routing inside the template file. Sometimes a switch statement is enough, sometimes FastRoute makes more sense. It tends to be a lot of boilerplate even for simple tasks. I agree with Ryan that piggybacking on 404s is technically correct even though somewhat of a misnomer. It ensures that regular pages always have priority when routing a request. In the case of conflicts with a module, the site has a way of overwriting and customising the routes.
  14. @MarkE There's currently no direct way to do this — the chart data is passed as a JSON blob, so no functions. I've been looking at setting up charts via JS files or JSON endpoints, but nothing concrete yet. I'll probably end up moving the chart panel to a chartkick.js implementation which would allow all of that.
  15. @MarkE Callback function in what context? What's the goal?
  16. There's currently no way of grouping panels in tabs. What'd be your use case?
  17. @schwarzdesign Thanks for reporting. I'm afraid there's no easy solution without changing how the core handles user edit permissions. Currently, the editable() check fails for all processes other than the default page-edit or page-lister ones. That's why it doesn't work in the context of the Dashboard process. See the corresponding source code of PagePermissions.module. I'm not sure why it's done this way and if there's a chance to get this opened up. I'd suggest you open an issue in the official ProcessWire repo to get a discussion started. Checking for user-admin permissions as a special case sounds good but won't solve the problem: the user permissions are a lot more complex when you're handling superusers vs. non-superusers and multi-layer permission systems. There's user-admin-all and any combination of user-admin-[role] permissions we'd have to check manually. It's definitely better than the current state, though. I might implement this in the near future.
  18. +1 for a solid database migration mechanism. Deploying field/template updates to production involves a lot of manual copy/pasting. Having a built-in way of describing changes in database structure would make automated deployments and rollbacks possible.
  19. The module seems stable enough to bump to version 1.0. Notable changes Declare a private namespace, solving install issues Require the latest ProcessWire master version 3.0.165 Add a new panel type Add New Page which recreates the core add-page shortcut menu
  20. We've switched most of our servers to a setup of Hetzner VPS managed via Ploi. I haven't found many differences between Cloudways, ServerPilot, Moss, Ploi, etc. if all you're doing is hosting simple Laravel or ProcessWire sites. The main advantage seems to be speed here — compared to shared hosting, the sites are between 4 to 10 times faster even when hosted on the cheapest Hetzner instance at 3$/month and with security and updates taken care by Ploi. We liked Ploi because it's great at regular backups, has lots of notification channels for automatic deploys and the admin panel is very polished.
  21. Looks great! Thanks for releasing this as a public module. Does this theme do away with all colors? How does it handle warnings and error states?
  22. Does anybody else feel like the login screen could use a revamp? While it might not be the most important thing in the world, first impressions count. On large(r) screens the login form seems to get lost in the upper third. The rest of the admin looks a lot cleaner and more deliberate. A few tweaks would go a long way in making the login screen work on all device sizes. Those are two custom styles I've been adding to my sites lately, one PW-branded and one not. No markup changes needed, just CSS. This second one borrows heavily from Twill's login screen. The floating environment label has turned out to be really useful to see at a glance if one is editing on staging or live. Not sure if there's a way to make this 100% core compatible.
  23. I've gone ahead and created a separate repo for third-party and Pro modules. Looking forward to having forum users test these and contribute with their own translations. daun/pw-lang-de-modules While the list of modules to include is obviously subjective, I've started with the ones my non-technical clients tend to use on their own (in alphabetical order): Dashboard Jumplinks PageListerPro PageLister Actions Delete Email Set field Set status ProcessWire Upgrade ProFields Table
  24. Hi @Mike Rockett, first of all thanks for this wonderful module! Been using this for a while but never stopped by to say thanks. I just sent two pull requests your way I'd love to get your take on. The first one makes the module work well with multi-language sites by adding a hook for modifying the Typographer Settings instance. The second one just updates the underlying php-typography package, while we're at it.
  25. Just a quick note that the above example will need an adjustment if the site uses a non-default asset folder or url. To make this work when serving assets from, say, /data/* or assets.domain.com/v1/*, we can use the path and url settings for the files folder instead of root. if ('url' === $event->method) { $file = $config->paths->files . substr($file, strlen($config->urls->files)); }
×
×
  • Create New...