Hi!
I'd like to make the comments one user made only visible to him.
He his posting irrelevant and unuseful comments, but for personal reasons I can't prevent him from commenting a picture.
Is it possible, to give the comments he sends e.g. a special ID, so that only he can see them?
Would be grat for me!
THX
Bruz
Maybe something like that is possible:
do a check, if the user id is "34" - and if this is true, show the comments made by "34" (I just need this for "34" - not for multiple/all id's!)
If the id is not "34", don't show the comments.
I think this shuold be possible - but I really need help to get this working!
I think we are talking about this part of the functions.inc.php
case 'lastcom': // Last comments
if ($ALBUM_SET && $CURRENT_CAT_NAME) {
$album_name = $album_name = $lang_meta_album_names['lastcom'].' - '. $CURRENT_CAT_NAME;
} else {
$album_name = $lang_meta_album_names['lastcom'];
}
$result = db_query("SELECT COUNT(*) from {$CONFIG['TABLE_COMMENTS']}, {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND {$CONFIG['TABLE_COMMENTS']}.pid = {$CONFIG['TABLE_PICTURES']}.pid $ALBUM_SET");
$nbEnr = mysql_fetch_array($result);
$count = $nbEnr[0];
mysql_free_result($result);
if($select_columns == '*'){
$select_columns = 'p.*';
} else {
$select_columns = str_replace('pid', 'c.pid', $select_columns).', msg_id, author_id, msg_author, UNIX_TIMESTAMP(msg_date) as msg_date, msg_body, aid';
}
$result = db_query("SELECT $select_columns FROM {$CONFIG['TABLE_COMMENTS']} as c, {$CONFIG['TABLE_PICTURES']} as p WHERE approved = 'YES' AND c.pid = p.pid $ALBUM_SET ORDER by msg_id DESC $limit");
// echo("$result");
$rowset = db_fetch_rowset($result);
mysql_free_result($result);