• Content Count

  • Joined

  • Last visited

  • Days Won


bernhard last won the day on November 29

bernhard had the most liked content!

Community Reputation

3,050 Excellent


About bernhard

  • Rank

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Vienna, Austria
  • Interests

Recent Profile Visitors

12,185 profile views
  1. bernhard

    I've used Nette image functions for that once I needed it: but your linked library looks more advanced
  2. bernhard

    Sounds like a job for
  3. Nice, was it easy to create the extension? Do you have any good links for tutorials for us?
  4. Agree @Gadgetto what is your goal? What do you want to build? If we knew that it would be easier to help you. You have 3 main options to customize ProcessWire: Hooks in ready.php Very easy, but can get hard to maintain if you have lots of customizations Regular modules You can include your own scripts, libraries, hooks etc. You can modify almost anything you want - for example inject custom scripts, modify rendering of fields in the admin, sending emails on special events in the frontend etc... Process modules They are used to build custom admin pages in the backend. See my forum + blog post to get a quick introduction.
  5. bernhard

    I don't think so, I think the best option would be a pull request
  6. bernhard

    Maybe also there. The preview was also wrong on the client side, so there's something more to change in the js file.
  7. Are you sure your hook gets triggered? Always proceed step by step. I usually start with a hook that only outputs "triggered" via tracy: bd("triggered!"); If you don't see the dump in the tracy bar, your hook does not fire and you have something else wrong (and that's the case here). Try this one and then update the inner code: $wire->addHookAfter('Pages::saveReady(template=product)', function($event) { $page = $event->arguments(0); // your logic here bd("hook fired!"); }); To update your field you don't need "setAndSave", just set your field's value like this: $page->yourfield = 'yourvalue'; That's it
  8. bernhard

    I just looked at it and it not as easy as just changing that value. I've also found that annoying, but I guess the reason is not to get pixelated results...
  9. bernhard

    I've added a section about how to grab the latest updates of processwire when you already have the setup shown in this tutorial.
  10. Anybody of you ever came across this error? Seems to be a problem of PHP FPM: What is my alternative? @adrian we use this method in the tracy request logger, so this might need to be changed! Edit: if (!function_exists('getallheaders')) { function getallheaders() { $headers = []; foreach ($_SERVER as $name => $value) { if (substr($name, 0, 5) == 'HTTP_') { $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; } } return $headers; } } This seems to fix it. If anybody has a better solution please let me know.
  11. Usually it's fine to put everything in BeforeInit. Sometimes AfterInit is needed (for example if you have dynamic columns calculated on runtime). Yes, that's fine. CSS should be loaded automatically:; I don't know why your css classes are overwritten, sorry. See the readme here And a very simple example You can then just use col = RockGrid.colDefs.yourColdefName(col); in BeforeInit
  12. I don't think there is one good practise. There was some discussion about different approaches for page builder like setups lately. Repeater matrix or using regular pages are for sure a good solution.
  13. This stupid bootstrap div class="row" thing is really one of the main reasons why I love uikit's grid system so much. There it is as easy as this: <div class="uk-child-width-1-1 uk-child-width-1-2@s uk-child-width-1-3@m" uk-grid> <div>item</div> <div>item</div> <div>item</div> <div>item</div> <div>item</div> <div>item</div> <div>item</div> <div>item</div> <div>item</div> </div> And you instantly get a nice grid that is stacked on mobile (full with), 2-column on small devices upwards and 3-column on medium devices upwards. No html-row elements and lots of further options (divider, modifying grid item order responsively etc). But as you are limited to bootstrap I guess it might be worth taking a look at to make your life easier.
  14. bernhard

    I could maybe do that for RequestLogger over christmas...
  15. Thx for sharing that @Beluga! Do you think the aggrid core team could be interested in your solution? Maybe they can implement it somehow?