Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/02/2020 in all areas

  1. This module allows you to integrate hCaptcha bot / spam protection into ProcessWire forms. hCaptcha is a great alternative to Google ReCaptcha, especially if you are in the EU and need to comply with privacy regulations. The development of this module is sponsored by schwarzdesign. The module is built as an Inputfield, allowing you to integrate it into any ProcessWire form you want. It's primarily intended for frontend forms and can be added to Form Builder forms for automatic spam protection. There's a step-by-step guide for adding the hCaptcha widget to Form Builder forms in the README, as well as instructions for API usage. Features Inputfield that displays an hCaptcha widget in ProcessWire forms. The inputfield verifies the hCaptcha response upon submission, and adds a field error if it is invalid. All hCaptcha configuration options for the widget (theme, display size etc) can be changed through the inputfield configuration, as well as programmatically. hCaptcha script options can be changed through a hook. Error messages can be translated through ProcessWire's site translations. hCaptcha secret keys and site-keys can be set for each individual inputfield or globally in your config.php. Error codes and failures are logged to help you find configuration errors. Please check the README for setup instructions. Links Github Repository and documentation InputfieldHCaptcha in the module directory Screenshots (configuration) Screenshots (hCaptcha widget)
    10 points
  2. Literally heard about hCaptcha for the first time earlier today when someone recommended it as a ReCaptcha replacement. Great to have this available as an option! ?
    3 points
  3. Since it's featured in ProcessWire Weekly #310, now is the time to make it official: Here is Twack! I really like the following introduction from ProcessWire Weekly, so I hope it is ok if I use it here, too. Look at the project's README for more details! Twack is a new — or rather newish — third party module for ProcessWire that provides support for reusable components in an Angular-inspired way. Twack is implemented as an installable module, and a collection of helper and base classes. Key concepts introduced by this module are: Components, which have separate views and controllers. Views are simple PHP files that handle the output for the component, whereas controllers extend the TwackComponent base class and provide additional data handling capabilities. Services, which are singletons that provide a shared service where components can request data. The README for Twack uses a NewsService, which returns data related to news items, as an example of a service. Twack components are designed for reusability and encapsulating a set of features for easy maintainability, can handle hierarchical or recursive use (child components), and are simple to integrate with an existing site — even when said site wasn't originally developed with Twack. A very basic Twack component view could look something like this: <?php namespace ProcessWire; ?> <h1>Hello World!</h1> And here's how you could render it via the API: <?php namespace Processwire; $twack = $modules->get('Twack'); $hello = $twack->getNewComponent('HelloWorld'); ?> <html> <head> <title>Hello World</title> </head> <body> <?= $hello->render() ?> </body> </html> Now, just to add a bit more context, here's a simple component controller: <?php namespace ProcessWire; class HelloWorld extends TwackComponent { public function __construct($args) { parent::__construct($args); $this->title = 'Hello World!'; if(isset($args['title'])) { $this->title = $args['title']; } } } As you can see, there's not a whole lot new stuff to learn here if you'd like to give Twack a try in one of your projects. The Twack README provides a really informative and easy to follow introduction to all the key concepts (as well as some additional examples) so be sure to check that out before getting started. Twack is in development for several years and I use it for every new project I build. Also integrated is an easy to handle workflow to make outputs as JSON, so it can be used to build responses for a REST-api as well. I will work that out in one section in the readme as well. If you want to see the module in an actual project, I have published the code of www.musical-fabrik.de in a repository. It runs completely with Twack and has an app-endpoint with ajax-output as well. I really look forward to hear, what you think of Twack?! Features Installation Usage Quickstart: Creating a component Naming conventions & component variants Component Parameters directory page parameters viewname Asset handling Services Named components Global components Ajax-Output Configuration Versioning License Changelog
    1 point
  4. https://github.com/processwire/processwire-issues/issues/1086
    1 point
  5. Might be something to do with FormBuilder then. Is that how FormBuilder generates temporary page names or something? Unfortunately I don’t have FormBuilder, but if your license is still fresh you might want to run this by the FormBuilder support forum. The way your code looks, I suppose you don’t want FormBuilder to handle submitted requests at all, since you’re rolling everything yourself. So perhaps you want to use its “Submit to another URL” option.
    1 point
  6. Thx @zoeck I've added a shortcut method getRepeaterTemplate() for that: https://github.com/BernhardBaumrock/RockMigrations/commit/dd741064cd19b661bdcb441cdabe153b3abe8e57
    1 point
  7. After I had a closer look at the repeaters, I could add the items to the repeater. It is actually not that difficult, but you need a little workaround: $repeatertemplate = $this->templates->get($this->fields->get("**REPEATERNAME**")->template_id); $rm->addFieldToTemplate("proj_milestone_date",$repeatertemplate); For each repeater a (hidden) template is created, you just have to find the template from the repeater and then add the field via RockMigrations ? It is also possible to add several fields with "addFieldsToTemplate", setFieldData is also possible.
    1 point
  8. There is a cool hack for getting immunity safely. It is called a vaccine.
    1 point
  9. The Processwire admin does not support webp. Webp is an output format, but not a valid source format for images. The Imagesizer engine of Processwire is not capable of resizing webp images, therefore when you save, it cannot generate the thumbnail, and that's why you get the error. You'll need to delete that webp image and upload a jpg instead.
    1 point
  10. That's not how it works ? ProcessWire does not just read files on your system arbitrarily Templates have to be 'registered' with ProcessWire Templates do not need to have a template file (some of the files you are seeing in the ftp) Template file names do not need to match the name of the template (i.e., default is that they match, but this can be changed) Some developer uses the templates folder to store PHP files they can include in their template files or modules Hooray! We have (partial) lift-off ?
    1 point
  11. Hi Joshua, yes, in Germany, this is not mandatory at the moment - in other EU countries the situation might be different. All German lawyers online with lots of drama about the subject offer - surprise surprise - their own commercial solutions. I have not read any neutral position/comment on the subject yet. As I understand it, the tenor from the BGH is that the user should be able to know exactly what he or she agrees to. According to this, the webdesigner would have to name names. The BGH ruling is still too recent (end of May 2020) and has not yet been implemented in German law. I just want to be prepared. I am irritated to I see the free KLARO goes the same route, listing all the little details. I am not prepared yet to fork and PR. I am thinking about possible concepts right now. Maybe just adding an optional data-attribute with some line of text or a link which is is dispayed with a "read more" in the module's output, so the module does not need to handle every little detail? I am curious about other opinions from EU developers here. (I am also checking out the KARO module for WordPress right now to see how they are managing the information there.) Cheers, Carl
    1 point
  12. Hi @pmichaelis, I'll have look. Thanks for reporting.
    1 point
  13. @gornycreative - https://github.com/rolandtoth/AdminOnSteroids/issues/118
    1 point
  14. @ryan Thank you for your insight, it was an interesting read to learn more about your current refactoring efforts. I am wondering if it is the right time for you to also start working on the Javascript API perhaps? I don't remember since when it is on the roadmap, but in this post from 2017 you wrote: "...so I'm going to continue to keep this in our roadmap."
    1 point
  15. There is some bug with links provided in this warning message. I also struggled with this for some time until I made "C" translation manually through language panel. Setup -> Languages -> [ your language ] -> Find files to translate -> In "Translatable files in /wire/" -> "/modules/LanguageSupport/LanguageSupport.module - Languages Support"
    1 point
  16. @szabesz in templates, sure, using return $this->halt() is a better solution, but in functions or classes or anywhere outside template context, there's no option but to exit; or die; to stop PHP from processing further.
    1 point
  17. Please do NOT die There are other explanations in the forum about why but here is one too: https://webdesign.tutsplus.com/tutorials/processwire-tricks-and-tips--cms-28613 <?php if ($config->ajax) { // AJAX content echo ‘my content’; // Calling halt() stops template rendering but continues towards ProcessWire’s normal shutdown. return $this->halt(); } // non AJAX content below
    1 point
  18. Hi Sradesign, Finally could look at the implementation, turned out that you must enable tracking by values explicitly like this: $p = $pages->get('/'); $p->setTrackChanges(Wire::trackChangesOn | Wire::trackChangesValues); $p->title = 'new value'; var_dump($p->getChanges(true)); die(); Worked for me then, hope it helps! Cheers
    1 point
×
×
  • Create New...