hello
I want to enable uploding picture for non-register user. My gallery including a picture of people, so
I need to do some changes in upload.php file. This file must icluding "I certify that I have the copyright on these photos" phrase, and check or radio button.
Without mark that buton, user cannot click continue and upload files.
This is very Important.
I do not want to be responsible for the photos posted on my site.
I know i can include that phrase in registration rules, but like i said, uploding module must be enabled for everyone.
Can someone can help me with this ? I have no idea how to start...
Quote from: jolly on May 07, 2009, 04:02:45 PM
I do not want to be responsible for the photos posted on my site.
That's an "exotic" attitude. Making your visitors tick that checkbox doesn't mean much in legal terms.
QuoteThat's an "exotic" attitude. Making your visitors tick that checkbox doesn't mean much in legal terms.
Thank you for your opinion, Joachim.
But for me and for polish lawyers it is very important, and change everything in legal terms.
Edit upload.php then and add the checkbox there - shouldn't be too complicated, just plain HTML and JavaScript.
To be honest , I am a php noob :-[
I tried to put checkbox function in upload.php, but wherever i add this function , it is not showed.
I need assistance if somebody is willing..
No PHP skills needed - all it needs is HTML skills. You could have googled for a solution, as this is being covered on many sites. Here's the JavaScript-driven solution that will not work if your visitors have turned JavaScript off. If you need the foolproof method that works with JavaScript turned off as well, you will need PHP skills, as you will have to edit the code at db_input.php.
Anyway, here's the solution: edit upload.php , find </script>
and add before it into a new line of it's own var checkobj
function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){ //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}
function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("I am sure")
return false
}
}
}
Then find <form method="post" action="$path" enctype="multipart/form-data">
and replace with <form name="uploadform" method="post" action="$path" enctype="multipart/form-data" onSubmit="return defaultagree(this)">
Finally, find <input type="submit" value="{$button_value}" class="button" />
and replace with <input name="agreecheck" id="agreecheck" type="checkbox" onClick="agreesubmit(this)" /><label for="agreecheck">I swear that I'm a nice guy and won't upload copyrighted material, yada yada.</label>
</td>
</tr>
<tr>
<td colspan="2" align="center" class="tablef">
<input type="submit" value="{$button_value}" class="button" disabled="disabled" />
Not one single line of PHP affected - all plain HTML and JavaScript.
The code I have pasted in comes originally from modifyalb.php...
Thank you !!! You are TopMan.