Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I display the name of the uploader with the picture info?

display info picture uploader
0
Posted

How can I display the name of the uploader with the picture info?

0

Warning: this is quite a complicated hack for a newbie to perform! Make sure to back up your original files before attempting this. Edit displayimage.php and search for: $info[$lang_picinfo[‘Filename’]] = htmlspecialchars($CURRENT_PIC_DATA[‘filename’]); add after it: $info[$lang_picinfo[‘Username’]] = htmlspecialchars($CURRENT_PIC_DATA[‘user_name’]);. Then open /include/functions.inc.php and search for following in function get_pic_data(): if($select_columns != ‘*’) $select_columns .= ‘, title, caption’; and replace it with: if($select_columns != ‘*’) $select_columns .= ‘, title, caption, user_name’;. After that search for: $result = cpg_db_query(“SELECT $select_columns from {$CONFIG[‘TABLE_PICTURES’]} WHERE aid=’$album’ $approved $ALBUM_SET ORDER BY $sort_order $limit”); and replace it with: $result = cpg_db_query(“SELECT $select_columns from {$CONFIG[‘TABLE_PICTURES’]} AS p LEFT JOIN {$CONFIG[‘TABLE_USERS’]} AS u ON u.user_id = p.owner_id WHERE p.aid=’$album’ $approved $ALBUM_SET ORD

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123