Hide username in 2 of 4 categories Hide username in 2 of 4 categories
 

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]

Main Menu

Hide username in 2 of 4 categories

Started by Dogbot, March 23, 2009, 02:21:53 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Dogbot

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?



        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

Dogbot

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

Fabricio Ferrero

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

Catching up! :)

Dogbot

Quote from: Fabricio Ferrero on March 24, 2009, 08:41:15 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

Dogbot

Can anyone offer any advice on this one please?

Many thanks.

Dogbot

Nibbler

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

Dogbot

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

Many thanks!

Dogbot.


Nibbler

OK, then change that section like this


        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.