Jump to content

bernhard

Members
  • Posts

    6,674
  • Joined

  • Last visited

  • Days Won

    367

Everything posted by bernhard

  1. Hi @phoros and welcome to the forum, interesting read! Would be interested what your concerns have been. I love PW for many reasons, but I've also come across situations where I wished there was some kind of content-builder to give editors more flexibility than just different fields (where PW is awesome). There are several approaches for that already and I've built something like this several times already, but it still does not feel right, because you always have to start from scratch. Seeing all those fance marketing screencasts about wordpress click-click magic I got a little frustrated from time to time, because building such functionality in pw needs a lot of time and effort - which means lots of costs and a disadvantage in terms of business. So I'd be happy to hear some more details about the problems that gutenberg brings in. Thx
  2. If you are developing modules I'd recommend changing .module to .module.php so every ide from every user will recognize it ?
  3. Thx @MoritzLost! Could you please explain the benefit of using composer compared to packing things into a pw module?
  4. And a fourth: $this->wire->pages I prefer this version because you don't need to activate functionsapi (and the functions api should not be used in module development), it is multi instance proof and I get IntelliSense in my IDE Don't know which one is the best in terms of performance...
  5. Hi eelkenet, nice find! Thx. Could you try adding this fieldtype here, then I could push an update: https://github.com/BernhardBaumrock/RockFinder/blob/master/RockFinder.module.php#L70 You can do a PR or just paste this line of code here in the forum. But I don't have a version to test here at the moment.
  6. 1 + 2 yes, but this one sounds strange. But it depends a lot on how you plan everything. I'd start with a simpler module first to get familiar with module development. This one would be a nice project to start with: You'd have some user input (teaser: image uploads can be tricky), some methods to generate markup, http requests via the API, but not all the complexity that you have in your full blown module. I'd always be available for help on the road ?
  7. I've used Nette image functions for that once I needed it: https://doc.nette.org/en/2.4/images#toc-image-modification but your linked library looks more advanced ?
  8. Sounds like a job for https://modules.processwire.com/modules/admin-restrict-branch/
  9. Nice, was it easy to create the extension? Do you have any good links for tutorials for us?
  10. 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 https://processwire.com/blog/posts/processwire-2.6.7-core-updates-and-more/#new-core-files-for-site-hooks 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... https://github.com/ryancramerdesign/Helloworld Process modules They are used to build custom admin pages in the backend. See my forum + blog post to get a quick introduction. https://github.com/ryancramerdesign/ProcessHello
  11. I don't think so, I think the best option would be a pull request ?
  12. Maybe also there. The preview was also wrong on the client side, so there's something more to change in the js file.
  13. 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 ?
  14. 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...
  15. I've added a section about how to grab the latest updates of processwire when you already have the setup shown in this tutorial.
  16. Anybody of you ever came across this error? Seems to be a problem of PHP FPM: https://github.com/php/php-src/pull/3363 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.
  17. 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: https://github.com/BernhardBaumrock/FieldtypeRockGrid/tree/master/plugins#creating-custom-plugins; I don't know why your css classes are overwritten, sorry. See the readme here https://github.com/BernhardBaumrock/FieldtypeRockGrid/tree/master/coldefs And a very simple example https://github.com/BernhardBaumrock/FieldtypeRockGrid/blob/master/coldefs/fixedWidth.js You can then just use col = RockGrid.colDefs.yourColdefName(col); in BeforeInit
  18. 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.
  19. 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 http://arnaudleray.github.io/pocketgrid/ to make your life easier.
  20. I could maybe do that for RequestLogger over christmas...
  21. Thx for sharing that @Beluga! Do you think the aggrid core team could be interested in your solution? Maybe they can implement it somehow?
  22. We also have the language alternate fields. On mobile so you might want to use Google
  23. Adrian please save your time and forget about the open in new window stuff. The new options are much better!
  24. I've just created a frontendtheming module that does take the source files of uikit (in a separate module to be up-/downgradeable), injects custom LESS files as you want and parses it on the fly with a PHP less parser. That works really well. It's not something I can release soon, but maybe someone wants to take the same approach for the backend theme. Just had a look and this approach would also be possible for the backend as Ryan is also using LESS to compile the pw backend css: https://github.com/ryancramerdesign/AdminThemeUikit/blob/master/uikit/custom/pw.less https://github.com/ryancramerdesign/AdminThemeUikit#uikit-css-development-with-this-admin-theme
  25. Thx arjen, I like tutorials that show things step by step, including possible warnings, how to read and how to fix them. Shortcuts are nice when you have some experience but they can be a pain in tutorials... Having said that, I also have to admit that I'm still just scratching the surface of GIT and I like to do things step-by-step myself ?
×
×
  • Create New...