hi gaugau
thanks for replying. here's a snippet of displayimage.php ... the complete "main" section of code with the change i made (search for
"// hide picture info - peter")
but here's the 1 line i commented out from "main" t
// hide picture info - peter
// $pic_info = html_picinfo();
$pic_info = '';
however the real problem is, and this is the better fix, is that
the admin config option to hide picture information by default is not working (on our server anyway). ie, whether set to yes/no it still displays the file information for photos by default ("file information is visible by default")
your help is appreciated!
peter
-----------------------------------------------------------------
/**
* Main code
*/
$pos = isset($HTTP_GET_VARS['pos']) ? (int)$HTTP_GET_VARS['pos'] : 0;
$cat = isset($HTTP_GET_VARS['cat']) ? (int)$HTTP_GET_VARS['cat'] : 0;
$album = isset($HTTP_GET_VARS['album']) ? $HTTP_GET_VARS['album'] : '';
// Build the album set if required
if (!is_numeric($album) && $cat) { // Meta albums, we need to restrict the albums to the current category
if ($cat < 0) {
$ALBUM_SET .= 'AND aid IN (' . (- $cat) . ') ';
} else {
$ALBUM_SET_ARRAY = array();
if ($cat == USER_GAL_CAT)
$where = 'category > ' . FIRST_USER_CAT;
else
$where = "category = '$cat'";
$result = db_query("SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} WHERE $where");
while ($row = mysql_fetch_array($result)) {
$ALBUM_SET_ARRAY[] = $row['aid'];
} // while
get_subcat_data($cat, $CONFIG['subcat_level']);
// Treat the album set
if (count($ALBUM_SET_ARRAY)) {
$set = '';
foreach ($ALBUM_SET_ARRAY as $album_id) $set .= ($set == '') ? $album_id : ',' . $album_id;
$ALBUM_SET .= "AND aid IN ($set) ";
}
}
}
// Retrieve data for the current picture
if ($pos < 0) {
$pid = - $pos;
$result = db_query("SELECT aid from {$CONFIG['TABLE_PICTURES']} WHERE pid='$pid' $ALBUM_SET LIMIT 1");
if (mysql_num_rows($result) == 0) cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
$row = mysql_fetch_array($result);
$album = $row['aid'];
$pic_data = get_pic_data($album, $pic_count, $album_name, -1, -1, false);
for($pos = 0; $pic_data[$pos]['pid'] != $pid && $pos < $pic_count; $pos++);
$pic_data = get_pic_data($album, $pic_count, $album_name, $pos, 1, false);
$CURRENT_PIC_DATA = $pic_data[0];
} elseif (isset($HTTP_GET_VARS['pos'])) {
$pic_data = get_pic_data($album, $pic_count, $album_name, $pos, 1, false);
if ($pic_count == 0) {
cpg_die(INFORMATION, $lang_errors['no_img_to_display'], __FILE__, __LINE__);
} elseif (count($pic_data) == 0 && $pos >= $pic_count) {
$pos = $pic_count - 1;
$human_pos = $pos + 1;
$pic_data = get_pic_data($album, $pic_count, $album_name, $pos, 1, false);
}
$CURRENT_PIC_DATA = $pic_data[0];
}
// Retrieve data for the current album
if (isset($CURRENT_PIC_DATA)) {
$result = db_query("SELECT title, comments, votes, category, aid FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid='{$CURRENT_PIC_DATA['aid']}' LIMIT 1");
if (!mysql_num_rows($result)) cpg_die(CRITICAL_ERROR, sprintf($lang_errors['pic_in_invalid_album'], $CURRENT_PIC_DATA['aid']), __FILE__, __LINE__);
$CURRENT_ALBUM_DATA = mysql_fetch_array($result);
if (is_numeric($album)) {
$cat = - $album;
$actual_cat = $CURRENT_ALBUM_DATA['category'];
breadcrumb($actual_cat, $breadcrumb, $breadcrumb_text);
$cat = - $album;
} else {
$actual_cat = $CURRENT_ALBUM_DATA['category'];
breadcrumb($actual_cat, $breadcrumb, $breadcrumb_text);
}
}
if (isset($HTTP_GET_VARS['fullsize'])) {
display_fullsize_pic();
ob_end_flush();
} elseif (isset($HTTP_GET_VARS['slideshow'])) {
slideshow();
ob_end_flush();
} else {
if (!isset($HTTP_GET_VARS['pos'])) cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
$picture_title = $CURRENT_PIC_DATA['title'] ? $CURRENT_PIC_DATA['title'] : strtr(preg_replace("/(.+)\..*?\Z/", "\\1", htmlspecialchars($CURRENT_PIC_DATA['filename'])), "_", " ");
$nav_menu = html_img_nav_menu();
$picture = html_picture();
$votes = html_rating_box();
// hide picture info - peter
// $pic_info = html_picinfo();
$pic_info = '';
$comments = html_comments($CURRENT_PIC_DATA['pid']);
if ($CURRENT_PIC_DATA['keywords']) { $meta_keywords = ""; }
pageheader($album_name . '/' . $picture_title, $meta_keywords, false);
// Display Breadcrumbs
if ($breadcrumb && !(strpos($CONFIG['main_page_layout'],"breadcrumb")===false)) {
theme_display_breadcrumb($breadcrumb, $cat_data);
}
// Display Filmstrip if the album is not search
if ($album != 'search') {
$film_strip = display_film_strip($album, (isset($cat) ? $cat : 0), $pos, true);
}
theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip);
pagefooter();
ob_end_flush();
}