-
Posts
6,671 -
Joined
-
Last visited
-
Days Won
366
Everything posted by bernhard
-
why don't you want to install LanguageSupport?
-
Ah, sorry @flydev I missed that this happens when clicking on the module's page and not during installation. I pushed an update that does the check if RockGrid is available, otherwise it does not add this field (and shows only SQL). The process module is not really helpful without RockGrid, I know, but the day will come where I can release RockGrid ?
-
please try to install the regular module before the process module No, I have a clean installation only with AOS + Tracy and it worked
-
Hi @flydev sorry but I cannot reproduce this bug. I need step by step instructions, pw version etc... It is already there: https://modules.processwire.com/modules/rock-finder/ not sure when it updates, though (it's still version 7 instead of 1.0.0).
-
If anybody is already using RockFinder make sure you have the latest version (1.0.0). Just pushed an update because the previous version didn't work with checkbox selectors because I only used the WHERE part of the original query. I switched now to a join, that should work in 100% of the cases:
-
@dragan do you know adrians admin actions module?
-
You are right, my mod works. Just edited aos.js instead of aos.min.js and that had no effect ? Could you please change both occurances of querySelectorAll('textarea') to querySelectorAll('textarea:not(.noAutosize)') as requested? Thanks!
-
interested as well. did you already read https://www.google.com/search?q=site:processwire.com+sendy ?
-
Ok, I've created a PR that does at least the first part of what I requested: https://github.com/adrianbj/TracyDebugger/pull/22 @szabesz adrian was crazy enough to implement exactly what you requested, so that's is already possible ? @adrian Regarding my PR: Not sure why, but I have an options field that does not show any information about the selectable options in the request info panel. Also I'm not sure how to work with multilanguage fields, as the inputfield seems to be always single language.
-
I'd be in for that ?
-
You can already disable the request panel... And you can disable tracy completely. Don't think there is a need to overcomplicate things where we already have solutions ?
-
thx @Robin S @elabx @flydev This works: $p = new Page(); $p->template = 'project'; $field = $this->fields->get('title'); $form->add($field->getInputfield($p)); I've had an error in my field's config (requesting dynamic data, getting a page via $this->wire->process->getPage(); and that threw an error. I thought I was doing something wrong but with the title field it worked ? Thank you! Edit: This also works: $form->add($this->fields->get('recipients')->getInputfield(new NullPage()));
-
Preview/Discussion: RockDataTables
bernhard replied to bernhard's topic in Module/Plugin Development
Not sure about this on such large numbers. 10k pages per se should be easy. But with hundreds of users..?! Would need a test-run for sure. Maybe caching would be necessary or at least helpful. Are you interested in a closed beta test run? -> pm -
hey adrian, hope you are enjoying your vacation! what do you think of adding a section in the request info panel that shows the code needed for creating this field via api (for example in process module)? $form->add([ 'type' => 'page', 'label' => __('Mail auswählen'), 'derefAsPage' => 1, // single or null 'inputfield' => 'InputfieldAsmSelect', 'template_id' => 73, // mail 'value' => 23669, ]); The request info panel has all the necessary informations: If we had a section "Field code" we could just create fields in the Backend and then copy/paste them in our modules ?
-
301 Redirect for curl (and facebook crawler)
bernhard replied to verdeandrea's topic in General Support
If you set trailing slash to "NO" but facebook requests the page via trailing slash that would lead to a 301, so you need to try both settings. You could also try a browser extension (mine is called redirect path) to see if you have any unwanted redirects on that page. -
Preview/Discussion: RockDataTables
bernhard replied to bernhard's topic in Module/Plugin Development
Sorry for the delay @arjen Don't think there should be any restrictions. My module should not break any functionality that comes with aggrid. Maybe some of my additional tools might need to be adopted to also support enterprise features, I don't know, but the module will be extendible via plugins so you can do whatever you want with it. Another feature that I've implemented is called Batcher. This makes it easy to create batch processes sent via AJAX and execute custom actions on the server. An action can be as simple as that: $this->ajax('trash', function($data) { foreach($data as $id) { $p = pages($id); if(!$p->trashable()) continue; $this->pages->trash($p); } }); And the GUI: var Batcher = RockGrid.batcher; Batcher.items = grid.pluck('id', {selected:true}); Batcher.batchSize = 2; Batcher.action = function(items) { // send ajax request to this grid var ajax = grid.ajax({ action: 'trash', data: items, }).done(function(params) { Batcher.nextBatch(); }); }; Batcher.confirmStart({ msg: 'Are you sure you want to delete the selected rows?', onYes: function() { Batcher.nextBatch(); }, onNo: function() { $(grid.getWrapperDOM()).find('.rockgridbutton.trash i').removeClass('fa-spin fa-spinner').addClass('fa-trash'); Batcher.abort(); } }); Batcher.onStart = function() { $(grid.getWrapperDOM()).find('.rockgridbutton.trash i').removeClass('fa-trash').addClass('fa-spin fa-spinner'); }; Batcher.onEnd = function() { $(grid.getWrapperDOM()).find('.rockgridbutton.refresh').click(); $(grid.getWrapperDOM()).find('.rockgridbutton.trash i').removeClass('fa-spin fa-spinner').addClass('fa-trash'); setTimeout(function() { Batcher.vex.close(); }, 500); }; ? Edit: The screencast does not really delete mails and it's a lot slower than real-life, because the ->trash() operation is replaced by a sleep(1) ? -
301 Redirect for curl (and facebook crawler)
bernhard replied to verdeandrea's topic in General Support
check your trailing slash option and see if that is the reason -
Could you please tell us what you mean by that?
-
hi @stand-ground and welcome to the forum, Because these options are a site-wide config setting and site-wide config settings are placed in the config file, which is stored as /site/config.php - That's how pw is built.
- 1 reply
-
- 3
-
-
I've added 3 new methods to the module: getArray(), getValues() and getPages() and officially released the module as BETA with a dedicated thread: I also added docs for all available methods with examples, here are the new ones: @joer80 see here for what you requested: https://gitlab.com/baumrock/RockFinder/tree/master#custom-sql-aggregations-groupings-distincts @Guy Verville I cannot reproduce your issue - please provide more information with exact steps to reproduce. Please use the other thread for all further discussion.
-
--- Please use RockFinder3 ---
- 88 replies
-
- 14
-
-
-
I don't think so, but I don't care about that any more as the new version works differently and always returns a sorted resultset quickly and efficiently ? Absolutely! By default the finder query would be this: $finder = new RockFinder('template=person', ['title', 'surname']); $sql = $finder->getSQL(); d($sql, [6,999]); Doing the distinct: getting ids (verbose): Selecting only ids by group_by: And finally to get the pages: (btw: the portion of the sql dump is from an outdated version of rockfinder... but it still works) I see those kind of things have been requested several times now and I guess they will pop up quite often (doing aggregations, distincts, group_bys etc). It would be great to have a method for that in RockFinder, so if you have some time I would appreciate a PR making things like this possible: $finder = new RockFinder('template=person', ['title', 'surname']); $sql = $finder->getSQL(); $sql = "SELECT id FROM ($sql) as tmp group by concat(title,coalesce(surname,''))"; $ids = $finder->getArray($sql); $distinct_pages = $finder->getPages($ids); // or $sql = "SELECT id FROM ($sql) as tmp group by concat(title,coalesce(surname,''))"; $distinct_pages = $finder->getPages($sql, 'id'); ?
-
@mattcohen not sure what you are trying to do exactly but you have lots of if/else and duplicates that makes the code quite hard to read. Maybe somethink like this could clean things up a little? $path = '/foo'; $selector['foo'] = 1; $selector['bar'] = 2; $selector['type'] = $sanitizer->text($input->post->type); $selector['limit'] = 100; switch($path) { case '/foo': unset($selector['bar']); $selector['limit'] = 10; break; case '/bar': unset($selector['foo']); $selector['limit'] = 20; break; } d($selector, 'selector array'); $session->tmp = json_encode($selector); d($session->tmp, 'session as string'); d(json_decode($session->tmp), 'session as object'); As you can see I would highly recommend to use d() = dump() or bd() = bardump() in tracy. It's a lot more readable than var_dump() and a lot less effort. See the tracy docs for all the options (maxLength etc).
-
Considering this it might be true in austria: https://euobserver.com/justice/141746. Not sure if you are serious, but that's not what I meant. That's a different topic and I don't think that what we are doing here is good. I also think/hope that is is not legal and will change in the future... But I've no idea about law and politics ?