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: [ADDED RC3] Show username of who uploaded pic  (Read 3075 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.028 seconds with 18 queries.