Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Make the comments one user made only visible to him  (Read 3670 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
(http://www.kingbruz.de/Fotos/signatur_cpg.php)

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
(http://www.kingbruz.de/Fotos/signatur_cpg.php)

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

Page created in 0.022 seconds with 19 queries.