Okay here goes: (I'm leaving out the comments)
Open
lang/english.phpFind the line
$lang_errors = array(
Just
before the next line with a ");", add this line:
'tc_not_agreed' => 'In order to upload images, you must agree to the gallery\'s <a href="terms.php" target="_blank">Terms and Conditions</a> by checking the box on the upload form.',
Find the line beginning with $lang_register_disclaimer, then
after the next line with a "EOT;", add this:
$lang_terms = <<<EOT
[your terms and conditions go here]
EOT;
Find the line that looks like this:
if (defined('UPLOAD_PHP')) $lang_upload_php = array(
Just
before the next line with a ");", add this line:
'tc_agree' => 'By checking this box, I agree to the gallery\'s <a href="terms.php" target="_blank">Terms and Conditions</a>.',
Now close english.php and create a file called
terms.php. Put the following in it:
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2008 Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation.
**********************************************/
define('IN_COPPERMINE', true);
define('REGISTER_PHP', true);
require('include/init.inc.php');
require('include/mailer.inc.php');
pageheader($lang_register_php['term_cond']);
starttable(-1, $lang_register_php['term_cond']);
echo <<<EOT
<tr>
<td class="tableb">
EOT;
echo $lang_terms;
echo <<<EOT
</td>
</tr>
EOT;
endtable();
pagefooter();
ob_end_flush();
?>
Now open
upload.php.
Find the line that begins with "function text_box_input..." and look for the next line that starts with a } (no spaces before it).
After that line add the following:
function checkbox_input($text, $name) {
echo <<<EOT
<tr>
<td width="40%" class="tableb"> </td>
<td width="60%" class="tableb" vlaign="top">
<input type="checkbox" id="check_$name" name="$name" />
$text
</td>
</tr>
EOT;
}
Now search for these lines:
// Call the hidden input funtion.
hidden_input($element[0], $element[1]);
break;
And
after them, add this:
case 5 :
checkbox_input($element[0], $element[1]);
break;
Look for this:
create_form($data);
And add this
before it:
array_push($data, array($lang_upload_php['tc_agree'], 'agree', 5));
Look for this:
// Add the control device.
$form_array[] = array('control', 'phase_1', 4);
And add this
before it:
array_push($form_array, array($lang_upload_php['tc_agree'], 'agree', 5));
Look for this:
// We have error support.
$error_support = 'TRUE';
}
And add this
after it:
if($_POST["agree"] != "on") {
pageheader($lang_error);
msg_box($lang_error, $lang_errors['tc_not_agreed'], $lang_continue, "upload.php", "100%");
// Create the footer and flush the output buffer.
pagefooter();
ob_end_flush();
// Exit the script.
exit;
}
And that's it!
