i'm using nuke 6.7 with all security patches
just installed coppermine 1.2 rc2
no problem.
i want to use the block for random pictures in the center of nuke, but it looks like the sql queries in the blocks don't use the database prefix set in the config.inc.php
i'm not a php expert, but am learning and can understand most of what the code does.
Can someone give me a hand in getting the block-center-Random_pictures.php to work
i get this error at the moment:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ###my path to the file###/block-Random_pictures.php on line 49
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ###my path to the file###/block-Random_pictures.php on line 60
The SQL statement in the block is presuming that you have the default directory cpg_pictures. If, like me, you renamed your install then you have to modify two lines of code to get this to work..
Around line 48
$result = sql_query("SELECT count(*) from nuke_cpgpictures", $dbi);
Around line 59
$result2 = sql_query("SELECT pid, aid, filepath, filename from nuke_cpgpictures WHERE approved='YES' LIMIT $random_number,1", $dbi);
The two bits in bold are the correction for MY config where I kept the nuke prefix and stuck the cpg after the _ to keep all the cpg tables together.
Edit to suit your tables.
hmmmm when I made that change for my config I get this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /path to my file/blocks/block-Random_pictures.php on line 49
any ideas?
Upgrade to RC3 it has mass changes.