ok admin please more this mod as i could not find the place to post this mod i did go and red the post about where to post it and that you will move it. please move it and delete the above messange and let me knwo where it has been moved. thanks
All this code does is lets people view a 10 images and then they have to register or wait for an other 24 hours. I am not the best php programer so if you think you can improve the code please do so.
<< Instollation >>
should work with version 1.4.x
Open displayimage.php
Find $picture = theme_html_picture();
Replace with
///10 images view hack for Coppermine Photo Gallery V 1.4.x //////////////////////////////////////////
//number of images that can be viewed before having to register
$viewimages=10;
//your register messange
$message = "<p align='center'><a href='register.php'><font size='5'>Please register<br> or login <br> to view all the files </font></a></p>";
$set=0;
//checking if the user is loged in.
if(USER_ID){
$picture = theme_html_picture();
//when user logsin reset cookie
setcookie("viewcount", "0");
}
else {
//checking how many files have been viewed
if($_COOKIE["viewcount"] < $viewimages){
//adding one to the cookie
$set=$_COOKIE["viewcount"]+1;
//setting the cookie
setcookie("viewcount", $set, time()+86400);
//printing the image
$picture = theme_html_picture();
}
else{
//printing the message
$picture = $message ;
}}
/////////////////////////////////////////////////////////////////////////////////////////////////////