Jump to content

adrian

PW-Moderators
  • Posts

    11,214
  • Joined

  • Last visited

  • Days Won

    373

Everything posted by adrian

  1. Just seems like it would be an easy way to check access. You could of course do a partial match, or match a custom field on the user template for each user against the page name. Lots of options - just depends what suits your needs the best and is easiest to maintain depending on how the users are added to the system.
  2. Correct - that is how those language alternate fields work. Just add the name of the language as a suffix to the base field name and it should all be taken care of automatically. Maybe not the cleanest solution because you do need a new field for each language, but other than that it works seamlessly in my experience.
  3. Haven't used it, but does this module help: http://modules.processwire.com/modules/ajax-intercooler-js/
  4. Just hook into Page::render or Page::viewable and check the user name against the page name. Sorry, no time for example code, but take a look at the Page Protector module - it should help you with code.
  5. Works great for file fields for me - I use it for different language versions of the same PDF report. I don't think you want outputformatting off though - you'd want it on to get the localized version of the file and its description. Maybe someone with more ML experience might have an idea why it's not working for you?
  6. This is the approach I use for ML file fields: https://processwire.com/api/multi-language-support/multi-language-fields/#language-alternate-field-values
  7. I don't know what your ajaxSave() method does, but get it to save the file to a temporary path, then do: $page->image_field->add("path_to_temp_image"); $page->save("image_field"); and everything should be fine.
  8. Options needs to be an array: array('upscaling'=>false)
  9. That makes sense for sure. When I sent you those other links, I assumed that the usernames would be different to the email address.
  10. Something sounds wrong there - are you sure you don't have something else that is handling the email to username check? I don't see anything in the login method to handle an email: https://github.com/processwire/processwire/blob/35df716082b779de0e53a3fcf7996403c49c9f8a/wire/core/Session.php#L704 and it doesn't work for me.
  11. Not sure, but maybe try hooking after: Session::redirect Or maybe you need to: $session->logout() first.
  12. I don't see why not - I never really thought about it before, that's all. Trouble is that I now have too many modules and not enough time I wasn't really sure how much use this module was getting. Is anybody else using this regularly?
  13. Hi everyone, Thanks to @Richard Jedlička for testing and ideas, there is a new version available. New features, both off by default: Option to control pages saved via the API - respects all defined settings, just like via the admin GUI. Option to set the name to match the title, even if the title wasn't changed during the current page editing event. Let me know if you notice any issues with this new version.
  14. adrian

    Hanna Code

    Save position: https://github.com/adrianbj/TracyDebugger/blob/865a669a3ddfc0e528413452235e8aefe50e332e/ConsolePanel.inc#L95-L107 Restore position: https://github.com/adrianbj/TracyDebugger/blob/865a669a3ddfc0e528413452235e8aefe50e332e/ConsolePanel.inc#L540-L545
  15. Two options: https://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/?page=4#comment-89599 https://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/?page=4#comment-89616 You should read about the pros and cons of each.
  16. http://modules.processwire.com/modules/markup-dribbble-feed/
  17. adrian

    Hanna Code

    I use that technique in the Console Panel of the TracyDebugger module - it's pretty easy to implement by storing the current position in LocalStorage or cookie. Perhaps you could send Ryan a PR with the added functionality?
  18. What you want is domdocument: Google this: php domdocument get first image
  19. Checking if a body field has an image in it or not should be as simple as: if (strpos($page->body, "<img") !== false) { // contains at least one image }
  20. Or if you come across a situation where you don't actually need the children, this is quicker: $child->numChildren(); but of course if you already have them, then there isn't much point doing this.
  21. Just because it looks like valid json doesn't mean it's in the correct format for Migrator. But could you please make sure you are using this version of Migrator: https://github.com/adrianbj/ProcessMigrator/tree/3e2121b8fdb68e9d9dc0c6aca8aae75e923a2669 It is two commits behind, but it looks like some bugs were introduced since that commit. As an update on this project. I still do want to get back to it, but I am now going to wait until Ryan completes all the new core page migration tools so I can use those new core methods. Will wait and see exactly what functionality he builds and extend from there if needed.
  22. Excellent - sorry about the new bug in the first place
  23. Hi @flod, I have had users able to upload images no problem here. Could you perhaps help by debugging the error from the image upload. Your browser dev console's Network tab might show what is going on. Anyone else using this module having any problems with image upload?
  24. Please try the version I just committed - I have just tested here on PW 2.7.2 and it's working fine. Note that I am using horst's WireMailSMTP module, but I don't think that should matter.
  25. Nice first post Thanks for your contribution!
×
×
  • Create New...