Jump to content

bernhard

Members
  • Content Count

    2,884
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by bernhard

  1. @ryan any news on this? It works really great in my setup and I think this approach can open up a lot of great options for a better DEV/LIVE workflow with processwire. In my current project where I modified the core file it was really just doing a git clone myrepo.git git submodule update --init --recursive # restore db dump And I had a working copy of the site that downloaded all assets on demand while working with it! This is really awesome but it would break on every core update. I could implement some hack that does a str_replace and file_put_contents in my dev environment to prevent updates breaking this feature, but it's really just adding three underscores to one core file thanks to the ingenious hook system 🙂 PS: I've created an issue for this: https://github.com/processwire/processwire-issues/issues/954
  2. $wire->addHookAfter("InputfieldForm(name=form-application)::processInput", function($event) { $form = $event->object; /** @var InputfieldForm $form */ if(count($form->getErrors())) return; // do your stuff $input = $event->arguments(0); }); Something like this? See https://processwire.com/api/ref/inputfield-form/process-input/
  3. This module will log information about all mails that are sent via WireMail to the PW logs https://github.com/BernhardBaumrock/RockMailLogger https://modules.processwire.com/modules/rock-mail-logger/
  4. Another little helpful update: Added support for colDef callbacks. Before: col = grid.getColDef('id'); col = RockGrid.colDefs.rowActions(col); col = grid.getColDef('created'); col.headerName = 'Datum'; col = RockGrid.colDefs.date(col); After: grid.getColDef('id', function(col) { col = RockGrid.colDefs.rowActions(col); }); grid.getColDef('created', function(col) { col.headerName = 'Datum'; col = RockGrid.colDefs.date(col); }); The benefit is that before if the column did not exist for whatever reason (eg the column is hidden for some users) the JS broke and stopped execution because "col" was undefined and setting options on an undefined column definition doesn't work.
  5. Just added support for Fieldsets. They work a little differently than normal fields, because they need a corresponding _END field. Now if you create fieldsets in your migration those fields will automatically be created and automatically be added to a template: Upgrade: // create tab and add it to invoice template $f = $rm->createField('dunningtab', 'FieldtypeFieldsetTabOpen', [ 'label' => 'Mahnwesen', ]); $rm->addFieldToTemplate($f, 'invoice'); // create semple field and add it to this tab $f = $rm->createField('invoiceinfo', 'FieldtypeRockMarkup2', [ 'label' => 'Info zur Rechnung', ]); // add it after the field "dunningtab", before the field "dunningtab_END" $rm->addFieldToTemplate($f, 'invoice', 'dunningtab'); Downgrade: $rm->deleteField('dunningtab'); $rm->deleteField('invoiceinfo'); This will remove your field from all templates where it is used and also remove the corresponding closing field 🙂
  6. It's all in the facebook docs: https://developers.facebook.com/docs/plugins/comments/
  7. The newest version of RockGrid now supports RockFinder2 as data source 😎 $finder = new RockFinder2(); $finder->find('template=basic-page'); $finder->addColumns([ 'title', 'body' ]); $this->setData($finder); Data is available on the JS side via the RockFinder2 property in the GridItem object:
  8. In RockFinder2 I'm hooking into ProcessPageView::pageNotFound: https://github.com/BernhardBaumrock/RockFinder2/blob/master/RockFinder2.module.php#L127
  9. No, but on a second thought I got that my screenshot is not exactly answering your question... A shop module could totally make sense in a separate tab (menu item) even for superusers. I'd have to think more about that. A quick idea would be a redirect module that adds custom menu items for some users that actually live somewhere else? I think AOS has a similar feature.
  10. I think it's great to have all modules under "Setup" for Superusers and for clients on bigger sites/apps you can separate modules into several sections:
  11. Offtopic, but have you (@zeka) had a look at RockFinder and RockGrid? And the upcoming RockFinder2 and RockTabulator? 😉
  12. Hm... For whatever reason the halt() method is protected and can therefore only be called from within the class or derived ones. Passing $this to the function does not work and I don't know of any solution other than using die() or exit() in this case. Or just let the function return false and halt outside in that case: function foo() { if(...) return false; echo 'foo bar'; } if(foo() === false) return $this->halt(); echo 'something more';
  13. Hi @tpr any chance we can get a fix for this issue in AOS as long as it is not fixed in the core? https://github.com/processwire/processwire-issues/issues/812#issuecomment-520855872 Thx 🙂
  14. I've never used url segments in the admin myself. You can always use url parameters though. Only thing you have to keep in mind is that PW strips off all parameters except the ID parameter when a user is not logged in and wants to visit yoursite.com/yourbackend/yourmodule/?id=1&foo=2&bar=3 which would mean he would be redirected to yoursite.com/yourbackend/yourmodule/?id=1
  15. Can we see your executeRefresh() method? Maybe it's just a typo? I'd try "foo" + "executeFoo" instead of "refresh" - maybe it's a reserved word for whatever reason or conflicting somewhere else?
  16. Thx, fixed in 1.1.5 True, but I won't fix this as it's not critical and I want to focus on RockFinder2 + RockTabulator 🙂
  17. I just had a quick look and the description "best of both worlds, WYSIWYG + pre-defined blocks" sounded great 🙂
  18. Yeah - I've too often had to build complicated RockFinder queries and came up with this quick&easy solution one day and couldn't believe I didn't think of it earlier 😄 Don't tell anybody, but I've just started developing RockFinder2 with a new syntax that will be even easier to use and more intuitive and powerful 😉
  19. That's a good idea. Though I'm not sure if non-technical users totally understand what that means or what is going on. I agree. I just had my first statement in an open browser window and did not submit 🙂
  20. I'm always happy to improve, thx 🙂 I was thinking of that... Then I thought it might make sense to put all those little admin "bugfixes" in a module that we can install on any site. But then I thought that's basically the same as AOS, so maybe it would be something for @tpr ? And it seems that @adrian already has such a module that he installs on every site that fixes issues that ryan has not fixed for a longer time? Maybe it would make sense to open such a module up for the community for collaboration? Or maybe this would be counterproductive as it would seduce us to quick-fixing things and not properly file issue reports and wait for ryan to implement it?
  21. Ok, I get your points and agree. What do you think of displaying the url directly under the title field and show an edit icon that takes you directly to the settings tab? I think this would make it more obvious to the editor that changing the title does NOT change the url while it gets a lot easier to change the url even when the field is "hidden" under the settings tab.
  22. Are you using markup regions? Those can lead to unexpected output sometimes.
×
×
  • Create New...