Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Yes, similar to that. PW template could bei used AS controller / return json, but requests for HTML / views should be redirected to another file (for example "./site/template/views/*"). But I don't know how to separate both. Easiest way should be urlSegments, but another way would be nice. Both requests could be ajax.
  3. @jimmytricks, did you see this?
  4. @horst, it's perfect for me. I already had WebP since your code from late 2018 and use my own ImageSizer, which relies on LibVips. The Vips engine is very fast - about 5 times faster than ImageMagick. I hope WebP will make it into the core soon - many thanks for your hard work!
  5. Just curious, is "daurl" a field you have defined in processwire? If not, i think you might need to use $page->url for the actual url of the page
  6. If you don't want comments at all on blog posts, you can just delete the comments field from the blog-post template.
  7. Hi Ralf, I haven't used comments yet on my sites, but maybe you could add a new "Disable Comments" checkbox field on the "Blog post" template? Then in site/templates/blog-post.php add a conditional check with PHP that says something like: If "Disable Comments" is false then show the comment box and comments. Then just check the box that say's "Disable Comments" when editing the individual blog post pages and the comments/comments form won't be shown when the page is viewed. Hope that helps
  8. Great Module, thanks. I had some luck getting this to integrate with FormBuilder (method d) by using the following Form Builder hook to check the recaptcha before submitting: $forms->addHookBefore('FormBuilderProcessor::processInputDone', function ($e) use ($captcha) { $form = $e->arguments(0); // retrieve argument by number (zero based) // Check to see if recaptcha is true if ($captcha->verifyResponse() === true) { // This will process the form as usual } else { // This will cause an error on form and stop processing $form->error('Recaptcha is missing. Please tick I\'m not a robot and try again'); } }); More info on FormBuilder hooks: https://processwire.com/blog/posts/formbuilder-v34/ Cheers,
  9. @Tom. Many thanks for your feedback! And, uhm, - GD does not use the compressed jpeg for webp creation, but currently IMagick does. But this is not intended and I locally have a version that uses the uncompressed src variation for webp creation. I will finalize this and commit an update to the test branch later this evening. So the intended usage is that you can define independend quality settings for jpeg and webp, and both final variations will be created from the uncompressed variation bitimage. ["quality" => 80; "webpQuality" => 90] If you simply want to test out GD-Lib when IMagick is installed with higher priority, you can pass the param "forceEngine" with the options array to the size method: $options = [ 'forceEngine' => 'ImageSizerEngineGD', // ImageSizerEngineGD | ImageSizerEngineIMagick 'forceNew' => true, 'webpAdd' => true, 'webpQuality' => 90, 'quality' => 80, 'sharpening' => 'none' ];
  10. I'm not sure I understand. Do you want to build some sort of React/Vue/SPA and use your existing HTML templates plus "raw data" from JSON? Why not using PW .php templates in the first place? What's the big picture / goal? Perhaps you'll find some ideas/hints in this thread:
  11. I guess you could also rename your module folder from modulename to .modulename.
  12. The TracyDebugger module also has a "Module Disabler" panel that can easily disable modules.
  13. On the current page, in incognito mode (guest, i.e. not logged in), I see: page id 10207 is NOT trashable On the same page, as superuser, I see page id 10207 is trashable (simple if/else in my template) So, I'm not sure why your setup behaves different. I run the exact same PW version.
  14. @dragan This happens even when I'm logged in as the superuser, so it should bypass any permission checks. The permissions are definitely right, it only occurs for the current page. For example, I have a news listing being generated by a loop, and $news->trashable correctly returns true inside the loop. But when I view an individual news page, $page->trashable returns false for that very news ... I'm using the latest Dev-Branch (3.0.130) by the way, maybe this is a bug that was introduced recently?
  15. Are you sure you've assigned the necessary user/role rights? d($page->trashable()); If I visit a frontend-page as superuser, this always returns true. (Tracy Debugger)
  16. I you sure the keywords are being generated by this module? As you can see, I removed all references to them: https://github.com/adrianbj/MarkupSEO/commit/d6d65af93127b88f63d328d61c55fa2544133342 Are you definitely using that branch of my fork? I guess I should probably merge that branch into my master now.
  17. I'm having a problem with the $page API. I'm working on some custom admin actions / links for the frontend, and I want to check permissions before I display some links. Specifically, I'm trying to display a trash link if the page is trashable by the current user. I've tried both $page->trashable and $page->deleteable. Unfortunately, both of those seem to always return false when the page I'm calling this on is the page being viewed (i.e. I'm using the literal $page variable in my template). Is this by design? Some sort of prevention against trashing the page that is currently being viewed? I can't seem to find the method in the source code, so I'm not sure how to look it up. The documentation only says: Nothing about a special case for the current page ... Anyway, how can I reliably if a page is trashable? Do I need to take a detour through the template settings? Thanks!
  18. @horst Thank you so much, I'm playing with this now - I'll let you know if I come across anything. Appreciate the hard work. Edit: Looking good! Edit: One thing I've noticed is let's say you set the quality of the jpeg to 50 on resize, WebP will use the resized jpeg at 50 quality. Does this mean that using also webpQuality 50 would compress it twice? @horst
  19. Thanks @horst. Hopefully @ryan will include this quickly into the core.
  20. Wicked! If you happen to stick it up on github I'll use it for sure!
  21. Thanks for posting that little trick. I took some inspiration there and made a small module that does the same without AOS. Should work with Default, Reno and Uikit themes. You can enable dev mode in the module's settings or by setting $config->devMode to true in site/config.php. Text and colors can be adapted in module settings.
  22. Managed to solve my issue, documenting what I done here for others and future reference. So basically I never actually figured out the specifics of what was causing the fatal error, however as mentioned previously it did seem related to the custom module that was setting up numerous webhooks. After trying numerous things, I ended up deleting the contents of the cache table within the database, which got rid of my inital fatal error and let me render pages. Now that I could see pages, albeit with some errors I was able to then log into the backend. Wherein I refreshed the module cache which appears to have resolved the issue. Hopefully the above will be of use to someone in future... more than likely myself as I have a habit of running into the same odd errors.
  23. Hm... Thinking a little more about it, I think having a setting "set checkbox to true by default for newly created pages" would be the best option. Changing the default setting during lifetime of your website is unlikely and if so, this setting would just impact newly created pages and there would not be the need for updating existing pages (as they already have the correct value, which was set manually at that time). It would be a very easy hook, as shown above: https://processwire.com/talk/topic/2199-checkbox-default-value/?tab=comments#comment-184564 Sorry for hijacking your thread robin and thanks for the discussion
  24. Thanks for that, clears things up a bit for me. Useful information for future reference
  25. I guess this should do it: $selector .= "title|headline|lead|body|matrix.repeater_field.body%=$q";
  1. Load more activity
×
×
  • Create New...