Jump to content

apeisa

Moderators
  • Posts

    4,623
  • Joined

  • Last visited

  • Days Won

    53

Everything posted by apeisa

  1. Congratulations Ryan and everyone involved! It's always amazing to see these blog posts that gather all changes from longer timeline.
  2. Where is that code? Template or module?
  3. apeisa

    Community Gamers

    I get shivers when I hear Monkey Island tune. That is epic 😊
  4. Looks and works great, thanks @Pete!
  5. Great to see pull requests merged. This will help community and pw greatly!
  6. Not exactly what you are looking for, but similar solution (to a certain level) can be achieved by using a repeater field which then has title ("folder name") and files -fields.
  7. Same here. This is probably windows specific problem - at least in our company it is.
  8. Just my 2 cents: it should throw an exception here - this current logic is not good in my opinion.
  9. Great additions - many of these are things that we have setup our own solutions when hitting performance issues on large scale (10 000+ pages with lots of fields) so it is great to see core supporting this kind of things. Thank you Ryan! Quick note on findRaw - it looks like it doesn't support parent? It would be very powerful to be using parent just like any normal field based page relation.
  10. Yes, thumbs up from here also to focus on bard/editorjs level of "content blocks" instead of full layout editor.
  11. I actually do like the functions api, although using it in one project only. But it doesn't help with selectors, which is where I type most of my tempaltes...
  12. I think this is probably because in Finnish it is pretty rare to see L after P - I think probably only in words that come directly from foreign languages, like application => applikaatio etc. Very frustrating, maybe we should have a module that adds tempalte as an alias for template... 😉
  13. After 9 years using ProcessWire I still do multiple times a day a typo writing template as tempalte (probably write it wrong more often than right). I know few of my co-workers does the same. Is this curse for us Finnish people, or is tempalte thing in other parts of the world also?
  14. It was Kongondo doing maintenance release to old one. But I know Kongondo is working hard to get v2 released.
  15. Yes, I think you are probably right with both of your reasons. I did try to make pagelist work with pagination (it does, but couldn't get limit to be set dynamically, so it follows whatever is set on pagelist module which defaults to 50). It seems that I wont need pagination at all on dashboard (more proof for your point 1), but if the need arises I will definitely take a closer look into it.
  16. Unfortunately I believe there is no best practice and very little tools and helpers regarding testing. I have some experience with Laravel and there testing is first class citizen and is very easy to get started. I think @teppo has done some testing with few of his modules if I remember correctly?
  17. I generally prefer modules not to "pollute" anything with fields and templates. I believe it is also quite a rare need for modules to really to create pages, templates and fields. Of course you generally don't get "turnkey solutions" this way, but more lower level modules and building blocks. For simple example: any modules related to event calendars are just tools to help you build event calendars (render helpers, fieldtypes etc) until they actually create templates and fields for you.
  18. Sound quality is strange 🙂 But your English and articulation is very good, clear and easy to understand! Keep up with the videos!
  19. Ajax upload is not possibility here. I tried to find a cleaner solution than downloading, extracting and filtering json files myself, but final method wasn't that messy so I think it goes (just worried about the edge cases though).
  20. Thanks @kongondo! Never actually used WireUpload - is there way to "attach" it to certain field in a page? If I do $language->language_files->add($urltozip) it just adds the zip without unzipping it.
  21. @bernhard just created a new PR for basic language support (creating new languages and setting translation files for a language). Usage inside migrations is simple: $finnish = $rm->addNewLanguage("finnish", "Finnish"); $rm->setTranslationsToLanguage( "https://github.com/apeisa/Finnish-ProcessWire/archive/master.zip", $finnish->name, ); Or if you just want to set translations to default language: $rm->setTranslationsToLanguage("https://github.com/apeisa/Finnish-ProcessWire/archive/master.zip");
  22. Thanks @teppo Those links you added come handy if the need is add new language instead of update default one. EDIT: I realize that adding new languages was exactly what I asked for in first post. But actually needed only updating the current default. Anyways, I think adding new languages is trivial to this.
  23. Ok, it was "fairly" simple. I didn't find a way to use WireUpload to handle unzipping, so had to do it manually. But this seems to work: <?php namespace ProcessWire; $upgrade = function (RockMigrations $rm) { // Install lang support module modules('LanguageSupport'); // get default language $default = languages()->get('default'); // Download lang pack from github to cache folder, unzip and loop and add .json files to language_files field for the language $http = new WireHttp(); $zipUrl = "https://github.com/apeisa/Finnish-ProcessWire/archive/master.zip"; $zipLocal = config()->paths->cache . "language.zip"; $http->download($zipUrl, $zipLocal); $items = files()->unzip($zipLocal, config()->paths->cache); if(count($items)) { foreach($items as $item) { if (strpos($item, ".json") === false) continue; // Yeah, there could be more proper check here... $default->language_files->add(config()->paths->cache . $item); } } // finally save the language $default->save(); // UI update needs still logout/login or modules => refresh modules()->refresh(); }; Not sure what part of that could be part of RM and how? Also - in this level uninstall of LanguageSupport works nicely - I think it might be a lot more complex when multilang fields are involved.
×
×
  • Create New...