Jump to content

bernhard

Members
  • Posts

    6,671
  • Joined

  • Last visited

  • Days Won

    366

Everything posted by bernhard

  1. I read your message as "thank you for your help". You are welcome. A better practice than sending massive amounts of spam emails and logging all of them without cleaning up the logs from time to time? Sending only necessary mails. And cleaning up the logs ?? Or a better practice than complaining about free and open source modules? Helping to debug things and then trying to add improvements and creating a PR ? You could for example add the option to cleanup the mail log automatically after x days or after y logged mails...
  2. Just find the correct logfile in /site/assets/logs, rename rock-mail-logger.txt to rock-mail-logger-bak.txt and then create an empty rock-mail-logger.txt and see if that changes anyting in behaviour.
  3. Hi @fruid I don't think that my module causes this as I'm simply using PW's logging features. You can try renaming the log to something different and using it with a subset of the real data. Then copy over junk for junk and see if/when the error starts to occur. Not sure if that's the right thing to do with 504 errors but that could bring more insights.
  4. Loving it ? You can't do that ? What is it? https://github.com/quilljs/quill ? https://github.com/summernote/summernote/ ? Also, some insights on that part would be especially interesting ? Fingers crossed for a smooth transition! Thx for all your great work!!
  5. Yeah I agree it's quite a hidden feature. Similar to the double-click-delete on files/images... I think there has been some discussion about it some time. Maybe it was a github request, don't know ? But a note would certainly not hurt here ?
  6. Thx for the screencast ? Can't you do a SHIFT+CLICK to select all from the first click until the last click?
  7. v2.1.0 adds a totally revamped module config and changes the way some assets are loaded - if you used some RockFrontend magic and notice something is not working any more after upgrade make sure that all necessary features are enabled and all necessary assets are loaded: If you find anything that should be added to those settings let me know! @dotnetic ?
  8. As you might have noticed I try to improve my frontend skills ? And now that I have RockFrontend I can invest on all those little details that are tedious to implement but always the same. One of those things that has always annoyed me is switching the main navbar to the mobile menu toggle and vice versa. How do you do that? I've always done that using breakpoints (simply using uk-hidden@m / uk-visible@m) or using custom breakpoints. The problem here is that the main menu might change due to user input. Or it might change in width due to changing the language. The PW backend uses a JavaScript solution that shows the menu as long as there is enough space and shows the burger if not. Is that a good solution for a real website? Any tips on how to best implement that? Would be using the ResizeObserver be sufficient? Thx for your input ?
  9. Robin's module is more flexible but needs more setup. That's why I created my plug&play module. And the UI is a little different.
  10. No readme yet but could do exactly what you need: Upload images in one central place and then pick one of them on the related page: https://github.com/baumrock/RockImagePicker If you have any questions or find issues let me know. If you find time to write some instructions / screenshots for the readme that would be great ?
  11. Thx @nbcommunication for the module. It looks great. It's my first time using responsive image sizes (shame on me) and I have a question: I'm using this ruleset: On a 500px screen with 1x pixel ratio this loads the 640 image. Great. But on a 2x pixel ratio screen it always loads the 2048 image. Not so great ? Can I somehow tell my browser to load a 1280 (2*640) image on 500 pixel screen?
  12. Thx adrian totally forgot about that setting since it's always enabled for me ? Seems to work now and was an easy fix: https://github.com/baumrock/RockFrontend/commit/eafe6b9bf46150101723c5dfa874ce0412dee47e
  13. Thx, it has already been running all the time ? Just tried without it and same issue. What about adding a $config->noTracy = true config setting that makes sure that tracy is not loaded if the flag is true? I could maybe set that on runtime and it could also be nice to have on production servers maybe?
  14. Hey @adrian I get the following error when using Tracy with RockFrontend's live reload feature: Failed to init module: TracyDebugger - Tracy\DeferredContent::sendAssets() called after some output has been sent. Output started at /var/www/html/site/modules/RockFrontend/LiveReload.php:147. This is the line in question: https://github.com/baumrock/RockFrontend/blob/5f6c822f2f561f7b0d90d46e05eb66d2964d7dbd/LiveReload.php#L147 This is how I'm loading the livereload class: https://github.com/baumrock/RockFrontend/blob/5f6c822f2f561f7b0d90d46e05eb66d2964d7dbd/RockFrontend.module.php#L122-L131 It needs to be loaded before session start. I guess Tracy does not like that ? Any ideas how to fix this? Can I somehow tell Tracy not to load for that requests?
  15. Ok then it's not about loading order, then I guess that UIKit.modal() does only work if the modal has some content. If your modal html element does not have content then UIkit.modal(el).show() throws an error, so you either need to make sure that you have some content in your modal or that you show it only if the modal is created properly: <?php if ($page->id == 1): ?> <script> let infoShown = localStorage.getItem('infoPopup'); if(!infoShown) { let modal = UIkit.modal('#modal-center'); if(modal) { modal.show(); localStorage.setItem('infoPopup', 1); } } </script> <?php endif; ?> Maybe you need to change the IF condition to if(typeof modal != 'undefined')... btw I copied your code and you had a space before the .show(): That might also cause problems...
  16. This would be the cleanest imho: $photo = $item->get("image_" . $categorie); You could also do this: $property = "image_" . $categorie; $photo = $item->$property; Or this $photo = $item->{"image_" . $categorie}
  17. I don't understand what you are trying to do. Could you explain that a little more please? I understand parts of what you said but not everything and details are important ? Maybe you can provide a real example of what you have and what the expected output would be.
  18. Update 2022 Custom backend design is very easy now! See https://github.com/baumrock/AdminStyleHello (waiting for a PR to be merged) Continuous Integration is very easy now using https://github.com/baumrock/RockMigrations Data Listing is possible using RockGrid (commercial module, PM me if interested)
  19. The reason for this error is that your code having "UIkit.modal..." is executed too early (before UIkit is available). You need to make sure that you load UIkit before adding the script that shows the modal.
  20. Well, that's a totally different story then. Your explanation was a little short, so I did not realise we are talking about a field of an image rather than a field of a page... I've at least posted an update that forces the first alfred argument to be a Page. And if you provide something else you'll at least get a better error message: I don't know of any good way to render the editor interface just for one single image (or even a field of that image) so I don't think what you are trying to do is easy to achieve.
  21. Thx @MarkE I've modified the behaviour of isActive() so that it treats the homepage different than all other pages. It does now only mark the homepage active if the currently views page is the homepage (id=1). I have not hat that case until now but I think that makes sense 99,9% (maybe 100%) of the time since the homepage would otherwise always be "active" (as any page is a child of the root page), which is likely not what we want. Thx for the input ? Sorry I still don't get it I think. My menus always reflect the page tree. If I want the "home" menu item on the same level as child1, 2 and 3 I simply output it above: <ul> <li><a href=/ n:class="$page->is('/') ? 'uk-active'">HOME</a></li> <li n:foreach="$home->children() as $item"> <a href="{$item->url}" n:class="$rockfrontend->isActive($item) ? 'uk-active'"> {$item->title} </a> </li> </ul> Is that what you are talking about? Not always. If no sort order is specified, they will be in id order (I think) - which is fine if you created them in the order you want. If you specify "sort=sort" then the top level will be correct, but lower levels will get mixed in - see I think you are making things more complicated than they need to be. $page->children() already return the children in the admin sort order. So if you call $page->children() recursively in your menu than the menu perfectly reflects the page tree. https://processwire.com/docs/selectors/ So the problem might be that you are using $pages->find() or maybe that you apply a selector to page->children() ?! For me $page->children() did a perfect job without any extra magic ?
  22. Could you please explain that in detail? This is one of the things that a really believe should not be built custom for every project. They should be done in a place where we can share logic across project and simply call the function that should work everywhere. What I also do not understand: What do you mean by reflect the page tree hierarchy? And what are the custom page class methods for? Doesn't my menu version do the same just without those helper functions? If I call $page->children() then they are already sorted in the correct order, no?
  23. Thx, I'm also very happy with it ? Sure! I don't understand. ALFRED's whole purpose it to have an easy frontend editing interface when inline editing does not work or is not appropriate... What do you mean? Yeah that's an issue with UIkit not with ALFRED ? But you can customize the toggle of your lightbox, see https://getuikit.com/docs/lightbox#component-options It's not obvious to me that this does not work. What exactly is wrong? Maybe you are just missing quotes in your alfred call? Or is is the issue with the lightbox that might be solved with the solution I showed above?
  24. Hey @flydev ?? I see that your style has the same issues that I had to tackle when building the rock style: First, the notices have some (in my opinion) unnecessary spacing: Second, the content tab should not have margin-left: I just tried and when adding this line on top of your LESS those issues (and maybe others) are gone: @import "../../../../wire/modules/AdminTheme/AdminThemeUikit/uikit-pw/styles/rock.less"; And finally one thing that is not related to the rock style: Tooltips are not the best in terms of contrast ? PS: Installation worked like a charm ?
  25. Sure, RockFrontend just injects a CSS variable "rf-grow" to the root element and updates it on window resize. Then you can use regular (and easy to read and understand) CSS to define min/max values with fluid behaviour: https://github.com/baumrock/RockFrontend/blob/bcec0efcfba2036b26997ac7f2648300e978ee82/RockFrontend.js#L29-L48 <video style="width: calc(200px + 300px * var(--rf-grow))">...</video> That means: Min width = 200px, Max width = 500px, fluid in between ? That's all the magic! That's outdated as of 11/2022 - now RockFrontend does everything with CSS only (and some math / calc) ?
×
×
  • Create New...