forum.coppermine-gallery.net

No Support => General discussion (no support!) => Topic started by: chrisyew on November 05, 2004, 02:21:48 pm

Title: Search albums by username
Post by: chrisyew on November 05, 2004, 02:21:48 pm
Hi,
I'm trying to seach for all the albums/photos by a particular user, so if I key in the username of that person in the Search of Coppermine, it does not give me any album/photo created by the username. Why is this so and how can I search for all albums/photos created by a user (including those not in the User Gallery)?

Thank you.
Title: Re: Search albums by username
Post by: Nibbler on November 05, 2004, 02:26:33 pm
You can get latest uploads through the user's profile page. To modify the search, alter include/search.inc.php:

find:
Code: [Select]
if ($query_all) $sql .= "OR filename LIKE '$match_word' " . "OR title LIKE '$match_word' " . "OR caption LIKE '$match_word' " . "OR user1 LIKE '$match_word' " . "OR user2 LIKE '$match_word' " . "OR user3 LIKE '$match_word' " . "OR user4 LIKE '$match_word' ";
change to :

Code: [Select]
if ($query_all) $sql .= "OR filename LIKE '$match_word' " . "OR title LIKE '$match_word' " . "OR caption LIKE '$match_word' " . "OR user1 LIKE '$match_word' " . "OR user2 LIKE '$match_word' " . "OR user3 LIKE '$match_word' " . "OR user4 LIKE '$match_word' OR owner_name LIKE '$match_word'";
Title: Re: Search albums by username
Post by: chrisyew on November 05, 2004, 02:46:27 pm
Hi Nibbler,

Thank you for your info.

The Last Additions in the user's profile - I'm rather confused by the term "Last Additions": do they mean all the photos by that user or only the Last (ten or twenty) Additions?

Will try out the search mod.

Chris Yew
Title: Re: Search albums by username
Post by: Casper on November 07, 2004, 05:21:09 pm
It is actually all the photos uploaded by that user, in last uploaded order.