Jump to content

bernhard

Members
  • Posts

    6,671
  • Joined

  • Last visited

  • Days Won

    366

Everything posted by bernhard

  1. You could inject the checkbox via a little JavaScript that disables the form unless the checkbox is checked. It's might be an ugly hack, but it might be the best solution in your case..
  2. I've never used this module yet (so I don't know if that is possible or not), but as you didn't get any answer yet, you might be interested in my forms module:
  3. Sorry, I was unclear here ? I meant maybe I'm misunderstanding him (and why he thinks ProCache is no solution) or maybe I'm misunderstanding what exactly you are trying to build and therefore I do not understand Tom's statement. Is there any standard definition of "highly dynamic site"? Because I think this should be very clear before we talk about possible solutions... Hooks populating cache fields can also save you from hungry db requests, for example...
  4. Hi @Christof Kehr and welcome to the forum. Thx for the hint, I renamed the topic and placed a more obvios comment in the first post. Why should it not be a solution? It's an absolutely awesome tool, bypassing sql and php completely once the content has been cached, so for sure it would reduce your server load drastically. For example if you had 2.000 requests ans content changed 2 times during these 2.000 requests this would mean 2 requests including php+mysql and 1.998 requests serving only the static HTML file ? Thx for the kudos, but I don't think he will need my module for the features he mentioned so far ? RockFinder is great for listings of pages. It is especially built for the coming RockGrid module where you can list thousands of pages in a grid that the user can manipulate on the client side (filtering, instant aggregations etc). It can also be handy for things like CSV export or RSS feeds or the like. Other than that I don't think that it is that useful and the core utilities are perfectly fine (just use pagination and proper limits). ProcessWire is already built with scalability in mind and others have already reported sites handling millions of pages (see here for example https://processwire.com/talk/topic/9491-site-with-millions-of-„pages”/ ). It seems that in your case you are more concerned about the scalability of the infrastructure (requests) than the amount of data handled by the system (pages)?! ProCache will for sure be great: https://processwire.com/api/modules/procache/ Not sure about this one, because the find queries usually are cached, but I don't know exactly how that works because usually you don't have to care about such things as it just works? Maybe I'm misunderstanding you or @Christof Kehr but why do you think ProCache would be no good idea here? Or why should the core cache be the better choice? Of course, ProCache is not the solution to all our problems, but this statement definitely needs a more detailed explanation ?
  5. Jep, and try it in a private window - maybe you have some old session cookies or browser cache / redirects that mess things up.
  6. I've done such a task by using my RockGrid field and connecting it via JS to a Page Reference field. You have a nice UI for filtering and listing items (books in your case) with different columns and you can just select + add them to your reference field. If you are happy with your autocomplete field, great. If not you can contact me ?
  7. very interesting thoughts, thx @Beluga
  8. Hi theo, I was also thinking about how such a PageBuilder could be approached in the last days. No solution yet. I think the challenge is to make it reusable. And I guess it will be hard (impossible) do have a solution that works across multiple css frameworks. I'm thinking of building something like that for Uikit. I'm building all my sites based on it, so that would be a timesaver for me. ATM I have a Matrix-based setup. I've not tried PageTableExtended yet. But I'm also not convinced of the Matrix setup... So I would be happy to hear your thoughts and considerations on this topic.
  9. yeah, the site is in the showcase section: https://processwire.com/about/sites/list/zone-de-ski-de-lestrie/
  10. not sure if that has already been posted, but this is a nice article about pw: https://www.spiria.com/en/blog/website-creation/processwire-trial
  11. Hi @Francesco Mugnai, welcome to the forum and thanks for sharing! I like how you did the gdpr page ? [pub] Also a nice skills page, but it seems that you are missing the Uikit CSS framework ?? [/pub]
  12. hi @asilentwish, not sure, but maybe this module can help you? https://modules.processwire.com/modules/admin-restrict-branch/
  13. Actually I think this should already work. Not enough time to test it, but it should work if you select the old page as source and the new page's repeater page as destination. Only tricky part is to find that page via the page tree - but the existing repeater-copy-action itself should work already.
  14. Hey @adrian today I had to move one repeaterfield with several items into a repeaterfield inside another repeater matrix on another page. I thought I'll have a look at your admin actions module, but it seems it does not support such a special task. I came up with this solution: // $page is the repeater matrix page (found by inspecting the repeater matrix item and looking for the id and then pasting this id manually in the page edit url $page->of(false); $page->quotes->removeAll(); $page->setAndSave('quotes', ''); // pages(123) is the page with the populated repeater foreach(pages(123)->quotes as $old) { $quote = $page->quotes->getNew(); $quote->title = $old->title; $quote->person = $old->person; $quote->body = $old->body; $quote->of(false); $quote->save(); $quote->image->add($old->getUnformatted('image')->first()->filename); $quote->save(); $page->quotes->add($quote); $page->save(); } Not too complicated - I thought I share it if anybody else has the need. Not sure if that would make sense as an action in your module? Guess the need is VERY limited... Thanks again for your great modules! In this case Admin Actions didn't do the job but with the help of tracy I moved the content within 10minutes ?
  15. http://lmgtfy.com/?q=javascript+form+formula You just need some very basic HTML + some very basic JavaScript
  16. glad it helped you @monollonom not sure what would be the best approach here - I think it depends on your situation. PW uses the class "InputfieldStateChanged" for inputfields that where changed. You could either check on the client side (by intercepting click events) or if you want to do some checks on the server you could use sessions (set a session flag on beginning of the creation and check for that flag on every page other than your process module). 1000 possibilities here...
  17. So maybe the upgrades module should get an upgrade to support custom upgrade urls. Does not sound very complicated that when a module has a custom update url, the upgrades module takes this url instead of the default modules directory service?! The "latest version" check would then of course not work, but it could show a link to the repo. And maybe the module could also add a link to a release info page. Would be great to have such a release log in a somewhat standardized way ?
  18. Such a setup might now be even more flexible (and even easier) with the use of markup regions. You could populate regions with widgets easily just by doing something like this: foreach($page->getVisibleWidgets() as $widget) { echo WireRenderFile("widgets/{$widget->name}.php", ['page' => $page, 'region' => $widget->region]); } And the widget something like that: <div pw-append="<?= $region ?>"> my great widget </div> Only thing to do would be the user interface for defining the visible pages, I've done that once like this: https://processwire.com/talk/topic/8635-simple-example-for-widget-management/?do=findComment&amp;comment=148216 Would be nice to put that into a module to make it reuseable! And to add a simple API just like $page->getVisibleWidgets(). If you want to sponsor/outsource that just send me PM. If you want to do it on your own I'm happy to share what I have so far and help wherever I can. Edit: Or maybe just use the selector fieldtype?
  19. @MarcoPLY my comment was for @autofahrn and since he is german he will understand besserwisserisch ? a processmodule might be overkill in your situation. it's more advanced but once you get the concept it makes you more efficient in lots of ways. Regarding your problem: Start with this code and then continue step by step until you get your result. Use d() = dump() to chech the content of your variables. Then you see instantly wheter the variable contains some data or is NULL: $UserData = json_decode($http->get('localhost:8888/playwood/pw_users.json'), true); d($UserData); edit: $http will not work, you can just try d($http); which will show you this error: Error: Undefined variable: http on line: 1 null So you need to do this first: $http = new WireHttp(); d($http); // shows ProcessWire\WireHttp
  20. Put this in your home.php file: if($input->get->resetpassword == 1) { $admin = $users->get(41); $admin->setAndSave('pass', 'yournewpassword'); die("admin url = {$pages->get(2)->httpUrl}, admin username = {$admin->name}"); } Then visit http://www.yoursite.com/?resetpassword=1 and remove this code snippet when you are done!!
  21. In this case I'd create a processmodule ? ? Don't want to be besserwisserisch, really just saying it's very easy to create them and you get a lot of flexibility and features with very little effort. For example a little import site could be as simple as this (available at yourmodulepath/import in the admin): public function executeImport() { if(input()->post->submit) { // do the import $this->import(); } $form = modules('InputfieldForm'); $form->add([ 'type' => 'text', 'name' => 'myinputfieldname' ]); $form->add([ 'type' => 'submit', 'name' => 'submit', 'value' => 'import my data!', ]); return $form->render(); } private function import() { // import logic }
  22. Yep, as @Autofahrn said it's easy to do that via the API and a foreach. But I would suggest using Tracy Console instead of a template. Just create your code, debug it instantly using d() and CTRL/ALT+Enter and then finally do the import when everything works as expected. You can use the Password class to generate new passwords: $pw = new Password(); $pw = $pw->randomPass([ 'minLength' => 10, 'maxLength' => 10, 'maxSymbols' => -1, 'minUpper' => 0, 'maxUpper' => -1, ]); See https://github.com/processwire/processwire/blob/master/wire/core/Password.php#L419
  23. just added the possibility to add custom sql statements easily. that way you can easily do "reverse queries", for example show all projects that have the current page selected in a page-reference-field: Aggregations like sum(), min(), max() should also be easily possible like this, though they might not be as efficient as doing a group_by manually on the resulting sql.
  24. Of course this sounds better, but I'd also be happy with the get variable. Disable tracy on some templates does not work in my case because I'm developing process modules. So maybe the "disable tracy for selected templates" option could also be moved to this panel and away from the module settings (they are getting more and more complex ? ). So it totally depends on you and your spare time and if you think you'd also benefit from such a feature. Again: In my case the get var would be sufficient and I guess this would be a lot easier to implement. Thanks and welcome back ?
×
×
  • Create New...