• Hello,

    I’ve just installed the ‘Math Comment Spam Protection’ in the hope of getting less Spammers to my site.

    I’ve got a wee question – does anyone know how to change the font of the Question ‘Sum of x + x?’ to be the same as ‘Name’, ‘Email’, ‘Website’ etc that I have on the comment section, here’s an example:

    Comment Section

    These are the two bit of code that came with the Plug-in:

    <p>
    <label for="[fieldname_answer]">Spam protection: Sum of [operand1] + [operand2] ?</label> <span class="required">*</span>
    <input id="[fieldname_answer]" name="[fieldname_answer]" type="text" value="" size="30" aria-required="true" />
    <input type="hidden" name="[fieldname_hash]" value="[result]" />
    </p>

    And:

    <?php if ( function_exists('math_comment_spam_protection') ) {
    $mcsp_info = math_comment_spam_protection();
    ?> <p><input type="text" name="<?php echo $mcsp_info['fieldname_answer'] ?>" id="<?php echo $mcsp_info['fieldname_answer'] ?>" value="" size="22" tabindex="4" />
    <label for="<?php echo $mcsp_info['fieldname_answer'] ?>">SUM OF <?php echo $mcsp_info['operand1'] . ' + ' . $mcsp_info['operand2'] . ' ?' ?></label>
    <input type="hidden" name="<?php echo $mcsp_info['fieldname_hash'] ?>" value="<?php echo $mcsp_info['result']; ?>" />
    </p>
    <?php } // if function_exists... ?>

    the second I’ve got pasted into my Comments.php.

    Any ideas?
    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • in your second part of code, try and change:
    <label for="<?php echo $mcsp_info['fieldname_answer'] ?>">SUM OF <?php echo $mcsp_info['operand1'] . ' + ' . $mcsp_info['operand2'] . ' ?' ?></label>

    to:
    <label for="<?php echo $mcsp_info['fieldname_answer'] ?>"><small>SUM OF <?php echo $mcsp_info['operand1'] . ' + ' . $mcsp_info['operand2'] . ' ?' ?></small></label>

    (your theme has the <small> tag around all these labels)

    Thread Starter IestynR

    (@iestynr)

    Nice!

    That worked a treat – thank you so much Alchymyth.
    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Font on Comment Section Fields’ is closed to new replies.