Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by gerritvanaaken

  1. One field for each role could cause problems, because a new user might have more than one role. Then: which message do you send? All of them? You would need some complicated conditional logic in the UI. Not all that easy.
  2. Wow, @adrian – that looks good, it might be exactly what I need for my client. I’ll chedk this out in the next few days. Do you have a small hint in which format I set line breaks? $u->emailMessage = "Hello {name}\n\nwelcome to the show"; or better this way? $u->emailMessage = 'Hello {name} welcome to the show';
  3. Is it possible to have different welcome messages for different User-Roles? I use the module via API. Maybe it’s possible to manually choose an email template file for each welcome message, something like this: $u = new User(); $u->name = "foo"; $u->pass = randomPassword(); $u->sendEmail = true; $u->welcomeMessageFile = '/some/path/client.txt'; $u->save() My client has a bunch of different user types that need a variety of welcome texts. Any idea how I could accomplish that?
  4. Thanks for the update! It would be brilliant if you could take a look at two issues that I experience using the new custom image/file data (which were introduced in 3.0.142). This feature seems to be not that stable in repeater context and multi-language context...
  5. @Jens Martsch - dotnetic That is more or less the same that I did. Not pretty, but works:
  6. Here is my final init.php code for bilingual password forgot. if (wire('session')->language) { wire('languages')->setLanguage(wire('session')->language); } $wire->addHookBefore('ProcessLogin::execute', function($event) { if (wire('input')->lang == 'fr') { wire('languages')->setLanguage(7085); wire('session')->language = 7085 } });
  7. I’m such a noob! I used the hook with function parentheses. ProcessLogin::execute() is wrong. ProcessLogin::execute works totally fine. Thanks, case closed!
  8. Hey @kixe Thanks for your answer. However, I couldn’t hook in correctly. I tried every hook from "ProcessLogin". The most suitable seemed "buildLoginForm" or "renderLoginForm", because I want the form itself to be translated. None of my hooking attempts seemed to be executed. This is from my init.php: $wire->addHookBefore('ProcessLogin::buildLoginForm()', function($event) { wire('log')->save('langlog', 'language should be: '.wire('input')->lang); if (wire('input')->lang == 'fr') { wire('languages')->setLanguage(7085); } }); I cannot explain why there is no log entry after visiting mysite.com/processwire/?forgot=1&lang=fr
  9. If my backend has two languages, is there any way to force (via URL parameter?) which language will be displayed on the login page and the password forgot page?
  10. Maybe I’ll just build the language-dependend "show/hide" switch as a hidden field, and then write a little bit of custom javascript to somehow make it very compact in the top right corner. Let’s see how that works out.
  11. Insane! Great, thank you. I submitted a pull request on github, because in my installation the created label was empty.
  12. Of course that’s the obvious thing to do. But it takes a lot of space and makes my (already) complex repeatermatrix items even more complex... Any ideas for "hacking" oder "hooking" into these little icons in the top right corner?
  13. Wouldn’t it be cool to have whole repeater items (or even repeater matrix items) language-specific. Some of my clients do have pages that are 90% identical in German and English, but there are some sections that should not appear in one or another language. I attached a concept screenshot. Would something like this be possible with some simple backend hooks and "hidden checkbox fields"? Or is it way more complicated?
  14. My client could save some time if she could select multiple pages at once. Of yourse, we are using the standard page selector in multi-tree mode, but she has to select one page after another. Each time she has to open the site tree again and open the required subtree, finding the page she wants to select. Would be cool to let the tree open after selecting a page, so she could select multiple pages in one "tree session". Understand what I mean? Anybody any solution to this? Alternatively, maybe the site tree could keep its state with all the subtrees open, when you are re-open it again.
  15. It’s a rather complex thing. We have 7 base types: Text, Teaserbox, Image(s), Video, Divider, Bike Teaser, Download(s), each of which comes with some additional options for the rendering in the template. I don’t know what the "depth" feature is The menu is rather simple, I add the bike images via javascript later, the rest is pretty much a standard menu.
  16. Why not? We thought it looked good and shows the expandability ;-) No, the configurator is a separate application which is tightly connected to the internal "Warenwirtschaftssystem". It’s done by a different company.
  17. Velotraum is a small German manufacturer, building rather costly, individually manufactured bicycles for both globetrotters and everyday bikers. We use RepeaterMatrix for long structured texts, and we use a lot of individual fields for metadata. We even built our own "preview" function for blog comments and included Textile light for blog comments, too. Have a look: velotraum.de
  18. @louisstephens Thank you for your thoughts! Sure, I could use these "nested" queries to gather a "global comments array", which I would to sort by "created" afterwards. But these are too many steps and seems not very performance efficient.
  19. I came up with a pretty "close-to-the-metal" solution. Not perfect, but seems to work: $comments = $database->query('SELECT * FROM field_comments ORDER BY created DESC'); foreach($comments as $c) { // $c is an array with raw database values of those comments }
  20. Hi there! I need to gather a list of all comments, regardless of the parent page of each comment. Is there a global $comments object, which can do this? Something like: foreach($comments->find('sort=-created') as $comment) { // show comment } I did not find anything similar in the forums. Can someone help me?
  21. I’m using the core-embedded TextformatterMarkdownExtra module, but I do not like the autolinking of URLs. Can it be turned off somehow, or do I have to install a custom Textformatter plugin which has this option turned off?
  22. We’ll give the LinkChecker Module a try, once the site is online. Thanks for your help so far!
  23. Very interesting! I will think about that – this ist super-helpful!
  • Create New...