Jump to content

Ivan Gretsky

Members
  • Posts

    1,473
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by Ivan Gretsky

  1. Hey @PWaddict! Thanks for the module. Today I found a use case for it. I have a lot of pages with a certain template under root which pollute the Page Tree and make other pages hard to find. They are there for the sake of pretty URL structure. I wanted them to be hidden even for superuser (the one who struggles the most in admin area ), so I removed $this->user->isSuperuser() from the code. I spotted something that looks like a bug and a chance to improve the module. Pagination and the ">More" button still count all the pages, including the hidden ones. Maybe there is a chance to fix it?
  2. Hey @James Ulrich! Welcome to the forums! I think, learning PHP+JS or Python+JS is pretty straightforward. Just start a web project and do both backend and frontend stuff)) It is the the more practical way. If you want something more classical take your time and watch something like this Harvard course. It gives you a good start in C, MySQL, Python and JavaScript. No PHP, but you will get it naturally when you'll start to do something with the best web CMF. You know, ProcessWire))
  3. Thanks for this blog post @ryan. The new features are coming at such a pace I sometimes only have time to get excited, but not to try them out. Those recommendations are really useful (at least to me). I would enjoy to read more about use cases for the newly added stuff.
  4. Maybe we could use some 3rd party php zip library for this? Not to deal with all those cross-platform issues...
  5. I can see you are concerned about ProcessWire project, as you speak so passionate @Donald. But I can't really get the point of all those posts. Let me guess: ProcessWire could have some better docs... Partly true, but it's getting better and the code is documented very well. Take a look. I also love Vue docs, but they are also not so helpful when you go from basic stuff to real projects. And as I see it PW is more complicated and has way more stuff to document. And new features are coming more often. ProcessWire will never beat Vue on github stars... I think so too, but not really due to lack of documentation. You think that this topic will not help PW get too much stars... Partly true, but anything is better than nothing. You want to get paid modules for free... I also sometimes think that donation based support could be better for the PW development. But it is not our decision and might not work as well here. You suggest to buy stars for ProcessWire github repo... Ryan will not do it for sure. Neither will I. If you got some money to spend it is up to you to try it, but I don't not feel like it is up with the ProcessWire spirit, if you will. Anyway, wanted to share my experience here on the forums. Being gentle always paid out better for me than being provocative)) P.S. The reply is to some posts that were probably removed by either the author or moderators. I did not actually see anything bad about them. But maybe some trolling was reasonably stopped by some good censors)
  6. Cool stuff @ryan! Are there any chances this could be implemented for Table and TableRows? Would be great to have it there too.
  7. Once upon a time the official PW Repo had way more stars on Github. But as @ryan values customer satisfaction over some abstract regalia like numbers stored in Github database (read the whole story here), they got kind of lost (actually not really lost - they are still present, but lost for the marketing purposes). I guess we could have something about one thousand now if this would be dealt differently . But that is old story. Personally I am visiting https://github.com/trending regularly to see what's going on in the open source world. And stars is what makes me see something. So I am 100% for this @adrian's initiative. And one forum post is not enough for success. At least placing Github star buttons all over the main site and forum and in the sticky top banner somewhere would help. Maybe we could ask @Pete to help here? As I understand from years being here @ryan is expecting ProcessWire to "market itself". But as community is part of PW, us marketing PW is kind of PW marketing itself anyways . So let's attract as much stars as we can to make the real star CMS get a primetime!
  8. Good day, @flydev! I am trying to transfer my work (done locally on windows 10) to a production linux server. But after package got extracted with the installer, I got this instead of the file structure; (filenames = what should be paths) When manually extracting I get the same result. It seems like archiving does not work as expected on windows. Am I doing something wrong, forgetting something?
  9. 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?
  10. Do you see any chance to restore a site from the package from admin, @flydev?
  11. 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?
  12. 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?
  13. 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)
  14. 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).
  15. 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.
  16. @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!
  17. 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!
  18. 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.
  19. 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.
  20. 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.
  21. 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.
  22. 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!
  23. 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.
  24. This issue is what primarily stops me from using VS Code for php development (and that means "at all").
  25. @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.
×
×
  • Create New...