Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. Any non-pw code does not need to go into the templates folder. Just put it in a subfolder of your root directory and it should be installable.
  2. Just keep in mind to maybe also check for a cookie or something, otherwise this will prevent users from manually switching to another subdomain / language.
  3. I always hate those kind of answers. I mean they invested time to replicate or otherwise prove that it's not their fault, but giving any detailed information about the results cannot be done?!
  4. The default pagination methods should work with the resulting pagearray.
  5. Did you also change the part where you're instantiating the class? $paginator = new PagesPaginatorNoDuplicates(); If that's not the issue I might need to look more detailed into what's happening on your end.
  6. I see you're using a limit, therefore I assume you're using pagination, where this one won't work. Use OR-groups to put both searches into a single selector, if you need pagination to work. If you need more control over the sorting of results take a look at this topic:
  7. Selectors cannot handle multiple level nesting by using the dot-syntax, but you can use subselectors: https://processwire.com/api/selectors/#sub-selectors
  8. Doesn't this also work? …, !title%=nyc
  9. @Pete Jones Try this one, as it should prevent duplicate page selections by later selectors: https://github.com/LostKobrakai/Paginator/commit/e515bbba8a33be9259be810ff80ad2ad61078497
  10. Most of the time people do not only submit the module to the modules directory, but also link to either the module's page in the directory or the github repo (sometimes both) from their forum posts as well. Especially as it seems like your module is by not not approved in the module's directory nobody but you can see it there.
  11. I especially found the frontpage forum overview to be a visual mess. Giving a fast overview does work different. The "explore questions" thing in some subforums (Q&A style ones I think) is also taking up way to much space imho. This might work as a sidebar element, but not above the actual content. Also the modules forum does suffer a lot in readability because of duplicated tags. I think everything else might really work out over time.
  12. I'm not sure how your local setup does look like, but I really like this one: https://github.com/wilmoore/php-version Just switch around php versions in no time
  13. I'm just using import() to import the results of each "turn" into a single PageArray, therefore duplicates will be moved to the later places if they are returned twice. I can make some adjustments, so the class could actually prevent duplicates to be found again by later selectors.
  14. My pagination class has no concept of appending or prepending. It's just selector after selector after selector. Just put your selectors in the intended order from the start and you should be fine. If the first selector does not return any items it'll just skip to the next one.
  15. It's taking each selector separately one after another, so it shouldn't bring anything out of order – it shouldn't even query later selectors if the ones before where enough to fulfill the limit of pages for the current pageNum. Just make sure it's in the correct order in the first place.
  16. Does this work with internal server errors? I mean the server isn't even able to respond anything in this case.
  17. Internal Server Errors are a pain to debug, especially if the server logs do not give any useful information. I'm always doing the die() debugging on such things, e.g. Going to ProcessPageEdit.module and putting die() at various stages an see when the error disappears for a probably blank screen. This way you can at least narrow it down to where the error does happen, which might help finding the issue behind it.
  18. @Pete At least in theory it should work that way. As stated above I hadn't had time to test if further than the plain array testclass. Would be nice if you could report back if it works. If so I'd be also interested how much render time it saved you.
  19. Yeah. There's a checkbox besides the name field(s) for each page.
  20. If the order is your issue than use count() with those selectors, the current page num and some math to determine which pages are to be shown on the current page - then load just those. Edit: I've not tested it with real pages, but the test class seems to work correctly: https://github.com/LostKobrakai/Paginator
  21. You way does load all of those notes into memory even though only 15 are used later. Build your Selector first and then query the db for the total result.
  22. There's no support for (mysql) date functions in the selector engine. You need to go this way: $startOfYear = mktime(0,0,0,1,1,date('Y')); $endOfYear = mktime(23,59,59,31,12,date('Y')); $pages->find("…, article_detail_date>=$startOfYear, article_detail_date<=$endOfYear");
  23. You cannot load two modules (instance one / instance two) which are using the same classname. That is why my fix is preventing the other core modules from being loaded. It's the same issue if you'd use a site module on both installs. Probably the only way to really load each instances separately with all it's own modules and classes would be compiling at least one into a separate namespace. And that's not starting to talk about third party composer libraries, which might be part of both installations and worst case even in different versions. – It's not the kind of easy topic it seems to be.
  24. The thing is ProcessWire is evaluating all the fields, which are part of the form object and nothing more. You could try to hook before processInput() or alike and add those inputfields for real, so they can be saved even if those weren't used previously to generate the frontend representation.
  25. I've a basic mockup of such a feature/fieldtype sitting here, but I've currently not the time to look further into it. It should be a "single page field" with features of both pagetables and repeaters (auto-generation / deletion, auto-naming, real template as base for pages).
×
×
  • Create New...