miniBB Support Forums
|
Forums
|
Register
|
Reply
|
Search
|
Statistics
|
Manual
|
miniBB Support Forums
/
How To
/
How to search for usernames using a placeholder?
tobyy
Registered
#1
|
Posted: 6 Nov 2006 06:39
Is there a possibility to search for a user using a placeholder? (in the Admin section)
example: my search "Mike%" should get these results:
Mike Skinner
Mike Jackson
Mike Jordan
...
hope there is a way to do that..
thanx
tobyy
Paul
CEO
#2
|
Posted: 6 Nov 2006 07:21
|
Edited by: Paul
If you modify bb_admin.php and locate the section
elseif ($searchus=='email' OR $searchus=='login'){
there will be an SQL request with a condition
$whatx,'=',$whatus
so you will need to modify it a bit...
$whatx,' like ', '%'.$whatus.'%'
tobyy
Registered
#3
|
Posted: 6 Nov 2006 09:44
seems like that doesn't work... i always get 0 results..
here's the whole line:
if($row=db_simpleSelect(0,$Tu,$dbUserId.','.$dbUserSheme['username'][1 ].','.$dbUserDate.','.$dbUserSheme['user_password'][1].','.$dbUserShem e['user_email'][1],$whatx,'like',$whatus.'%')){
what could be wrong?
Paul
CEO
#4
|
Posted: 6 Nov 2006 09:51
Forgot to mention - you should search, not entering '%' sign in the search term itself. If you modify the code, it will find the names automatically by a fragment... If you enter 'Mike', it will find 'Mike Skinner', 'Mike Jackson',
'Mike Jordan'.
I often need this myself and probably will implement something like this in the next releases.
Anonymous
Guest
#5
|
Posted: 6 Nov 2006 10:46
hmm, it gives me 0 results too. good feature, though.
tobyy
Registered
#6
|
Posted: 6 Nov 2006 11:54
i always get 0 results... any idea what could be wrong? i searched for users i know that they exist...
mike
Mike
Mike Skinner
none of these search terms would work... :(
Paul
CEO
#7
|
Posted: 6 Nov 2006 12:59
|
Edited by: Paul
Oh well, sorry. 'like' should contain spaces on both side. I've fixed the code above, try again. It works 100% on my side.
Anonymous
Guest
#8
|
Posted: 6 Nov 2006 13:19
works! is it possible to do this for members list addon?
Paul
CEO
#9
|
Posted: 6 Nov 2006 16:20
Well, I'll think about it :-)
tobyy
Registered
#10
|
Posted: 7 Nov 2006 06:55
works great.. thank you very much.
miniBB Support Forums
/
How To
/ How to search for usernames using a placeholder?
↑
Top
Your Reply
Short link for this topic:
?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.
Before posting, make sure your message is compliant with our
forum posting rules
. If not, it may be locked or deleted with no explanation.
News & Announcements
FAQ
How To
Bugs
The Other
Official Addons and Solutions
Custom Tutorials and Modifications
Master Class
Specific
Re-cycled
Suggestions
Testimonials
qwerty
Features
Requirements
Demo
Download
Showcase
Gallery of Arts
Compiler
Premium Extensions
Premium Support
License
Contacts
Worried about forum enemies?
Pre-approve postings and members with the
Premoderation add-on
!