Jump to content

kongondo

PW-Moderators
  • Posts

    7,476
  • Joined

  • Last visited

  • Days Won

    144

Everything posted by kongondo

  1. Hi @hollyvalero Thanks for the purchase. Currently this is not possible. $ds->cat1, etc only return simple values like texts and integers. However, I should be able to add this as an extra property for $ds columns that refer to pages, i.e. add the URL. Have you seen the documentation here? https://dynamicselects.kongondo.com/documentation/using-fieldtype-and-inputfielddynamicselects-backend/fieldtypedynamicselects-api/ This would fall under 'Other Properties'. So, something like $ds->cat1URL ($ds->nameofcolumnURL format). Let me have a think and I'll get back to you. Thanks.
  2. I wish I could convince you otherwise ? I won't...been there, done that.
  3. I really recommend that you do. Sooner or later you will need older versions of something and it will be a pain to rebuild (and various other reasons why one should try and use some versioning system, invariably git). What IDE do you use for you coding? VSCode? The easier way is to using cloning, then push your changes from your local repository. So: Assuming you use VSCode, open the editor and CLONE your repository (using this url https://github.com/techcnet/ProcessPageViewStat.git) It will want to clone to an empty directory. You can temporarily rename the directory where your module files are to ProcessPageViewStat2 Let VSCode clone your empty repo to /site/modules/ProcessPageViewStat. It will copy the files from your project in GitHub and create a .git file. Your files will be ready for tracking. Once that's done, in your file explorer (e.g. windows explorer if on Windows), copy the local module files that you have in ProcessPageViewStat2 to the new ProcessPageViewStat VSCode will tell you that you have added new files. You can then PUSH the CHANGES to your repository. To do that, the first time, VSCode will guide you through authenticating yourself to GitHub as you are the only one with PUSH privileges. Sorry, I am in a bit of a rush. I suggest you have a look at a tutorial about the basics of git or maybe just the basics of GitHub/git and VSCode.
  4. 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.
  5. That will be great, thanks. It just makes it easier for people to fork, play around with, submit PRs, rollback to older versions, etc. ?
  6. 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?
  7. 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);
  8. 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? :-)
  9. 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?
  10. Silly me. That's because the iframe is being stripped out in my tests. Let me try again, properly this time :-).
  11. Is this the whole iframe code? I've just pasted it and saved and there is no glitch at all.
  12. @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 :-).
  13. 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.
  14. FYI, there's a corresponding filter for templates.
  15. Actually you don't need this :-). Just need to use Filters -> Show System Fields :-).
  16. Welcome to the forums @guigui, I have no idea but maybe this topic can help?
  17. 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.
  18. 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 :-).
  19. It is a free ProField. Welcome to the forums and ProcessWire ?.
  20. 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
  21. 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.
  22. 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.
  23. 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
×
×
  • Create New...