Jonathan Lahijani

  • Content count

  • Joined

  • Last visited

  • Days Won


Jonathan Lahijani last won the day on April 23 2015

Jonathan Lahijani had the most liked content!

Community Reputation

539 Excellent

About Jonathan Lahijani

  • Rank
    Distinguished Member
  • Birthday 04/24/1983

Profile Information

  • Gender
  • Location
    Los Angeles, CA
  • Interests
    Web Development, Snowboarding, Hiking

Contact Methods

  • Skype

Recent Profile Visitors

7,225 profile views
  1. Looks like CKEditor 5 is on the way: (HackerNews comments of the above article) Home page: Demo: Feature Video:
  2. If a client is dead-set on WordPress, it's worth communicating to them that every developer has their own go-to approach with the system, to the point where I would say it's not even "WordPress" anymore. So even if another developer were to take over it, it's still foreign territory to an extent, followed up with continuously saying "why the hell did the previous developer do things in X way instead of Y?" and a lack of productivity. Just check out all the starter themes, mega themes (ugh... ... ... ugh), and different approaches to custom fields. It's pretty terrible. For me, ProcessWire + UIkit solves like 95% of my challenges, and solves them WELL.
  3. I have a script that deletes a bunch of pages and it's very slow too, but I'm not sure if it's normal or if something's wrong. In addition, I'm running it from Bash. Did you have any luck with improving the speed?
  4. I have a Page Reference field (ASM Select) and I am utilizing the "Custom Format" for the "Label field". However even the custom format itself is a bit limiting for a particular use case I have. Is it possible to hook into it and modify the output cleanly with PHP? I can't seem to find a proper hook. Somewhat related... it's possible to do this for the Tree page labels via ProcessPageListRender::getPageLabel.
  5. I just hit this same issue as well. My resolution was to break up my script into two separate files (first one deletes a bunch of pages, second one adds a bunch).
  6. This article came out today. Delicious Brains is known for some popular plugins. I dropped a reference to PW in the comments. Perhaps others here can add to the discussion.
  7. Ryan has a habit of developing features we didn't even know we needed!
  8. +1 for WSL. It works wonderfully and has a lot of resources behind it. Getting better all the time.
  9. I tested out the new version and it works really well. Thanks @Robin S.
  10. Shouldn't it actually be this? $form->insertAfter($field, $form->getChildByName('tags'));
  11. Yea there's a trade-off here. Personally, I think inserting the IDs is the best route since IDs do not change (while text does). Unless there's a really fancy way to satisfy both needs through some sort of richer CKEditor widget?
  12. When making a new booking, you have the 'room' dropdown (well perhaps it should be "Rooms" since one customer may be able to book more than one room) as I described, however you obviously don't want to a room to be double-booked, meaning that dopdown should only show available/unbooked rooms. You can determine that by writing a custom query for that ASM-select field (using PW's Custom PHP Code feature). I think the selector would be something like (well you'd need to finish it off and also make it handle whether the current booking has a room selected): // this will find all the unbooked rooms of the selected boat $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->name == 'rooms') { $booking = $this->pages->get($this->input->id); $cruise = $booking->cruise; $boat = $cruise->boat; $allRooms = $boat->children; $availableRooms = new PageArray(); foreach($allRooms as $room) { if( ! $this->pages->count("write query here to determine if the room has been booked") ) { $availableRooms->add($room); } } $event->return = $availableRooms; } }); Hope this helps.
  13. Sounds like you would want to handle 5 data types: boats rooms cruises customers bookings A boat I'm assuming has a fixed number of rooms. Perhaps start with a data model like this which takes everything into consideration: Boats (boats.php) Boat A (boat.php) Room 1 (room.php) Room 2 Room 3 ... Boat B Room 1 Room 2 ... Customers (customers.php) Customer 1 (customer.php) Customer 2 ... Bookings (bookings.php) Booking 1 (booking.php) Booking 2 ... Cruises (cruises.php) Cruise 1 (cruise.php) Cruise 2 ... Cruise template fields: title date boat (page-select to /boats/, boat.php) Customer template fields: first name last name (other typical fields) Cruise template fields: title boat (page-select to /boats/, boat.php) date Booking template fields: customer (page-select to /customers/, customer.php) cruise (page-select to /cruise/, cruise.php) rooms (based on cruise->boat, select for the rooms that the boat has) I'm assuming the interface would be PW's admin. Perhaps use some hooks and ListerPro to tie it all together. Make it as user-friendly as possible. Maybe have a page within the admin outputs each cruise with which rooms have been booked vs. unbooked which would be friendly to the site admins.
  14. To what extent are you storing a customer's information as part of booking a room? Or do you simply just need to indicate whether a room is taken?