Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
  1.  
    Hey all

    Loving jobberbase... Thanks for your work guys!! kudos.

    Questions:

    1) the captcha on the add a post page... does anyone have some implementation instructions on this??
    2) i'd like to add a field or two to the add a post page... ie another location field for like, 'area -> subarea'... any suggestions on how to do this??

    thanks much!
    •  
      CommentAuthorgason
    • CommentTimeJan 22nd 2008
     
    I´d like that too!
    Some PHP genius over here please!
    • CommentAuthorfilip
    • CommentTimeJan 22nd 2008
     

    On jobber.ro, I use www.recaptcha.net, which is fairly easy to implement…

  2.  

    how do you add the PHP scripting for recaptcha into the .tpl file??

  3.  

    nevermind! <blush>hehe</blush>

    realized that <?php and ?> is replaced with {php} and {/php}

    genius! :)

  4.  

    cant seem to get the captcha to work.. :(
    it displays but doesn’t verify…

    • CommentAuthorfilip
    • CommentTimeJan 23rd 2008
     

    http://www.jobberbase.com/blog/01-23-2008/how-to-implement-recaptcha/
    :)

    • CommentAuthorvector
    • CommentTimeJan 28th 2008
     
    I followed all the steps but in:

    Code:
    page-write.php
    On line 2, we generate the html code that displays the captcha in the template:

    $smarty->assign(’the_captcha’, recaptcha_get_html(CAPTCHA_PUBLIC_KEY));

    ———————–

    I do not know where to place this line.
    Anyone helpe me…

    Thanks
    • CommentAuthorfilip
    • CommentTimeJan 28th 2008
     

    You place that line right on the start of page-write.php, first line after “<?php”

    • CommentAuthorvector
    • CommentTimeJan 29th 2008
     
    Hi filip,

    Showing error for me...

    Parse error: syntax error, unexpected T_STRING in /home/.blu/myuser/mydomain/page_write.php on line 2

    My page-wite.php

    <?php
    $smarty->assign('the_captcha', recaptcha_get_html(XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX));
    $later_edit = false;
    if ($id != 0)
    {
    $j = new Job($id);
    }
    --------------------------------

    Thanks
    • CommentAuthorfilip
    • CommentTimeJan 29th 2008
     

    In my example, CAPTCHA_PUBLIC_KEY is a previously defined constant (in config.php). Basically, that translates into:
    $smarty->assign(‘the_captcha’, recaptcha_get_html(‘ASDF234F234FAH98U3453034FSASDF’));

    So recaptcha_get_html takes parameter a STRING.

    • CommentAuthorvector
    • CommentTimeJan 29th 2008
     
    Sorry my newbies question, but now showing new error in post page.

    Notice: Undefined index: recaptcha_challenge_field in /home/.blu/user/www.domain.com/page_write.php on line 58

    Notice: Undefined index: recaptcha_response_field in /home/.blu/user/www.domain.com/page_write.php on line 59

    -------------------------
    51 // this branch executes after first writing a post and hitting the submit button
    52 if (!empty($_POST['action']) && $_POST['action'] == 'publish')
    53 {
    54 escape($_POST);
    55 $errors = array();
    56
    57 $resp = recaptcha_check_answer('ASDAF135463435746ASF24765345',
    58 $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"],
    59 $_POST["recaptcha_response_field"]);
    60
    61 if (!$resp->is_valid)
    62 {
    63 $errors['captcha'] = 'Incorrect code';
    64 }
    65
    66 $_SESSION['user_ip'] = $_SERVER['REMOTE_ADDR'];
    67 $_SESSION['referer'] = BASE_URL . 'post/';
    ----------------------------------

    What is recaptcha_challenge_field?

    Thanks
    • CommentAuthorvector
    • CommentTimeJan 29th 2008
     
    Hi filip

    Now this working perfectly.

    Thanks for help me;)
  5.  

    Have followed instructions but get the following error:

    Fatal error: Call to undefined function recaptcha_get_html() in /home/scanning/beta/job-listings/page_write.php on line 2

    Any help please?