Mihalism Technologies: [5.0.x] Captcha check for guest user - Mihalism Technologies

Jump to content

READ BEFORE USING MODIFICATIONS

Before the use of any modifications within this forum, please be aware of the following:

1. All modifications are provided as-is without any warranty of merchantability or warranty of fitness for a particular purpose.
2. Like any product, there is a risk of data loss or damage when used improperly or in untested environments or configurations. Accordingly,
you should use the modifications in strict accordance with its documentation and only after making a successful backup of your data.
3. Mihalism Technologies and the author of each modification does not claim any responsibility for data loss as a result of misuse.
4. Mihalism Technologies does not provide support for any modifications listed within this forum. It is the job of the authors to provide support.

This forum is not for modification requests!
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[5.0.x] Captcha check for guest user Originally posted by: sasha2002, on 31 March 2010 Rate Topic: -----

#1 User is offline   Josh D. Icon

  • Staff
  • PipPipPip
  • Group: Administrators
  • Posts: 474
  • Joined: 07-February 09

Posted 01 April 2010 - 08:03 PM

Originally posted by: sasha2002, on 31 March 2010

In index.php (line 103):
Before :
"STANDARD_UPLOAD_YES" =>

Add this :
"CAPTCHA_CODE" => recaptcha_get_html($mmhclass->info->config['recaptcha_public']),


In source/language/upload.php (line 71):
Before :
?>

Add this :
$mmhclass->lang['061'] = "The security code entered did not match the one displayed. <br />
A new code has been generated. Please try again.<br />
<br />
<a href=\"javascript:void(0);\" onclick=\"history.go(-1);\">Return to Previous Page</a>";


In source/public_html/home.tpl (line 40):
Before :
<input class="button1" type="button" value="Start Uploading" 

Add this :
                <if="$mmhclass->info->is_user == false">
                <div style="width:100%;text-align:left;"><span>Security Code:</span><# CAPTCHA_CODE #></div>
                </endif>

In source/public_html/home.tpl (line 148):
Before :
<input class="button1" type="button" value="Start Uploading" 

Add this :
                <if="$mmhclass->info->is_user == false">
                <div style="width:100%;text-align:left;"><span>Security Code:</span><# CAPTCHA_CODE #></div>
                </endif>


In upload.php (line 13):
After :
$mmhclass->templ->page_title = sprintf($mmhclass->lang['001'], $mmhclass->info->config['site_name']);

Add this :
        if ($mmhclass->info->is_user == false) {
                $recaptcha_check = recaptcha_check_answer(
$mmhclass->info->config['recaptcha_private'],
 $mmhclass->input->server_vars['remote_addr'],
 $mmhclass->input->post_vars["recaptcha_challenge_field"],
 $mmhclass->input->post_vars["recaptcha_response_field"]);
        }

In upload.php (line 34):
After :
case "paste_upload":

Add this :
                                        if ($recaptcha_check->is_valid == false && $mmhclass->info->is_user == false) {
                                                $mmhclass->templ->error($mmhclass->lang['061'], true);
                                        }


In upload.php (line 40):
After :
case "webpage_upload":

Add this :
                                        if ($recaptcha_check->is_valid == false && $mmhclass->info->is_user == false) {
                                                $mmhclass->templ->error($mmhclass->lang['061'], true);
                                        }


In upload.php (line 150):
After :
case "standard":

Add this :
                                        if ($recaptcha_check->is_valid == false && $mmhclass->info->is_user == false) {
                                                $mmhclass->templ->error($mmhclass->lang['061'], true);
                                        }


In upload.php (line 154):
After :
case "normal-boxed":

Add this :
                                        if ($recaptcha_check->is_valid == false && $mmhclass->info->is_user == false) {
                                                $mmhclass->templ->error($mmhclass->lang['061'], true);
                                        }



That's all folks.
Just Use it !!!


With best regards sasha2002

Do not PM me for support (message will be ignored), please use the support forum and one of the staff members will try to assist you.

Support Topic Guidelines
0

#2 User is offline   Josh D. Icon

  • Staff
  • PipPipPip
  • Group: Administrators
  • Posts: 474
  • Joined: 07-February 09

Posted 01 April 2010 - 08:05 PM

Discussion Topic
Do not PM me for support (message will be ignored), please use the support forum and one of the staff members will try to assist you.

Support Topic Guidelines
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic