Jump to content

bernhard

Members
  • Posts

    6,671
  • Joined

  • Last visited

  • Days Won

    366

Everything posted by bernhard

  1. I think there's nothing that can't be done with RepeaterMatrix, but I like two details: The live preview is nice (not related to this field) Writing text directly to the field and only insert blocks where needed is definitely a nice improvement for the UI when you are writing lots of text. In a recent blogpost that I wrote it was quite tedious to use repeatermatrix' different types because sometimes I just needed one line of text to introduce the next block and I always had to create a new repeater matrix item. In those scenarios it would be great to just start writing and insert blocks where needed. A CKEditor field with HannaCode tags is similar but also not as good as your example imho.
  2. Just wanted to share a blogpost by myself about my master thesis that I'm writing at a great little company based in vienna and specialised in earth observation related things and geoinformatics called EOX: https://eox.at/2018/01/visualizing-geotiff-tiles-with-openlayers/ In (very) short, this is how WMTS works now: this is what we do: and this is what we analyze (finding the "break-even" when it starts to make sense using this approach): Maybe this might especially be interesting for you, @Mats ?
      • 7
      • Like
  3. thx, now I get it
  4. thanks for that tip! sorry, dont't get it
  5. https://stackoverflow.com/questions/5479073/when-is-it-good-to-use-pass-by-reference-in-php https://www.elated.com/articles/php-references/ So I think you have to decide on your own taking into account performance and code readability.
  6. @FrancisChung is there a reason why you reacted "sad" to my above posting?
  7. This is exactly what can be done with the migrations module. It totally depends on his usecase what is the best option. That it is not maintained does not mean that it does not work It's only some helper functions around pw's API - and you know how often the api changes... almost never Maybe copying over site profiles is the best option. But maybe he needs more flexibility then the other options could be handy. And maybe he wants to maintain all of those websites lateron, then site profiles would be totally useless whereas migrations could be shared across the single instances and modify them as needed.
  8. Not to forget there's also the migrations module: https://modules.processwire.com/modules/migrations/ https://processwire.com/blog/posts/introduction-migrations-module/
  9. Agree, but I can't see any of them on the linked site. Yes Thanks for the discussion but I don't want to bring us too far offtopic
  10. I know the test-site ( http://isit.pw/?url=https%3A%2F%2Fwww.integrify.com%2Fcustomers%2F ) but I don't know how the testsite works either I can't find anything indicating that it is PW other then the /site/templates/ urls and I'm just not sure if that is proof enough...
  11. What tells you that this is PW? The /site/templates/ urls?
  12. I'm not a fan of site profiles... That's why I created ProcessWire Kickstart. I created another explanation of how you can use it in szabesz' linked topic:
  13. ...or create one kickstartfile and run it: <?php return [ 'pw' =>'https://github.com/processwire/processwire/archive/dev.zip', 'profile' => 'site-default', // could also be a custom profile url from gitlab 'settings' => [ // usernames + passwords ], 'recipes' => [ function() { $this->installModule('TracyDebugger', 'https://github.com/adrianbj/TracyDebugger/archive/master.zip'); }, function() { $this->installModule('DemoModule1', 'url1'); }, function() { $this->installModule('DemoModule2', 'url2'); }, function() { $this->installModule('DemoModule3', 'url3'); }, function() { // create pages or do whatever is possible via pw api // you could also change settings in config.php here }, ], ]; Then it is literally just one click! You could create one master kickstartfile and then just comment out the recipies that you don't want. I think this is a really, really powerful and timesaving method. Also it will always download the latest versions of all the modules. I don't get why there is no almost no response at the dedicated forum thread. Seems that nobody gave it a try so far...
  14. Hi and welcome to the forum. Have you looked at kongondos Multisite Module and my recently published Kickstart module?
  15. thx - I'm using the console for 99% of such tasks
  16. Just wanted to say that I really love the new copy&paste feature in ckeditor. Really a great timesaver and so much more comfortable to work with!
  17. For reference, copy&paste for images is finally in the core: https://processwire.com/blog/posts/pw-3.0.87/
  18. Hi gerald, another Austrian here Adrian's modules are such great timesavers, indeed. But be careful using $pages->delete() as this is irreversible! You can also use $pages->trash() to have one extra step and then click on "empty trash" if you are sure everything is fine.
  19. Thanks, I've already used VIEWS for some of the operations, but the problem I had was that the definition of the view was done inside phpmyadmin and this was totally unmaintainable! See here: So maybe there are better tools for such tasks? Not only is the definition of the view a 1-line-string but also I cannot add any comments to it. My "dynamically created views" that I have now are far better to read and can also use php (variables and functions). The latter would not be possible using standard views, would it? I'm talking about something like this: <?php // demo-sql-query.php $year = 2018; $months = ''; for($i=1; $i<=12; $i++) { $months .= ",(SELECT month_$i FROM demo WHERE year = $year) AS month_$i"; } $sql = "SELECT id $months FROM pages LEFT JOIN ... WHERE ... "; // result SELECT id ,(SELECT month_1 FROM demo WHERE year = 2018) AS month_1 ... ,(SELECT month_12 FROM demo WHERE year = 2018) AS month_12 FROM ... The problem with that technique is that it is always hard to debug since you have to execute the command and you cannot just click on the view in phpmyadmin. Thats why i created the processmodule to list thos "views". So i just select "demo-sql-query.php" and see the resulting table ("view") But I'm totally open to better solutions and learning new things.
  20. hi @Clément Lambelet and welcome to pw and the forum you can also use a queue to split the work into several junks, either with your own technique or using this module: https://modules.processwire.com/modules/wire-queue/
  21. Today I had an idea and wanted to try out if that could work... A little later I had a little module as a working prototype and I want to share it with you to start some discussion: Idea: The idea is to have a simple interface that provides some helpers for copying/modifying/deleting elements in any HTML page. For now it is bundled to processwire but generally it would be possible to use this tool combined with any HTML that you provide. Why? I think that mockups can really speed up development and - maybe even more important - can also serve as a tool for better communication between us and our clients. There are several tools for this usecase but all that I know (like https://pencil.evolus.vn/ ) have a totally different look and feel than the final software has. So I thought why not use the look and feel of ProcessWire when developing something for ProcessWire? I've built some simple mockups sometimes with my browsers devtools and this works - but it is not really fast (and therefore not fun). Thats why I started this module today. Usage: After installation the module monitors your mouse and highlights all hovered elements inside the #main div. Then you have several keyboard shortcuts: c --> copy element r --> remove element arrow left --> previous sibling arrow up --> parent element arrow right --> next sibling arrow down --> first child e --> edit content with ckeditor ctrl + enter --> save edit Quite selfexplaining, isn't it? Roadmap/Vision: Save/Load For now the module does not save anything. You can modify content as you like and then do a screenshot, but of course it would be great to save your mockups somewhere. And continue work afterwards. Undo/Redo UI-Element Library It would be great to have a sidebar with common pw elements like inputfields and buttons to add via click to your mockup. Copy feature from other sites For example you could copy markup from any other website (like the UIKit docs) and paste that markup to your mockup. Or you could open another site in the pw backend that has UI elements that are similar to your needs and just copy them over. Use it with any HTML The module could be packed into a single JS file and then be used to modify any HTML content (like themes from themeforest or the like). This would be an awesome tool for creating quick mockups of any page, moving around elements, copying things, removing items, changing texts etc. Download: You can download the module here: https://gitlab.com/baumrock/RockMockup (have a look at the code, it's really really simple and everybody is welcome to contribute!) Use ProcessWire Kickstart for a One-Click-Installation: <?php $password = $this->randomPassword(); return [ 'pw' =>'https://github.com/processwire/processwire/archive/dev.zip', 'profile' => 'site-default', 'settings' => [ 'timezone' => 368, // vienna 'dbName' => 'yourdbname', 'dbUser' => 'root', 'dbPass' => $this->randomPassword(), 'admin_name' => 'youradminurl', 'username' => 'youradminusername', 'userpass' => $password, 'userpass_confirm' => $password, //'dbTablesAction' => 'remove', // overwrite existing tables? ], 'recipes' => [ function() { $this->msg('Installing RockMockup...'); $this->installModule('RockMockup', 'https://gitlab.com/baumrock/RockMockup/repository/master/archive.zip'); $this->succ('RockMockup installation completed'); }, ], ]; What do you think? Would you use such a tool? Do you maybe know any existing tools that do a similar thing?
  22. [offtopic] you know that tracy has the bd() option to dump beautifully highlighted and collapsible variable dumps? Do you still have a question? I cannot really follow your --edit-- junks
  23. Just pushed a little update that makes the definition of recipes easier, see this sample: <?php $password = $this->randomPassword(); return [ 'pw' =>'https://github.com/processwire/processwire/archive/dev.zip', 'profile' => 'site-default', 'settings' => [ 'timezone' => 368, // vienna 'dbName' => 'yourdbname', 'dbUser' => 'root', 'dbPass' => $this->randomPassword(), 'admin_name' => 'youradminurl', 'username' => 'youradminusername', 'userpass' => $password, 'userpass_confirm' => $password, //'dbTablesAction' => 'remove', // overwrite existing tables? ], 'recipes' => [ function() { $this->msg('Installing RockMockup...'); $this->installModule('RockMockup', 'https://gitlab.com/baumrock/RockMockup/repository/master/archive.zip'); $this->succ('RockMockup installation completed'); }, ], ]; I also added this video to the first post to demonstrate how easy it is to use (I think all the screenshots may have made the impression that it is complicated)!
  24. and finally this one: As you can see I was not able to fix this... Maybe you find some helpful informations in those posts though.
  25. @Pixrael the summary is basically: Do a really bad job before with lots of foreach etc and then refactor everything to proper sql statements that join the related data together in a fraction of the time At least I'm on step two of "make it work, make it fast, make it pretty" Jokes aside: The background is that I have quite some performance issues with my CRM - there is an admin page that lists all projects and all their revenues. The revenues are themselfes pages with additional informations (like type of revenue (internal/external/etc), date and so on). This way it is possible to do all kinds of great stuff with that data (fake data here): Listing all those related items is not so easy, thats why I used regular PW api before, looping all projects, summing up all related revenues etc.; And of course that is terribly inefficient. But a lot easier than setting up SQL queries with joins, sum(), concat() etc... Since all the joins etc. are quite complex I created a little ProcessModule that will be part of my Datatables module (planned for this year) that lists the queries instantly, makes it possible to combine different views and - what stants out from regular sql tools - can interpret PHP. So you can for example create custom db views with variable setups: Resulting in this PS: Just realized that this topic went quite far from the initial title (best query for pages->find() ), so I'll change it. @adrian 's suggestion was of course on spot of the old thread title
×
×
  • Create New...