forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Fab on September 23, 2006, 10:03:22 pm

Title: How to remove Username from Album Name under File Information?
Post by: Fab on September 23, 2006, 10:03:22 pm
I don't want my Username to be in Album Name under File Information.

How can I prevent it from being display?

Alternatively is it possible to edit the Admin Username? e.g. change from Fab to Admin, and would the change be applied to all pics uploaded by Fab?
Title: Re: How to remove Username from Album Name under File Information?
Post by: Sami on September 24, 2006, 10:48:00 am
It's config setting
config=>Thumbnail view
Title: Re: How to remove Username from Album Name under File Information?
Post by: Fab on September 24, 2006, 07:52:22 pm
Yes I know about this option, but it doesn't remove the username from the "File Information" section.
Title: Re: How to remove Username from Album Name under File Information?
Post by: lamama on September 24, 2006, 08:36:36 pm
You'll have to modify the original code. Please note, that you'll have to do it everytime when a new version of CPG is released.

open displayimage.php
search for "function html_picinfo()"

Code: [Select]
    if ($CURRENT_PIC_DATA['owner_id'] && $CURRENT_PIC_DATA['owner_name']) {
        $owner_link = '<a href ="profile.php?uid=' . $CURRENT_PIC_DATA['owner_id'] . '">' . $CURRENT_PIC_DATA['owner_name'] . '</a> ';
    } else {
        $owner_link = '';
    }

Change it to:

Code: [Select]
    if ($CURRENT_PIC_DATA['owner_id'] && $CURRENT_PIC_DATA['owner_name']) {
        $owner_link = '';                   
    } else {
        $owner_link = '';
    }

Title: Re: How to remove Username from Album Name under File Information?
Post by: Sami on September 24, 2006, 09:02:46 pm
@fab:oops Sorry my bad ::)
Title: Re: How to remove Username from Album Name under File Information?
Post by: Fab on September 25, 2006, 04:09:14 am
No worries Sami :)

Thanks lamama worked like a charm.