Grav CMS form Integraion with Recaptcha v3 - forms

I am using Grav form v2.16.4 - i want to integrate recaptcha v3 to it but it doesn't work.
I have added the below field to it as in the documentation, please let me know if there is any issue in it?
recaptcha:
name: g-recaptcha-response
version: 2-checkbox
site_key: 6LczAsUUAAAefefwefwefe
secret_key: sfefefwefwfcaEB0fsadzKggE
type: hidden
Here is the documentation i followed -(https://learn.getgrav.org/16/forms/forms/fields-available#captcha-field),
And also i have added the recaptcha script in the head , which shows the recaptch symbol on the site now.
please help on this. i m not familiar with Grav cms.
Thank you!

Hi Here is the solution - so what i did was - i updated the Grav form to version 4, then there you could find the recaptch latest version 3 in the drop down. And after that just need to put this code to the form -
-
name: g-recaptcha-response
label: Captcha
type: captcha
recaptcha_site_key: ////////
recaptcha_not_validated: 'Captcha not valid!'
validate:
required: true
And In process
process:
-
captcha:
recaptcha_secret: ///////
-
save:
fileprefix: feedback-
dateformat: Ymd-His-u
extension: txt
This worked for me, please let me know if anyone need help on this.

Related

'YAML syntax error: (): did not find expected key while parsing a block mapping at line 1 column 1' while creating a GitHub issue form

I get the error YAML syntax error: (): did not find expected key while parsing a block mapping at line 1 column 1 while I've created another GitHub issue form.
Here is my code:
name: Bug report
description: Send a bug WinUEFI has that needs to be fixed
title: "[BUG] <title>"
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thank you for filling out a bug that WinUEFI has! It helps me make the application better. Please be as detailed as possible so that i may consider and review the bug easier.
I ask that you search all the issues to avoid a duplicate bug. If one exists, please reply if you have anything to add to it.
Before requesting a bug, please make sure you are using the latest version and that the bug you are requesting is not already fixed in WinUEFI.
- type: textarea
id: bug-and-suggestion-relation
attributes:
label: Is your bug related to a suggestion?
description: Please give some context for this request. Why do you want it to be fixed?
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is and what needs to be fixed.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: List any alternatives you might have tried to fix the bug you want.
- type: checkboxes
id: agreements
attributes:
label: Agreements
description: Please agree to the following:
options:
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: I have ensured the bug I'm reporting isn't already fixed in the latest supported WinUEFI build.
required: true
- type: textarea
id: other
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.
EDIT: I have fixed it by correcting an another few things.
I've tried changing the name value, but it did not help.
I expected it to parse correctly and work as a template.
You have several issues going on with your YAML. First, labels: [bug] should be labels: ["but"] as that accepts a string array.
Second, you have a lot of issues with spacing. Remember that YAML is highly sensitive to spacing. Here is the working YAML of what you are looking for:
name: Bug report
description: Send a bug WinUEFI has that needs to be fixed
title: "[BUG] <title>"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thank you for filling out a bug that WinUEFI has! It helps me make the application better. Please be as detailed as possible so that i may consider and review the bug easier.
I ask that you search all the issues to avoid a duplicate bug. If one exists, please reply if you have anything to add to it.
Before requesting a bug, please make sure you are using the latest version and that the bug you are requesting is not already fixed in WinUEFI.
- type: textarea
id: bug-and-suggestion-relation
attributes:
label: Is your bug related to a suggestion?
description: Please give some context for this request. Why do you want it to be fixed?
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is and what needs to be fixed.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: List any alternatives you might have tried to fix the bug you want.
- type: checkboxes
id: agreements
attributes:
label: Agreements
description: "Please agree to the following:"
options:
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: I have ensured the bug I'm reporting isn't already fixed in the latest supported WinUEFI build.
required: true
- type: textarea
id: other
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.

How do I include base64 image in tinymce

I'm having a problem including a base64 image using tinymce.activeEditor.execCommand('mceInsertContent',
The following works:
tinymce.activeEditor.execCommand("mceInsertContent", true, "<img style = 'height:80px;width:80px' src='/Content/image.png' />");`
tinymce.activeEditor.execCommand("mceInsertContent", true, "<div>safasfdasfd</div>");
But when using tinymce.activeEditor.execCommand('mceInsertContent', true, img64);
where img64 is a base64 image received from a MVC partial view converted to string.
Does someone have a working example. I don't know if the syntax is wrong or if there is some option I have forgotten?
Update:
The following do not work:
tinymce.activeEditor.execCommand("mceInsertContent", true, "<img style='height:80px;width:80px' src='data:image/png;base64,/some long 64 string is here'>");
Does anyone know why this is not working? Some help would be greatly appreciated.
It seems that others are having this problem as well. Until there is an official way to solve your problem, there is a workaround posted in this thread: https://github.com/buddyexpress/bdesk_photo/issues/2
UPDATE: Solution is to add paste_data_images : true to your configuration.
See the docs here: http://www.tinymce.com/wiki.php/Configuration:paste_data_images
Try mceInsertRawHTML rather than mceInsertContent

Typo3 BE : No module "" could be found

I've upgraded one of typo3 module from 4.1 to 6.2 when I switch the module back end options from dropdown. The error comes. Any Idea please help
After a couple days of research. I got the solution for this.
The issue is occured because in the Iframe url: parameter 'M' {Module Name} was not generated.[you could able to see the complete url by view frame in new window]
This was due to a mis configuration that doesn't support in TYPO3 6.2
I've changed conf.php and index.php in TYPO3 Module Folder.
1.In conf.php
OLD : $MCONF['script']='index.php';
CHANGE : $MCONF["script"]="_DISPATCH";
2.In index.php
OLD CODE
unset($MCONF);
require ("conf.php");
require ($BACK_PATH."init.php");
require_once($BACK_PATH.'template.php');
require_once (PATH_t3lib."class.t3lib_scbase.php");
$LANG->includeLLFile("EXT:extension_name/mod1/locallang.php");
$BE_USER->modAccess($MCONF,1);
NEW CODE
unset($MCONF);
require ("conf.php");
//Comment----------require ($BACK_PATH."init.php");
//Comment----------require_once($BACK_PATH.'template.php');
//Comment----------require_once (PATH_t3lib."class.t3lib_scbase.php");
/*
* Changed $LANG to $GLOBALS['LANG']
* Changed $BE_USER to $GLOBALS['BE_USER']
*/
$GLOBALS['LANG']->includeLLFile('EXT:wf_tagcloud_bl/mod1/locallang.xml');
$GLOBALS['BE_USER']->modAccess($MCONF,1);

Symfony2.5 softDeleted with mongodb

How to make the symfony doctrine extension 'SoftDeleted' works with mongoDb? (doctrine-mongo-odm). The plugin says 'only works for ORM'...And is there any other solutions ?
DoctrineExtensions for ODM currently doesn't support Softdeletable.
List of extensions which support ODM
Translatable
Sluggable
Timestampable
Blameable
Loggable
Translator
Tree (Materialized Path strategy for now)
References
Sortable
See the documentation on Github for more informations.
Edit: scratch that. Just found this https://github.com/Atlantic18/DoctrineExtensions/pull/877
Edit 2: https://github.com/Atlantic18/DoctrineExtensions/blob/master/lib/Gedmo/SoftDeleteable/Filter/ODM/SoftDeleteableFilter.php
It seems to work like the normal ORM annotation. To set it up with symfony just follow the usual documentation (not the one on that Repo).
Config:
doctrine_mongodb:
...
document_managers:
default:
[.....]
filters:
soft-deleteable:
class: Gedmo\SoftDeleteable\Filter\ODM\SoftDeleteableFilter
enabled: true
Edit 3 Updated the code above again, because I'm stupid

Is it possible to only post fxml comments without letting a user enter a comment by themself?

Im want to let the user to see the comments done to a topic without giving him the opportunity to enter a comment by his one! Is this possible with fxml? canpost="false" doesn't work for any reason...
Is this possible at all?
Thanks
Markus
Well lets take a look at sources. If we open http://connect.facebook.net/en_US/all.js it has the following piece of code:
FB.subclass('XFBML.Comments', 'XFBML.IframeWidget', null, {
_visibleAfter: 'resize',
_refreshOnAuthChange: true,
setupAndValidate: function () {
var a = {
channel_url: this.getChannelUrl(),
css: this.getAttribute('css'),
notify: this.getAttribute('notify'),
numposts: this.getAttribute('num-posts', 10),
quiet: this.getAttribute('quiet'),
reverse: this.getAttribute('reverse'),
simple: this.getAttribute('simple'),
title: this.getAttribute('title', document.title),
url: this.getAttribute('url', document.URL),
width: this._getPxAttribute('width', 550),
xid: this.getAttribute('xid')
};
...
It is a list of parameters that are getting passed to actual widget iframe.
Bad news is that there is no such parameter as canpost anymore even though it is still listed in their docs (anyone surprised?), so it just getting ignored.
Good news is that css parameter could be still supported. In good old days they allowed you to pass custom css (in a form of absolute url, http://mysite.com/style.css), but I doubt it still works. Try to create your custom css style with comment box hidden (check comments iframe for required class name) and pass it. If that doesn't work then there is nothing else you can do I'm afraid.