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: Hide username in 2 of 4 categories  (Read 3474 times)

0 Members and 1 Guest are viewing this topic.

Dogbot

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Hide username in 2 of 4 categories
« on: March 23, 2009, 02:21:53 pm »

I would like to be able to hide the username of the photos owner in categories 2 and 3 only, in my gallery

Would it be this part of the build caption function in includes/function.inc.php that needs editing, if so how do I achieve it?


Code: [Select]
        if ($CONFIG['display_uploader'] /*&& !in_array($row['owner_id'],$CONFIG['ADMIN_USERS']) *|| ($CONFIG['display_admin_uploader'] && in_array($row['owner_id'],$CONFIG['ADMIN_USERS']))*/) {
            $caption .= ($row['owner_id'] && $row['owner_name']) ? '<span class="thumb_title"><a href ="profile.php?uid='.$row['owner_id'].'">'.$row['owner_name'].'</a></span>' : '';
        }

And if I am totally wrong, how do I go about hiding usernames in categories 2 & 3 only?

Many thanks in advance.

Dogbot
Logged

Dogbot

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Hide username in 2 of 4 categories
« Reply #1 on: March 24, 2009, 01:49:46 am »

Can anyone help at all or is there a similar topic you know of that I have not found via the search that may help me?

Many thanks

Dogbot
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Hide username in 2 of 4 categories
« Reply #2 on: March 24, 2009, 08:41:15 am »

This is not a hotline, wait days not hours for a reply.
Logged
Read Docs and Search the Forum before posting. - Soporte en espaņol
--*--
Fabricio Ferrero's Website

Catching up! :)

Dogbot

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Hide username in 2 of 4 categories
« Reply #3 on: March 24, 2009, 10:04:45 am »

This is not a hotline, wait days not hours for a reply.

Yes, I am fully aware of that. And its because its not a hotline that I'm doing my best to solve the issue myself by using the search function, and why I made the second post asking if anyone had seen a similar posting that may help me search through the huge ammount of info already available on this site.

Now that we have got that out of the way, has anyone seen a similar posting or know of a topic of a similar ilk that I could search for?

Many thanks.

Dogbot
Logged

Dogbot

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Hide username in 2 of 4 categories
« Reply #4 on: March 25, 2009, 01:07:21 pm »

Can anyone offer any advice on this one please?

Many thanks.

Dogbot
Logged

Nibbler

  • Guest
Re: Hide username in 2 of 4 categories
« Reply #5 on: March 25, 2009, 02:37:46 pm »

The captioning code is not aware what category the picture is in. Can you do it by album or by user_id instead?
Logged

Dogbot

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Hide username in 2 of 4 categories
« Reply #6 on: March 25, 2009, 03:36:08 pm »

Its a definite possibility I could use "aid" instead, so yes.

Many thanks!

Dogbot.

Logged

Nibbler

  • Guest
Re: Hide username in 2 of 4 categories
« Reply #7 on: March 25, 2009, 03:44:26 pm »

OK, then change that section like this

Code: [Select]
        if ($CONFIG['display_uploader'] && !in_array($row['aid'], array(1, 2, 3))) {
            $caption .= ($row['owner_id'] && $row['owner_name']) ? '<span class="thumb_title"><a href ="profile.php?uid='.$row['owner_id'].'">'.$row['owner_name'].'</a></span>' : '';
        }

1, 2, 3 are the albums where the username is to be hidden.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.