SMF Support > SMF 1.1.x Support

Change Registration Disabled Error Messages

<< < (2/3) > >>

peterinwa:
Here are the TWO locations in /Sources/Register.php I changed. I have also included the line that follows so you can see that I didn't mess anything up.


--- Code: --- // Check if the administrator has it disabled.
if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3)
{
$context['error_title'] = 'Registration Instructions';
fatal_lang_error('registration_disabled', false);
}

// If this user is an admin - redirect them to the admin registration page.
--- End code ---


--- Code: --- // You can't register if it's disabled.
{
$context['error_title'] = 'Registration Instructions';
fatal_lang_error('registration_disabled', false);
}

foreach ($_POST as $key => $value)

--- End code ---

The result of the above TWO edits is that the title does change, but it causes my change to /Themes/default/languages/Erros.english.php to not show at all. It is blank.

I have another question if I may. If someone could please explain... when I FTP the modified code, why do I see two files?

Register.php
Register.php~

Thanks!

Elmacik:
You are right sorry. So we have just found a little bug in SMF 1.x :)
It is enough for you to change it for the first occurence only.

Then for the bug, you will need to do this code change; in /Sources/Errors.php file,


--- Code: (Find) --- // Log the error and set up the template.
if (!isset($context['error_title']))
{
$context['error_title'] = $txt[106];
$context['error_message'] = $log || (!empty($modSettings['enableErrorLogging']) && $modSettings['enableErrorLogging'] == 2) ? log_error($error) : $error;
}
--- End code ---


--- Code: (Replace) --- // Log the error and set up the template.
if (!isset($context['error_title']))
$context['error_title'] = $txt[106];
$context['error_message'] = $log || (!empty($modSettings['enableErrorLogging']) && $modSettings['enableErrorLogging'] == 2) ? log_error($error) : $error;

--- End code ---

As you will notice, only the curved braces should be removed. Then it will work for you.

By the way, .php~ files are just backups. You'd beeter keep them if you are not lacking of storage.

peterinwa:
Works great! Thanks so much.

BTW, what brought this up is now explained in Titlewave of Spambot Attacks...

http://www.simplemachines.org/community/index.php?topic=273816.0

Peter

P.S.

If you want to see how this works, click on my website (in my signature, below) and then try to register!

Father Luke:
I know this topic is old, but I wanted to express thanks for this.

Much-oh headaches solved.
Thanks muchly.

- -
Okay,
Father Luke

bharat91:
sir actuallly I want to change the message which comes  just after the registration when admin approval is mandatory, after registration it comes "thank you for registering you account will be active after admin approval ......." How to change this message

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version