Jump to content

gebeer

Members
  • Posts

    1,489
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by gebeer

  1. This looks really useful. Might still be a bit cumbersome for editors with all those start end rows columns. But nice how you made changes reflect instantly in the preview. Mind to share the code? ? What do you need the row settings for, Couldn't you act on drag&drop of the rows themselves inside the table field?
  2. I am totally fine with paying money for that extra functionality. PW has so many great features already in the core. And I am happy to support Ryan with a ProFields subscription. Looking at how many great tools you get in that bundle, the price is more than fair.
  3. You can always add a custom class to the button and style it according to your needs.
  4. Today I discovered that it doesn't work inside RepeaterMatrix fields, yet. If you have a chance to test this, please report. Thank you.
  5. New version v2.0.2 is available from github. This version fixes the problems with getting thumbnails displayed via ajax. At least in my extensive testing everything was working. @LMD can you please give it a try now? While trying to fix the ajax issue, I was running in circles for hours on end. Tried various methods I found in the forum and @bernhard's hook. I always got it working as superuser but got very strange results when logged in as an editor user with page edit permissions. Until I discovered that the problems were due to my module not always loading for ajax requests. I added 'autoload' => 'template=admin' to my module info and suddenly all was working as expected. Still scratching my head why a module's init() method would get called when logged in as superuser but not when logged in as editor. Any ideas here? New in this version is the feature for uploading files to the predefined folder from within the inputfield. Here's a short preview of that feature. uploadtofolder.mp4 Now that this is working, I'm thinking about adding the ability to delete them from within the inputfield, too. As always, I shall be happy to receive your comments and issue reports ?
  6. Yep, will change it. Thanks for that hint. Will give it a try.
  7. Thank you for clarifying. I'm currently looking into it. But won't be able to fix this until hopefully tomorrow.
  8. Are you logged in as non superuser when this happens? I just discovered a few minutes before you posted that there is a problem with non superusers. See my last post above. Try to fix this asap.
  9. @all I just discovered that v2.0.1 is not working correctly when not logged in as superuser. The ajax calls to get the thumbnails are not working. You can either revert back to v2.0.0 and deactivate the option to get thumbnails or wait for a fix to the master version. Sorry for the inconvenience! I have my logic for the ajax calls in the init() method of InputfieldImageReference.module. Until just now I didn't realize that this is not getting called correctly. I read up on how to implement ajax calls to an inputfield module and one of the proposed ways was to do this in init(). Will have to investigate further. If anyone can give me pointers on how to make this work, this would be great.
  10. You need to set additional data attributes on your button data-buttons='button#submit_dashboard_status_action' data-autoclose $field->attr('data-buttons', 'button#submit_dashboard_status_action'); $field->attr('data-autoclose', ''); and your submit button needs an id, too $submit->attr('id+name', 'submit_dashboard_status_action'); // set id and name in one go This is documented at the top of file wire/modules/Jquery/JqueryUI/modal.js.
  11. I had that problem, too. Until I discovered that my PHP gd library didn't have webp support installed. So you need to check that in phpinfo. I am using laradock for my local dev environment. In my php-fpm container, I had to install libwebp-dev. For my specific environment this was achieved with RUN apt-get update -yqq && \ apt-get install -y libwebp-dev RUN docker-php-ext-configure gd \ --enable-gd-native-ttf \ --with-jpeg-dir=/usr/lib \ --with-webp-dir=/usr/lib \ --with-freetype-dir=/usr/include/freetype2 && \ docker-php-ext-install gd
  12. I will soon implement the file upload to custom folder feature into ImageReference. Then you can upload an image from within the inputfield to a designated folder and then pick it afterwards. This should make it an even better option for SettingsFactory.
  13. Happy New Year to everybody! New v.2.0.1 is out. It fixes the problem described by @LMD. Now the inputfield can be used inside repeaters again. Also I removed the option to load thumbnails via ajax. It didn't really make sense to have this as an option. They are now always loaded via xhr requests. I did extensive testing with 2 fields of this type on one template and a repeater field on the same template, that also holds the 2 fields of this type and it went smoothly. However, if you experience any problems, please let me know here or on github. Thank you.
  14. Do you need a fallback code in a template php file to render your normal image field if imagereference field is empty? an empty ImageReference field returns null. So you could do something like this if($page->imagereference) { // the image reference field has an image echo "<img src='$page->imagereference->url'>"; } elseif(!$page->imagereference && $page->imagenormal) { // no image in image reference field but image in normal image field echo "<img src='$page->imagenormal->url'>"; } You can have the ImageReference field alongside your normal image field on one template. So it shouldn't be a problem to keep your normal images field and add a ImageReference field. The ImageReferenceField needs a normal image field to get images from. But the normal image field does not have to be on the same page since you can pick an image from any other page (depending on the field settings). Hope this clarifies it. If not, please try to explain your use case in more detail.
  15. @LMD thank you for reporting. Will look into it and upload a patch soon.
  16. Not quite sure if I really understand your needs. If you want to upload a file from a URL to a file field, there is a module 'Add Image URLs'. Maybe you can use it, or some code from that module for your file field.
  17. New v2.0.0 is out on github. I renamed the module to ImageReference (as suggested by @bernhard) to avoid the naming conflict with @theo's module ImagePicker. Version was bumped to 2.0.0 because it introduces breaking changes due to renaming. So if you have an older version installed, you need to first uninstall it and then install v2.0.0. Sorry for the inconvenience. The new version also adds a new option. You can now choose images from any page on your site (similar behavior to choosing images when inserting into CKEditor). Please give it a try and let me know if you run into any problems. After some more revision, I will add this fieldtype to the modules directory. I would like to thank everybody who contributed their ideas to this module and wish everyone a good transition into the new year.
  18. Nice idea. If you have sth like template engine factory module in mind, people could add their own engine modules. Two more engines, that are quite popular and not on your list: Mustache and Smarty.
  19. Thanks a lot for your suggestions @szabesz @bernhard I really like ImageSorcerer and ImageReference. The former for its creativity, the latter for its clarity and reference to the page reference field. The more I think about it the more I tend towards ImageReference. It says it all clear what this fieldtype and inputfield are doing: allowing you to store a reference to an image that lives elsewhere in the system. I had that thought, too. But I decided to leave them as separate options mainly because the 'select image from page' allows to setup a dedicated page with a set of images to choose from and to categorize them by using child pages. If I made this a flexible option it might not be obvious for developers and editors what is really happening here. What I'm currently working on is having the PageListSelect remember the page that the image was selected from. Will release this feature before end of this year.
  20. @kongondo let me know that there already is a fieldtype module ImagePicker authored by @theo. To avoid confusion, I am going to rename my module. Not 100% sure yet on the new name. What I think would fit the purpose and features of my module is ImageFromAnywhere. With the upcoming addition of the 'Choose image from any page' feature, I think this name reflects quite well what the module does. I'll be happy to receive your suggestions for a new name. Note to forum admins: I can't make text bold or italic for quite some time now on latest Firefox and Chrome on Linux.
  21. I am working on the 'pick image from any page' feature. It have it basically working but it still needs some polishing. Here's a short preview (mainly for @adrian) so you see what I mean ? pickfromanypage.mp4
  22. Thank you for this info. I was not aware of that. Will have a loock at that module and contact the author. Can rename mine if necessary because eventually I want to add it to the directory.
  23. You can also use a conditional hook https://processwire.com/blog/posts/new-ajax-driven-inputs-conditional-hooks-template-family-settings-and-more/#new-conditional-hooks These fire only, when a specified field value has changed. So your potential problem of accidentally sending multiple emails can be eliminated. You just watch for changes in your status field and act accordingly. Edit: here is an excellent tutorial about how to watch for field changes: It uses a different hook.
×
×
  • Create New...