• Content count

  • Joined

  • Last visited

  • Days Won


fbg13 last won the day on June 24

fbg13 had the most liked content!

Community Reputation

325 Excellent

About fbg13

  • Rank
    Sr. Member

Recent Profile Visitors

1,060 profile views
  1. .foo is another tld they they force https on, here is a blog post by google https://security.googleblog.com/2017/09/broadening-hsts-to-secure-more-of-web.html
  2. https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/
  3. The 2018 Guide to Building Secure PHP Software
  4. What are you doing here then? Go use django, we wont stop you.
  5. You don't need an extension, just add vscode://file/%file:%line to tracy. https://code.visualstudio.com/docs/editor/command-line#_opening-vs-code-with-urls
  6. If I understand correctly you require the interface in the main module, but not in the sub module were you implement it. Maybe you need to require it in the sub module.
  7. Did you add namespace ProcessWire; to your interface?
  8. @SamC your $imgOptions is null since it's not in the function's scope. The code works because $options is ignored if null. https://github.com/processwire/processwire/blob/57b297fd1d828961b20ef29782012f75957d6886/wire/core/Pageimage.php#L377 You can check function test() { return $imgOptions; } var_dump(test()); just replace $imgOptions with wire("config")->custImages in your function
  9. You can add your own properties to $config $config->customProperty = "whatever"; $config->prefixName = [1, 2, 3];
  10. Have you tried $config->urls->httpAdmin ?
  11. The get method generates the cache if no cache is found, if you pass it a function/closure. And with a hook (on page save or wherever it makes sense for your use case) you can generate/update the cache.
  12. You can pass a function to $cache->get and it will generate the cache for you $expiration = 3600; $cache->get("cache_name", $expiration, function() use($page) { $markup = "<div>$page->title</div>"; return $markup; }); https://processwire.com/api/ref/cache/get/ https://github.com/processwire/processwire/blob/57b297fd1d828961b20ef29782012f75957d6886/wire/core/WireCache.php#L136 Edit: Read again and I think that is not what you want. To prevent the cache being generated by a visitor you can generate it in a hook, depending on when you want the cache to update.
  13. I think just $form->login_submit = "???"; should do it. $wire->addHookAfter('LoginRegister::buildLoginForm', function($event) { $form = $event->return; $form->description = false; $form->login_submit->value = "???"; $event->return = $form; });
  14. You can use $start = microtime(true); // code to test echo microtime(true) - $start; // or log the time $log->error("code xyz took: " . microtime(true) - $start); to find which part takes the most time to execute. http://php.net/microtime
  15. Update the AdminThemeUikit module too.