WordPress.org

Ready to get started?Download WordPress

Forums

SI CAPTCHA Anti-Spam
[resolved] SI CAPTCHA - Javascript required? (19 posts)

  1. G
    Member
    Posted 3 years ago #

    I have just started using SI CAPTCHA and noticed it loaded si_captcha.js on every page. Is this javascript required, you say in the plugin description - "Features: ... JavaScript is not required ..."

    So I edited out reference to the si_captcha.js in si-captcha.php, to stop js file loading, and the plugin still works fine.

    Thankyou.

    http://wordpress.org/extend/plugins/si-captcha-for-wordpress/

  2. Mike Challis
    Member
    Plugin Author

    Posted 3 years ago #

    It is needed for the captcha refresh button. It was added in a recent version. I will update the readme.

    Although if you set the setting to use sessions for the captcha, the javascript file does not load because it is not needed.
    Just un-check the setting: "Use CAPTCHA without PHP session". Be sure to test and make sure it is working because some servers have broken sessions.

  3. G
    Member
    Posted 3 years ago #

    I am using it on WordPress MU for all sites, I also use the anti-spam plugin NoSpamNX to doubly secure my sites. I previously used WP-Spamfree but recently been receiving quite a bit of comment spam, so dumped it, and since using both SI CAPTCHA and NoSpamNX am down to zero spams!
    And yes I have tested as a human commenter on sites and your plugin works great.
    I just like to remove unnecessary javascripts from code for faster page loads.

  4. chuckfloyd
    Member
    Posted 3 years ago #

    Does the si_captcha.js file need to call the /health/lib/yui/container/assets/skins/sam/a3Slider.php file using a document.write? I found this tucked away (pushed way over to the right on the last line of code) and I'm not sure why. I have this path and yui library, but I know I didn't ad this line to your this js file... I have commented the code out, but was curious if this was put there on purpose?

    Thanks!

  5. Mike Challis
    Member
    Plugin Author

    Posted 3 years ago #

    chuckfloyd,

    NO that code is NOT included in the official si_captcha.js source!
    is your site hacked?
    http://codex.wordpress.org/FAQ_My_site_was_hacked

    Mike

  6. chuckfloyd
    Member
    Posted 3 years ago #

    Hi Mike,

    Thanks. I was pretty sure it wasn't part of your code... didn't make a lot of sense. I'm verifying all my site code - I do think it's been hacked, at least at some point in the past by an automatic type script. Thanks for the link to the FAQ as well.

    Chuck

  7. hydn
    Member
    Posted 3 years ago #

    gnetworkau,

    Did you ever get the js in header removed?

    I don't care for refresh button especially if it requires java. I also don't want to use php sessions and I don't have that enabled in php.ini and dont want to enable it for just one plugin.

  8. hydn
    Member
    Posted 3 years ago #

    I found this in si-captcha.php:
    if ( isset($si_captcha_opt['si_captcha_disable_session']) && $si_captcha_opt['si_captcha_disable_session'] == 'true')

    changed to:
    if ( isset($si_captcha_opt['si_captcha_disable_session']) && $si_captcha_opt['si_captcha_disable_session'] == 'false')

  9. G
    Member
    Posted 3 years ago #

    hydn, i still resort to hack. i tried Mike Challis suggestion to uncheck setting: "Use CAPTCHA without PHP session", but my page just hangs - i use wpmu with wp-supercache so runs better without session - so i have it selected.
    every upgrade of the plugin, i edit the si-captcha.php:

    search for line containing "captcha.js"

    function si_captcha_enqueue_scripts(){
       wp_enqueue_script('si_captcha', plugins_url('si-captcha-for-wordpress/captcha-secureimage/si_captcha.js'));
    }

    remove everything shown above, save and upload.

    works great!

  10. hydn
    Member
    Posted 3 years ago #

    Do u have display php errors on? Thats a few lines further down correct?

  11. hydn
    Member
    Posted 3 years ago #

    Never mind this just adds php sessions!!! Use redbot.org to check.

    I just want it with no refresh.

  12. hydn
    Member
    Posted 3 years ago #

    Ok removed plugin. I now use this:
    http://wordpress.org/extend/plugins/wp-recaptcha/

    It's officially supported by Google:
    http://www.google.com/recaptcha/whyrecaptcha

  13. Mike Challis
    Member
    Plugin Author

    Posted 3 years ago #

    The next version will have this improvement:
    - The javascript is only loaded on pages when it is conditionally needed, and it loads in footer.

  14. G
    Member
    Posted 3 years ago #

    Thanks Mike for your fine plugins, I use both SI CAPTCHA Anti-Spam and Fast Secure Contact Form. They both work fine, but having a wpmu setup with multiple sites, I sometimes had to go thru all sites to change config, and it was just easier to snip references to captcha.js. I generally like to minimise use of js for faster page loads.
    Great plugins, I include them here:
    Best Plugins for WordPress 3 and WordPress MU

  15. Mike Challis
    Member
    Plugin Author

    Posted 3 years ago #

    The version is not out yet but you can upgrade to the latest code by replacing the files by FTP with the files in the current download:
    http://downloads.wordpress.org/plugin/si-captcha-for-wordpress.zip

  16. G
    Member
    Posted 3 years ago #

    PS: I use SI CAPTCHA Anti-Spam as mu-plugin

  17. G
    Member
    Posted 3 years ago #

    thanks, will do

  18. Mike Challis
    Member
    Plugin Author

    Posted 3 years ago #

    Actually I just released it.
    2.6.5 should be available in a few minutes.

  19. G
    Member
    Posted 3 years ago #

    all fine, works here and no js, i like that. thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic