Ivan Gretsky

Members
  • Content count

    739
  • Joined

  • Last visited

  • Days Won

    5

Ivan Gretsky last won the day on August 1

Ivan Gretsky had the most liked content!

Community Reputation

816 Excellent

About Ivan Gretsky

  • Rank
    Hero Member

Profile Information

  • Gender
    Male
  • Location
    Russia

Recent Profile Visitors

5,689 profile views
  1. If I understood correctly, you are trying to get some kind of a content builder. So your client can add a section with copy, then a section with a copy and an image and so on. I suggest you use Repeater Matrix for that. If you cannot afford the subscription, use Page Table from the core. But... just buy Repeater Matrix) There are other ways, but this one's the best.
  2. Ok. 1. We need to generate a unique token for a user and store it. The simple way to do that is to add a field to user page (login_token in the example). To make process easier we make a method for that via hook: // site/init.php $wire->addHook("User()::getToken", function(HookEvent $event) { $page = $event->object; if (empty($page->login_token)) { $page->of(false); $page->login_token = generateToken(12); $page->save(); $page->of(true); } return $event->return = $page->login_token; }); The genereateToken() function is yours to implement as you wish. 2. Now we can generate a link: $link = $page->httpUrl . "?user=". $user->id . "&token=". $user->getToken(); 3. Finally we need to handle those parameters and make user autologin: // site/templates/_init.php if ($userToLoginId = $sanitizer->int($input->get->user)) { $url = $page->url; $userToLogin = $users->get($userToLoginId); $tokenToLoginWith = $sanitizer->text($input->get->token); if ($userToLogin->id && $tokenToLoginWith && strcmp($userToLogin->login_token, $tokenToLoginWith) == 0) { $loggedInUser = $session->forceLogin($userToLogin); if ($loggedInUser) { $user = $loggedInUser; }; $session->redirect($url); } } We can then nullify user token if we want it to be only a one-time ticket. I rewrote whole lot of stuff, so might not work straight away, but surely you can fix it @szabesz)) Hope I am not missing something essential.
  3. Hey, @szabesz! It was done. Actually It was pretty easy (at least the way we implemented it without much security overthinking). Would be happy to share code if needed. But it is essentually what @LostKobrakai wrote.
  4. This topic made me check the progress on Atom IDE project. The 1.21 version of atom is finally out of beta, so now one can install it without switching to beta channel. Atom IDE uses the same Felix Becker's language server, and has language contexts figured out, as far as I know. While at it upgraded my Windows Atom to x64 version (startup appeared to be a little faster, but maybe I'm just dreaming). Jump to class definition works. Auto-completion works, Outline view is present. Somehow I consider Atom to be more open source and open in general than VS Code. So will try stick to it for now. VS Code starts up a bit faster, but they have near feature parity now. Good competition is good!
  5. It is html, css and js in php files. IntelliSense (at least out of the box) just does not recognize that it is html context embedded in php PW template, so no autocompletion and stuff. Felix Becker (the creator of php language server, used in VS Code as the base for php IntelliSense) writes about it in the mentioned issue. I did not find a workaround. Edit: Actually the main problem is the other way around. PHP includes in html templates/views.
  6. This issue is what primarily stops me from using VS Code for php development (and that means "at all").
  7. @ryan, just tested the new page export/import module in zip-mode. I was able to move some rather basic pages with images from one installation to another. Felt like launching a spaceship. And it worked! Yahoo! Congratulations! I did not get into much testing, but spotted a bug. When using "Pages that I select" and "Pages having parents" options? I could not actually select pages. The select button appears when hoverung a page and disappears instantly not allowing to make a selection. So I had to cope with selector option. Tested on 2 computers with the same result.
  8. Good day, @horst! Was messing with an old site of mine. I did not even remember I used pim2 on this one. And getting to use this powerful tool once again was a pleasure. Thank you for your work! I had to make a overblurred version of an image for a background. So I used smooth(255) about a 10 times in a row. That did the trick, but the code looks kind of ugly. Am I missing some shortcut way to do it in a more beautiful manner?
  9. I am facing the same problem. Made a github issue to get more attention to it.
  10. Thank you Ryan! Both modules look awesome! And I see use cases for both of them on sites I am working on right now. It is especially nice to see these developed in response to a community feedback made through a PW weekly poll. And this is the first reason I hope both fill be released in the core. The second is that that FieldsetGroup is such a natural and kind of even expected extension of the regular fieldset it must be valuable to many. I got my ProFields subscription anyways, but still...
  11. The answer to the original question seems to be: // use this $config->httpHosts = array(); // instead of this $config->httpHosts = array(''); I guess the 2nd line creates an array with an empty item, not an empty array. But I still have a problem with empty httpHosts config on https sites. They just do not want to work without $config->httpHosts set explicitly.
  12. This stuff is amazing! The built-in help videos for ERPNext are auto-generated and are always in sync with the evolving interface. Just wanted to share.
  13. Hey, @flydev! I am sure those that are not beta testers will have most questions, so better ask us, eagerly waiting for the release, after it happens) Glad you are back here, by the way!
  14. Good day @adrian! Tracy debugger is one of the tools I can't live without no more Thanks for supporting it! I got an unexpected behavior I can't explain. Tracy bar foes not appear on form sent (there is actually quite a lot happening processing that form). I does appear on all other pages of the site as expected though. That can cause such behavior?
  15. Just read your comment here and found out AOS now has some profound documentation. You're a monster, @tpr! The wiki is awesome! I saw it and said to myself: "Ha, but he probably does not have changelog!" But I was wrong (and astonished)! I think the main PW repo could benefit from a CHANGELOG.md like this. Especially that there are enough of nice changes to be mentioned almost every week. Sorry for offtop))