Jonathan Lahijani

Members
  • Content Count

    260
  • Joined

  • Last visited

  • Days Won

    6

Jonathan Lahijani last won the day on June 14

Jonathan Lahijani had the most liked content!

Community Reputation

740 Excellent

About Jonathan Lahijani

  • Rank
    Distinguished Member
  • Birthday 04/24/1983

Profile Information

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

Contact Methods

  • Skype
    jonathanlahijani

Recent Profile Visitors

8,311 profile views
  1. Jonathan Lahijani

    Never used Craft professionally... just tried the demo a couple years ago.
  2. Jonathan Lahijani

    I put this feature request in a couple months ago which relates to this conversation about migrating structural changes: https://github.com/processwire/processwire-requests/issues/230
  3. Jonathan Lahijani

    If you run multiple PW under the same hostname, then setting $config->sessionName to something unique is recommended as well as it prevents one installations logged in state from clashing with another (and other weird admin caching things). I usually set its value to $config->dbName since that's easily unique enough. $config->sessionName = $config->dbName; $config->sessionFingerprint = 2;
  4. Jonathan Lahijani

    Note: whether I use Page(template=mytemplate)::added or Pages(template=mytemplate)::added does not make a difference.
  5. Jonathan Lahijani

    In 2015, Ryan introduced conditional hooks: https://processwire.com/blog/posts/new-ajax-driven-inputs-conditional-hooks-template-family-settings-and-more/ I have the following hook which works properly: $wire->addHookAfter('Pages::added', function($event) { $page = $event->arguments[0]; if($page->template=='mytemplate') { // ... } }); Now if I want to take advantage of conditional hooks, I should be able to do this: $wire->addHookAfter('Pages(template=mytemplate)::added', function($event) { // ... }); however the hook doesn't get hooked. Any ideas?
  6. Jonathan Lahijani

    User-specific timezones is on Ryan's todo list: https://github.com/processwire/processwire-issues/issues/270
  7. Jonathan Lahijani

    That video got me hooked as well. I'd love to help out with making a new marketing video. I can do the screen recording, video editing and voice-over. If someone can concept out a script/storyboard, I can take care of the rest. Maybe it can be featured on the new PW homepage hero section to hook more people.
  8. Jonathan Lahijani

    Try Adminer instead: https://www.adminer.org/ It's only one file. phpmyadmin feels bloated compared to it.
  9. Jonathan Lahijani

    That would depend on the nature of what one needs. But perhaps if you wanted to name it the name of the page (assuming it's an existing page) you could do: $p->your_single_image_field->first->rename("{$p->name}.png"); // need 'first' here
  10. Let's say you want to add an image using the PW API from an outside service that doesn't provide a clean filename like my-cool-image.jpg (such as from dummyimage.com, urlbox.io, etc). Doing it this way will add the image successfully, but the filename will be problematic and have an invalid extension (bad): $p = $pages->get(1); $p->your_single_image_field = "https://dummyimage.com/600x400/000/fff"; $p->save(); Instead, you need to rename the file right before save (good): $p = $pages->get(1); $p->your_single_image_field = "https://dummyimage.com/600x400/000/fff"; $p->your_single_image_field->first->rename("better.png"); // need 'first' here $p->save();
  11. Jonathan Lahijani

    UIkit3 is a bit more of a utility class oriented CSS framework. The benefits of utility based CSS are excellently summarized in this article, which I side with given my own evolution with CSS: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/ Gridlex is just a grid system from what I can tell. If you need all the usual components (accordions, tabs, etc.), UIkit3 has it covered extremely well, especially compared to the other big CSS frameworks. Many great options. I rarely pull in other libraries since UIkit has it covered, and since it's all under one roof, it's very consistent and doesn't lead to conflicts.
  12. Jonathan Lahijani

    Does this work with FormBuilder?
  13. Jonathan Lahijani

    Feature request Can there be an option to redirect the user to another page if they land on a protected page (rather than showing them the login form)? Additionally, if there could be a field by which an admin can enter a custom message (or error) to $session->message("the message"); or $session->error("the message"); that would be really great.
  14. Jonathan Lahijani

    Great module @adrian. For the Custom PHP Code option, can you make it also have access to the $pages variable (in addition to just the $user variable)? I have a use case for it and it would be helpful. I modified the module to include it and it worked fine for me.
  15. Jonathan Lahijani

    What version of PW are you on? Newer the better? Also, recently one thing that was driving me nuts was a bug related to ListerPro pages taking forever to load (you might not be able to view the link since it's in the private ListerPro forum): The temporary work-around for that was to remove all the filters in my ListerPro. For some reason, my ListerPro was loading all 2000 pages on my site on each page load causing a slowdown. Is the site still slow when there's only a handful of people using it, as opposed to over 100+? If so, that may indicate something. Have you enabled debug mode in PW? Anything stand out?