-
Posts
95 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Alexander
-
@peterknight I'm just wondering why you not publish real IP? Maybe something wrong with https?
-
@nghi With ListerPro module you can make as many presets for search as you want. Like that:
- 1 reply
-
- 3
-
@kongondo @netcarver @einsteinsboi Is it possible, that something was changed for this module in last PW dev? I use PW 2.5.15 and have strange issue. When I try to edit page I get page witch pointed in "redirect restrict user to" on top of normal edit page. Like: <code of "redirect restrict user to page"> <code of normal page edit page>
-
See ProcessWire Latest Forum Posts in Terminal
Alexander replied to Gayan Virajith's topic in Dev Talk
Back to BBS. I like that!- 1 reply
-
- 1
-
- terminal
- forum posts
-
(and 1 more)
Tagged with:
-
@LostKobrakai You using in "show this field only if" with something like "roles=1011" and this is working for you?
-
@toothpaste Nice website, but please, think twice about "wet floor" under logotype. It's looks like visual noise and you can use that place for better positioning of your logotype. For sure it's only my personal viewpoint.
-
@adrian, This is awesome, thank you!
-
Maybe someone know how forbid access to edit page if user not author of page. Like deny access for edit if created_users_id != this->user. Thanks!
-
@Guy Verville, I played a lot with Shop-for-Processwire with PW 2.5.7 dev without any issues.
-
How to convince old client to swith from EE to PW?
Alexander replied to OrganizedFellow's topic in Pub
@OrganizedFellow, maybe you will be able to explain real benefits for business owner like (just for example) better ranking by google, because PW is faster and can be easy adapted for SEO or unreal benefits, like unicorn inhabit inside PW. -
Wow! Actual it's look little bit different. Chalet ARepeater 1Arrival=2014-09-13 Booked=1 Repeater 2Arrival=2014-09-20 Booked=0 Chalet BRepeater 1Arrival=2014-09-14 Booked=0 Repeater 2Arrival=2014-09-21 Booked=0 When searched with dates 2014-09-13 | 2014-09-14 I want to return only Chalet B because it's not booked. More than, if forget about booked=0 and use this code it's take around 7 seconds. $selector = "template=chalet, clndr.arrival={$dates}|{$todate}"; If use search without repeater for normal fields like checkbox, it works as normal. So, I'm thinking maybe it's better to made hidden copy of all repeaters line to checkboxes like 20140921=0, 20140921=1 and use them for searching.
-
Sfrosman, thank you for trying. This selector returns all chalets with selected dates in repeater and some of booked=0. Another words, it's not possible to use this selector to check booked exactly selected dates or not.
-
Dear all, I have 205 pages with repeaters. Each repeater has 21 lines with two fields: date field and checkbox. I use this function to find free chalets for selected days and it's take around 10 seconds. Any suggestion of possible speedup this? Maybe PageTable is faster in this case? function find($selector) { if (wire('sanitizer')->name(wire('input')->get->dates)) { $dates = wire('sanitizer')->name(wire('input')->get->dates); $dates = strtotime($dates); $todate = strtotime("+1 day", $dates); $selector .= "template=chalet"; $chalets = wire('pages')->find($selector); foreach ($chalets as $chalet) { foreach ($chalet->clndr->find('arrival=' . $dates . '|' . $todate . ', booked=0') as $r) { ... } } }
-
Brilliant! It's 100% works! Now I can sleep well. Kongondo, thank you very much for your help!
-
Kongondo, yes and no. I know, that is not elegant way, but I try to find page parent that have the same name with user to provide access. $p->set('id', 15729) = working $p->set('id', $p_page) = no $p_user = $user->name; // set user name $p_page = $pages->find("title=$user->name"); // try to find page with the same with user name $p = $this->modules->get('ProcessPageList'); // kongondo's code goes here $p->set('id', $p_page); // setting the parent page to user name page May be you know the reason?
-
Thank you, Kongondo, you made me happy.
-
Good day everybody, I'm trying to make Custom Page with one of Pages Tree. I took this code https://processwire.com/talk/topic/6315-processpagelist-to-hide-some-pages/?hl=backend for custom page template: <?php $form = $this->modules->get('InputfieldForm'); // prep the form $wrapper = new InputfieldWrapper; // a wrapper $wrapper->attr('value', 'List of available articles'); $p = $this->modules->get('ProcessPageList'); // kongondo's code goes here $p->set('id', 4049); // setting the parent page $pageTree = new InputfieldMarkup; // the placeholder $pageTree->value = $p->execute(); // fill the InputfieldMarkup form field... $wrapper->add($pageTree); // put inside the wrapper... $form->append($wrapper); // append the wrapper ?> No success. The main idea is to give to each user separate space for editing only his pages and prevent access to system pages and pages of other users. What did I miss? Thanks for any hints.
-
ProcessWire conference, Switzerland (central europe)
Alexander replied to Soma's topic in News & Announcements
Hdesigns, I live in Chamonix and always ready for action! -
ProcessWire conference, Switzerland (central europe)
Alexander replied to Soma's topic in News & Announcements
Maybe in this year? -
I get one word — Φιλοξενία it's look similar with russian Философия (philosophy). Site looks great, but maybe more organic to put menu from right to left side, because greek people (I think) reading from left to right and most useful part of content must be on the left side. Good luck.
-
Ryan, thanks for your assistant, but it was my fault. I using date field without strtotime. But, I have some really strange bug. I use "limit" in selector and it works not very well. For example, if I use limit=1 or 2 or 3, I get the same numbers of result. But, if limit=4 or 5, result = 3 item. If limit=6,7,8,9 result = 4 item. Any idea why this happens? For sure, this bug happens only for dates. $result = wire('pages')->find($selector); return normal results with right limits. Here is my code: $selector = "template=chalet, limit=10"; $result = wire('pages')->find($selector); if (wire('sanitizer')->name(wire('input')->get->dates)) { $dates = wire('sanitizer')->name(wire('input')->get->dates); $dates = strtotime($dates); foreach ($result as $res) { foreach ($res->clndr->find('arrival=' . $dates . ', book=0') as $r) { $i++; if($i==1) {$result=$result->makeNew();} $r = $r->GetForPage(); $result->add($r); } } } return $result; For example: foreach ($res->clndr->find('arrival=' . $dates . ', book=0') as $r) if limit=8, $r= 7416,7889,7893,7898, (4 results) if limit=10, $r= 7416,7889,7893,7898,7903, (5 results) if limit=100, $r= 7416,7889,7893,7898,7903,7394,7402,7398,7817, (all 9 results) Sorry for this dummy question. Maybe someone can help, what to do with foreach ($res->clndr->find('arrival=' . $dates . ', book=0') as $r) pagination?
-
Now I see my fail. With strtotime works correct.
-
Dear Soma, million thanks for your help. Your words and logic as always direct to the correct result. For sure, your code is absolutely right and I try to use this code before, but with zero result. $p->calendar->find("booked=0, checkin_1=16.11.2013")All problem were with date field. In some reason (maybe output data format or something) selector don't find correct result for this date field. I try to use different date in selector, like d.m.y, y.m.d & etc but nothing works.So, I just change data field to usual text field. Now works absolutely fine.
-
This is all picture. pa=5773|5789 — Find result for 16.11. p=5773 — First property r=5975 — checkin 17.11, booked 0 r=5976 —checkin 18.11, booked 0 r=6816 — checkin 19.11, booked 0 p=5789 — Second property r=5919 — checkin 16.11, booked 0 The problem is, that I need to remove not correct dates from results.
-
As find result $pa=5773|5789 and this is correct. But $p->calendar->find('booked=0') return r=5773 r=5773 r=5773 r=5789, that is $r — all entry of booked=0 in repeater, and I need only for select date. Sorry for difficult explain.