WordPress.org

Ready to get started?Download WordPress

Forums

Simplr Registration Form Plus+
Missing sreg.class (5 posts)

  1. pazifikwelle
    Member
    Posted 11 months ago #

    ....-form/lib/sreg.class.php): failed to open stream: No such file or directory in ....plugins/simplr-registration-form/simplr_form_functions.php on line 439

    [22-Sep-2013 12:02:29 UTC] PHP Fatal error: require_once(): Failed opening required '.....form/lib/sreg.class.php' (include_path='.:/Applications/MAMP/bin/php/php5.4.4/lib/php') in ....plugins/simplr-registration-form/simplr_form_functions.php on line 439

    ==> File is simply not included in your production package.
    ==> Please submit updated version of your plugin!

    Thank you.

    http://wordpress.org/plugins/simplr-registration-form/

  2. kvkooten
    Member
    Posted 11 months ago #

    Yes, I'm having the same problem. The result is that the page on which I had implemented the form via shortcodes now doesn't show any of the manually entered text. It just says that "sreg.class.php" is missing. It also messes up certain parts of my CSS...

  3. Lucas Balzer
    Member
    Posted 10 months ago #

    Plus one for this issue. Just downloaded the current version archive, and sreg.class.php is missing from the /lib directory. Can you please add back in, or let us know name of the file that includes the sreg class?

    Thanks. Really looking forward to this plugin. It's exactly what I need!

    Lucas

  4. Nagaraj
    Member
    Posted 10 months ago #

    For Solution, replace the sreg_basic function on line 438, with the following function. Enjoy !!

    function sreg_basic($atts) {
    //Check if the user is logged in, if so he doesn't need the registration page
    if ( is_user_logged_in() AND !current_user_can('administrator') ) {
    global $user_ID;
    $first_visit = get_user_meta($user_ID, 'first_visit',true);
    if(empty($first_visit)) {
    $message = !empty($atts['message'])?$atts['message']:"Thank you for registering.";
    update_user_meta($user_ID,'first_visit',date('Y-m-d'));
    echo '<div id="message" class="success"><p>'.$message.'</p></div>';
    } else {
    echo "You are already registered for this site!!!";
    }
    } else {
    //Then check to see whether a form has been submitted, if so, I deal with it.
    global $sreg;
    if(isset($sreg->success)) {
    return $sreg->output;
    } else {
    if(is_array($sreg->errors)) {
    $out = '';
    foreach($sreg->errors as $mes) {
    $out .= '<div class="simplr-message error">'.$mes .'</div>';
    }
    } elseif(is_string($sreg->errors)) {
    $out = '<div class="simplr-message error">'.$message .'</div>';
    }
    return $out.simplr_build_form($_POST,$atts);
    }
    
    } //Close LOGIN Conditional
    
    } //END FUNCTION

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  5. nafsruh
    Member
    Posted 10 months ago #

    @Nagaraj

    Thank you for your solution!!! I couldn't get in touch with the developer. I'm happy someone else found this out!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags