News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

Excluding Album(s) from Random Image block

Started by Aadilya, October 01, 2003, 07:14:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Aadilya

Is there a way to exclude the pictures in a specific album from appearing in my "Random Images" block?

Aad

gtroll

In block-Random_pictures.php
aid!=4 AND aid!=6 AND aid!=7 were the directories i wanted to exclude change those aid to your own..
~= line 48 was$result = sql_query("SELECT count(*) from cpg_pictures", $dbi);

change to
$result = sql_query("SELECT count(*) from cpg_pictures WHERE aid!=4 AND aid!=6 AND aid!=7", $dbi);

~=line 59 was$result2 = sql_query("SELECT pid, aid, filepath, filename  from cpg_pictures WHERE approved='YES' LIMIT $random_number,1", $dbi);
change to:$result2 = sql_query("SELECT pid, aid, filepath, filename  from cpg_pictures WHERE aid!=4 AND aid!=6 AND aid!=7  AND approved='YES' LIMIT $random_number,1", $dbi);