Ivan Gretsky

  • Content count

  • Joined

  • Last visited

  • Days Won


Ivan Gretsky last won the day on December 20 2017

Ivan Gretsky had the most liked content!

Community Reputation

850 Excellent

About Ivan Gretsky

  • Rank
    Hero Member

Profile Information

  • Gender
  • Location

Recent Profile Visitors

5,824 profile views
  1. I just made a quick search and found this one - could be an easier replacement to ftp. But could we make the 1st step even simpler - not care about the uploading side at all. Say we want to restore something already on the server, be it the package created on the server in the 1st place or uploaded via on-server file manager of ftp. And only provide the facility to kill the current installation and launch the new one from the backup?
  2. Do you see any chance to restore a site from the package from admin, @flydev?
  3. Good day, @flydev! It's been a while science beta testing phase. Really glad the module is now released and gathering all the attention it deserves! May I propose a little enhancement that seems reasonable to me and just may be of use to others? I am using Duplicator to quickly create a local dev environment for a site (just not to practice cowboy coding straight on the server). When I do so the installer overrides the db settings in config file. It seems like there is not an option to later copy a locally produced package back to production and replace the installation from the admin. One has to remove all the files (and probably drop all the tables in the existing database) and run the installation "from the clean slate". And one has to remember and fill the production db credentials. Bit we could have an option to put the db credentials in the config-dev.php file instead (for local installation) and another one to remove config-dev.php from the installation if needed (for "back-to-production" installation). P.S. While writing this I realized I do not really know what happens to the existing db tables if the db is not empty. Are the being dropped?
  4. This module is awesome! Exactly what I was thinking about these holidays. I was about to try to integrate codiad into PW, but it is probably not needed anymore. The editor is obviously codemirror (have you considered monaco, by the way). Is this one a filemanager used? A few questions: Does it seem possible to limit edit capabilities for roles by directory/filetype in the future? Does it seem possible to run terminal commands through the interface for on-site asset building and such? Are there any known platform limitations?
  5. 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)
  6. 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).
  7. 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.
  8. @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!
  9. 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!
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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!
  15. 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.