View Single Post
Old March 3rd, 2006, 06:30 PM   #3 (permalink)
cwallace
Junior Member
Verified Customer
 
Join Date: Dec 2004
Location: So Cal USA
Posts: 10
Would you be so kind as to show where I would place the "AND cat NOT IN (501,503)"? Thanks!!

Here's a portion of the code (not sure if I copied enough of it) for your convenience:

function display_gallery($q_switch, $showuser="", $showcat="", $overcol=0, $overnum=0) {
global $Globals, $Style, $ppopen, $ppclose, $link, $cat, $exclude_cat, $si, $CatPerms;

$rcols = ( $overcol == 0 ? $Globals['recentcols'] : $overcol );
$rphotos = ( $overnum == 0 ? $Globals['recentnum'] : $overnum );
$catquery = ""; $cattype = "c";

if ($rcols < 0) $rcols = 4;
if ($rcols > 12) $rcols = 4;
if ($rphotos < 0) $rphotos = 12;
if ($rphotos > 100) $rphotos = 12;

$twidth = intval(100/$rcols);

if ( $cat == "500" ) {
$catname = "{$Globals['pp_lang']['gallery']}";
if ( $si == "" ) {
$catquery = "500";
}
else {
$queryb = "SELECT id,cattype FROM {$Globals['pp_db_prefix']}categories ORDER BY catorder ASC";
$boards = ppmysql_query($queryb, $link);
$cnt=0;
while ( list( $catqid, $cattype ) = mysql_fetch_row($boards) ) {
if ( $cnt == 0 ) {
$cnt=1;
$catquery .= "$catqid";
}
else {
$catquery .= ",$catqid";
}
}
ppmysql_free_result($boards);
}
}
cwallace is offline   Reply With Quote