Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Make the comments one user made only visible to him  (Read 3686 times)

0 Members and 1 Guest are viewing this topic.

Bruz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Make the comments one user made only visible to him
« on: April 13, 2004, 08:13:29 pm »

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
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.kingbruz.de%2FFotos%2Fsignatur_cpg.php&hash=b7bf1fbae41c2d8c534416d10d32fe51619697d7)

get your statistik-hack here

Bruz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Make the comments one user made only visible to him
« Reply #1 on: April 13, 2004, 08:21:26 pm »

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
Code: [Select]

        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);
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.kingbruz.de%2FFotos%2Fsignatur_cpg.php&hash=b7bf1fbae41c2d8c534416d10d32fe51619697d7)

get your statistik-hack here
Pages: [1]   Go Up
 

Page created in 0.051 seconds with 20 queries.