I am trying to use a Image Captcha plugin on my website.
Currently I am using google reCaptcha plugin with V2.
But I need a captcha with Image (like Flexible Captcha), I tried using it, but Image dosen't load for this plugin.
I searched for many, but I want it with short code, so that I can place it on my custom forms.
Or If anyone knows how to remove image issue with "Flexible Captcha" plugin, please post your solution.
Edit:
I also tried to use the Securimage-WP plugin as suggested by drew010. Following is the output of plugin:
On Admin settings for plugin:
On Login page:
Note:
My website URL is like http:abc.com/myWebFolder/
Is this thing breaks the plugin to work or it could be the theme issue.
Thanks
My plugin Securimage-WP offers a shortcode for putting a captcha on a custom form.
The plugin also defines a function which you can then call to validate the submitted CAPTCHA.
I have posted a gist here which shows a WordPress page that uses the shortcode on a form and then validates the form and CAPTCHA. Note: Since this page uses PHP, you will need a plugin (I use Exec-PHP) that allows you to run PHP code in posts and pages.
If you need to validate the CAPTCHA in a form processor that is independent of WordPress, you can hook into WP and the plugin by including wp-load.php from the root of your WordPress install.
Comment if you have any questions. Hope this helps!
thank you drew010 for your help, I made complete new installation of wordpress & used your plugin & it worked, then I also used Flexible Captcha plugin & that also worked. Then in order to debug the real problem I add my custom plugin code in new Wordpress. Then it braked. Therefore, to debug more I added each method in my plugin & tested it worked with method. The culprit was following code:
/**/
?>
<?php
function displayLoginForm() {
/*
ob_start();
get_template_part( 'signin-form' );
$ret = ob_get_contents();
ob_end_clean();
return $ret; */
ob_start();
include(ABSPATH . "wp-content/plugins/tus-forms/Views/sign-in.php");
$output = signin_get_clean();
return $output;
}
?>
Changing above into following solved my problem:
function displayLoginForm() {
/*
ob_start();
get_template_part( 'signin-form' );
$ret = ob_get_contents();
ob_end_clean();
return $ret; */
ob_start();
include(ABSPATH . "wp-content/plugins/tus-forms/Views/sign-in.php");
$output = signin_get_clean();
return $output;
}
?>
But I still don't know the real reason behind this issue?
but finally it worked.
Thanks
Captcha On Login This plugin is more flexible with image and its having another feature include of blocking ip and removing ip from blocked. I am using this plugin it is really good.
enter image description here
Related
I have tired many solutions and posted code but I didn't get any response please help me. My function doesn't even give an error.
add_action( 'phpmailer_init', 'New_Mail');
ini_set('display_errors', 1);
error_reporting(E_ALL);
function New_Mail($phpmailer){
print_r($phpmailer);
die();
}
You can install a plugin like "Easy SMTP" and use normally wp-mail functions. Its rather than reinventing the wheel.
I want to edit my mail and change everything, if I want, as shown here.
Ive imported my file and created a test route to view the page:
use Illuminate\Mail\Markdown;
Route::get('/mail/html', function () {
$markdown = new Markdown(view(), config('mail.markdown'));
return $markdown->render('vendor.mail.html.message'); // or ..markdown.message
});
However, Im having variable errors for #slot. How to view my change/see what the mail looks like before sending? Another package for that?
Thanks
To preview your email in browser please add below code to route
Route::get('preview-notification', function () {
$markdown = new \Illuminate\Mail\Markdown(view(), config('mail.markdown'));
$data = "Your data to be use in blade file";
return $markdown->render("path-of-your-templete-blade-file", $data]);
});
and you will be access your templete using
http://your-application-url/preview-notification
This is the recommended way by the Laravel community
kunal has a nice quick solution and that's how I used to do it. But now I use mailtrap.io to test emails because it allows you to replicate the whole process of sending an email.
Create a (free) account with mailtrap.io.
Add your mailtrap username and password in .env file.
By the way, Laravel is already configured to use mailtrap by default, so it is their recommended way to test emails.
Watch how Jeffrey Ways does it in his lesson:
Laravel 5.4 From Scratch: Sending Email
https://laracasts.com/series/laravel-from-scratch-2017/episodes/26
If you want to test in locally. You can put echo command in blade file at end and put die; this way you can test.Suppose you have test-email.blade.php
test-email.blade.php // file name
This is tets mail
<?php echo "test"; die; ?>
Hope it helps!
Im writing a Joomla extension that allows a custom script to run on every "site" page.
I've already done the backend part including database access, but, now I'm completely stuck as to how to add custom javascript to every page of the "site", no matter what theme is installed. Also, I do NOT want to disturb any other stuff on the page.
I have been searching the net for almost 4hours, plus have tried modifying index.php file of templates in various ways, but all in-vain.
Any help?
Thanx in advance...
EDIT
I need to distribute this as an extension...
You need to create a content plugin. For example
class plgContentMyplugin extends JPlugin
{
public function onContentPrepare($context, &$article, &$params, $page = 0)
{
$document = JFactory::getDocument();
$document->addScript(JURI::base().'plugins/content/myplugin/js/myscript.js' );
}
}
This will add myscript.js in the <head>. Just check in docs how to package the plugin
So, one of my developers used a function like this to make a custom navigation for a Magento eCommerce site:
<li><a class="about" href="<?php echo $this->getUrl() ?>"><?php echo $this->__('about') ?></a></li>
The only problem is it's outputting like:
<li>about</li>
From what I understand, SSL seals break in the browser if there are both http:// and https:// references.
I'm trying to look for a quick fix to remedy this and would be thrilled if someone has a better way to do this than what's been done.
Cheers!
Revised:
Thanks guys,
I think I've narrowed it down to an extenstion that was installed called, Jirafe.
The output code is:
<noscript><p><img src="http://data.jirafe.com//piwik.php?idsite=#####" style="border:0" alt="" /></p></noscript>
The php file that I think generates the script is:
class Fooman_Jirafe_Model_JirafeTracker extends Piwik_PiwikTracker
{
protected function sendRequest($url)
{
$client = new Zend_Http_Client($url);
$response = $client->request();
//check server response
if ($client->getLastResponse()->isError()) {
throw new Exception($response->getStatus() .' '. $response->getMessage());
}
return $response;
}
}
How would I request the image via SSL?
Thanks in advance!
You can use
$this->getUrl('', array('_secure' => true));
or
$this->getUrl('', array('_forced_secure' => true));
to make Magento use the configured web/secure/base_url.
I don't believe there is a problem with having non-ssl links on a secure web-page, after all you might wish to link to another website that doesn't support ssl traffic. I think perhaps you can confusing this with including non-secure resources on a page. So in your example I don't believe the anchor link is a problem, but if it was an img tag with a src attribute, then it would cause issues, since you are telling the browser to request an insecure link on a secure page.
I am having trouble getting a working Codeigniter version 2.0.3 with hmvc and tank auth(set up as a module) setup properly. I have installed CI properlly and then install HMVC with these directions https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home
I get to my welcome controller/view as example just fine which means the HMVC is working. Next I try to add tank auth to the project by adding it to a folder in the modules folder. It has the proper controller/view/model etc.. setup within the tank auth. I even added in routes something like
$route["auth"]="auth/login";
I also extended the controller within the auth module to MX_Controller like as directed. Also in the constructor I have :
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
$this->load->library('security'); <--failing to load this
$this->load->library('tank_auth');
$this->lang->load('tank_auth');
$this->form_validation->CI =& $this;
It seems to be redirecting fine to the module however it comes up with an error saying ::
An Error Was Encountered
Unable to load the requested class: security
What am I doing wrong? Does any one have a working CI installation with HMVC and tank auth as a module so I can see how its done? I'm new to HMVC, thanks
I found the same problem, but i solved by simple adding a comment to the
$this->load->library('security');
so it will look like this:
//$this->load->library('security');
since security its now part of the codeigniter core, i guess its already loaded by default, and everything seems to be working pretty good
it is in Helper now according to CodeIgniter 3.0 user guide
try:
$this->load->helper('security');
I fix this, by creating Security.php file in application/libraries directory with the following code:
require_once(BASEPATH.'core/Security.php');
class Security extends CI_Security { }
I found a solution, I simply took the security.php file from codeigniters system/core folder and dropped it into system/libraries.
move the file security.php from system/core to system/libraries
then edit core/codeigniter.php line number 204 from $SEC =& load_class('Security', 'core'); to $SEC =& load_class('Security', 'libraries');
Security.php is present in "codeigniter/system/core/Security.php"
so provide this path your problem gets solved easily
load->library('../core/security');
I Read CodeIgniter 3.X User Guide and I was found that "Security" is available as a 'helper' Now.
So you need to change this;
$this->load->library('security');
into
$this->load->helper('security');
XSS Filtering
The Input class has the ability to filter input automatically to prevent cross-site scripting attacks. If you want the filter to run automatically every time it encounters POST or COOKIE data you can enable it by opening your application/config/config.php file and setting this:
$config['global_xss_filtering'] = TRUE;
You need to read a CodeIgniter 3.0 User Guide there are so many changes and implementation or please Refer change log.