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: When viewing a picture show it's uploader.  (Read 5491 times)

0 Members and 1 Guest are viewing this topic.

icebox

  • Translator
  • Coppermine novice
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 21
    • Open Photography
When viewing a picture show it's uploader.
« on: October 24, 2003, 12:06:53 pm »

Another thing I think it would be nice to show it's, when viewing a picture, the username who uploaded it ! :idea:
Especially on photography sites creditting the author seems normal.
For now I use a custom filed for author name but it's not the best sollution.

P.S. Php Nuke, Post Nuke etc ports could have this name linked to the users public profile...
Logged
Cool photos, reviews, forums at:
http://www.openphoto.tk/
[size=10]Note: Contains  artistic nudity...[/size]

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
When viewing a picture show it's uploader.
« Reply #1 on: October 24, 2003, 01:03:56 pm »

Well this may not be such a great idea on personal sites where the photographer and uploader are the same for almost every photo

This is the precise reason why custom fields are given - to use it as per your needs....
Logged
SANIsoft PHP applications for E Biz

icebox

  • Translator
  • Coppermine novice
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 21
    • Open Photography
When viewing a picture show it's uploader.
« Reply #2 on: October 24, 2003, 01:19:08 pm »

Well, I guess a config on/off switch should do the trick...
Logged
Cool photos, reviews, forums at:
http://www.openphoto.tk/
[size=10]Note: Contains  artistic nudity...[/size]

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
When viewing a picture show it's uploader.
« Reply #3 on: October 24, 2003, 01:28:25 pm »

Quote from: "icebox"
Well, I guess a config on/off switch should do the trick...

We already are fighting code bloat - so right now what is achieve able one way OR the other is unlikely to make it to a release in yet another form
Logged
SANIsoft PHP applications for E Biz

MALTP

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • http://www.maltp.com/
Hack
« Reply #4 on: November 14, 2003, 10:54:44 pm »

I'm looking at the hack for this...I've done all the PHP steps, and all that's left is the SQL query ALTER TABLE `cpg11d_pictures` ADD INDEX ( `owner_id` );.

My host offers a builtin MySQL database manager/editor, but I stuck phpMyAdmin on my server to help me with this. Just wanted some help with this (I'm good with PHP but completely SQL-ignorant) — where do I execute this command in phpMyAdmin? The "Run SQL query/queries on database" field (under the SQL tab) looks like the most likely, but in the Documentation for that field it doesn't mention anything starting with "ALTER TABLE"...

I wanna make sure I'm doing the right thing, so I don't start losing data. Is this an iffy command, and so I should backup all the SQL data before doing it?
Logged

terrorhawk

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 61
When viewing a picture show it's uploader.
« Reply #5 on: November 15, 2003, 12:21:41 am »

if you need help just tell me i have my own server (windows) with this photo album in it and my own Mysql server sow making some thing in MySql is not that hard for me.

just let me know if you want to test and i make a ftp login for you where a clean copy is installed and where you can test shit like this..

mail me at
terrorhawk@home.nl
Logged

MALTP

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • http://www.maltp.com/
Almost...
« Reply #6 on: November 19, 2003, 04:56:21 am »

I've gotten this to work...sort of.

To get a "Picture uploaded by (username)" message, I did some poking around in functions.inc.php and added some things to the ($rowset as $key => $row) loop. Specifically, I'm checking if the image is in a specific category, and then setting $caption .= to what I want, using $rowset[$key]['user_name'] to get the user name.

Now I'm trying to do a similar thing for the Last Additions (lastup) and Last Comments (lastcom) views, but I've discovered some snags:

In lastup: $row['owner_name'] is blank but $row['owner_id'] is not. The "owner_name" fields in cpg11d_pictures are blank, but the "owner_id"s are not.
In lastcom: for one comment (the only comment by this user), $row['msg_author'] is empty but $row['author_id'] is not. The "msg_author" field in cpg11d_comments is blank for the one problematic comment, but "author_id" is not.

I'm hoping there are a few commands I can run in phpMyAdmin to fix this all up — something like assigning "owner_name"s to everything in cpg11d_pictures based on the "owner_id"s, and then doing the same sort of thing for cpg11d_comments...?

Also, can anyone give me any clues about why this happened? I'd like not to have to do some sort of fix every time someone posts anything new...

Thanks, everyone.
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
When viewing a picture show it's uploader.
« Reply #7 on: November 19, 2003, 07:22:35 am »

This has been implemented and commited to the devel branch of CVS
Logged
SANIsoft PHP applications for E Biz
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.