Jump to content

bernhard

Members
  • Content Count

    3,532
  • Joined

  • Last visited

  • Days Won

    115

Everything posted by bernhard

  1. Hi @gornycreative this could work, yes. But I guess there would be 1000 edge cases that could make that setup fragile. I've used Kickstart on almost all installations for the last couple of months years ๐Ÿ˜ฒ and had no problems, but for example on my new live server I get a 500 (though the installation works afterwards, but I have to clean some files manually... likely a permissions issue). What I'd really like to have is some kind of simple and solid kickstart that installs RockMigrations and can then do whatever you want. Yeah, you always get the latest versions of PW and all the modules and you stay flexible in the setup (just comment out unneeded modules).
  2. v1.0.8 improves the readme (had no section about getRows() ๐Ÿ˜ฎ ) and adds a nice shortcut $finder->groupBy(): https://github.com/baumrock/rockfinder3#getting-data Getting data When using a regular $pages->find() you get a PageArray as result. When working with RockFinder we don't want to get the PageArray to be more efficient. We usually want plain PHP arrays that we can then use in our PHP code or that we can send to other libraries as data source (for example as rows for a table library). getRows() This returns an array of the result having the id as key for every array item: $finder = $rockfinder ->find("template=cat") ->addColumns(['title', 'owner']); $rows = $finder->getRows(); db($rows); Having the id as item key can be very handy and efficient to get one single array item via its id, eg db($rows[1071]): getRowArray() Sometimes having custom ids as array item keys is a drawback, though. For example tabulator needs a plain PHP array with auto-increment keys. In such cases you can use getRowArray(): https://github.com/baumrock/rockfinder3#predefined-methods Predefined Methods At the moment there is one shortcut using the string modification technique for grouping a result by one column: $finder = $rockfinder ->find("template=cat") ->addColumns(['title', 'owner']); $cats_by_owner = $finder->groupBy('owner', [ 'GROUP_CONCAT(title) as title', ]); db($cats_by_owner); Another example could be getting averages: $finder = $rockfinder ->find("template=cat") ->addColumns(['title', 'owner', 'weight']); $cat_weight_by_owner = $finder->groupBy('owner', [ 'AVG(weight) as weight', ]); db($cat_weight_by_owner); Of course you can combine both: $finder = $rockfinder ->find("template=cat") ->addColumns(['title', 'owner', 'weight']); $combined = $finder->groupBy('owner', [ 'GROUP_CONCAT(title) as title', 'AVG(weight) as weight', ]); db($combined);
  3. Very interesting ๐Ÿ™‚ Have you thought about using https://www.chartjs.org/ or https://apexcharts.com/ ? (not meant to be a recommendation, it's really just a question why you chose SVG and if you are happy with that and why...) ๐Ÿ™‚
  4. Yes, but it's not streamlined and also not in the docs. Just grab the tabulator instance (open devtools and inspect RockTabulator variable) and do whatever you want with it ๐Ÿ˜‰
  5. Great looking site as always! What tool is this? ๐Ÿ™‚
  6. I really like the input api variable syntax: https://processwire.com/blog/posts/pw-3.0.125/#input-api-variable-upgrades $q = $input->get('q', 'text'); +1, just a little note that you don't need the ELSE and you could also do an include to keep things organized: if($config->ajax) { include("your/ajax/file.php"); $this->halt(); // or use die() } // your template code regarding $this->halt() vs. die() see https://processwire.com/blog/posts/processwire-2.6.8-brings-new-version-of-reno-admin-theme-and-more/#new-this-gt-halt-method-for-use-in-template-files
  7. Hi @kater I've just added support for RockFinder3: https://github.com/BernhardBaumrock/RockTabulator/commit/b41362bbc4ffa29785fdfab6462ebaaabdabef41 Usage is the same as with the oder rockfinders, though the commit also includes an example ๐Ÿ™‚
  8. Could you please elaborate what you mean by "can't make it work"? Also the statement "seems like it's great for visualising results" shows that you may have misunderstood what it is or does, because it is really not for visualising data but for FINDING data ๐Ÿ˜‰ It does exactly what you state you need: Finding data and returning a plain array in a performant way. Visualization can then be done however you want. RockTabulator is a little cumbersome, but tabulator.info is great and you can easily build a custom integration that renders thousands of rows. You don't even have to use RockFinder as data source, you can also use a custom ajax endpoint to get junks of data: http://tabulator.info/docs/4.6/data#ajax-progressive Many options, but I'd really be interested in the part "can't make RockFinder3 work" ๐Ÿ˜‰
  9. This is a great concept, thanks for creating a module for it - have to try that soon! ๐Ÿ™‚
  10. = I have not thought about that, but it's a good idea and easy to implement. = I have not thought about that and I'm not willing to add any other services. ? ๐Ÿ˜‰
  11. Hi @Mats thx, this has been on my wishlist for quite some time ๐Ÿ™‚ Have you thought about also integrating other services like https://www.pexels.com or https://pixabay.com ?
  12. @psy Could you please try to get https://github.com/BernhardBaumrock/tabulator.test running - then we'd have the same environment wich would make debugging / helping a lot easier!
  13. Hi @psy Does it work if you change that to ->addColumns(['title', 'booking_status']) ?
  14. Hey @dotnetic could you please change the translation of "move" from "bewegen" to "verschieben" ?
  15. Seems that things changed slightly ๐Ÿ™‚ This worked for me today: Translate file /wire/modules/Inputfield/InputfieldDatetime/types/InputfieldDatetimeText.php Set path: /wire/modules/Jquery/JqueryUI/i18n/jquery.ui.datepicker-de.js
  16. Hi @Crowdland Technology Thx for the report - the wrong version compare is fixed in v1.0.7 ๐Ÿ™‚ I'd need more info on that - what is the exact query you used? What is your setup? What is the output (dump+sql)?
  17. Another question: Any ideas how I can transform this: into that: ? ๐Ÿ™‚
  18. v0.0.11 adds support for repeater matrix fields ๐Ÿ™‚ Thx to @aComAdi of https://www.a-commerce.ch/ for sponsoring this update! ๐Ÿ˜Ž $rm->setMatrixItems('your_matrix_field', [ 'foo' => [ 'label' => 'foo label', 'fields' => ['field1', 'field2'], ], 'bar' => [ 'label' => 'bar label', 'fields' => ['field1', 'field3'], ], ]);
  19. bernhard

    Twack

    Hey @Sebi have you thought of registering $twack as API variable? // in your module $this->wire('twack', $this); // in any template // no need for $twack = $modules->get('Twack'); $general = $twack->getNewComponent('General');
  20. Didn't take that as offense at all ๐Ÿ™‚ Just tried to make clear that I have already thought of that but I don't plan to implement it any time soon. But if anybody would be up for it, I'd be more than happy to assist or to pull the changes ๐Ÿ˜‰ Sorry if that was not clear.
  21. Thx for that report @elabx ๐Ÿ™‚ The other module works totally different. My migrations can be run from anywhere, anytime. That makes it a lot easier to use but of course this has drawbacks. Keeping track of with migrations have already been applied is more complicated. I'm not sure how that could be done exactly. But I have to say that since I'm using RockMigrations I have not REALLY needed such a feature. My main goal was to make the changes as easy as possible. Migrations can always be applied several times so it does not really matter if they have been applied or not. But I'd love to have a good concept for that and since RockMigrations is totally free and open source I invite anybody to contribute and improve it ๐Ÿ™‚ I have lots of other more important things to do. Command line support sounds interesting though. But I'm not sure if that would bring a huge benefit compared to the tracy console. And even more I wonder if it might make a lot more sense to have a command line module that can be used by any other module. Not one that is locked to RockMigrations...
  22. Sorry, of course you get the ids! ๐Ÿ™‚ But you can already be enough depending on your situation. Do you dump lots of data? Or is in-memory an option? What does that mean? How do you know? How does a tracy dump look? Did you follow the docs? https://github.com/baumrock/rockfinder3#relations Did you already read about callbacks? https://github.com/baumrock/rockfinder3#callbacks
ร—
ร—
  • Create New...