PDA

View Full Version : search string to search for all threads a user started ?


09-20-2000, 12:19 PM
is there a search string which can allow you to search for all threads a particular user started only

http://animeboards.net/forums/search.php?getdaily=yes&action=dosearch&searchdate=1&searchuser=$username

daily posts started by a user

http://animeboards.net/forums/search.php?action=simplesearch&exactname=yes&searchuser=$username

this searches for all threads a user replied to or posted in.

But can i only search for posts the user started ?

09-20-2000, 07:32 PM
I know someone talked about something like this awhile ago. I seem to remember someone wanting to have a ratio under the username instead of total posts, something to show Topics Started/Total Posts or something like that
Don't know if anything ever came of it

09-20-2000, 11:56 PM
thanks... i'll search harder using the search function :D

09-21-2000, 03:26 AM
You could hack it in to search.php...

To get you started, you'd be editing this:
if ($searchuser!="") {
if ($exactname=="yes") {
$checkuser="AND INSTR(userindex,' ".addslashes($searchuser)." ')>0";
} else {
$checkuser="AND INSTR(userindex,'".addslashes($searchuser)."')>0";
}
} else {
$checkuser="";
}
To resemble:
if ($searchuser!="") {
if ($threadstart=="yes") {
if ($exactname=="yes") {
$checkuser="AND thread.postusername = '".addslashes($searchuser)."'";
} else {
$checkuser="AND thread.postusername LIKE '%".addslashes($searchuser)."%'";
}
} else {
if ($exactname=="yes") {
$checkuser="AND INSTR(userindex,' ".addslashes($searchuser)." ')>0";
} else {
$checkuser="AND INSTR(userindex,'".addslashes($searchuser)."')>0";
}
}
} else {
$checkuser="";
}
Then change the search template to have radio buttons for $threadstart...

Should be all!