WordPress.org

Ready to get started?Download WordPress

Forums

Question about HashCash plugin and v1.5 (11 posts)

  1. davincim
    Member
    Posted 9 years ago #

    I'm in the process of implementing the code modifications as outlined in the instructions for WP HashCash.

    It says to put this:


    <script src="http://yoursite.com/wp/wp-content/plugins/md5.js" type="text/javascript"></script><script type="text/javascript"> function removeHTMLComments(html) { return html.replace(/<!(?:--[\s\S]*?--\s*)?>\s*/g,''); } function antispam(in_str){ in_str = removeHTMLComments(in_str); eElement = document.getElementById("antispam_id"); if(!eElement){ return false; } else{ eElement.name = hex_md5(in_str); eElement.value = removeHTMLComments(eElement.value); } }</script>

    somehwere in the head of my index.php. Well, since upgrading to v1.5 I don't see the <head> anywhere in there.

    Can anyone tell me where this goes?

  2. Kafkaesqui

    Posted 9 years ago #

    wp-content/themes/YOUR CURRENT THEME/header.php

    Look there.

  3. davincim
    Member
    Posted 9 years ago #

    Found it. Thanks Kafkaesqui.

    Now there's a part in the instructions that says I should modify:

    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform" >

    with the following event handler as an attribute to my form tag in comments.php. So would the end result be this?

    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform" onsubmit="antispam('<!--mfunc get_hashcash_special_code() --><?php get_hashcash_special_code(); ?><!--/mfunc-->');"
    >

  4. Uncommon
    Member
    Posted 9 years ago #

    Is the manual install the only thing that works it WP1.5? I put the HashCash files in my plugins directory, but it doesn't show up in my plugins admin page.

  5. Nick Momrik
    Member
    Posted 9 years ago #

    You don't need the manual install unless you are using the staticize plugin. All you need to do is put the files in your plugins folder and activate it.

  6. Jinsan
    Member
    Posted 9 years ago #

    http://wordpress.org/support/topic.php?id=25093

    Had explained it another thread as well. Do NOT grab the manual files unless the auto installation fails.

    Grab wp-hashcash.php (not manual) and md5.js upload both to your plugins dir and then activate. That's it.

  7. Nick Momrik
    Member
    Posted 9 years ago #

    Well said!

  8. davincim
    Member
    Posted 9 years ago #

    Got it. Thanks for the help.

  9. James
    Happiness Engineer
    Posted 9 years ago #

    You shouldn't have to do a manual install for WP-HashCash

    1. Get WP-HashCash for WPv1.5: http://dev.wp-plugins.org/browser/wp-hashcash/branches/

    2. Upload the wp-hashcash.php and md5.js files to /wp-content/plugins.

    3. Activate the plugin.

    4. That's it. Nothing else is required.

  10. Uncommon
    Member
    Posted 9 years ago #

    Thanks, it's working now. I think either I didn't get the WP1.5 version, or maybe I downloaded the files wrong - I just copied the text since I didn't see the download link at the bottom of the page.

  11. Elliott C. Bäck
    Member
    Posted 9 years ago #

    Yes, ack. Please, no one, NO ONE ever do a manual install of WP-hashcash. If it doesn't work, it's because you've hacked your site to bits, which means that you can probably figure out why it doesn't work and fix the problem directly. Unfortunately, there are also some people who hack it to bits but don't know what they are doing--and the manual install is for them.

    For 99.99999% of users, just drop it in and activate.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.