Jump to content

Chris Bennett

  • Content Count

  • Joined

  • Last visited

  • Days Won


Chris Bennett last won the day on May 12

Chris Bennett had the most liked content!

Community Reputation

81 Excellent

About Chris Bennett

  • Rank
    Jr. Member

Recent Profile Visitors

733 profile views
  1. Thanks to the excellent feedback from @matjazp , have re-vamped way the whole module works. Minimizes potential conflicts and was just a better idea. Now draws CSS variables, conditionally loaded source CSS and framework CSS together to generate single minified CSS file, with version control link to refresh cache for other pages. Only occurs when the module is visited, as it should, and after that other pages draw the minifed CSS straight from cache. Now loads in parallel with other CSS. at somewhere around 30ms, same as other CSS files. First load (in the module itself, n
  2. https://github.com/chrisbennett-Bene/AdminThemeTweaker Inspired by @bernhard's excellent work on the new customisable LESS CSS getting rolled into the core soon, I thought I would offer up the module for beta testing, if it is of interest to anyone. It takes a different approach to admin styling, basically using the Cascade part of CSS to over-ride default UiKit values. Values are stored in ModuleConfig Module creates a separate AdminThemeTweaker Folder at root, so it can link to AdminThemeTweaker.php as CSS AdminThemeTweaker.php reads the module values, constructs th
  3. Weird edge case, which has me scratching my head. Background: API-added button to delete selected files exhibits (maybe) weird behavior when save is triggered by custom js. As soon as the InputfieldSubmit field is there, it intercepts/captures the javascript trigger instead. Almost like validation or as if it's acting as an anchor. It definitely seems like the inclusion of that InputfieldSubmit causes the unexpected (by me) behavior. Have tried multiple different workarounds to troubleshoot: deleting trigger does nothing deleting hook does nothing moving Inputf
  4. Hi Kaz, I am by no means an expert. It *could* be a problem with the actual server variables, had a little "fun" with that end, working out what had changed when Siteground made some changes. In my case, setting the timezone properly (again) solved my server problem. Re: config my locale mirrors yours with the exception of setting $config->timezone as well. $config->timezone = 'Australia/Brisbane'; setlocale(LC_ALL,'en_AU.UTF-8'); Hope you get it sorted, sorry I can't be of more assistance.
  5. Thanks Bernard! The mobile preview bit is from the first pw module I am preparing to release into the wild, very shortly, FaviconMagic. Been using it for many months now, but wanted to make it shinier and stress test it before offering it up. Was complicated a little by the background admin styling, which is from another module I plan to release into the wild shortly ...have been using and tweaking it for around 2 years now, since we discussed admin theme tweaking strategies. Just tweaking FaviconMagic now, adding features and trying to break it so I can make it better. Plannin
  6. Many thanks Horst, confirmed my thinking. After happily and messily playing around, a tiny voice deep in my memory whispered "sandbox" ...sheesh. Been a while since I played around with sandboxed iframes, but the little voice from the past was right. Simple addition of sandbox to the iframe automatically prevents get/set of cookies. So I could get it doing what I wanted by adding: <iframe sandbox="allow-same-origin" src="..."> Apologies for not remembering sooner, I will be busily head-desking over in the corner now πŸ˜‰
  7. Edit: Belated memory that iframe sandbox exists, so there is a simple way to provide page preview as guest. <iframe sandbox="allow-same-origin" src="..."> Prevents get/set of cookies and scripts by default, so simple workaround. Drawback is that little things like your js dark mode etc won't be active either, but for simple preview needs bit easier than the other things I unsuccessfully tried. Page preview as guest from within admin... is there an easy strategy? If any wise heads have any ideas for how I can "log out" only from the iframed link or if there is a query I can
  8. Slight adjustments to enhance use for 2021 and to remind me how I can make it work when I forget and need to use Google as my offline memory
  9. Very much appreciate the tip. Had taken a look with code inspector, but must have stuffed up my typing, then tried way too many other potential options. Next time, if in doubt I will use Tracy to confirm. Can't believe I didn't think of that, Saturday afternoon brain is not working as well as I would like. Many thanks again!
  10. Thank you Adrian, I love your work. Tried variations similar, but obviously not the right combo. You rock!
  11. Having no joy trying to find out how to trigger InputfieldRadiosFloated on InputfieldRadios via api for module. Basically just want same as Radio Button Column options on "normal" field. Guessing at what the magic words might be has not got me far πŸ˜‰ Figure it has to be do-able, and is probably easy, just can't work out how. Any help pointing me in the right direction, or at a good run down of the options in general would be very gratefully accepted.
  12. 2021 update These things change and get tweaked over time, as stuff always does. We can make the size declaration a little more relevant. Declare a selection of sizes for your svg to "encourage" chromium-based browsers to use it instead of the larger bitmapped 192x192 and other assorted icons. We also need to thread the needle to ensure app start icons don't get confused and end up with an icon that is smaller than desired. Declare it last, after your png fallbacks - last one that is suitable size *must* get the nod. Counter-intuitively, declare that your svg is 150x1
  13. Many thanks @BillH, I will certainly investigate that thread further, it expands on some of the snippets I tried unsuccessfully along the way. In the meantime, I lucked upon the thread below, thanks to Bernard posting, which got me a lot further along the path. Still experimenting, with a fair degree of success so far, but not yet ready to claim it is "solved". Enjoying learning more as I go. Module I am playing around with - mainly to force myself to learn more about how everything really works - is an attempt to recreate what I am already using (via normal admin page, a couple of fi
  14. Thank you @bernhard, @adrian and @kixe for this thread and the very timely thank-you note from Bernard that pointed my in a far more productive direction with regards to my question from yesterday: Had been playing around with hooks to try to achieve my goals but this has made things a whole lot better and a whole lot easier. I kinda figured there had to be a way to hook into the form build process, but without this thread I would have remained lost for much longer as I played around the edges. My very grateful appreciation to all!
  15. Hi all, I am going round and round in circles and would greatly appreciate if anyone can point me in the right direction. I am sure I am doing something dumb, or missing something I should know, but don't. Story of my life πŸ˜‰ Playing round with a module and my basic problem is I want to upload an image and also use InputfieldMarkup and other Inputfields. Going back and forth between trying an api generated page defining Fieldgroup, Template, Fields, Page and the InputfieldWrapper method. InputfieldWrapper method works great for all the markup stuff, but I just can't wrap my head aroun
  • Create New...