-
Posts
6,671 -
Joined
-
Last visited
-
Days Won
366
Everything posted by bernhard
-
Awesome!!! Thanks!! Thought I've read the whole docs and examples and googled for an hour but found nothing... now it will be a lot more fun working on this tomorrow Maybe I should change the topic title to "everybody who can rtfm better than me, raise your hands" ??
-
@MrSnoozles introduced me to aggrid and so far my first experiments where great. Unfortunately I got stuck now when looking at events. I hope someone can help me: I have this sample setup: Data is fetched by @adrian 's findObjects() suggestion. Works great. Custom cell renderers are also easy to achieve (see column "rand") and also custom filters are easy (not visible here). So far, so good. The problem is the last row: I'm using a pinned row and I want to show aggregated data for the columns in that row. Statistics, sums, min/max, average etc.; Coming from datatables.net events there made a lot more sense to me: https://datatables.net/manual/events As far as I understand from the docs of aggrid, I have these events available: https://www.ag-grid.com/javascript-grid-events/ Usage is like this: var gridOptions = { columnDefs: columnDefs, rowData: rowData, enableSorting: true, enableFilter: true, rowSelection: 'multiple', // pinned footer row getRowStyle: function (params) { if (params.node.rowPinned) { return {'font-weight': 'bold', 'border-top': '1px solid #afafaf'}; } }, pinnedBottomRowData: [{}], // events onGridReady: function(params) { params.api.sizeColumnsToFit(); console.log('grid is ready'); }, }; This sucks, because I have no option to attach multiple event handlers to one event. I want my module to be extensible, so for example I want to build a "columnSum" plugin that shows stats of the colum whenever the table is filtered, sorted, rendered etc. In datatables I had the draw() event that fired on the dom element of the table. Having multiple plugins would have been easy, because in each of the plugins I could have added the event listener: // plugin A $('#mytable').on('draw', function() { // do my plugin logic for plugin A }); // plugin B $('#mytable').on('draw', function() { // do my plugin logic for plugin B }); So, can anybody give me a hint how I could do something like $('#myAgGrid').on('draw', function() { // populate all footer cells with statistics // in the screenshot this row has "x" in every column // the "x" should get populated with some html }); Of course, aggrid does not use jquery. It's just an example related to the jQuery datatables way of doing it. Thanks!
-
ProcessWire + RepeaterMatrix + CSS Grid Page Builder Concept
bernhard replied to Jonathan Lahijani's topic in Dev Talk
it is great i switched from sublime -
I don't see any suspicious information in the panel. Only the HTML code of the debug bar is totally bloated. I think the simplest is to test it on your own. I'm running a fresh dev installation with blank profile and tracy v4.9.33 I've just created a page "data" under /home and added 30k pages with the tracy console: for($i=0; $i<30000; $i++) { $p = new Page(); $p->template = 'basic-page'; $p->parent = $pages->get('/data'); $p->title = uniqid(); $p->save(); } Then when I open one of those pages in edit mode the tracy bar takes 10s to load..
-
good guess Debug Mode is also very slow, but only if Request Info is ON. If Request Info is OFF the Debug Mode is 10ms (first screenshot)
-
hey @adrian I'm working on my DataTables module (that might get renamed to RockGrid btw because I'm experimenting with another grid software ) and have 30k sample data pages (basic-page with only title field). When I open such a page in the admin, the page load takes very long (around 10s). I looked at the network tab and saw that the request for initial page load (?id=1017) loads 5.7MB of data. Cookie: pagelist_open=JSON%5B%221-0%22%2C%221016-0%22%2C%221017-0%22%2C%227-0%22%5D; wire=...; wire_challenge=...; tracyCodeError=ERROR%3A+Maximum+execution+time+of+120+seconds+exceeded+on+line%3A+454+in+D%3A%5Claragon%5Cwww%5Caggrid1%5Cwire%5Ccore%5CWireDatabasePDO.php When i switch off tracy the page load is instant. The code for the debug bar is huge: Any ideas which feature of the panel is causing this behaviour? Thanks in advance, no hurry at all with this one
-
Is it possible to use HTML tags in log files and how?
bernhard replied to Juergen's topic in General Support
This community is crazy -
Is it possible to use HTML tags in log files and how?
bernhard replied to Juergen's topic in General Support
I always use pages to log mails... just use a ckeditor field and you can see your html content. Or why exactly do you want to use logfiles? -
https://github.com/processwire/processwire-issues/issues/514
-
pseudocode: // tracy console foreach($users as $user) { if(user admin theme == ..) $user->setAndSave('admin theme', 'uikit'); } you'd need to find out the correct properties and values, but that should not be too hard.
-
Forum software sucks here you got a lot of links from szabesz:
-
I don't know technical details but I think browsers cache this redirections somehow. Try it with a different browser, try writing http:// manually to the url, try adding ?v=1 to your url (with http:// of course)
-
☁️ Duplicator: Backup and move sites
bernhard replied to flydev's topic in Module/Plugin Development
hi @flydev I didn't follow the whole thread. Maybe you want to have a look at https://doc.nette.org/en/2.4/finder and https://doc.nette.org/en/2.4/filesystem; Maybe this makes things easier You could also have a look at Soma's online installer: https://raw.githubusercontent.com/somatonic/PWOnlineInstaller/master/grabpw.php (this is in use for a long time and should be tested on all systems). -
PS: @Robin S I don't think there is a real "eco"system around pw modules by the way. There are some commercial modules, but nobody (except the authors) knows how many people are using them. I don't think this is something that attracts other developers... And it makes it hard for us to estimate if developing/supporting a module is worth the effort (and time) or not. It makes it even harder when it comes to commercial modules. Which pricing should one choose? 10 hours of work devided by 1 user is something totally different than devided by hundreds... Tracking the interest in a module could maybe bring some light into that.
-
Thanks szabesz, I support your request and liked + commented it on github
-
Hi Robin and szabesz, I was actually expecting that something like this would come up. I'm happy about your feedback I'm not sure about that. I can actually only see the number of Events that occured. Nothing else. No visitor information at all. The request is sent with an anonymous client ID, so there is really no data connected to anybody. No cookies are set. Nothing. Basically it's just a counter. I partially agree. I would love to have some kind of pre-screen before a module is installed. Maybe I'm wrong, but I think at the moment we only have the "summary" statement that is shown before installation? It does not support HTML though. I think it would nice to have the possibility to place some statements before installation and also before updating a module that the user must accept. This could be nice in several situations. The user could check a box to agree to data submission, the user could be informed about breaking changes that may be installed with an update, we could show a donation button etc. I don't agree with you here. Actually I do think it is quite the opposite. Trust in ProcessWire is for sure a good thing. In its security, in its features, in its future. But I do not think, that (blind) trust in 3rd party modules is good. As you said, any module author can basically do anything within the instance where it is installed. This may not be obvious especially to unexperienced users. So I think actions/discussions like this support the ecosystem and do not harm. But again, I agree that a "feature" like the install/uninstall tracking should be stated more prominent. BTW: I have 26 likes and 0 installs for RockForms so far, so nothing happened until now
-
How to import table of data into ProcessWire
bernhard replied to Tony Carnell's topic in General Support
https://www.google.at/search?q=site:processwire.com+save+page+multilanguage+api -
You have to read carefully... that's not the same
-
Same here. But as long as this is not implemented I'll do it on my own for my own modules
-
Sury, I'm only tracking installations and uninstallations of the RockForms module at the moment: https://gitlab.com/baumrock/RockForms/blob/master/RockForms.module.php#L13-39
-
Preview/Discussion: RockDataTables
bernhard replied to bernhard's topic in Module/Plugin Development
Offtopic, Tracy praise: You can use d() to dump and if you select some lines in the console only those lines will be executed. No need for commenting out -
Preview/Discussion: RockDataTables
bernhard replied to bernhard's topic in Module/Plugin Development
https://gitlab.com/baumrock/RockSqlFinder is already online. The datatables module is in the works but will need quite some time... -
just added the renderTable() method: $form->onSuccess = function($form) { $form->linkedFields = [ 'pdf' => 'files' ]; $log = $form->createPage(123, 'rockforms_anfrage', date('d.m.Y H:i:s') . ', {forename} {surname} {email}'); $m = new WireMail(); $m->to('your@email.com') ->from('your@email.com') ->subject('Your great subject') ->bodyHTML($form->renderTable()); foreach($log->files as $file) $m->attachment($file->filename); $m->send(); // return success message return '<div class="uk-text-center uk-padding-large">'. '<h3>ENERGIEGURU bedankt sich für ihre Anfrage.</h3>'. '<div>Wir melden uns in Kürze bei Ihnen. Wenn Sie Ihre letzte Jahresrechnung hochgeladen '. 'haben erhalten Sie in den nächsten 24 Stunden Ihr individuelles Angebot!</div>'. $form->renderTable([ 'wrapper' => '<div class="uk-card uk-card-secondary uk-card-body uk-margin">{table}</div>', ]). '</div>'; }; I agree this could be automated, but at least until that is finished it is already REALLY simple to accomplish.
-
Sure, but that's the same for outputting fields in regular processwire templates... echo $page->myfield... You also need to remember the field's name here. I almost wanted to implement the feature right away but I started with the renderTable() method, because it is more important. Also I'm not sure how my idea will work with groups and containers... I have to think about that.
-
$form = $modules->get('RockForms')->form; //$form->addFromTemplate('mypwformtemplate'); // this would result in this initial form setup: $form->addText('forename', 'Vorname'); $form->addEmail('myemail', 'E-Mail-Adresse'); // either by using an email field in pw or by setting the title to email_myemail $form->addUpload('attachment', 'Anhang hochladen'); // using a pw file field with title upload_attachment --> upload_ will set the nette type and the rest will be used as the field's name // then you can adjust your form via nette and do whatever you need: $form->getComponent('myemail')->setRequired(); ... $form->addSubmit('submit', 'Subscribe'); $form->render(); Ok, I can imagine that this can make sense. I'll stick to my 1-file-setup since everybody can use include() whenever the need comes up