[RC1] Registration Auth Code (RAC)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29252
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [RC] Registration Auth Code (RAC)

Post by Marshalrusty » Sat Jun 23, 2007 9:44 pm

Yes that looks fine. In the future, please use the

Code: Select all

 BBCode tags when pasting code blocks.

Installs through 3rd party services such as fantastico are not supported on this site, however that should not be the issue in this case. After making those edits to the files, make sure that they save and that correctly overwrite the existing copies on the server. If the edits to profile_add_body.tpl are made on a standard installation of phpBB, something will show up (even if the other bits of code are not added).

Did you install any MOD that alters how registration works? Another antispam MOD perhaps?
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

gbungart
Registered User
Posts: 22
Joined: Fri Mar 28, 2003 3:41 pm
Location: Orlando Florida
Contact:

Re: [RC] Registration Auth Code (RAC)

Post by gbungart » Sat Jun 23, 2007 10:17 pm

Thank you for your quick reply I did indeed make the changes to the includes/usercp_register.php but I went ahead and double checked and the changes are there and saved. It still does not work. Any other things I should look at? And you are right bots are still registering.

Thanks again!

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29252
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [RC] Registration Auth Code (RAC)

Post by Marshalrusty » Sat Jun 23, 2007 10:41 pm

gbungart wrote:Thank you for your quick reply I did indeed make the changes to the includes/usercp_register.php but I went ahead and double checked and the changes are there and saved. It still does not work. Any other things I should look at? And you are right bots are still registering.

Thanks again!
If you made the proper edits to the file, then an error would be displayed if the code is not submitted with the form. As such, the file on the server does not have the proper edits made. Make sure that your FTP client actually overwrote the old file with the properly modified version.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

Sapphire Luna
Registered User
Posts: 4
Joined: Wed Nov 08, 2006 3:37 pm

Re: [RC] Registration Auth Code (RAC)

Post by Sapphire Luna » Sun Jun 24, 2007 1:07 am

Lines 140 to 160. Thanks. I bet it's something stupid...

Code: Select all

	$user_timezone = ( isset($HTTP_POST_VARS['timezone']) ) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone'];

	$sql = "SELECT config_value
		FROM " . CONFIG_TABLE . "
		WHERE config_name = 'default_dateformat'";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not select default dateformat', '', __LINE__, __FILE__, $sql);
	}
	$row = $db->sql_fetchrow($result);
	$board_config['default_dateformat'] = $row['config_value'];
	$user_dateformat = ( !empty($HTTP_POST_VARS['dateformat']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['dateformat'])) : $board_config['default_dateformat'];
al'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarcatname']) : '' ;

	$user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['avatarremoteurl'])) : '';
	$user_avatar_upload = ( !empty($HTTP_POST_VARS['avatarurl']) ) ? trim($HTTP_POST_VARS['avatarurl']) : ( ( $HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : '' );
	$user_avatar_name = ( !empty($HTTP_POST_FILES['avatar']['name']) ) ? $HTTP_POST_FILES['avatar']['name'] : '';
	$user_avatar_size = ( !empty($HTTP_POST_FILES['avatar']['size']) ) ? $HTTP_POST_FILES['avatar']['size'] : 0;
	$user_avatar_filetype = ( !empty($HTTP_POST_FILES['avatar']['type']) ) ? $HTTP_POST_FILES['avatar']['type'] : '';
Last edited by drathbun on Mon Jun 25, 2007 8:36 pm, edited 1 time in total.
Reason: added code format

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29252
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [RC] Registration Auth Code (RAC)

Post by Marshalrusty » Sun Jun 24, 2007 1:37 am

The MOD comes nowhere near to modifying these lines.

In the future, please use the [code] tags when posting code blocks

Find:

Code: Select all

	$user_dateformat = ( !empty($HTTP_POST_VARS['dateformat']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['dateformat'])) : $board_config['default_dateformat'];
al'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarcatname']) : '' ;

	$user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['avatarremoteurl'])) : '';
Replace with:

Code: Select all

	$user_dateformat = ( !empty($HTTP_POST_VARS['dateformat']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['dateformat'])) : $board_config['default_dateformat'];

	$user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarselect']) : ( ( isset($HTTP_POST_VARS['avatarlocal'])  ) ? htmlspecialchars($HTTP_POST_VARS['avatarlocal']) : '' );
	$user_avatar_category = ( isset($HTTP_POST_VARS['avatarcatname']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarcatname']) : '' ;

	$user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['avatarremoteurl'])) : '';
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

gbungart
Registered User
Posts: 22
Joined: Fri Mar 28, 2003 3:41 pm
Location: Orlando Florida
Contact:

Re: [RC] Registration Auth Code (RAC)

Post by gbungart » Sun Jun 24, 2007 12:39 pm

OK so it still won't display correctly for me. I thought maybe one of the other mods was interferring with it so I replaced the 3 files with the original files from the download zip. Then I did the edits.

It appears NOW that it will not let you register without entering the default code but the description of what to enter is still missing on the registration page.

Can you help me figure this part out?

Thanks

http://www.themeparks.com/forums/profil ... greed=true

sikenward
Registered User
Posts: 10
Joined: Sun Jun 24, 2007 5:22 pm

Re: [RC] Registration Auth Code (RAC)

Post by sikenward » Sun Jun 24, 2007 5:26 pm

I am thinking of installing this mod, but I have a question first.
How do you choose whether you want to use a code or a question?
Simon

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29252
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [RC] Registration Auth Code (RAC)

Post by Marshalrusty » Sun Jun 24, 2007 9:23 pm

sikenward wrote:How do you choose whether you want to use a code or a question?
Please read the instructions, it's all very clearly explained in the installation file. If you change the description to a question, then the answer will be the code. In other words, the only difference is that instead of telling users where to find the code, the answer to the question will be the code you define.

gbungart: since your code has obviously been altered from the default, there's really no way I can help you without seeing the files.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

Sapphire Luna
Registered User
Posts: 4
Joined: Wed Nov 08, 2006 3:37 pm

Re: [RC] Registration Auth Code (RAC)

Post by Sapphire Luna » Sun Jun 24, 2007 10:37 pm

Aw it's working. Thanks a lot.

samredman
Registered User
Posts: 30
Joined: Sat Oct 22, 2005 8:24 pm

Re: [RC] Registration Auth Code (RAC)

Post by samredman » Mon Jun 25, 2007 1:23 am

This is a remarkable MOD. It stopped spambots completely. It is amazing (we were getting 50 a day, now none). But, it also works to stop human spammers by allowing you to employ clever questions. To stop human spammers, I found that asking a question, whose answer is generally known by the local nation's culture (assuming that is the group which will include your legitimate users) but, wouldn't be known by those of an eastern European culture (most of the spammers), will stop them cold.

However, I am hesitant to post my question(s) here (I don't want them to end up in their databases), but my advice is be creative and keep it narrowly related to the nature of your board. Thanks to this great MOD, I am spammer free.

alaskan_vwnut
Registered User
Posts: 1
Joined: Mon Jun 25, 2007 6:59 am

Re: [RC] Registration Auth Code (RAC)

Post by alaskan_vwnut » Mon Jun 25, 2007 7:09 am

This works great, thanks!! Went from 30 spambots a day to zero.

:mrgreen:

sikenward
Registered User
Posts: 10
Joined: Sun Jun 24, 2007 5:22 pm

Re: [RC] Registration Auth Code (RAC)

Post by sikenward » Mon Jun 25, 2007 7:01 pm

Marshalrusty wrote:Please read the instructions, it's all very clearly explained in the installation file.
Thanks. One more question... Can this Mod be installed with EasyMod?
I am new to installing Mods and am terrified I will do something wrong - so I apologise if I am asking stupid questions.

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29252
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [RC] Registration Auth Code (RAC)

Post by Marshalrusty » Mon Jun 25, 2007 7:51 pm

sikenward wrote:Thanks. One more question... Can this Mod be installed with EasyMod?
I am new to installing Mods and am terrified I will do something wrong - so I apologise if I am asking stupid questions.
I'm not sure how you would expect that to work. The MOD has 4 steps, 2 of which need to be customized. You can install it with EasyMOD, but then you would have to go through the installation instructions and make the changes suggested to configure it, thus making the whole process considerably more difficult. It's only 4 steps, there's no reason to involve EM whatsoever. In fact, I don't suggest using EM to install any MOD. How do you expect to learn if you keep using automated tools?

In any case, before installing any MODs, you are asked to make backups of the files that will be edited. As such, even if you make a mistake, you'll have backups.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

csheakos
Registered User
Posts: 8
Joined: Tue Jun 26, 2007 3:22 pm

Re: [RC] Registration Auth Code (RAC)

Post by csheakos » Tue Jun 26, 2007 3:27 pm

I just tried making the mods to the files on my server and when I go to register I get the following .

Parse error: parse error, unexpected '}' in /usr2/caeweb/forum/includes/template.php(127) : eval()'d code on line 72
This is definitely not a file I touched and everything works fine when I put the original files in place. Any ideas?

Here are are lines 60-80 of template.php

Code: Select all

	$this->set_rootdir($root);
	}

	/**
	 * Destroys this template object. Should be called when you're done with it, in order
	 * to clear out the template data so you can load/parse a new template set.
	 */
	function destroy()
	{
		$this->_tpldata = array();
	}

	/**
	 * Sets the template root directory for this Template object.
	 */
	function set_rootdir($dir)
	{
		if (!is_dir($dir))
		{
			return false;
		}
Thanks.

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29252
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [RC] Registration Auth Code (RAC)

Post by Marshalrusty » Tue Jun 26, 2007 5:28 pm

The problem is in a template files (I would assume profile_add_body.tpl since that's the only template file you need to edit to install this MOD). When template.php processes the template file, it ends up with a parse error.

Make sure that both switches (<!-- BEGIN switch_user_logged_out -->) are in place and that you didn't remove any of the other ones. If you still can't figure it out, post a link to your board so we can take a look.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

Post Reply

Return to “[2.0.x] MODs in Development”