-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
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.
-
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.
-
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?!
-
The default pagination methods should work with the resulting pagearray.
-
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.
-
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:
-
Selectors cannot handle multiple level nesting by using the dot-syntax, but you can use subselectors: https://processwire.com/api/selectors/#sub-selectors
-
Doesn't this also work? …, !title%=nyc
-
@Pete Jones Try this one, as it should prevent duplicate page selections by later selectors: https://github.com/LostKobrakai/Paginator/commit/e515bbba8a33be9259be810ff80ad2ad61078497
-
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.
-
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.
-
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
-
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.
-
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.
-
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.
-
Internal server error when trying to edit a page
LostKobrakai replied to Christoph's topic in General Support
Does this work with internal server errors? I mean the server isn't even able to respond anything in this case. -
Internal server error when trying to edit a page
LostKobrakai replied to Christoph's topic in General Support
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. -
@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.
-
Pages query only showing all results with default language
LostKobrakai replied to didhavn's topic in General Support
Yeah. There's a checkbox besides the name field(s) for each page. -
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
- 37 replies
-
- 10
-
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.
-
Return pages from, in-between and exclude specific year/years
LostKobrakai replied to a-ok's topic in General Support
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");- 1 reply
-
- 1
-
PW 3.0.20: Comprehensive recap of ProcessWire 3.x so far!
LostKobrakai replied to ryan's topic in News & Announcements
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. -
Something like... repeater field with only one entry allowed
LostKobrakai replied to benjaminE's topic in Getting Started
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).