Jump to content

adrian

PW-Moderators
  • Posts

    10,896
  • Joined

  • Last visited

  • Days Won

    348

Everything posted by adrian

  1. Another thought for you - what about the option to select an image from an images field on the current page? I know sometimes I ask users to sort images so that the featured image they want is the first one in the list, or get them to tag an image with "featured", or some other approach. Being able to select an image from the current page with this field would be an awesome way of handling this.
  2. I guess I was thinking that you could combine both modules - just because the interface elements are so similar and thought it might be less maintenance for you. If a directory path is supplied in the field settings, then the images from that path could be added to a image selection section above or below the collapsed page sections. If none is specified, then only the pages would be shown. Similarly, it could be path only if no page / image field is specified in the field settings.
  3. @gebeer - I recently recommended this module to @eydun as he was looking for a media manager tool. He asked me about using it in @Macrura's awesome Settings Factory module. I had a quick play around with it but got some errors. Then I tried your FieldtypeImagePicker module and it actually works quite well. I am wondering whether: a) you are planning on maintaining this other module, and b) if you think it might be possible to make FieldtypeImageFromPage work with Settings Factory as well - I fear the need for storing multiple values might be the problem. I guess the data could be converted to json, but that complicates things for you and probably isn't worth it, but just wanted to start the discussion because I know that having an image field in Settings Factory is something many users have requested.
  4. Just a random thought - in addition to using child pages for categorizing images, I wonder if some users may prefer image tags? Perhaps you could group images for selection by the tags they have been assigned on their page. Really just thinking out loud, so please don't consider this a feature request unless you think it's a good idea - I haven't thought it through ?
  5. Yeah, being out of context like this will be confusing I think. Could you try the getForPage() method to find the page that the repeater item is on and link to that instead?
  6. Works great - thank you! This is going to be such a useful module ?
  7. Looks brilliant @gebeer A couple of minor things: 1) The "Include child pages of above page as source for images?" checkbox doesn't show as checked when it is actually checked. Typically the way to handle this is with a ternary conditional to set the checked attribute to "checked" if the value is "1", eg: $f->attr('checked', $data['enabled'] == '1' ? 'checked' : ''); 2) I didn't get an error message when deleting one of the source images. I actually wonder if you can hook into this and prevent deletion completely (unless the image is removed from being selected by this field.
  8. Or maybe you are looking to hook into the image deletion process to prevent an image from being deleted if it is used by an ImagePicker field? If so, that sounds like a smart thing to have ?
  9. I don't think it's possible. Two comments in the core code: "Fieldtype modules are not automatically loaded, they are only loaded when requested" "Inputfields are not loaded until requested" I think you might need to add a helper module for those hooks. I guess otherwise you would need to check for the presence of the pageimage from init(), rather than hooking which I think could also work fine.
  10. @gebeer - I am sure you have already thought of this, but if you're changing to only support selecting a page (and its children), you could make use of PW's API to load up the images in the picker field, rather than scanning the server folder directly. I don't think there is a reason not to change.
  11. You should be able to do that with any module, but you will likely also need to delete its entry from the modules DB table so that PW isn't looking for it. That said, I'd like to know more about the login issue - never heard anyone have that problem before - those details on PHP version etc will be useful.
  12. What about adding the image description, width, height, and filesize to the tooltip and under the selected image?
  13. I was thinking this would be optional - I don't think anyone has to set this up - the module would scan these only if they exist.
  14. I might be getting carried away, but I think it might also be nice to be able to select images from child pages of this page as well - I can see a use case for categorizing images and I think this would be a decent way of doing it. Perhaps the picker could even have a dropdown that lets you filter by child page (category). What do you think?
  15. I could, but I am not sure if you want to refine things a little more than my quick hack. I just replaced all instances of $this->config->paths->templates and $this->config->urls->templates with $this->config->paths->root and $this->config->urls->root I think perhaps it would be better to have an option in the field's settings to actually choose a page rather than manually /site/assets/files/xxxx - what do you think?
  16. @bernhard - just submitted a PR for the childTemplates and parentTemplates removal issue (https://github.com/processwire/processwire-issues/issues/802) https://github.com/BernhardBaumrock/PwCoreFixes/pull/1 One thing to note - I think you should perhaps set the autoload value of this module to 99999 - the reason being that Tracy's Admin Tools panel has a "Template delete" tool that allows you to delete templates that have associated pages in one step - it deletes the pages for you first and then the template. The problem is that because Tracy is set to autoload at 9999 it deletes the template before this fix is applied. The catch with loading this before Tracy is that then you can't use bd() calls to debug this module or the fixes you are writing for it, so not sure what is actually best ?
  17. I just implemented it here: The only changes I had to make to the module were to set the root path higher than the default site/templates/ so that I could point it to /site/assets/files/xxxx and it works brilliantly! BTW, this is what the Global Images page looks like:
  18. I think this could be handled automatically. If this module created a unique identifier for each installation then with each module settings save the ping would update the stats for this install by passing that identifier along with the fixes that are enabled / disabled. Make sense?
  19. Thanks @gebeer - this looks really useful! I wonder whether it would be useful to have an "Upload Image" option so that site editors can easily add images to this global directory so they don't need to resort to FTP or engaging their developer to add new images. I suppose the alternative would be to create a "Global Images" page in the page tree and point this module to the /assets/files/xxxx/ directory for this page - maybe that's actually the better approach? Anyway, I can definitely see using this quite often!
  20. I really like this idea and almost see it as more important than fixes that this module might contain. This is something Bernhard could implement pretty easily - whenever the module's settings are saved, it could ping a server of his with a list of which fixes are enabled. The catch of course is that some users may not want these stats tracked. Perhaps there could be an option to allow / deny tracking? It would also be great if it didn't capture any site details. Any thoughts on this @bernhard ? It would be great to show Ryan how many people some of these issues affect.
  21. Maybe it is art, but you know what would be logical and efficient ? ..... fixing issues via PRs ?
  22. Hey @bernhard - you've probably already seen this comment via Github, but I'll repost here for others. I like your proactive approach with module, but I fear that it might actually slow down fixing these things in the core because if users start adopting it, they'll be less likely to add their voice to the actual issue reports and so Ryan won't see that the issue affects other users as well. I hope I am wrong though and I really do appreciate your effort!
  23. Thanks for all the great updates (and the new examples) Chris, Latest version is looking good so far - I expect I'll be testing more again tomorrow and will let you know if I notice any issues. Cheers!
  24. Thanks Chris, I had forgotten about the ability to pass an array to the wireMail to() method - I was thinking it only handled one address or address / name pairing. Perhaps given that, there isn't really a need to pull the email and toName from the recipientVariables array, although it is a nice shortcut still. Sorry if I sent you on a wild goose chase with that. One minor point - do you know why in my email client (Mac Mail) there is a comma after the "to" address, even if I only send it to one recipient: It's not super important, but it seems a bit weird and wasn't happening before I started using batch mode.
×
×
  • Create New...