Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/19/2020 in all areas

  1. Hi all, I'm searching for Alpha/Beta tester of the new rewritten Croppable Image module. I opened a new repo on Github, with the name CroppableImage4: https://github.com/horst-n/CroppableImage4 It is a rewrite of the CAI3. I dropped all internal image manipulations, to be more future safe. Now I delegate all this to the parent core image fields methods. To be able to do this, I need to change some things and the module is no longer backwards compatible. A) For the alpha & beta testing, there is a new crop method name: $image->getCrop4(), this may be changed later to the legacy $image->getCrop() method. But for the testing period to avoid conflicts with CAI3, it is named getCrop4(). <- OBSOLETE, see the next post here in thread B) With the first param, you pass the cropname into the method. Optionally you can pass image processing options as a second param, like with the core image field. To do this, you may use an array or a selector string. C) You can use every known options param. Width, Height, Size is ignored! If you also want create WebPs in one go, please add "webpAdd" => true to the options array, (or webpAdd=1 to the options selector string)! D) The resulting image variation names will differ from those of the previous version 3! Please refer to the readme of the repo and, maybe compare it against the version 3, if you not already know it. Thats it so far. I have tested it a bit in the last days and haven't found any issues. But it would be nice if some of you can test it too.
    6 points
  2. A little promotion... Just stumbled over this one: https://metatags.io/ - it looks nice. Any experience with this or similar tools?
    2 points
  3. Just a quick note that the latest release fixes the "NEW SINCE" feature in the API Explorer panel. It had always mostly seemed to work, but I was often seeing results from old upgrades but wasn't sure why. I think it's now fixed, but I'd appreciate if you guys could check at your end when you next upgrade the PW core and see if it appears correct for you as well. Thanks.
    2 points
  4. Background I'm creating a module to integrate https://pushalert.co/ into ProcessWire. You actually don't even need a module. You could just use the "Other Websites" javascript provided by PushAlert for basic functionality, ie send a broadcast notification to all subscribers. This is essentially what all the other integrations, including WordPress, do. The WP integration installs a widget with a form enabling the admin to enter details such as title, message, etc from a blog post. It does not: collect any statistics within the CMS about the notification enable audience fine tuning to eg a particular subscriber or subscriber segment within WP. The admin needs to use the PA dashboard for that functionality PushAlert has a javascript and REST API. It's intended that this module will use both. https://pushalert.co/documentation What my module does so far: associate a subscription with a user. FE user clicks a button on the website front end to subscribe and/or agrees to the browser popup to accept notifications from this site send broadcast push alerts from a page within admin It doesn't have a 'widget' but easy enough to create a fieldsetpage with the relevant fields and add that fs page to any appropriate templates, then with a hook, send the notification. Need to be careful that once published/sent, the notification is not automatically re-sent on subsequent page edits. Looking for help/collaboration on how best: to send a notification, eg from a blog post, then track the statistics. Dilemma is that the push notification must come from the admin page. Responses go to the sending page which, as it's an admin page, is restricted and will not accept the https response. This is where the other CMS integrations stop. The only json response from PushAlert is the status, eg 'success', and the notification id. There is no opportunity at this point to capture the sending page id. handle, 'once sent on page publish', do not automatically resend on future page edits Am thinking along the lines that FS Page will have a @kongondo runtime markup field https://modules.processwire.com/modules/fieldtype-runtime-markup/ to pull the stats from PushAlert. Every time an admin visits the page, the stats will update. Once an admin checks the 'Send notification on page publish' checkbox, a hook creates new front end page that records the 'sender page', sends the notification request to PA, which then uses that newly created frontend page, as the response endpoint. Another rook re-associates the front end page with the admin page (eg blog post), to update the stats. Potential use cases: Notify individual and/or users with a particular role of an event, eg "New work opportunity" for job seekers; new blog post published; entries now open, etc... Looking for help/ideas/collaboration on this module. Please let me know if you're interested and as I do, believe this would be a great addition to ProcessWire
    1 point
  5. Just something I was trying out recently that might be useful to someone... With the following hook added to /site/ready.php you can adjust the CKEditor toolbar that a particular role gets for a particular field. Use the name of your CKEditor field in the hook condition. $this->addHookBefore('Field(name=my_ckeditor_field)::getInputfield', function(HookEvent $event) { $field = $event->object; // Define toolbar for a particular role if($this->user->hasRole('editor')) $field->toolbar = 'Format, Bold, Italic, -, NumberedList, BulletedList, Outdent, Indent'; }); Or what I find useful on some sites is adding extra toolbar buttons for superuser only that you don't trust editors to use. $this->addHookBefore('Field(name=my_ckeditor_field)::getInputfield', function(HookEvent $event) { $field = $event->object; // Add extra buttons for superuser only if($this->user->isSuperuser()) $field->toolbar .= ', Table, TextColor'; }); You could use the same technique to selectively define other CKEditor settings such as 'stylesSet', 'customOptions', 'extraPlugins', etc.
    1 point
  6. Hi @horst! When saving Crop Settings with MAMP i get (square,200,200 for example) . DB connect error 2006 - MySQL server has gone away Everything else seems fine when saving.
    1 point
  7. Thank you, Adrian, that's exactly what I need!
    1 point
  8. - + - + - + - + - + - + - + - + - + - NEWS - 2020/03/19 - + - + - + - + - + - + - + - + - + - There is a new Version in the pipe, that supports WebP too: - + - + - + - + - + - + - + - + - + - NEWS - 2020/03/19 - + - + - + - + - + - + - + - + - + -
    1 point
  9. Another problem with RestAPI. When loading large files, an error occurs. In the backend everything is fine, a 300 MB file is loaded normally. The problem only occurs when testing through Insomnia or Postman with files larger than 15 mb. We managed to solve the problem. It is necessary to include AJAX in the file properties. $ul = wire(new WireUpload($formName)); $ul->setValidExtensions(['mp4', 'avi', '3gp']); $ul->setMaxFiles(1); $ul->setMaxFileSize(100 * 1000000); // 100 MB $ul->setOverwrite(true); $ul->setDestinationPath($p_path); $ul->setLowercase(true); $ul->setAllowAjax(true); $files = $ul->execute();
    1 point
  10. Sorry, I never get to work on multi-language sites here in NZ so I don't know about multi-language features.
    1 point
  11. Ok, interesting. I had the same problem today. It's important that loading VEX happens in ready() not in init() of the module ?
    1 point
  12. Hi @Pete, thanks for the warm words. And yep, the times without web fonts was way more challenging in regards to satisfy designers dreams. Especialy when working with designers coming from print media. ?
    1 point
  13. I feel I'm going to go crazy in containment in my no balcony flat. On the other hand, I feel profoundly thankful for my working conditions because I have a lot of friends loosing their jobs or freelance income since last week and s**t hasn't even hit the whole fan here in México. Stay safe everyone! Best of luck!
    1 point
  14. Hi @kongondo just very curious as a padloper customer. Would it be possible for you to communicate a tiny bit more about what is happening maybe when to expect the fruit of all your hard work just so we know when to budget our sending you money for the upgrade to the next version thanks!
    1 point
  15. Thanks everyone for the feedback! I just pushed a new version that resolves a bug that prevented installs on PHP versions <7.4. PHP 7.1, 7.2 and 7.3 should work now! Thanks @Mikie for your help! I have also found some documentation in the ProCache store page. I've added an option to clear the ProCache now as well, though I haven't included it in the new version because I can't test it out. Would you mind giving it a go? The ProCache integration is in the procache branch on Github (download link). If it's working as intended, it should add a new option to clear the ProCache in the module configuration, including a note saying whether ProCache is installed. If selected, the 'Clear all' action should use $procache->clearAll and log the result. It would also be good to know if non-superusers can use this, or if it's limited to the superuser. Thanks! The module also appears to have been approved to the module directory, so it can now be downloaded directly through the backend using the module name ProcessCacheControl. Thanks @adrian (or is Ryan in charge of the module directory? ?)
    1 point
  16. This is actually so useful that I need to add to AOS (if you don't mind) Removing toolbar items is easy with your code but AOS may add extra buttons via CKEditor plugins. I found out that listing them in "removePlugins" is enough, so this can be used to remove extra plugins with ease: $this->addHookBefore('Field(inputfieldClass=InputfieldCKEditor)::getInputfield', function(HookEvent $event) { // do not show modified data on Field edit page if ($this->wire('process') != 'ProcessPageEdit') { return; } $field = $event->object; if($this->wire('user')->hasRole('editor')) { $field->toolbar = 'Bold, Italic'; $field->removePlugins = 'div, justify'; // plugins to remove $field->formatTags = 'p;h2;h3;h4'; // allowed format tags, separated with semicolon } });
    1 point
  17. I like the readability of the $page->exists -- something to consider. But I want to make sure I understand what you are saying, because technically there wouldn't be any difference in how you use it from $page->id, unless I'm not reading it right? i.e. these two would do exactly the same thing: $page = $this->pages->get($id); if($page->id) { // success } $page = $this->pages->get($id); if($page->exists) { // success } I guess what I'm not clear about what would be the benefit of a typed boolean here? Btw, here's another trick to do the same thing. Surround the $page in "quotes" to see if it exists: $page = $this->pages->get($id); if("$page") { // success }
    1 point
×
×
  • Create New...