Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by apeisa

  1. 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.
  2. 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?
  3. 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.
  4. Sound quality is strange 🙂 But your English and articulation is very good, clear and easy to understand! Keep up with the videos!
  5. 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).
  6. 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.
  7. @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");
  8. 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.
  9. 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.
  10. Thanks @bernhard Yep, I guessed this might be tricky one... Things I would like to to do via API is a) install basic language support (this is probably easy one) b) add new languages (this probably too, since language is a page) c) upload json files to a new language (maybe this also, since json files are just files inside the language) If/when I get this working, I will definitely add support to RockMigrations for this.
  11. Thanks @d'Hinnisdaël Gotta say I really like this module, solid work & documentation. One suggestion - not sure I understand the reason for current Collection pagination? It only shows the count of results, instead of showing actual pager. Changing this to actual pager is trivial, but probably something you would like to offer as an option? $pagination = sprintf( $this->_('Showing %d of %d'), $this->collection->count, $this->collection->getTotal() ); $footer .= "<div>{$pagination}</div>"; so instead of that just use: $footer .= "<div>{$this->collection->renderPager()}</div>"; And we have default PW pager working as expected. Of course this is not fully functional (and probably reason why left out from initial version?) is that it doesn't work with current table sorts which are only client sorts. Another route for case where you really need paging would be using pagelist, but there I think pager limit should be a setting too.
  12. Hi Has anyone tried to install (and/or) update languages without using admin UI? I would love to automate that process.
  13. Hi @d'Hinnisdaël Just noticed that module documentation returns 404 https://philippdaun.github.io/processwire-dashboard/ Edit: docs are accessible from git repo directly: https://github.com/daun/processwire-dashboard/blob/master/docs/
  14. apeisa


    Hah, I had forgotten this one. SplashAndGrab looks (and sounds) great!
  15. Nothing too fancy, just few composer hooks that update ProcessWire based on the composer.json. Looking forward to handle module updates through composer too, but not there yet.
  16. Hi everyone! This is Antti from Avoine. Our website business is growing and we are looking for some extra talent to help us. We are looking for web developer(s) with great visual skills who can design and develop websites that look great and work fast on desktop and mobile. We are looking for a long-term partnership, not a single project gig. Agencies and freelancers can both apply. All the projects will come to our hosting and maintenance, so we expect you to build websites in a same way that we build all our sites. We will of course teach and help to get in track with this. Our current process includes: source code hosted at github.com gulp based workflow composer based processwire installation default site profile that all our projects use tailwind css wireframe used for output strategy We hope that you are familiar with tools like git and composer. Not too much, so don't be afraid about these. Please contact me with email to antti.peisa@avoine.fi and please include: Links to at least 2 reference projects online (both design and front end development needs done by you or your company) Some kind of estimate about how many hours reference project development took Your hour price in euros or usd Looking forward for your application. This is great opportunity to work with legendary creatures like @teppo @Fokke and unfortunately me too.
  17. Thanks for this Mike. Not sure if 512 is long enough. There isn't any limitations for user agent length (other than server limit for headers) and if request_uri means uri that user were redirected - then few pointers for uri lengths: and https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers So if you want to limit these at the database level, then you should clip values also to that length.
  18. Thanks Mike! unfortunately we jut found another issue like this: Data too long for column 'request_uri' at row 1 So there is similar issue at least with request_uri also (not sure about other fields). Any possibility to get this fixed as well?
  19. Hi @Mike Rockett We are using this module on few client sites and it works great. There is one issue though: varchar 255 is too small for referrer field, we do get occasional: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'referrer' at row 1 (in /site/assets/cache/FileCompiler/site/modules/ProcessJumplinks/ProcessJumplinks.module.php line 532 Any hope to get this fixed? (we will most probably update local databases to text).
  20. Yes, that works great too in that case and others similar cases if there is possibility to tweak markup. I also found that purge failed on rather complex navbar css so I found it easiest to skip purge on my own css. Not a problem since with tailwind I write very little css anyways.
  21. Ah, that meant just for purge css. Things like pagination markup (and css classes it uses by default) comes from core module, so if you want to use those and just style using css, you need to disable purge for that part of css.
  22. Two sites I have build with tailwind and purge css. Other site css file was 3.4kb and other 2.5kb... I also skip purge from my own css, just tailwind goes through it. It is actually very simple. It does "scan" all the files you need. But in case of ProcessWire custom classes can come from many places, so I felt it easiest to purge only tailwind css. And I am pretty happy with the file size results...
  • Create New...