Jump to content

kongondo

PW-Moderators
  • Posts

    7,473
  • Joined

  • Last visited

  • Days Won

    144

Everything posted by kongondo

  1. Oh, I see. Do you have a GitHub account? Are you using some sort of version control, e.g. git? Hey, if it's too much of a bother, don't worry yourself. Thanks.
  2. That will be great, thanks. It just makes it easier for people to fork, play around with, submit PRs, rollback to older versions, etc. ?
  3. Welcome to the forums @tcnet. Thanks for this module. Is there any reason you decided to host the module on your servers rather than on GitHub, GitLab or similar?
  4. I haven't tried in a module's config but in a module and it works just fine. Looking at your code (I could be wrong) I don't think you should be calling getInputfields(). That's for a page or field context. Something like below, maybe should work (untested): $modules = $this->wire('modules'); $somethingAddPageItems = $modules->get('InputfieldPageAutocomplete'); $somethingAddPageItems->set('findPagesSelector', $pagesSelector); $somethingAddPageItems->notes = $this->_('Start typing to search for pages'); // OR // $somethingAddPageItems = $modules->get('InputfieldPageListSelectMultiple'); // $somethingAddPageItems->label = $this->_('Pages'); // OR // $somethingAddPageItems = $modules->get('InputfieldAsmSelect'); // MORE CODE... $form = $modules->get('InputfieldForm'); $form->add($somethingAddPageItems);
  5. Sort of ? This is still confusing. When you say store, do you mean store in memory? I am assuming that is what you mean since you said you are not doing any saving in your code. On the other hand, if you mean saving (i.e., database-storage-sort-of-saving) references to pages of instance1 in a page on instance2, then I am not sure how you can achieve that without having the pages in instance1 also present in instance2. You are using a Page Field and they cannot store external pages. Those pages must exist on the site the Page Field is present in. Again, maybe I am misunderstanding something, but InputfieldPage (all inputfields, in fact) do not store anything, if by store you mean save. Storage is achieved via Fieldtypes. Am I on the right track? :-)
  6. OK, I tested again, iframe appears in frontend, no issues at all. Did you allow iframes in CKEditor, like this? Aside, do you really need the iframe in your rich text? Have you tried using it (if you must) directly in a template file?
  7. Silly me. That's because the iframe is being stripped out in my tests. Let me try again, properly this time :-).
  8. Is this the whole iframe code? I've just pasted it and saved and there is no glitch at all.
  9. @rookie, if you want to tag a forum member, the forum software can do it for you. Just type the @ symbol followed by the first letter of the member's user name and a drop down will appear offering suggestions. This way, the user also gets a forum notification that they've been tagged :-).
  10. These topics will give you some helpful hints: Large in terms of assets or database? Either way, it's best to make a local copy of the WordPress site and do the migration to ProcessWire locally first.
  11. FYI, there's a corresponding filter for templates.
  12. Actually you don't need this :-). Just need to use Filters -> Show System Fields :-).
  13. Welcome to the forums @guigui, I have no idea but maybe this topic can help?
  14. Alternatively, @franciccio-ITALIANO, given that you are on a local site... echo $pages->get(2)->name; in any template file of a page accessible in the frontend should do it.
  15. Which method exactly? It would help us reproduce/test. I don't quite get this. Aren't all hooks called from a class context? Perhaps you meant to say frontend versus backend? What errors? Where are you calling the hook? Some code to look at would help :-).
  16. It is a free ProField. Welcome to the forums and ProcessWire ?.
  17. Could you please show us your code for this bit? Secondly, it is not clear whether you want to store pages from one instance in another instance. If that's the case, maybe this applies to you? https://processwire.com/blog/posts/multi-instance-pw3/#pitfalls-and-considerations
  18. moderator note This seems like a question specific to ListerPro. If you have a current subscription to that module, please ask this question in the ListerPro support forums. Otherwise, please start a new thread in General Support. We strive for one issue per thread please. Thanks.
  19. Hi @ryan, I just noticed that part of the documentation for $user variable refer to Page objects instead of User object. Yes, technically, these are pages as well but I think it might confuse new ProcessWire users. In addition, the $user variable docs clear refer to users as 'users' and not 'pages'. Here's an example of what I mean. $users->delete() Here is the list of docs that need amending (that I could find): https://processwire.com/api/ref/users/add/ https://processwire.com/api/ref/users/added/ https://processwire.com/api/ref/users/delete-ready/ https://processwire.com/api/ref/users/deleted/ https://processwire.com/api/ref/users/find/ https://processwire.com/api/ref/users/save/ https://processwire.com/api/ref/users/save-ready/ (some bits are OK). https://processwire.com/api/ref/users/saved/ The get* methods and setCurrentUser() are all OK, referring to User object instead of Page object. The saveReady() refers to User object in some parts but Page object in others. For instance: But further down... Could you please consider amending these? Thanks.
  20. Works fine for me. In ready.php $this->addHookAfter('Session::logoutSuccess', function(HookEvent $event) { $user = $event->arguments(0); // here, your condition for getting transitory user if($user->id>1025){ // just to confirm wire('log')->save('logged_out',$user->name); // delete the user wire('users')->delete($user); } }); ProcessWire 3.0.159
  21. Which one? ProFields Table? If yes, definitely; Ryan's the author ? (although I am not sure what you mean exactly by proper use of the API).
  22. Hello @ivineet9, Welcome to the forums ?. Most likely using a RESTFUL API or multi-instance ProcessWire if both sites are on the same file system. Mind, these will only get you as far as the data. If you want to 'see' the admin of the other site in the backend site, you will need to develop a Process Module. There are a couple of threads in the forums that discuss how the admin panel can be locked down to 'mimick' not accessible (redirects after login, hard-to-guess-admin-url, ProcessWire outside webroot, etc) but you cannot fully get away from an admin (unless I have missed new a trick or two).
  23. Just to add to the discussion....how Laravel does it: https://laravel.com/docs/7.x/events
×
×
  • Create New...