Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by tpr

  1. If someone could create a PR that would be nice, I don't have my personal notebook with me for a few days (that is, no PHP :)).
  2. Ok fair, but that could work for a module version 🙂
  3. Unless view was restricted to the user who created the content (or to role).
  4. It's in AdminOnSteroids.php file 🙂 https://github.com/rolandtoth/AdminOnSteroids/blob/master/AdminOnSteroids.module#L2582
  5. Only tried by dragging an invalid filetype to the fields. I now tried a trickyPNG.svg file and the backend responded with 500, perhaps it's a success? 🙂
  6. Sorry for the delay - apparently no, I set the allowed extensions to "svg" and a "png" file wasn't accepted (even when setting field "Closed + Load only when opened (AJAX) †"): [Allow SVG only for field 'images'] ?field = "images" extensions = "svg"
  7. I think it's doable with AOS, check the FieldOverrides feature: https://github.com/rolandtoth/AdminOnSteroids/wiki/FieldOverrides
  8. Thanks for the update. This implementation is a bit weird to me: // Get previous URL segment $prev = $input->urlSegment('=bar'); Perhaps a new urlSegmentBefore() (and after) or a second parameter would be more readable.
  9. Sounds good, although I'm not sure when I could get to it. If it's an easy PR please go on, I'll check then 🙂 (typo "unter" in your previous comment 🙂)
  10. You would just need to add test files to your module, not the whole testing module. You or someone who is interested could install the tester module and run the tests. I can think of data saving and retrieval tests that could be tested on the backend. Frontend (e2e) testing us another thing, I used Cypress a few times but there are many other available. With Cypress it is easy to simulate user inputs and interactions. I can spend some time to set up a simple test if you wish, so you could use that as a base. But it is easy enough to just get started with the official docs.
  11. Not my business (and no offence) but have you considered adding unit tests (there is none in the repo)? This is a sensitive area where accuracy is crucial, tests could improve the overall quality a lot. I can recommend ProcessNetteTester if you don't have any other preferred. In general tests for user supplied modules in PW are very rare (perhaps close to zero as I know, including my own modules), although it would be a sign of quality if there were some conditions to only accept modules with tests to the modules directory.
  12. So are you creating a new image for this effect? If so, have you considered using CSS backdrop-filter? https://css-tricks.com/almanac/properties/b/backdrop-filter/
  13. tpr


    You definitely took it at face value 🙂
  14. tpr


    Try pulling your mask bit lower 🙂
  15. The naming of "has" sounds a bit unintuitive to me as well, since it involves getting a true/false, so it can lead to confusion when reading the code where the returned id is used. Maybe something like this? (somewhat similarly to the C# TryGetValue()) $pages->tryGetId(selector);
  16. I usually supplied "translation keys" instead of the default translation to translation functions, and translated them in all languages, eg. __('btn_submit') instead of __('Submit'). This way they rarely needed to be changed, only when the translation changed to something completely different.
  17. Glad it helped. I know it can be a powerful feature even though I haven't had a chance to use too much. You may also take the relatively new built-in extended template overrides into account (available when $config->advanced = true). But that would need another template to use so AOS is more flexible.
  18. Sure, because they are field settings. This feature wasn't tested and used too many times (by myself) but when I opened a local PW site I usually use for testing, the following was filled int he FieldOverrides textarea in AOS: [Enable any markup in any CKEditor] ?field = "inputfieldClass=InputfieldCKEditor" useACF = 0 usePurifier = 0 Apparently it works, but it's important to know how. AOS is loaded in the admin only, so if you override a field like this, you won't see useACF=0 if you dump the field settings in the frontend (eg. with Tracy). But in the admin the value is overriden, so you can add any markup and it will be saved to the DB. On the contrary, if you decide to remove this override later on, the data won't be changed in the DB automatically unless you re-save the page again.
  19. That sounds me rather as an issue with vex dialogs, are their features rely on animations somehow? Edit: perhaps this? https://github.com/HubSpot/vex/issues/285
  20. There's no harm but then I would have to modify the current submodule toggle (and role setting) behavior. The idea was to enable/disable a submodule in the top section and hide the corresponding settings section below. If I would remove the "show if" conditionals to show all settings, one wouln't know whether the submodule he is configuring is enabled or not (without scrolling to the top to check). Perhaps the easier solution would be to add some kind of text or icon to indicate the on/off state.
  21. Here I added some code snippets that may help:
  22. Isn't AdminOnSteroids pagelist tweaks suit your needs? https://github.com/rolandtoth/AdminOnSteroids/wiki/PageListTweaks Show pagelist actions on full row hover: makes pagelist actions visible on hovering anywhere in the pagelist, not only on the page title
  23. I've checked on a site that was using .latte extension and a rather old module version (0.3.7). After the update I had to re-add the admin template check, otherwise I got errors complaining undefined variables, that I set in ready.php. public function ready() { if ($this->wire('page')->template == 'admin') { return; } In theory this could also work: 'autoload' => 'template!=admin', but unfortunately all pages go 404 because PW doesn't find template files (I guess). Furthermore there's a simpler way to set fuels, so the entire "fuels" array item in the getDefaultData() could be deleted: $view->fuel = $this->wire('fuel')->getArray(); I removed the ignored templates module setting and there were no errors. First I emptied and saved it to make sure it's removed from the db. With these settings this particular site was working OK (Tracy as well). Unfortunately I don't have any other sites locally on my computer to but I can copy prod sites and check (all uses .latte).
  24. Thanks, these seem to be useful updates. I'll try to try things out on the weekend. I wouldn't mind if somebody could take over this module. I'm doing asp.net and angular things nowadays and I don't plan to go back to php, and I have no time to jump back and forth, unfortunately. I started a major rewrite that affected filters and macros, namely I built a separate module that contained helper methods that could be used separately and by Latte as well. I added a great number of unit tests (via ProcessNetteTester) but the overall project was halted because of time. I can handle this over as well, though that one is really a time-consuming one 🙂
  25. Thanks @porl, I need to allocate some time to check the updates, which is not an easy task because I'm outside of the PHP world nowadays. It would be great if the excluded templates settings could be eliminated. What I'm concerned is that does it work OK with setting template extension to .latte besides .php as well? Plus since you were changing latte.php, wouldn't that mean update issues?
  • Create New...