Error when registering

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
luckyp79
Registered User
Posts: 140
Joined: Sat Nov 10, 2007 1:54 am
Location: Minnesota
Contact:

Error when registering

Post by luckyp79 » Thu May 30, 2013 9:55 pm

People are not able to register on my site http://www.mnbonsaiforums.com/forums

We get this message when we agree to the terms.

Parse error: syntax error, unexpected '}' in /home/content/11/9525511/html/forums/cache/tpl_prosilver-se_ucp_register.html.php on line 310

If I clean the cache We get this message

Parse error: syntax error, unexpected '}' in /home/content/11/9525511/html/forums/includes/template.php(230) : eval()'d code on line 310

Everything is up to date with the latest version.

Any ideas. I was unable to spot the error.

Thanks

User avatar
Solidjeuh
Registered User
Posts: 522
Joined: Wed Oct 06, 2010 11:20 pm
Location: Aalst / Belgium
Name: Andy Dm
Contact:

Re: Error when registering

Post by Solidjeuh » Thu May 30, 2013 10:13 pm

Did you made any changes? Installed a mod?
I think there's something wrong in ucp_register.html
I don't suffer from insanity. I enjoy every minute of it.

luckyp79
Registered User
Posts: 140
Joined: Sat Nov 10, 2007 1:54 am
Location: Minnesota
Contact:

Re: Error when registering

Post by luckyp79 » Thu May 30, 2013 10:51 pm

My installed mods

Code: Select all

Buttons menu

Anti-Spam ACP

Contact Admin

One Click Ban

Instant Post Redirect

Auto ACP redirection

Favicon 1.0.2

Advanced Block Mod

Facebook For PhpBB Light

Facebook For PhpBB Light Patch

Like button for Facebook (xFBML)

Prevent Topic View Increase by Author

Highslide Attachment Mod
my ucp_register

Code: Select all

<?php
/**
*
* @package ucp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
* ucp_register
* Board registration
* @package ucp
*/
class ucp_register
{
	var $u_action;

	function main($id, $mode)
	{
		global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;

		//
		if ($config['require_activation'] == USER_ACTIVATION_DISABLE)
		{
			trigger_error('UCP_REGISTER_DISABLE');
		}

		include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
	// START Anti-Spam ACP
		antispam::ucp_preregister();
		// END Anti-Spam ACP
		include($phpbb_root_path . 'includes/abm/functions.' . $phpEx);
	

		$coppa			= (isset($_REQUEST['coppa'])) ? ((!empty($_REQUEST['coppa'])) ? 1 : 0) : false;
		$agreed			= (!empty($_POST['agreed'])) ? 1 : 0;
		$submit			= (isset($_POST['submit'])) ? true : false;
		$change_lang	= request_var('change_lang', '');
		$user_lang		= request_var('lang', $user->lang_name);

		if ($agreed)
		{
			add_form_key('ucp_register');
		}
		else
		{
			add_form_key('ucp_register_terms');
		}

		if ($change_lang || $user_lang != $config['default_lang'])
		{
			$use_lang = ($change_lang) ? basename($change_lang) : basename($user_lang);

			if (!validate_language_iso_name($use_lang))
			{
				if ($change_lang)
				{
					$submit = false;

					// Setting back agreed to let the user view the agreement in his/her language
					$agreed = (empty($_GET['change_lang'])) ? 0 : $agreed;
				}

				$user->lang_name = $user_lang = $use_lang;
				$user->lang = array();
				$user->data['user_lang'] = $user->lang_name;
				$user->add_lang(array('common', 'ucp'));
			}
			else
			{
				$change_lang = '';
				$user_lang = $user->lang_name;
			}
		}


		$cp = new custom_profile();

		$error = $cp_data = $cp_error = array();

		if (!$agreed || ($coppa === false && $config['coppa_enable']) || ($coppa && !$config['coppa_enable']))
		{
			$add_lang = ($change_lang) ? '&change_lang=' . urlencode($change_lang) : '';
			$add_coppa = ($coppa !== false) ? '&coppa=' . $coppa : '';

			$s_hidden_fields = array(
				'change_lang'	=> $change_lang,
			);

			// If we change the language, we want to pass on some more possible parameter.
			if ($change_lang)
			{
				// We do not include the password
				$s_hidden_fields = array_merge($s_hidden_fields, array(
					'username'			=> utf8_normalize_nfc(request_var('username', '', true)),
					'email'				=> strtolower(request_var('email', '')),
					'email_confirm'		=> strtolower(request_var('email_confirm', '')),
					'lang'				=> $user->lang_name,
					'tz'				=> request_var('tz', (float) $config['board_timezone']),
				));

			}

			// Checking amount of available languages
			$sql = 'SELECT lang_id
				FROM ' . LANG_TABLE;
			$result = $db->sql_query($sql);

			$lang_row = array();
			while ($row = $db->sql_fetchrow($result))
			{
				$lang_row[] = $row;
			}
			$db->sql_freeresult($result);

			if ($coppa === false && $config['coppa_enable'])
			{
				$now = getdate();
				$coppa_birthday = $user->format_date(mktime($now['hours'] + $user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), $user->lang['DATE_FORMAT']);
				unset($now);

				$template->assign_vars(array(
					'S_LANG_OPTIONS'	=> (sizeof($lang_row) > 1) ? language_select($user_lang) : '',
					'L_COPPA_NO'		=> sprintf($user->lang['UCP_COPPA_BEFORE'], $coppa_birthday),
					'L_COPPA_YES'		=> sprintf($user->lang['UCP_COPPA_ON_AFTER'], $coppa_birthday),

					'U_COPPA_NO'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=0' . $add_lang),
					'U_COPPA_YES'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=1' . $add_lang),

					'S_SHOW_COPPA'		=> true,
					'S_HIDDEN_FIELDS'	=> build_hidden_fields($s_hidden_fields),
					'S_UCP_ACTION'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang),
				));
			}
			else
			{
				$template->assign_vars(array(
					'S_LANG_OPTIONS'	=> (sizeof($lang_row) > 1) ? language_select($user_lang) : '',
					'L_TERMS_OF_USE'	=> sprintf($user->lang['TERMS_OF_USE_CONTENT'], $config['sitename'], generate_board_url()),

					'S_SHOW_COPPA'		=> false,
					'S_REGISTRATION'	=> true,
					'S_HIDDEN_FIELDS'	=> build_hidden_fields($s_hidden_fields),
					'S_UCP_ACTION'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang . $add_coppa),
					)
				);
			}
			unset($lang_row);

			$this->tpl_name = 'ucp_agreement';
			return;
		}


		// The CAPTCHA kicks in here. We can't help that the information gets lost on language change. 
		if ($config['enable_confirm'])
		{
			include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
			$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
			$captcha->init(CONFIRM_REG);
		}

		$is_dst = $config['board_dst'];
		$timezone = $config['board_timezone'];

		$data = array(
			'username'			=> utf8_normalize_nfc(request_var('username', '', true)),
			'new_password'		=> request_var('new_password', '', true),
			'password_confirm'	=> request_var('password_confirm', '', true),
			'email'				=> strtolower(request_var('email', '')),
			'email_confirm'		=> strtolower(request_var('email_confirm', '')),
			'lang'				=> basename(request_var('lang', $user->lang_name)),
			'tz'				=> request_var('tz', (float) $timezone),
		);

		// Check and initialize some variables if needed
		if ($submit)
		{
			//Advanced Block MOD - check for spam
			$error = check_spam('user', 'register', $user->ip, 0, 0, $data, false);
			$error = array_merge($error, validate_data($data, array(
				'username'			=> array(
					array('string', false, $config['min_name_chars'], $config['max_name_chars']),
					array('username', '')),
				'new_password'		=> array(
					array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
					array('password')),
				'password_confirm'	=> array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
				'email'				=> array(
					array('string', false, 6, 60),
					array('email')),
				'email_confirm'		=> array('string', false, 6, 60),
				'tz'				=> array('num', false, -19, 19),
				'lang'				=> array('language_iso_name'),
			)));

			if (!check_form_key('ucp_register'))
			{
				$error[] = $user->lang['FORM_INVALID'];
			}

			// Replace "error" strings with their real, localised form
			$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);

			if ($config['enable_confirm'])
			{
				$vc_response = $captcha->validate($data);
				if ($vc_response !== false)
				{
					$error[] = $vc_response;
				}

				if ($config['max_reg_attempts'] && $captcha->get_attempt_count() > $config['max_reg_attempts'])
				{
					$error[] = $user->lang['TOO_MANY_REGISTERS'];
				}
			}


			/* Advanced Block MOD - feature renamed and moved to ./includes/abm/functions.php
			// DNSBL check
			if ($config['check_dnsbl'])
			{
				if (($dnsbl = $user->check_dnsbl('register')) !== false)
				{
					$error[] = sprintf($user->lang['IP_BLACKLISTED'], $user->ip, $dnsbl[1]);
				}
			}
			*/

			// validate custom profile fields
			$cp->submit_cp_field('register', $user->get_iso_lang_id(), $cp_data, $error);

			if (!sizeof($error))
			{
				if ($data['new_password'] != $data['password_confirm'])
				{
					$error[] = $user->lang['NEW_PASSWORD_ERROR'];
				}

				if ($data['email'] != $data['email_confirm'])
				{
					$error[] = $user->lang['NEW_EMAIL_ERROR'];
				}
			}


			// START Anti-Spam ACP
			antispam::ucp_register($data, $error);
			// END Anti-Spam ACP
			if (!sizeof($error))
			{
				$server_url = generate_board_url();

				// Which group by default?
				$group_name = ($coppa) ? 'REGISTERED_COPPA' : 'REGISTERED';

				$sql = 'SELECT group_id
					FROM ' . GROUPS_TABLE . "
					WHERE group_name = '" . $db->sql_escape($group_name) . "'
						AND group_type = " . GROUP_SPECIAL;
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);

				if (!$row)
				{
					trigger_error('NO_GROUP');
				}

				$group_id = $row['group_id'];

				if (($coppa ||
					$config['require_activation'] == USER_ACTIVATION_SELF ||
					$config['require_activation'] == USER_ACTIVATION_ADMIN) && $config['email_enable'])
				{
					$user_actkey = gen_rand_string(mt_rand(6, 10));
					$user_type = USER_INACTIVE;
					$user_inactive_reason = INACTIVE_REGISTER;
					$user_inactive_time = time();
				}
				else
				{
					$user_type = USER_NORMAL;
					$user_actkey = '';
					$user_inactive_reason = 0;
					$user_inactive_time = 0;
				}

				$user_row = array(
					'username'				=> $data['username'],
					'user_password'			=> phpbb_hash($data['new_password']),
					'user_email'			=> $data['email'],
					'group_id'				=> (int) $group_id,
					'user_timezone'			=> (float) $data['tz'],
					'user_dst'				=> $is_dst,
					'user_lang'				=> $data['lang'],
					'user_type'				=> $user_type,
					'user_actkey'			=> $user_actkey,
					'user_ip'				=> $user->ip,
					'user_regdate'			=> time(),
					'user_inactive_reason'	=> $user_inactive_reason,
					'user_inactive_time'	=> $user_inactive_time,
				);

				if ($config['new_member_post_limit'])
				{
					$user_row['user_new'] = 1;
				}

				// Register user...
				$user_id = user_add($user_row, $cp_data);
				// START Anti-Spam ACP
				antispam::ucp_postregister($user_id, $user_row);
				// END Anti-Spam ACP

				// This should not happen, because the required variables are listed above...
				if ($user_id === false)
				{
					trigger_error('NO_USER', E_USER_ERROR);
				}

				// Okay, captcha, your job is done.
				if ($config['enable_confirm'] && isset($captcha))
				{
					$captcha->reset();
				}

				if ($coppa && $config['email_enable'])
				{
					$message = $user->lang['ACCOUNT_COPPA'];
					$email_template = 'coppa_welcome_inactive';
				}
				else if ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable'])
				{
					$message = $user->lang['ACCOUNT_INACTIVE'];
					$email_template = 'user_welcome_inactive';
				}
				else if ($config['require_activation'] == USER_ACTIVATION_ADMIN && $config['email_enable'])
				{
					$message = $user->lang['ACCOUNT_INACTIVE_ADMIN'];
					$email_template = 'admin_welcome_inactive';
				}
				else
				{
					$message = $user->lang['ACCOUNT_ADDED'];
					$email_template = 'user_welcome';
				}

				if ($config['email_enable'])
				{
					include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);

					$messenger = new messenger(false);

					$messenger->template($email_template, $data['lang']);

					$messenger->to($data['email'], $data['username']);

					$messenger->anti_abuse_headers($config, $user);

					$messenger->assign_vars(array(
						'WELCOME_MSG'	=> htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
						'USERNAME'		=> htmlspecialchars_decode($data['username']),
						'PASSWORD'		=> htmlspecialchars_decode($data['new_password']),
						'U_ACTIVATE'	=> "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey")
					);

					if ($coppa)
					{
						$messenger->assign_vars(array(
							'FAX_INFO'		=> $config['coppa_fax'],
							'MAIL_INFO'		=> $config['coppa_mail'],
							'EMAIL_ADDRESS'	=> $data['email'])
						);
					}

					$messenger->send(NOTIFY_EMAIL);

					if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
					{
						// Grab an array of user_id's with a_user permissions ... these users can activate a user
						$admin_ary = $auth->acl_get_list(false, 'a_user', false);
						$admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();

						// Also include founders
						$where_sql = ' WHERE user_type = ' . USER_FOUNDER;

						if (sizeof($admin_ary))
						{
							$where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
						}

						$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
							FROM ' . USERS_TABLE . ' ' .
							$where_sql;
						$result = $db->sql_query($sql);

						while ($row = $db->sql_fetchrow($result))
						{
							$messenger->template('admin_activate', $row['user_lang']);
							$messenger->to($row['user_email'], $row['username']);
							$messenger->im($row['user_jabber'], $row['username']);

							$messenger->assign_vars(array(
								'USERNAME'			=> htmlspecialchars_decode($data['username']),
								'U_USER_DETAILS'	=> "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id",
								'U_ACTIVATE'		=> "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey")
							);

							$messenger->send($row['user_notify_type']);
						}
						$db->sql_freeresult($result);
					}
				}

				$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
				trigger_error($message);
			}
		}

		$s_hidden_fields = array(
			'agreed'		=> 'true',
			'change_lang'	=> 0,
		);

		if ($config['coppa_enable'])
		{
			$s_hidden_fields['coppa'] = $coppa;
		}

		if ($config['enable_confirm'])
		{
			$s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields());
		}
		$s_hidden_fields = build_hidden_fields($s_hidden_fields);
		$confirm_image = '';

		// Visual Confirmation - Show images
		if ($config['enable_confirm'])
		{
			$template->assign_vars(array(
				'CAPTCHA_TEMPLATE'		=> $captcha->get_template(),
			));
		}

		//
		$l_reg_cond = '';
		switch ($config['require_activation'])
		{
			case USER_ACTIVATION_SELF:
				$l_reg_cond = $user->lang['UCP_EMAIL_ACTIVATE'];
			break;

			case USER_ACTIVATION_ADMIN:
				$l_reg_cond = $user->lang['UCP_ADMIN_ACTIVATE'];
			break;
		}

		$template->assign_vars(array(
			'ERROR'				=> (sizeof($error)) ? implode('<br />', $error) : '',
			'USERNAME'			=> $data['username'],
			'PASSWORD'			=> $data['new_password'],
			'PASSWORD_CONFIRM'	=> $data['password_confirm'],
			'EMAIL'				=> $data['email'],
			'EMAIL_CONFIRM'		=> $data['email_confirm'],

			'L_REG_COND'				=> $l_reg_cond,
			'L_USERNAME_EXPLAIN'		=> sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
			'L_PASSWORD_EXPLAIN'		=> sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),

			'S_LANG_OPTIONS'	=> language_select($data['lang']),
			'S_TZ_OPTIONS'		=> tz_select($data['tz'], false, 'register'),
			'S_CONFIRM_REFRESH'	=> ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false,
			'S_REGISTRATION'	=> true,
			'S_COPPA'			=> $coppa,
			'S_HIDDEN_FIELDS'	=> $s_hidden_fields,
			'S_UCP_ACTION'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),
		));

		//
		$user->profile_fields = array();

		// Generate profile fields -> Template Block Variable profile_fields
		$cp->generate_profile_fields('register', $user->get_iso_lang_id());

		//
		$this->tpl_name = 'ucp_register';
		$this->page_title = 'UCP_REGISTRATION';
	}
}

?>

User avatar
Lumpy Burgertushie
Registered User
Posts: 66267
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Error when registering

Post by Lumpy Burgertushie » Thu May 30, 2013 11:04 pm

the problem is no in the php file it is in the html file:
prosilver/template/ucp_register.html

looks like something wrong with the facebook script that you have in that file.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

luckyp79
Registered User
Posts: 140
Joined: Sat Nov 10, 2007 1:54 am
Location: Minnesota
Contact:

Re: Error when registering

Post by luckyp79 » Fri May 31, 2013 9:21 pm

Code: Select all

<!-- INCLUDE overall_header.html -->

<script type="text/javascript">
// <![CDATA[
	/**
	* Change language
	*/
	function change_language(lang_iso)
	{
		document.forms['register'].change_lang.value = lang_iso;
		document.forms['register'].submit.click();
	}

	<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_REFRESH -->
	onload_functions.push('apply_onkeypress_event()');
	<!-- ENDIF -->

// ]]>
</script>

<form method="post" action="{S_UCP_ACTION}" id="register">
	<div class="panel">
		<div class="inner"><span class="corners-top"><span></span></span>
		<h2>{SITENAME} - {L_REGISTRATION}</h2>
<!-- IF S_FB4PHPBB_MOD_ENABLED and not S_USER_LOGGED_IN and not S_IS_BOT -->
	<span class="corners-bottom"><span></span></span></div>
</div>	   			
<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>    				
				<dl>
			<dt>{L_FB4PHPBB_LIGHT_REGISTRATION}</dt>   					
			<dd><br />	
							<span>
								<div id="fblogin">
									<a class="fb_button fb_button_medium"><span class="fb_button_text">{L_FACEBOOK_LOGIN}</span></a>
								</div>
							</span></div>
							<span>	
								<div id="dialog-confirm" title="Link Facebook" style="display:none;">
									<p>
										<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;">
										</span>
										Do you want to link your facebook account to this forum?
									</p>
								</div>
								<script>
								jQuery('#fblogin').click(function() 
								{
                                    jQuery( "#fbinnerorig" ).fadeOut('fast');    
                                    jQuery( "#fbinnerorig" ).show('slide').html('<span style="text-align:center;"><img src="images/loading.gif"></span>');
									FB.login(function(data) 
									{
										if (data.authResponse) 
										{
											FB.api('/me', function(response) 
											{
												var regod = jQuery.ajax(
												{
													url:"{FB4PHPBB_LIGHT_CONNECT}", 
													type: "POST", 
													data: 
													{
														check: 'yes', 
														id: response.id, 
														email: response.email, 
													}, 
													dataType: 'html', 
													success: function(regod)
													{
                                                        jQuery( "#fbinnerorig" ).hide('blind').remove();
														var optionsResponse = jQuery(regod).length;
														if(optionsResponse < 1) 
														{
                                                             
															jQuery( "#dialog-confirm" ).dialog( "destroy" );
															jQuery( "#dialog-confirm" ).dialog(
															{ 
																dialogClass: 'no-close', 
																closeOnEscape: false, 
																resizable: false, 
																minHeight: 90, 
																show: 'blind', 
																hide: 'highlight', 
																modal: true, 
																buttons:[
																{ 
																	text: "Yes", 
																	click: function() 
																	{
                                                                        jQuery('.ui-dialog-buttonpane').animate({height: "0px"}, 300, function(){jQuery(this).remove() });   
                                                                        jQuery( "#dialog-confirm" ).hide('slide');    
                                                                        jQuery( "#dialog-confirm" ).slideDown('fast').html('<span style="text-align:center;"><img src="images/loading.gif"></span>');
																		jQuery.post("{FB4PHPBB_LIGHT_CONNECT}", 
																		{ 
																			ajax: "yes", 
																			id: response.id, 
																			email: response.email, 
																			link: 'yes' 
																		}, 
																		function(data) 
																		{
																			jQuery('#dialog-confirm').fadeIn(function()
																			{
																			//console.log(jQuery(data+":contains('isregod')"));																			
																				if(data.indexOf('isregod') > -1)
																				{
																					jQuery('#dialog-confirm').html(data); 
																				}
																				else
																				{

																					jQuery('#dialog-confirm').html(data); 
																					jQuery('fieldset.submit-buttons').append('<input type="hidden" name="ajax" value="yes">');
																					jQuery('.ui-dialog').animate({ height: "600px", width: "800px", top: "100px"}); 
																					jQuery('#dialog-confirm').animate({ height: "500px", width: "750px"});
                                                                                    jQuery('fieldset.submit-buttons').append('<input type="hidden" name="agreed" value="I agree to these terms">');
                                                                                    jQuery('fieldset.submit-buttons').append('<input type="hidden" name="dialog" value="yes">');                            
                                                                                    jQuery('fieldset.submit-buttons').append('<input type="hidden" name="fb_id" value="'+response.id+'">');
                                                                                    jQuery('fieldset.submit-buttons').append('<input type="hidden" name="fb_email" value="'+response.email+'">');
                                                                                    jQuery('fieldset.submit-buttons').append('<input type="hidden" name="fb_username" value="'+response.username+'">'); 
																					jQuery(this).dialog(
																					{
																						buttons:[
																						{
																							text: "I agree to these terms",
																							click: function() 
																							{
                                                                                                jQuery('.ui-dialog-buttonpane').animate({height: "0px"}, 300, function(){jQuery(this).remove() });
                                                                                                jQuery( "#fbinner" ).hide('fold');    
                                                                                                jQuery( "#fbinner" ).show('fold').html('<span style="text-align:center;"><img src="images/loading.gif"></span>');
																								var newform = jQuery('#agreement'),     
																								url = newform.attr('action');
																								var values = newform.serialize();
																								jQuery.post(url, 
																								values,
																								function(data) 
																								{
                                                                                                    jQuery('#dialog-confirm').fadeOut('fast');
																									jQuery('#dialog-confirm').fadeIn(function()
																									{   
																										jQuery('.ui-dialog').animate({ height: "600px", width: "800px", top: "100px"}); 
																										jQuery('#dialog-confirm').animate({height: "500px", width: "750px"}); 
																										jQuery('#dialog-confirm').html(data); 
																										jQuery('fieldset.submit-buttons').append('<input type="hidden" name="ajax" value="yes">');
																										jQuery('fieldset.submit-buttons').append('<input type="hidden" name="submit" value="true">');
																										jQuery(this).dialog(
																										{
																											buttons:[
																											{
																												text: "Submit",
																												click: function() 
																												{
                                                                                                                    jQuery('.ui-dialog-buttonpane').animate({height: "0px"}, 300, function(){jQuery(this).remove() });
                                                                                                                    jQuery( "#fbinner" ).hide('slide');    
                                                                                                                    jQuery( "#fbinner" ).show('slide').html('<span style="text-align:center;"><img src="images/loading.gif"></span>');																												                                          
																													var regoform = jQuery('#register');     
																													var regourl = regoform.attr('action');
																													var regovalues = regoform.serialize();
																													console.log(regovalues);
																													jQuery.post(regourl, 
																													regovalues,
																													function(regodata) 
																													{   
																														jQuery('#dialog-confirm').fadeOut('fast');
																														jQuery('#dialog-confirm').fadeIn(function()
																														{
																															jQuery('.ui-dialog').animate({ height: "200px", width: "400px", top: "100px"}); 
																															jQuery('#dialog-confirm').animate({height: "200px", width: "380px"});
																															jQuery('#dialog-confirm').html(regodata); 
																														}); 
																													});
																												}
																											},
																											{
                                                                                                                text: "Cancel",
																												click: function() 
																												{
																													jQuery('#dialog-confirm').dialog("close");
                                                                                                                    jQuery( "#dialog-confirm" ).dialog( "destroy" );
                                                                                                                    setTimeout(function() { window.location.href = "./index.php";}, 0005);
																												}
																											}]
																										});
																									}); 
																								});
																							}
																						},
																						{
																							text: "I do not agree to these terms",
																							click: function() 
																							{
																								jQuery('#dialog-confirm').dialog("close");
                                                                                                jQuery( "#dialog-confirm" ).dialog( "destroy" );
                                                                                                setTimeout(function() { window.location.href = "./index.php";}, 0005);																								
																							}
																						}]
																					});
																				}
																			}); 
																		});            
																	}
																},
																{
																	text: "No",
																	click: function() 
																	{
                                                                        jQuery('#dialog-confirm').dialog("close");
                                                                        jQuery( "#dialog-confirm" ).dialog( "destroy" );
                                                                        setTimeout(function() { window.location.href = "./index.php";}, 0005);
																	}
																}]
															}, 
															function() 
															{
                                                                jQuery('.no-close .ui-dialog-titlebar-close').css('display', 'none'); 
																jQuery('#dialog-confirm').animate(
																{
																	height: "100px"
																});
															});          
														}
														else
														{
															//console.log(regod);
															jQuery('#page-body').hide('fast', function()
															{ 
																jQuery('#page-body').html('');
																jQuery('#page-body').html(regod); 
															});
															jQuery('#page-body').show('bounce'); 
														}
													},
												});        
											});
										}
										else 
										{
											console.log('User cancelled login or did not fully authorize.');
										}
									}, 
									{
										scope: 'email'
									});
								});
								</script>
							</span>
</dd>
        </dl> 
	<span class="corners-bottom"><span></span></span></div>
</div><!-- ENDIF -->

<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>

	<h2>{SITENAME} - {L_REGISTRATION}</h2>

	<fieldset class="fields2">
	<!-- IF ERROR --><dl><dd class="error">{ERROR}</dd></dl><!-- ENDIF -->
	<!-- IF L_REG_COND -->
		<dl><dd><strong>{L_REG_COND}</strong></dd></dl>
	<!-- ENDIF -->
	<dl>
		<dt><label for="username">{L_USERNAME}:</label><br /><span>{L_USERNAME_EXPLAIN}</span></dt>
		<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" title="{L_USERNAME}" /></dd>
	</dl>
	<dl>
		<dt><label for="email">{L_EMAIL_ADDRESS}:</label></dt>
		<dd><input type="text" tabindex="2" name="email" id="email" size="25" maxlength="100" value="{EMAIL}" class="inputbox autowidth" title="{L_EMAIL_ADDRESS}" /></dd>
	</dl>
	<dl>
		<dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label></dt>
		<dd><input type="text" tabindex="3" name="email_confirm" id="email_confirm" size="25" maxlength="100" value="{EMAIL_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_EMAIL}" /></dd>
	</dl>
	<dl>
		<dt><label for="new_password">{L_PASSWORD}:</label><br /><span>{L_PASSWORD_EXPLAIN}</span></dt>
		<dd><input type="password" tabindex="4" name="new_password" id="new_password" size="25" value="{PASSWORD}" class="inputbox autowidth" title="{L_NEW_PASSWORD}" /></dd>
	</dl>
	<dl>
		<dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label></dt>
		<dd><input type="password" tabindex="5" name="password_confirm" id="password_confirm" size="25" value="{PASSWORD_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_PASSWORD}" /></dd>
	</dl>

	<hr />

	<dl>
		<dt><label for="lang">{L_LANGUAGE}:</label></dt>
		<dd><select name="lang" id="lang" onchange="change_language(this.value); return false;" tabindex="6" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select></dd>
	</dl>
	<dl>
		<dt><label for="tz">{L_TIMEZONE}:</label></dt>
		<dd><select name="tz" id="tz" tabindex="7" class="autowidth">{S_TZ_OPTIONS}</select></dd>
	</dl>

	<!-- IF .profile_fields -->
		<dl><dd><strong>{L_ITEMS_REQUIRED}</strong></dd></dl>

	<!-- BEGIN profile_fields -->
		<dl>
<!-- ENDIF -->
			<!-- IF profile_fields.ERROR --><br /><span class="error">{profile_fields.ERROR}</span><!-- ENDIF --></dt>
			<dd>{profile_fields.FIELD}</dd>
		</dl>
	<!-- END profile_fields -->
	<!-- ENDIF -->

	</fieldset>
	<span class="corners-bottom"><span></span></span></div>
</div>
<!-- IF CAPTCHA_TEMPLATE -->
	<!-- DEFINE $CAPTCHA_TAB_INDEX = 8 -->
	<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
<!-- ENDIF -->

<!-- IF S_COPPA -->


<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>

	<h4>{L_COPPA_COMPLIANCE}</h4>

	<p>{L_COPPA_EXPLAIN}</p>
	<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->

<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>

	<fieldset class="submit-buttons">
		{S_HIDDEN_FIELDS}
		<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
		<input type="submit" tabindex="9" name="submit" id="submit" value="{L_SUBMIT}" class="button1 default-submit-action" />
		{S_FORM_TOKEN}
	</fieldset>

	<span class="corners-bottom"><span></span></span></div>
</div>
</form>

<!-- INCLUDE overall_footer.html -->
I counted the { and } but there are equal numbers as far as I can tell.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51700
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Error when registering

Post by Brf » Fri May 31, 2013 9:29 pm

It is likely this misplaced ENDIF:

Code: Select all

  <!-- BEGIN profile_fields -->
      <dl>
<!-- ENDIF -->

luckyp79
Registered User
Posts: 140
Joined: Sat Nov 10, 2007 1:54 am
Location: Minnesota
Contact:

Re: Error when registering

Post by luckyp79 » Fri May 31, 2013 9:48 pm

Brilliant. I removed the end if statement and it is working. Thank so much.

Locked

Return to “[3.0.x] Support Forum”