Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 2 3 4 [5] 6 7 8 9 10
 41 
 on: July 09, 2018, 09:49:31 am 
Started by DavidSam0230 - Last post by DavidSam0230
And before I spend a lot of time trying to debug them I thought I'd check to see if they are working for others.

They are ecard, report, and language other than english?

I tried turning on logging but I am having problems with it also.

I will report the errors I am having in separate threads...

Thanks in advance,
David

 42 
 on: July 09, 2018, 03:08:58 am 
Started by nowordneeded - Last post by ron4mac
Thumbnail size
Changes in Config to thumbnail sizes only affect any newly uploaded images. To modify the size of any existing thumbnails, use Admin Tools to regenerate them.

Theme errors
Your theme is not compatible with PHP 7. For the most part, you must change any calls in a theme .php file of the form mysql_xxx_xxxx to cpg_db_xxx_xxxx and that will solve compatibility issues.

 43 
 on: July 09, 2018, 02:58:22 am 
Started by nowordneeded - Last post by ron4mac
When upgrading a CPG site to 1.6.x make sure your plugins are compatible. Check here or here for plugin replacements that are compatible with CPG 1.6.x and PHP 7.

 44 
 on: July 09, 2018, 01:03:37 am 
Started by nowordneeded - Last post by nowordneeded
Along with the button not working, when I upload new images I get a fatal error warning. On this gallery http://tamara-braun.com/gallery using the latest stable version 1.6.03



Fatal error: Uncaught Error: Call to undefined function mysql_num_rows() in /tamara-braun.com/gallery/themes/KED-cpg104/theme.php:58 Stack trace: #0 /tamara-braun.com/gallery/displayimage.php(443): theme_display_fullsize_pic() #1 {main} thrown in /tamara-braun.com/gallery/themes/KED-cpg104/theme.php on line 58 and it won't show full size image. The code in line 58 is this:

Code: [Select]
if (!mysql_num_rows($result)) {
Also when I went to put the images in the album on the page where the images are supposed to show up, I got this image in the first attachment, then in the second is what happens when you bring up the full size image.

 45 
 on: July 08, 2018, 11:02:48 pm 
Started by nowordneeded - Last post by nowordneeded
So I solved one issue on the upgrade, but a new one has come up. This on all my upgrades. I'll use the same gallery of http://stephennichols.org/gallery using the latest stable version of 1.6.03.

So the issue I have now is I went to change the thumbnail size on this gallery to align with a new theme I'm going to use, but when I hit the "save new configuration" button, it won't work. I tried this on two of my other galleries I've upgraded to this same version and the same issue is present.

Sorry for the double post but while solving the one issue, this one came up.

 46 
 on: July 08, 2018, 10:50:11 pm 
Started by nowordneeded - Last post by nowordneeded
I solved it. When I had to move the site from one host to another for some reason the onlinestats plugin wouldn't work. I uploaded it with this new install and it created the error. I deleted the plugin and now the gallery is back.

Sorry for wasting the post.

 47 
 on: July 08, 2018, 10:34:45 pm 
Started by nowordneeded - Last post by nowordneeded
The gallery I'm needing help on is http://stephennichols.org/gallery running the current stable version of 1.6.03.

The issue I'm having is that after deleting all but the albums folder, one theme in the themes folder, and the include/config.inc.php file, then uploading all files and folders excluding the ones aformentioned and running the updater, I received a Critical Error message.

Thanks in advance.

 48 
 on: July 08, 2018, 01:29:16 pm 
Started by viper85 - Last post by ron4mac
As you must know, there is actually no way that you can truly verify a registrant's age. So what you are trying to do can be made much simpler. At the time of registration, calculate the date they would have been born to be over 18. Display that date and ask whether they were born before it with yes/no radio buttons. The method is used for many alcohol web stores. http://www.totalwine.com/

 49 
 on: July 08, 2018, 06:30:05 am 
Started by viper85 - Last post by viper85
I'm getting ready to create a gallery that will post image from another site that the user decided he didn't have the time to continue to update. He was using some other rudimentary photo gallery, and in my attempt to put my own spin on it, I've decided to use Coppermine. However, some of the content that will be in this gallery will be adult-oriented, and I want to make sure that any person who registers to the site is above 18 years old.

I found Andre's fix in this thread for how to make the optional fields required. I have changed the code to make Optional Field 1 the birthday.

However, it's been over a decade since I last did any JavaScript coding, and I must say that my skills have gone from rusty, to almost non-existent. Basically, what I'm wanting to do is have two functions:
  • Check that the input in Optional Field 1 fits a given template MM/DD/YYYY or YYYY/MM/DD
  • Check if Current year minus birth year is greater than or equal to 18.
    • If it's less than, decline registration.
    • If it's equal to, then check the month and day.
    • If it's greater than, allow the registration to go through properly.

Based on different snippets of code I've found on the internet, I've constructed the following, but I'm getting to the point where I don't know where I'm going anymore.

Code: [Select]
// Validates that the input string is a valid date formatted as "mm/dd/yyyy"
function isValidDate(dateString)
{
    // First check for the pattern
    if(!/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(dateString))
        return false;

    // Parse the date parts to integers
    var parts = dateString.split("/");
    var day = parseInt(parts[1], 10);
    var month = parseInt(parts[0], 10);
    var year = parseInt(parts[2], 10);

    // Get the current date broken into individual componenets
    var todayYear = new Date();
    document.getElementById("demo").innerHTML = todayYear.getFullYear();
    var todayMonth = new Date();
    document.getElementById("demo").innerHTML = todayMonth.getMonth();
    var todayDay = new Date();
    document.getElementById("demo").innerHTML = todayDay.getDate();


    // Check the ranges of month and year
    if(year < 1000 || year > 3000 || month == 0 || month > 12)
        return false;

    var monthLength = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];

    // Adjust for leap years
    if(year % 400 == 0 || (year % 100 != 0 && year % 4 == 0))
        monthLength[1] = 29;

    // Check the range of the day
    return day > 0 && day <= monthLength[month - 1];

    // Check if age is greater than 18
    if((todayYear - year) > 18)
        return true;
    elseif((todayYear - year) < 18)
        return false;
    elseif((todayYear - year) = 18) {
        if(((todayMonth + 1) - month) > 0)
            return true;
        elseif(((todayMonth + 1) - month) = 0)
            if(((todayDay + 1) - day) > 0)
                return true;
            else
                return false;
        elseif(((todayMonth + 1) - month) < 0)
            return false;
};

I'm also not sure what lines of code I'd need to amend and in which files to make these changes. (Although I'm pretty sure it'd be in registration.js and registration.php.)

If anyone can help me with this, I'd be very grateful.

 50 
 on: July 08, 2018, 02:36:38 am 
Started by nowordneeded - Last post by nowordneeded
That worked perfectly. Thanks.

Pages: 1 2 3 4 [5] 6 7 8 9 10

Page created in 0.019 seconds with 16 queries.