The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hello,
It is possible to alter the search query for members and add an option like this: search members that are located at least to 100 km by me(assuming that at registration i capture the coordinates of users). Thanks. |
#2
|
||||
|
||||
![]()
you dont need to ask user to input their coordinations
this can B done through ip address but might not be so accurate and might have like 10% error if u dont mind |
#3
|
|||
|
|||
![]()
the question was: how to alter the query, not how to capture the coordinates.
|
#4
|
||||
|
||||
![]()
its not that easy
u need a library of ip-coordination and a .php file for calculations , the output of this .php file could be a number for example 99.25 FINALLY in ur query u can limit records to ones lower than 100 |
#5
|
|||
|
|||
![]()
and this is what I want to find out: how to alter the query? where I can find it?
![]() |
#6
|
||||
|
||||
![]()
What is your php-knowledge-level?
Try looking in the search.php, you might even find a set of hooks you could use for plugins. (modifying native vb files is notcool.) |
#7
|
|||
|
|||
![]()
Well, this is what I'm trying: to create a hook, not to modify core files.
But i can't find the hook_location. |
#8
|
||||
|
||||
![]()
Chances are you are going to have to write your own query to do what you want.
|
#9
|
|||
|
|||
![]()
Well, I found one solution: create a new plugin with "memberlist_fetch" as hook position and code:
PHP Code:
|
#10
|
||||
|
||||
![]()
I'd be curious to see what you come up with for the location part of the query.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|