Advanced search  

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]

Pages: [1]   Go Down

Author Topic: [ADDED RC3] Show username of who uploaded pic  (Read 3051 times)

0 Members and 1 Guest are viewing this topic.

iamcanadian

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
[ADDED RC3] Show username of who uploaded pic
« on: November 16, 2003, 03:28:32 pm »

I tried the fix proposed for 1.1 and it doesn't work :(

I need to see who is uploading the pics on my site.

Thanks
Logged

iamcanadian

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
[ADDED RC3] Show username of who uploaded pic
« Reply #1 on: November 17, 2003, 04:15:36 pm »

Found a simple fix for this....

Make sure in your configuration that :: Picture information are visible by default is set to YES

Then..

In displayimage.php

After:

Code: [Select]
if ($CONFIG['picinfo_display_filename']) {
                $info[$lang_picinfo['Filename']] = htmlspecialchars($CURRENT_PIC_DATA['filename']);
            }


Add::

Code: [Select]


//-----------------------------------------------------------------
        //Added by Vitor Freitas on 2003-09-01.
        //Hack version: 1.1
        //Display the name of the user that upload the image whit the image information.
        //Iam using PHP-Nuke 6.5.
        global $db;
       
        $vf_Fields = 'username';
        $vf_sql = "SELECT ".$vf_Fields." FROM nuke_users WHERE user_id='".$CURRENT_PIC_DATA['owner_id']."'";
        $vf_result = $db->sql_query($vf_sql);
        $vf_row = $db->sql_fetchrow($vf_result);
       
        $info['Upload by'] = '<a href="modules.php?name=Forums&file=profile&mode=viewprofile&u='.$CURRENT_PIC_DATA['owner_id'].'" target="_blank">'.$vf_row['username'].'</a>';
       
        //End -- Vitor Freitas on 2003-08-29.
        //-----------------------------------------------------------------



Hope this helps someone out and saves them endless hours of frustration...
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 18 queries.