Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/24/2023 in all areas

  1. Thanks for the idea @bernhard - I've added it in the latest version - you'll find a new "Redirect Info" section in the Request Info panel. It is enabled by default on new installs, but will need to be manually enabled on existing ones.
    3 points
  2. ProcessWire is particular about the difference between saving pages and saving individual fields. In this case, only Pages::save and Pages::delete trigger the hook: https://github.com/processwire/processwire/blob/master/wire/modules/PageRender.module#L74. I agree this difference is pretty underdocumented. You can probably hook up your desired behaviour somewhat like this in ready.php: $this->addHookAfter("Pages::saveField", function(HookEvent $event) { modules()->get('PageRender')->clearCacheFile($event); }); I haven’t tested it but the relevant hook arguments should be the same, i. e. the Page is argument 0, so it might work? There is also Pages::savedPageOrField for when you want to make your own hooks trigger regardless of how the page was modified.
    2 points
  3. Ooh nice to see autocomplete getting some updates there ?
    2 points
  4. For my personal website I need to add many screenshots. I'd like to just save them to the clipboard and add them to my site by pasting it from the clipboard. I know that this is possible in CKE and I guess also in TinyMCE but I want to upload these images directly to an images field. Is that possible? I thought I've seen something like this once, but I couldn't find anything. Also it would be nice to be able to upload images from URL. That's especially handy when migrating content from old sites to new ones. But while writing I realise that for that use case a copy paste feature would also help! Thx
    1 point
  5. Its copied on the bottom because its an example of a feature not finished on another (not really) WIP module. it does what you are talking about. Copy image from another field, or from a screenshot, it doesnt matter, I understood you was talking about « clipboard ». The specific reason is as you are limited on mimetypes when working with the clipboard write api, in the example above it render the blob in a canvas, on différent format, including webp. Voila ?
    1 point
  6. The placeholder background images are pulled from YouTube / Vimeo, so whatever thumnail you set there will be what gets shown. Then a pretend play button that gets added which defaults to the Vimeo blue / YT red buttons: When you click the button the placholder is replaced with the relevant iframed video. The module has a config option that will let you change the colour of that button. It's not too much effort to style the play button if you want to make it bespoke (as we did for https://osborne.coop/ ). Now - GDPR is a good question. All we're doing when the page loads is pulling an image in. Neither Privacy Badger nor uBlock are complaining about anything when we load an image from YouTube, but Privacy Badger does flag a cookie from Vimeo (uBlock doesn't mind). We use the no-cookie domain for YouTube as well of course. It doesn't look as if lite-youtube or lite-vimeo offer the option to use a local placeholder image but it's probably doable. Not enrirely sure how we'd configure it in a TextFormatter tho.
    1 point
  7. Something like that ? I remember i had started to implement the feature in the not finished module editorjs. I can put my hand on it if you want, it shouldn't be missing lot of work as the upload between the two inputfields is still working.. Click "copy" button on the first pasge, CTRL/COMMAND+V on the second. Enregistrement #62.mp4 Edit: I must admit that this feature could be handy in the core image things.
    1 point
  8. I suspect this shouldn’t be too hard to implement naively, but it’s probably non-trivial to get all the configurable bells and whistles to work that image fields support (like client side resizing for example). I think you can grab images from the clipboard as blobs by listening to the paste event and filtering by type pretty easily. You’d have to figure out which image field to use, since a page could have multiple, and how to interface with it. I agree CTRL+Ving images is delightful and a desirable feature to have! Personally I don’t like WYSIWYG editors, so a cool feature would be the ability to paste pics into a Markdown textarea and have it upload it and generate the code automatically, like we see on Github.
    1 point
  9. In our page template cache settings we have, "Clear cache for saved page and parents", which works as expected when using ProcessWire (3.0.200) interactively. When we manipulate pages with the same template from the API though we get this: $page->save(); // Cache clear happens as expected $page->save('my_field'); // Cache clear is not triggered – it's as if the page has not been saved (though the field has been saved correctly). $page->setAndSave('my_field', $value); // Cache clear is not triggered Is this the expected behaviour? If so, could the $page->save() documentation be updated to mention this difference?
    1 point
  10. 1 point
  11. Not exactly sure what you want @bernhard, but if you are on a Windows machine, just use the snipping tool, select 'open screenshots folder' from the dropdown and drag to the field.
    1 point
  12. Would be nice to update the Fontawesome icons in PW core, so they can be used for labels in the backend. The current version 4 is quite old and has a very limit set of icons. Version 6 also has a free version with more icons. The implementation seems to be very similar, so it should be easy to implement. The icons can be downloaded here.
    1 point
×
×
  • Create New...