Jump to content

adrian

PW-Moderators
  • Posts

    11,213
  • Joined

  • Last visited

  • Days Won

    373

Everything posted by adrian

  1. This takes me back to my newbie days PS - hope that didn't come across as though I was suggesting that is a newbie question @jploch - I would probably have referred to that old thread if I had the need once again.
  2. Have you tried this gist: https://gist.github.com/adrianbj/e391e2e343c5620d0720 With this PW permission: I haven't tested, but I think that combination should work as is, or with a little tweaking. Might avoid you needing to reinvent things.
  3. You need to install the PDO driver: https://stackoverflow.com/a/6735730/1524576
  4. I don't see a problem here with regular fields. Any chance it's just ImageExtra fields that cause the problem?
  5. I haven't seen any issues and it should be fine, because it uses PHP's version_compare() which support comparison of integer and string version numbers https://github.com/processwire/processwire/blob/57b297fd1d828961b20ef29782012f75957d6886/wire/core/Modules.php#L4023 http://php.net/manual/en/function.version-compare.php
  6. It's always been an issue to some degree: I have actually moved all my modules to string version numbers so that I can do 1.2.13 etc. I am trying to be more diligent with using numbers that are somewhat semantic at least.
  7. Try doing Modules > Refresh
  8. Well, it's pretty much just like this. If the createdUser property for the given page matches the current user, it will return true, otherwise false. If that doesn't make sense, maybe post some code so we can debug for you.
  9. Thanks to a request from @Rudy this module now supports "Allowed Roles". This is basically the same as the option in the Page Protector module, but I thought it might be nice here as well. It allows you to limit access when in Protected Mode to a defined list of roles.
  10. @Robin S -if you have original files (InDesign or compatible) you might want to take a look at Adobe's DPS: https://digitalpublishing.acrobat.com/welcome.html I haven't looked into it in a while, but what I wish would happen would be wide spread adoption of EPUB 3 so we could build layout style publications that reflow properly on smaller devices.
  11. Hi @cstevensjr - nice looking site and story. I hope it proves successful for you wife. One small thing - I noticed that all the links in the sidebar open in a new tab - I assume that this isn't intentional? Cheers, Adrian
  12. PS, this is a really good reason to be using 7.1 over 7.0: http://php.net/manual/en/migration71.incompatible.php#migration71.incompatible.fatal-errors-to-error-exceptions
  13. It sounds like easiest approach would be to change it to look like this: Properties ---User 1 -------Property 1 -------Property 3 ---User 2 -------Property 2 -------Property 4 I understand that might be an issue for the url structure on your site. There are ways around this though. The other option is https://processwire.com/talk/topic/1176-hiding-uneditable-pages-from-users/?do=findComment&comment=84916 - read that post and the post that it links to and the rest of both threads. There are ways to do this that should work fine and in your scenario I don't think the mentioned problems will be an issue. Let us know if you need help with any of the linked scripts.
  14. Hey @Robin S I haven't used a website to app conversion tool, but I have built a few apps using hybrid technologies - most recently with Ionic. You can easily distribute Android apps with an APK file. iOS are of course more difficult. If you went with Ionic, they have an app called Ionic View which makes it easy to run an app on iOS and Android devices without submission to app/play stores. There are also things like these tester app distribution tools (https://rollout.io/blog/testflight-alternatives-ios-beta-testing/) which might get the job done for your needs. Hope that's a helpful start.
  15. @ziu I think this is what you are looking for, but not positive of your exact scenario: http://modules.processwire.com/modules/admin-restrict-branch/
  16. Sorry, @bernhard - yes I did see it. I haven't investigated fully yet. I am still not totally convinced of the right way to go - the Github Pages site is ready to go and can accept PRs, but @netcarver also has something cool up his sleeve: Amongst its many features, makes the ReadMe file viewable from the Module settings within PW, so maybe that is actually a good place for docs after all? So, not forgotten, just percolating. Thanks again for the suggestion!
  17. I don't think you are doing anything wrong other than having the path to the attachment incorrect. This is the code I use successfully for sending an attachment. I am using horst's WireSMTP module. $mailer = $mail->new(); $mailer->sendSingle(true)->to($to_address); $mailer->from($from_address); $mailer->attachment($page->files->last()->filename); foreach($page->files as $file) { $mailer->attachment($file->filename); } $mailer->subject("Email Subject")->body(strip_tags($message))->bodyHTML($message); $mailer->send(); This attaches all the files in the "files" field on the current page. You can remove that foreach loop and just attach the user's uploaded file. You just need to get the full path to the file on the server disk. Based on your code above, it should be at: $config->paths->assets . "files/useruploads/" So you just need to add the filename to the end of that. I think you should specify the full path to an image that is already on your server so you can first see for yourself that attachments are correctly sending. Then you can make it grab the user's uploaded file.
  18. Not quite the same, but you can currently select the first item and if you hold down shift while clicking the last, all will be selected.
  19. Hi @ryanC - sorry for the silence on this one. I don't have much time to help with this today, but I wanted to get the ball rolling for you. I think you are misunderstanding PHP objects/variables/strings etc a bit here. You define $upload_path as a string and they try to use it like an object with a $userimage property, which just doesn't work. I would suggest stepping back and using: $mail->attachment('known/path/to/image.jpg'); That will help confirm that the attachment process is working. Then make sure that the path you are linking to the user uploaded image is the correct full path to that image.
  20. I've had no issues with the PW core and PHP 7.1. It should be noted that 7.2 does result in this warning though: https://github.com/processwire/processwire-issues/issues/408 - it's only a warning though, so not a deal breaker. There will be many modules that also fall victim to this, so I would recommend that module authors upgrade to 7.2 as soon as possible to get these dealt with.
  21. The other option is: http://modules.processwire.com/modules/dynamic-description-notes/
  22. @rafaoski - that second load looks good, although of course the Captain Hook results are now cached, but the others have sped up also. I won't worry about anything for now.
  23. Yeah, you could pass null, but I do think it's just as much hassle, so went with the "hack". I know it's used in the PW core and l've seen it lots of other places and used it myself - it just feels dirty, but in this case, I don't think it will get out of hand and makes it much simpler to use.
  24. @Robin S - I have committed a new version with these changes - let me know if you see anything amiss. Cheers!
  25. @Robin S - I've been playing a little more with this. I decided to do the check to see if the second parameter is an array or not. It still feels hacky, but I do like not having to add a title when I just want to adjust maxDepth/maxLength, so I think it's worth it. I also tried removing the space between the label and the dump output (which I just got your reply about right now ) and I think that works nicely. What do you think - does this look ready to go? BTW, I have also made both these changes to the Dumps panel.
×
×
  • Create New...