forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Dogbot on March 23, 2009, 02:21:53 pm

Title: Hide username in 2 of 4 categories
Post by: Dogbot 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
Title: Re: Hide username in 2 of 4 categories
Post by: Dogbot 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
Title: Re: Hide username in 2 of 4 categories
Post by: Fabricio Ferrero on March 24, 2009, 08:41:15 am
This is not a hotline, wait days not hours for a reply.
Title: Re: Hide username in 2 of 4 categories
Post by: Dogbot 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
Title: Re: Hide username in 2 of 4 categories
Post by: Dogbot on March 25, 2009, 01:07:21 pm
Can anyone offer any advice on this one please?

Many thanks.

Dogbot
Title: Re: Hide username in 2 of 4 categories
Post by: Nibbler 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?
Title: Re: Hide username in 2 of 4 categories
Post by: Dogbot on March 25, 2009, 03:36:08 pm
Its a definite possibility I could use "aid" instead, so yes.

Many thanks!

Dogbot.

Title: Re: Hide username in 2 of 4 categories
Post by: Nibbler 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.