Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • whenever you can release approval functionality for reply. its very necessary , getting so many spam reply related to backlink promotion..

    thanks

    Thread Starter dpkagarwal59

    (@dpkagarwal59)

    Thanks justingreerbbi for your continue support. I have solved problem.

    Thread Starter dpkagarwal59

    (@dpkagarwal59)

    Please anyone help me to resolve these issue.

    Thanks in advanced.

    Thread Starter dpkagarwal59

    (@dpkagarwal59)

    i have code as you say but till now its giving me error. here is a code where you can see my code.

    http://pastebin.com/gAmHA2P2

    And this is screenshot for error.
    http://prntscr.com/5dwdig

    Thanks

    Thread Starter dpkagarwal59

    (@dpkagarwal59)

    Thanks Justin for your response.
    But till now i have getting same error and not also auto login in my profile while i have completely remove get_header from my file to check. i want to move after login to “template-profile.php” page. please help me to solve this problem. i am write down my complete code please check.

    <?php
    
    /*
    
    Template Name: Registration
    
    */
    
    ?>
    
    <?php  get_header();
    /* Check if users can register. */
    $registration = get_option( 'users_can_register' );
    
    /* If user registered, input info. */
    if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'adduser' ) {
    	$user_pass = $_POST['password'];
    	$user_confirm_pass= $_POST['confirm_password'];
    	$userdata = array(
    		'user_pass' => $user_pass,
    		'user_login' => esc_attr( $_POST['user_name'] ),
    		'first_name' => esc_attr( $_POST['first_name'] ),
    		'last_name' => esc_attr( $_POST['last_name'] ),
    		'nickname' => esc_attr( $_POST['nickname'] ),
    		'user_email' => esc_attr( $_POST['email'] ),
    		'role' => get_option( 'default_role' ),
    	);
    
    	if ( !$userdata['user_login'] )
    		$error = __('A username is required for registration.', 'frontendprofile');
    	elseif ( username_exists($userdata['user_login']) )
    		$error = __('Sorry, that username already exists!', 'frontendprofile');
    
    	elseif ( !is_email($userdata['user_email'], true) )
    		$error = __('You must enter a valid email address.', 'frontendprofile');
    	elseif ( email_exists($userdata['user_email']) )
    		$error = __('Sorry, that email address is already used!', 'frontendprofile');
    
    	else{
    		$new_user = wp_insert_user( $userdata );
    
    }
    
    	}
    
     ?>
    
    <div class="column eightcol">
    
    	<div class="section-title">
    
    		<h1><?php _e('Register', 'lovestory'); ?></h1>
    
    	</div>
    
    	<?php if ( is_user_logged_in() && !current_user_can( 'create_users' ) ) : ?>
    
    			<p class="log-in-out alert">
    			<?php printf( __('You are logged in as <a href="%1$s" title="%2$s">%2$s</a>.  You don\'t need another account.', 'frontendprofile'), get_author_posts_url( $curauth->ID ), $user_identity ); ?> <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="<?php _e('Log out of this account', 'frontendprofile'); ?>"><?php _e('Logout &raquo;', 'frontendprofile'); ?></a>
    			</p><!-- .log-in-out .alert -->
    
    		<?php elseif ( $new_user ) : ?>
    
    			<p class="alert">
    			<?php
    				if ( current_user_can( 'create_users' ) )
    					printf( __('A user account for %1$s has been created.', 'frontendprofile'), $_POST['user-name'] );
    				else
    					printf( __('Thank you for registering. You can Login Now, %1$s.', 'frontendprofile'), $_POST['user-name'] );
    
    			?>
    			</p><!-- .alert -->
    
    		<?php else : ?>
    
    			<?php if ( $error ) : ?>
    				<p class="error">
    					<?php echo $error; ?>
    				</p><!-- .error -->
    			<?php endif; ?>
    
    			<?php if ( current_user_can( 'create_users' ) && $registration ) : ?>
    				<p class="alert">
    					<?php _e('Users can register themselves or you can manually create users here.', 'frontendprofile'); ?>
    				</p><!-- .alert -->
    			<?php elseif ( current_user_can( 'create_users' ) ) : ?>
    				<p class="alert">
    					<?php _e('Users cannot currently register themselves, but you can manually create users here.', 'frontendprofile'); ?>
    				</p><!-- .alert -->
    			<?php endif; ?>
    
    			<?php if ( $registration || current_user_can( 'create_users' ) ) : ?>
    
    			<form method="post" id="adduser" class="user-forms" action="http://<?php echo $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>">
    			<div class="column sixcol">
    			<div class="field-wrap">
    				<input style="width:90%"  type="text" name="first_name" id="first_name" placeholder="<?php _e('First Name', 'lovestory'); ?>" value="<?php if ( $error ) echo wp_specialchars( $_POST['first_name'], 1 ); ?>"/>
    			</div>
    		</div>
    		<div class="column sixcol last">
    			<div class="field-wrap">
    				<input style="width:90%"  type="text" name="last_name" id="last_name" placeholder="<?php _e('Last Name', 'lovestory'); ?>" value="<?php if ( $error ) echo wp_specialchars( $_POST['last_name'], 1 ); ?>"/>
    			</div>
    		</div>
    <div class="clear"></div>
    		<div class="column sixcol">
    			<div class="field-wrap">
    				<input style="width:90%"  type="text" name="user_name" id="user_name" placeholder="<?php _e('Username', 'lovestory'); ?>" value="<?php if ( $error ) echo wp_specialchars( $_POST['user_name'], 1 ); ?>"/>
    			</div>
    		</div>
    		<div class="column sixcol last">
    			<div class="field-wrap">
    				<input  style="width:90%"  type="text" name="email" id="email" placeholder="<?php _e('Email', 'lovestory'); ?>" value="<?php if ( $error ) echo wp_specialchars( $_POST['email'], 1 ); ?>"/>
    			</div>
    		</div>
    <div class="clear"></div>
    		<div class="column sixcol">
    			<div class="field-wrap">
    				<input style="width:90%"  type="password" name="password" id="password" placeholder="<?php _e('Password', 'lovestory'); ?>" value="<?php if ( $error ) echo wp_specialchars( $_POST['password'], 1 ); ?>"/>
    			</div>
    		</div>
    		<div class="column sixcol last">
    			<div class="field-wrap">
    				<input style="width:90%"  type="password" name="confirm_password" id="confirm_password" placeholder="<?php _e('Confirm Password', 'lovestory'); ?>" value="<?php if ( $error ) echo wp_specialchars( $_POST['confirm_password'], 1 ); ?>"/>
    			</div>
    		</div>
    		<div class="clear"></div>	
    
    				<p class="form-submit">
    					<?php echo $referer; ?>
    					<input name="adduser" type="submit" id="addusersub" class="submit button" value="<?php if ( current_user_can( 'create_users' ) ) _e('Add User', 'frontendprofile'); else _e('Register', 'frontendprofile'); ?>" />
    					<?php wp_nonce_field( 'add-user' ) ?>
    					<input name="action" type="hidden" id="action" value="adduser" />
    				</p><!-- .form-submit -->
    
    			</form><!-- #adduser -->
    
    			<?php endif; ?>
    
    		<?php endif; ?>
    
    <!-- REGISTER FORM ENDS HERE -->
    
    </div>
    
    <div class="column fourcol last">
    
    	<?php if(get_option('users_can_register')) { ?>
    
    	<div class="section-title">
    
    		<h1><?php _e('Sign In', 'lovestory'); ?></h1>
    
    	</div>
    
    	<?php } ?>
    
    	<form class="ajax-form formatted-form" action="<?php echo AJAX_URL; ?>" method="POST">
    
    		<div class="message"></div>
    
    		<div class="field-wrap">
    
    			<input type="text" name="user_login" placeholder="<?php _e('Username', 'lovestory'); ?>" />
    
    		</div>
    
    		<div class="field-wrap">
    
    			<input type="password" name="user_password" placeholder="<?php _e('Password', 'lovestory'); ?>" />
    
    		</div>
    
    		<a href="#" class="button submit-button form-button"><?php _e('Sign In', 'lovestory'); ?></a>
    
    		<?php if(ThemexFacebook::isActive()) { ?>
    
    		<a href="<?php echo home_url('?facebook_login=1'); ?>" class="button facebook-login-button form-button" title="<?php _e('Sign in with Facebook', 'lovestory'); ?>">
    
    			<span class="button-icon icon-facebook nomargin"></span>
    
    		</a>
    
    		<?php } ?>
    
    		<div class="loader"></div>
    
    		<input type="hidden" name="user_action" value="login_user" />
    
    		<input type="hidden" class="nonce" value="<?php echo wp_create_nonce(THEMEX_PREFIX.'nonce'); ?>" />
    
    		<input type="hidden" class="action" value="<?php echo THEMEX_PREFIX; ?>update_user" />
    
    	</form>
    
    </div>
    
    <div class="clear"></div>
    
    <?php 
    
    query_posts(array(
    
    	'post_type' => 'page',
    
    	'meta_key' => '_wp_page_template',
    
    	'meta_value' => 'template-register.php'
    
    ));
    
    while(have_posts()) {
    
    	the_post();
    
    	echo '<br />';
    
    	the_content();
    
    	break;
    
    }
    
    ?>
    
    <?php get_footer(); ?>

    Thanks in advanced

    Thread Starter dpkagarwal59

    (@dpkagarwal59)

    Thanks justingreerbbi,

    but after apply this code its giving following errror.

    Warning: Cannot modify header information – headers already sent by (output started at /home/weddingrep/public_html/wp-content/themes/lovestory/template-register.php:11) in /home/weddingrep/public_html/wp-includes/pluggable.php on line 919

    Warning: Cannot modify header information – headers already sent by (output started at /home/weddingrep/public_html/wp-content/themes/lovestory/template-register.php:11) in /home/weddingrep/public_html/wp-includes/pluggable.php on line 920

    Warning: Cannot modify header information – headers already sent by (output started at /home/weddingrep/public_html/wp-content/themes/lovestory/template-register.php:11) in /home/weddingrep/public_html/wp-includes/pluggable.php on line 921

    please help me.

Viewing 6 replies - 1 through 6 (of 6 total)