Jump to content

adrian

PW-Moderators
  • Posts

    11,214
  • Joined

  • Last visited

  • Days Won

    373

Everything posted by adrian

  1. If you're keen, I'd love a PR! I think that adding it to that existing action would be the best approach, so I think I need to revisit the "Author" column so that everyone gets credit if there are multiple authors for an action.
  2. This sounds like a handy AdminAction Not specifically from the parent to child page, but a general one for copying/moving from one page to another. Not sure if it would be best as a new action, or incorporated into the logic of the "Copy Field Content To Other Page" action which currently only handles basic text based fields. I would like to extend this to support all field types.
  3. strip_tags is the simplest for sure. If you want more control, try the textarea sanitizer: https://github.com/processwire/processwire/blob/35df716082b779de0e53a3fcf7996403c49c9f8a/wire/core/Sanitizer.php#L1022
  4. Would you mind adding a note to that issue to confirm that you are seeing it also? Thanks! Yes, that works, but probably not a good idea, because status values are additive - it may not really matter with repeaters, but I would still recommend that we get Ryan to sort out the source of the problem.
  5. @CalleRosa40 - you may want to look at this: https://github.com/processwire/processwire-issues/issues/36#issuecomment-258702228 Firstly, it shows how to unpublish a repeater, but it also shows that there is currently a bug with this - at least as far as I can tell, but Ryan hasn't responded to my last post, so will have to wait and see. I'd love your feedback on that Issue if you can also confirm what I am seeing.
  6. I don't have time to help out right now, but this would be an easy module to create - either added to the children tab (which you could rename to family) or adding a new siblings tab.
  7. Any chance $page->parent->title; is returning an object due to multi-language?
  8. @lokomotivan - you should never install modules with the "-master" on the folder name. The easiest way to install is to use the ClassName option, or URL, or zip links. This is way easier than manually extracting and copying to the modules folder and it takes care of this for you.
  9. But a page can have more than one child You can define it as $page->child() or $page->children()->first() and you'll get the first child, but you need to define what child you are after!
  10. It should work that way. I am just guessing that $child is not defined in the _init.php file, so your $postedago variable is blank/null
  11. What did you set $child to?
  12. This module is very old and I am not sure if it is still maintained - maybe it's just fine, but you might also find what you need in this PW core function: wireRelativeTimeStr() https://github.com/processwire/processwire/blob/d935e9b6995124d76e6fda17fd47ab46dc4d3a3c/wire/core/Functions.php#L283
  13. Glad to hear it's working with 2.8. Sorry about the issue with 2.7 - I think perhaps the "noLang" template setting must have been introduced in 2.8/3.x I'll update the modules directory to reflect this. Thanks for the help debugging!
  14. Screenshot from your site:
  15. Ok, the problem is that you are running PW 2.5.3. Please try updating to 2.8 or 3.x. I don't think there is any way to make this module work with 2.5.3.
  16. Thanks - unfortunately it looks fine! I don't suppose there is any chance I can get access to this site to test a little? If not, we need to figure out why the module is not processing this page. I need to know that the multilanguageStatusCheck() methods is being called. If you have Tracy installed, could you replace that method with this: public function multilanguageStatusCheck(HookEvent $event) { $p = $event->object->getPage(); bd('pid:'.$p->id); // if actual noLang setting for this page's template is set to disabled (1) then exit now so we don't potentially enable if($p->template->noLang === 1) return; bd('OK1'); $parentsToMatch = array(); foreach($this->data['multilanguageStatus'] as $pid => $settings) { if($settings['onlyThisPage'] != 1 || $p->id === $pid) $parentsToMatch[] = $pid; } $pageMatchSelector = "id=".implode("|", $parentsToMatch); bd($pageMatchSelector); // parent() doesn't include current page $this->closestSpecifiedParent = $p->parent($pageMatchSelector); // closest() includes current page $this->closestMatch = $p->closest($pageMatchSelector); // if there's a match, set the noLang value for the page's template appropriately if(isset($this->data['multilanguageStatus'][$this->closestMatch->id])) { bd('match'); $p->template->noLang = ($this->data['multilanguageStatus'][$this->closestMatch->id]['status'] == 'disabled') ? '1' : '0'; } // if no match, then use default from config settings else { bd('no match'); $p->template->noLang = $this->data['multilanguageDefaultStatus'] == 'disabled' ? '1' : '0'; } } and then post a screenshot of the dumps panel for me.
  17. No, I am looking for this - do you have access to PHPMyAdmin or similar to browse the PW "modules" table?
  18. Sorry about this. Can you please post the contents of the data field on the RestrictMultiLanguageBranch row of the PW modules db table?
  19. @adrianmak - thanks for that. Sorry about the problem. Can you please try the new version I just committed. I have updated the modules directory, so it should be available from the update check.
  20. @adrianmak - can you please post a screenshot of the settings for this module that are at the bottom of this page's Settings tab?
  21. There are several options: 1) The easiest option would be in the Console Panel in TracyDebugger 2) Converted to an action for the Admin Actions module - this would be a great option because I expect there will be lots of users wanting to convert from Thumbnails to Croppable image over the next few months - hint hint @netcarver, @horst, or @jacmaes 3) In a test hanna code 4) In a template file 5) In a bootstrapped script in the root of your site
  22. Quick update to the CreateUsersBatcher action. It now allows two options: 1) Define Username and email address (requires EmailNewUser to generate password). 2) Define additional user template fields (whichever ones you want). If you use this option and include the password, then you don't need the EmailNewUser module. You could even given all staff at a client's office the same temp password and let me know by phone (this way there is no security risk with emailing even a temporary password that will be changed) - it's your choice. Hopefully this screenshot will help to explain it better - note that the "New Users" textarea lists the fields from the user template and the order they need to be entered. In this example I have additional "first_name" and "last_name" fields, as well as the field added by the PasswordForceChange module which you can set to 1 to enforce this if you want.
  23. Hi everyone, To celebrate @teppo featuring this module in PW Weekly, I have added a new action: Create Users Batcher It lets you quickly create many users by entering: "username, email address" on separate lines in a textarea. This action requires the EmailNewUser module and it must be configured to automatically generate a user password. The action checks for this module and that setting before it will let you proceed. I also recommend that you install the PasswordForceChange module to reduce the risks of having emailed a password to a user. You can set multiple roles to be added to each new user. Be aware that at least one of these roles must have the "profile-edit" permission so that the user has the ability to change their password when they first login. Note that EmailNewUser will report each successful user creation and email sent success. I hope that the next time you need to create several users for a new client that you'll give this a try. And of course, don't forget to send me your own actions for inclusion with the module
  24. Nice sleuthing - sorry, I should have thought to mention that since I posted this issues ages ago: https://github.com/ryancramerdesign/ProcessWireUpgrade/issues/10
  25. Definitely working here. Have you done a Modules > Refresh? Maybe it is caching the source?
×
×
  • Create New...