Jump to content

Ivan Gretsky

Members
  • Posts

    1,459
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by Ivan Gretsky

  1. Good day! It seems like I got about the same question, so will post it here. I have this code $nextAction = $p->next_action; try { $this->$nextAction($p); } catch(Exception $e) { bd($e, 'Exeption!'); } and it does not work if a call a method that does not exist. I get a WireException, and it is not caught by try/catch. Is there a way to make it work? P.S. bd() is from awesome Tracy Debugger. If you do not use it yet you certainly have been away to a far away planet or do not do any code in PW .
  2. Good day, @adrian! Is there anything preventing you from publishing this one in module directory? I only found it 'cuz I knew where to look for .
  3. Good day! I got a repeater with 2 Page fields inside of it. The second one is only visible if the 1st one has a value. This is possible since this release. Now I need the selectable pages of the second Page field to be the children of the 1st one. And this is where I am in trouble: the $page variable returns the page that the repeater is attached to, and $this return the InputField. Is there any way to get the current repeater page in the Custom PHP code to find selectable pages?
  4. @Jonathan Lahijani Great post and a wonderful case! Could you tell a bit more about how admin workflow is organized and how admin interface is customized for each role? It seems like there is something going on both in frontend and admin at least for some roles. And the admin theme seems to be modified (at leas there is no PW logo at the top).
  5. So there is no way to format it in List of fields to display in the admin Page List template config? I could not put no php functions like date() in there. Am I missing something obvious?
  6. That is the topic I was looking for... What if I need to output a created date? Could not find output formatting for it.
  7. Come on, @horst! You could be a modest person, but publishing modules under different names is too much. I am used to rely on authority a bit while choosing a module to download. Your name and the vast amount of good stuff made under it has always assured me I can trust that another one new. Probable same for others. Or is some technical issue?
  8. I guess you can use this method to check the existence of a filename: $page->template->filenameExists(); But it will probably not cover all cases. For example, when there is only one controller-like template for all templates. And I did not find a selector for that, so only in a foreach loop.
  9. Thanks for participation, @szabesz. But I have read several times about admin being "just another application on top of PW framework" and "just a branch of a site tree". Everything happen the first time sometimes, so it just might be the time to discover another trick . But I would be happy to find out as much as possible about what @renobird was talking about too.
  10. That is what the initial intention is. I will appreciate you giving me any piece of advice on that. And if there is something to be said on question of alternative admin under different root, that will still be interesting.
  11. Good day, everyone! I am having this idea for quite some time already and want to discuss if it is even possible. I really like using ProcessWire admin for site managing purposes. Some of my clients are also using PW admin interface. Recently I am meeting more demand to create role-based access with complex restrictions. I tried to modify the built-in admin interface for some roles, managed to build quite a different user experience for them. But It was not such an easy thing to do. More to that, my own admin interface got cluttered with the admin pages that were only intended for some other roles. And there is no single place for template permissions management to easy and quickly make things work as you expect. So the idea is to try to go another way. Not to adjust the common admin application, but to have another one. I am not talking about building a front-end admin, but about having another admin area with ProcessModule-based pages, but with a different set of them. For most cases quite a limited set of them. I do not know where to start. I can only imagine that some things are hard-coded, so that can be a problem. But still, what do you think about it?
  12. It's like your daugter's getting married. The name has to change and you got to let go. You better be prepared for this Ryan - test on this one of yours . This decision is clever. We need to take care to transfer everything (all the stars!!!) to the new organization. But I am sure it is thought out already.
  13. Just to make sure... How do you check for output? In the frontend or in the admin?
  14. ProcessWire core still uses Magnific Popup, so do I. Made by the same ukrainian/russian programmer as PhotoSwipe, but a bit more oldschool.
  15. Something to do with the sessions? How are they stored?
  16. Good day! I am playing with the new command and finding some inconsistencies: If something went wrong while installing, like wrong db credentials were provided, there is no way to start over again without downloading the whole repo once again. Should there be a --no-download flag or something like that. The best thing is to make it check the db connection before the download process or even make it interactive and allow reenter the db credentials? Even with a db connection error I still get this untruthful message in the end: Congratulations, ProcessWire has been successfully installed. It would be nice if a new db could be attempted to create if there is not one already. I still get an error in the end PHP Fatal error: Class 'WireDatabaseBackup' not found in C:\Users\dxlab1\AppData\Roaming\Composer\vendor\wireshell\wireshell\src\Helpers\Installer.php on line 486
  17. @ryan I was pretty sure you don't. For some people making things is much more interesting than having them. So Tesla won't be more fun than what you already doing (unless you're not a mechanic - or electric in this case ). I think words of appreciation won't hurt time to time. This just felt like the right place for a few. Promise not to write this kind of stuff after each and every you blog post))
  18. I know someone has to write this, so let it be me. The first time I realised what I could do with the ProcessWire API it was like an insane mode in mentioned Tesla Model S. But it was just the beginning as PW keeps accelerating me ever since. Of course there are rough edges, but I am sure there are some in Tesla too - you just have to own it a bit longer to discover them . This creation of yours, Ryan, is something that was a mind-changer and a life-changer for so many of us here and more around the globe. And it is not just cheaper and better, it is open source and the best you can get! Tesla team made a great job. So did you - alone. More people everywhere in the world are using PW now than probably ever will be using Tesla cars. So the impact not only on the future, but on the present is quite comparable (Tesla team just has to work harder to not fall behind too far). ProcessWire is equally fine crafted mixture of technology and design, as this electric car... But none of us have to give it back some day soon. But not only the technology is to be mentioned. ProcessWire is a community, open source and global. People from Africa use it alongside people from Europe and Americas. And they (actually we) come together every day to talk to each other about a topic of no envy and hatred, but a common love and perspective. The world seems to be so unstable and fragmented these days. At the place that I live I hear a lot of negative words aimed at US and its policy. Some of it might be true, some of it is an obvious propaganda. But without other channels of information and communication you can easily lose your own point of view. I am sure something similar is happening on the so called "other side". Here in community we overcome that way of thinking. You, Ryan, and the open source ProcessWire thing is doing better job for creating a world as a better place than NSA spying scandals and troops being brought to places abroad for sure. And your avatar is the most friendly face of America to be seen for many. I do not know if making one of the best pieces of software in the world for free and inspiring one of the most friendly and helpful international communities shall ever help you to buy a luxury electric car (I really hope so), but "at least" your children have something to be really proud about.
  19. Yep, ajax did not work out, it is in iframe indeed. So checking for the process is the option to choose. I managed to write a few lines in ready.php to handle the case: if($page->template == "admin") { if($user->hasRole("editor")) { if(!($page->process == "ProcessPageEdit" && $input->get->id == $currentCity->id)) { $session->redirect("/"); } } } This way the admin login page stays accessible for everyone, but almost everything else is not for the user with editor role. The page with the process ProcessPageEdit is accessible as it is needed for frontend editing, but only under certain conditions (actually only one page is editable).
  20. Good day! I want my users to be able to edit content via frontend editing but not to be able to access admin pages. I kind of reached what I wanted by putting this code in the ready.php file: if($this->page->template == "admin") { if($this->user->hasRole("editor")) { $this->session->redirect("/"); } } But I have a couple of fields, that can only be edited in popups. Those popups use admin pages in iframes, so the become broken as the code above works for them too. Could you suggest some kind of workaround for this situation? P.S. This topic is heavily inspired by this one.
  21. Ok, so I just install pim1 and write pim2Load().
  22. Good day! Is it somehow possible to test sending emails with WireMailSMTP without them actually being send? Something like you can do with regular php mail function in xampp where all the mail is put into a folder.
×
×
  • Create New...