Jump to content

Ivan Gretsky

Members
  • Posts

    1,459
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by Ivan Gretsky

  1. Happy new year, @rareyush! And yes, we are still celebrating here in Russia) As I got it, you want a menu kind of like on this site (you can look at some css to get inspiration, but js is also involved there). I think, you can achieve it with css-only. But I would not bother too much for full capability for no-js users these days. Provide some (possibly ugly) fallback to keep the site usable. Here is a nice link to start with css-only menus as a bonus)
  2. Hey, @pwuser1! You could already reach some intermediate JQuery skill by now, spending half the time passed from the creation of this topic . The basics are easy. Most of the times for the simple sites js+JQuery is about installing and configuring some plugins, using their docs pages and the official JQuery API reference (start by adding something like Magnific Popup to your site). But if you need some link to start with, I would recommend FreeCodeCamp course. The whole FreeCodeCamp thing is a hype so you'll feel yourself trendy)) Just recently listened to an issue of ShopTalkShow, one of my favorite podcasts, that fits here perfectly. Could not resist to put it here (for some controversy at least).
  3. Although Vue is being marketed as "incrementally adoptable" it is still aimed to become something react-like as I see it. That is a framework, that is to be used on a frontend, completely decoupled from the backend. In such architecture backend only serves data to a frontend via something like REST or GraphQL. And all the routing and markup generation is done on the frontend, in the browser. ProcessWire surely can be used in that scenario (just follow the provided links), but in 99% of cases I heard about it is used in an "old-fashioned" way, with routing and markup generation done on the server (backend) and served via page reload, not ajax+in-browser state change+framework like Vue. That means most examples here on the forums will be more relevant to such a usage. Ryan is building at least his demo sites this classic way. Vue is something from the new frontend oriented world. JQuery is something from that "classic" web-development world, which is still dominant. JQuery is used throughout the PW core and modules code. And that code is a very good manual in itself. So learning JQuery with PW will be easier. And (should it be first) PW API is known to be inspired by JQuery. Isn't it the ONE reason to learn JQuery first if going with PW? So, for now, I would say JQuery is a better start to be used with ProcessWire.
  4. @FrancisChung, when I came here someone introduced me to this google search trick. It was some discussion it has to be the default one for the forum search box. But it did not happen (due to some integration problems only @Pete knows about). So all the old-timers use it, as far as I know. Personally I almost never use the in-built search (only when I need to limit the search by thread, but that's rare). Let this topic be a reminder of such a useful tool to learn more from PW forums!
  5. Welcome here, @pwuser1! You made the best 1st step you could - found this amazing community and one of the best php products out there (with super cool inline docs) . Start a project, solve problems as they come, read the code. This is the way PW changed me from knowing almost nothing to knowing some of it. I am sure you will become much more advanced following the same route though. Good luck! I am sure you could find tons of advice on the Internet, so not giving any generic one. But just for the count here are some links to relevant forum topics: PHP js ...but really tons of it here and elsewhere) By the way, if you want to find something on this forum (like the fact that this question was raised so many times), use special google search like this one I made for myself. Good luck!
  6. If I got it right, we can now put custom logo in the new admin theme. So that would not be a problem at all.
  7. 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.
  8. 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.
  9. 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.
  10. 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!
  11. 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.
  12. This issue is what primarily stops me from using VS Code for php development (and that means "at all").
  13. @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.
  14. 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?
  15. I am facing the same problem. Made a github issue to get more attention to it.
  16. 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...
  17. 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.
  18. 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.
  19. 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!
  20. 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?
  21. 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))
  22. Admin on steroids adds that functionality (among many others). Just for the record.
  23. Great, @mel47! But I was not actually advising to add an extra field to the template. I thought it would be enough just to write $page->sizeColumn = 2; before the render call. It would add a temporary property to the current $page object, which will be passed to field template (but will not write this field to database).
  24. When you create a new product page a reference to some tags get automatically added to the product page, right? Is it your site or you are working with some clients you did not make? What tags are added? It might be that it is done with some hooks. If so, you can check the site/modules folder for some suspicious modules and read through site/ready.php and/or site/init.php - they might be there .
  25. Hey, @webhoes! I did not dive too deep into your code, but: I think you use $inputs instead of $input. I don't see the code for the form which has to include the select and therefore do not see the way that r_selector will ever get into the $input object. You need to sent the form to get the input parameters.
×
×
  • Create New...