After a search there is x% match given.
What's this based on? I know you can match field in the backend and give a %. But how is this all calculatet?
And where can i find that code to use it sidewide
After a search there is x% match given. What's this based on? I know you can match field in the backend and give a %. But how is this all calculatet? And where can i find that code to use it sidewide |
anyone? if you have a field for example age and you set the % to 25%. Would this mean it would get 25% of the bar if it matches? Would it get 25% out of the number of possible matching items? How does it work if i set everything to match 100%? Can anyone please give his experience and opinion on this? |
BTW the percentage after search, where can i find that part of the code? I want to use it on more place :) |
BTW the percentage after search, where can i find that part of the code? I want to use it on more place :) Hello, i had the same question. I found a function 'getProfilesMatch' in file /inc/class/BxDolProfileFields.php. If this is the correct function you can see if how it works. In my opinion, it douesn't work correct cause the code is a little buggy. I think the switch statement switch( "{$aField1['Type']} {$aField1['Type']}" ) { should be changed in switch( "{$aField1['Type']} {$aField2['Type']}" ) { The following statement in switch "range date" should be change from if( (int)$aVal1[0] <= $sVal2 and $sVal2 <= (int)$aVal1[0] ) to if( (int)$aVal1[0] <= $sVal2 and $sVal2 <= (int)$aVal1[1] ) Hope this helps. |
Has anyone tried this? Does this code change work? BTW the percentage after search, where can i find that part of the code? I want to use it on more place :) Hello, i had the same question. I found a function 'getProfilesMatch' in file /inc/class/BxDolProfileFields.php. If this is the correct function you can see if how it works. In my opinion, it douesn't work correct cause the code is a little buggy. I think the switch statement switch( "{$aField1['Type']} {$aField1['Type']}" ) { should be changed in switch( "{$aField1['Type']} {$aField2['Type']}" ) { The following statement in switch "range date" should be change from if( (int)$aVal1[0] <= $sVal2 and $sVal2 <= (int)$aVal1[0] ) to if( (int)$aVal1[0] <= $sVal2 and $sVal2 <= (int)$aVal1[1] ) Hope this helps. |
Could someone tell me how I can get rid of the "Percent match" on the search function entirely? I hate to mess with trying to edit php code. Is this in a templete file where I could just comment it out? Does anyone know? - Thanks - Rob |
Could someone tell me how I can get rid of the "Percent match" on the search function entirely? I hate to mess with trying to edit php code. Is this in a templete file where I could just comment it out? Does anyone know? - Thanks - Rob
clubbeyourself |
Fantastic - no code to edit. Thanks Club. |