Jump to content

bernhard

Members
  • Posts

    6,674
  • Joined

  • Last visited

  • Days Won

    367

Everything posted by bernhard

  1. Great @adrian thank you! Would it be hard to place that Info on top of the request panel and make it uncollapsed by default? It's quite hard to find right now and I guess in many cases that information is the most important information you want to find. And it does not do any harm on regular requests as it will only be shown in redirect bars ?
  2. It's interesting how many seem to not understand me ? I'll try it again! Thx for asking back! First of all Thx @flydev for the screencast. I'm not sure I understand that as it seems to be cropped and also I don't really get why the pasted image is in the footer at the end?! True True! Well it doesn't necessarily have to be CMD+V as you are right, it would be hard to tell which image field to target. Maybe a button to click would be easier/better. Maybe that could only appear if a suitable image is available in the clipboard. Thx - I already tried to explain that I'm not talking about the CKE field but a single core image upload field. But technically that shows that it's possible and we have the pieces already in the core. They would just have to be applied a little differently. --- For everybody who still didn't understand my request: Let's say we created a ticket system. And every ticket has an image field where we can/should upload a screenshot of the issue. Now I open my screenshot app on my laptop and add some arrows, blurs, notes etc. and then I hit "copy to clipboard". Then it would be nice to be able to go to my ticket system and just paste my image into that image field. I agree that this is really not a lot effort to save the image first and then load it from the PW images field, but those little extra steps add up and sometimes they make the difference whether an app feels easy or tedious to use. Now make screenshot click save image to disk think about where to save the image, or even worse add some more clicks to find the correct path to save it open processwire and click load image find the correct image path to load the image from hit upload delete the now unnecessary image from your disk My wish make screenshot click copy image to clipboard open processwire and click paste from clipboard For me this workflow would really be much better.
  3. Hey @adrian I apologise if I'm again asking for something that's already possible. But I don't think so ? I've just added a RockMigrations Tweak that shows WHY a $session->redirect happened in the tracy debug bar. Redirections can be really annoying and hard to debug. You open a page and it does not show up and instead redirects to the homepage. You wonder why... Access levels? Some other redirections in place? I had a look and Session::redirect is already hookable so it's really simple to add some helpful information: You instantly see that I got redirected because of line 36 in Hero.php While it's a very nice Tweak I think this would be much better placed directly into the tracy debug bar. What do you think? See https://github.com/baumrock/RockMigrations/blob/6003cf593b878b80937fa9708f0172a8f9fcfed9/tweaks/RedirectLogger.php
  4. Yeah, I wanted to save that "unnecessary" step and wanted to make sure I'm not missing anything, but it's fine. Thx for your answers ?
  5. Hey @Robin S very cool! Thank you ? I'm wondering how you guys are using this information and why? As you have built a module for it there seems to be a need for it, right? I've always found that interesting to see, especially when I had to deploy something to a live system and wanted to see if there are any active users that might get kicked out by the deployment. But maybe there's more to it? Can that information be helpful in other situations as well? Thx ?
  6. Are you talking about a wrapping <p>content</p> or are you talking about a trailing paragraph: ... content ... <p>&nbsp;</p> ?
  7. Thx! Not exactly ? I just want to create a screenshot and then paste that quickly to my blog. But I want to paste it into an Images field rather then to a WYSIWYG field, because there I have more control over what happens on rendering (eg automatically resize and style it and link the high-res version as a lightbox).
  8. Yeah, that should also be no problem. It just makes things more complicated and takes longer to develop. But if anybody has a need for something I'm happy to accept PRs or custom support requests. Sure! I added a comment to make that more obvious:
  9. For my personal website I need to add many screenshots. I'd like to just save them to the clipboard and add them to my site by pasting it from the clipboard. I know that this is possible in CKE and I guess also in TinyMCE but I want to upload these images directly to an images field. Is that possible? I thought I've seen something like this once, but I couldn't find anything. Also it would be nice to be able to upload images from URL. That's especially handy when migrating content from old sites to new ones. But while writing I realise that for that use case a copy paste feature would also help! Thx
  10. Sounds great. How does the placeholder look like? Or how do we define it? Do you have any helpful screenshots? ? What about GDPR? How would that work with this module? Or is that what you mean by "only load if interacted with"?
  11. Yeah, understand that. That's why RockFrontend does it only if you check a box: And I'm also using prefixes to avoid naming collisions. So for example the favicon field's name is "rockfrontend_favicon". For AdminStyleRock I decided to go a little different route. The field is automatically added to the home template, but it will be hidden unless you are a superuser and really request the field to be visible with an url parameter. The field's name is adminstylerock_adminlogo. I've just pushed that update to the AdminStyleRock dev branch that replaces the old logo-url-inputfield with a new upload field ?
  12. I'd be interested what you mean exactly by "in this way"? Can you please describe this in more detail?
  13. /textilien(/{category})?(/{article})?/
  14. @Robin S just had an issue with your solution that caused some headache. The problem is that "useLanguages" only disables the language UI of the title field, but from the API it is still a multilang field. The problem here is that the field actually shows and stores values in the user's language, which can lead to serious inconsistancies: So it looks like the page's title is "ttt" but for a user with the default language it is actually "test222" I'll report back when I found a solution but just wanted to mention that here in case someone is using that snippet. https://github.com/processwire/processwire-issues/issues/1787
  15. Ok just realised that the "rockshell" alias does not work 100% rockshell db:restore -y --> it will still ask for confirmation, so the -y seems to be ignored. Any ideas why? Update: OK... it is crazy... So if that thing knows it, why didn't it make it right from the beginning?! ?
  16. I'd be a little afraid if that all really works on all students' machines... What if the connection breaks? What if the upload does not work? What if the laptop restarts? etc.. Does that mean the exam is failed?
  17. Seems to be doable as well: https://www.youtube.com/watch?v=1o5PjuPOkgU Your project sounds interesting but challenging ?
  18. That's always a little annoying for me as well. What if AdminStyleRock created a logo field for you and placed it on the home template? Would that be what you want? You could then also move it to your dedicated settings page.
  19. And in contrast to @flydev 's link this is really working for me ? Interesting stuff. Doesn't anybody want to create a Fieldtype for that? ?
  20. No idea. But recently I watched a video that might work for you?!
  21. I have a new favourite alias ? function rockshell() { ddev exec php rock "$1" } WHY? RockShell needs to be run from within the DDEV web container. So usually you'd either ssh into the container and then run "php rock ..." or you'd have to use the command "ddev exec php rock ..." With this alias all you need to do is type "rockshell ..." ? Or don't add any command and you'll get the list of all RockShell commands: Here are all current aliases that I use: # ddev aliases alias ddc='ddev config --php-version=8.1 --database=mariadb:10.6 --webserver-type=apache-fpm --timezone=Europe/Vienna --omit-containers=dba' alias dds='ddev ssh && alias ll="ls -alh"' #alias dd='ddev start && ddev launch && ddev auth ssh -d ~/.ssh/ddev' alias dd='colima start && ddev start && ddev launch && ddev auth ssh' alias ddm='ddev launch -m' # launch mailhog alias ddr='ddev restart' alias ddp='ddev poweroff' alias ddx='ddev xdebug on' alias ddxo='ddev xdebug off' function rockshell() { ddev exec php rock "$1" }
  22. You could add something like this to your module that shows null: if(!$event->return) bd(Debug::backtrace()); The backtrace could have some helpful information what's going on before it is null.
  23. I don't have a real solution, but I have had similar Problems when using multi-instance. I don't think it is a namespace issue. At least in my case this was not the case. In my case the problem came from including some dependencies by using "require_once". At least on my modules I was able to fix that problem by using the PW internal class loader instead of require or require_once. This tells me that PHP seems not to be able to correctly understand "require_once" when it is used from different directories. So for PHP including the same PHP class (eg /foo/wire/MyClass.php and /bar/wire/MyClass.php) looks like including two different things and therefore it will fire the include twice and not only once. This would then lead to such "is already in use" errors. In my modules that was easy to fix, but you can't easily refactor modules that are not under your control. What I'm wondering though is why it works with plain installs and does not with your real life projects. So maybe it's another issue. But maybe my observations help nonetheless ?
  24. Template Engines have helpers for that very common use case. For example when using RockFrontend + Latte you can take your statement and simply add "n:ifcontent" to only output the whole li-tag if it contains content, meaning it will only be output if $page->title contains something: <li n:ifcontent><a href="<?= $page->httpUrl ?>"><?= $page->title ?></a></li> Additional to that you also have other helpers, like n:tag-if that refers not to the whole markup but only to the specific tag you put it on. That's very handy when rendering menus and some items should be linked and others should not be: <li n:foreach="$page->children() as $item"> <a href="..." n:tag-if="$item->viewable()"> {$item->title} </a> </li> Which will output something like this: <li><a href="...">Viewable page</a></li> <li>Non-viewable page</li> <li><a href="...">Other viewable page</a></li> ...
×
×
  • Create New...