vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Wildcard (*) in every searches (https://vborg.vbsupport.ru/showthread.php?t=47385)

warpeditor 01-05-2003 07:26 AM

Wildcard (*) in every searches
 
Hi, all

Since my forum is for Thai people we have to use wildcard (*) for better search result because we are using two byte fonts. However, most of the members always forget to include wildcard (*) and end up complaints for poor search result.

So, I was wondering whether it's possible to modify some files to including wildcard (*) for every searches. Any ideas?

Thanks in advance.

Logician 01-06-2003 08:08 AM

edit search.php, find:

PHP Code:

  $query=trim($query); 

after that add:
PHP Code:

if (substr($query01)!="*") {$query='*'.$query;} 
if (
substr($query, -1)!="*") {$query=$query.'*';} 


warpeditor 01-06-2003 12:31 PM

Thanks for reply.

I'll give it a try tonight.

Thanks again.

SamirDarji 04-08-2004 08:14 PM

Do you think this piece of code would allow for wildcard searches unless quotes are used? I haven't tried it and have never done any php programming, just some C. Feedback welcome before I starting hacking away... :D

Code:

if ((substr($query, 0, 1)!="*" && substr($query, 0, 1)!="\""))
  {
  $query='*'.$query;
  }
if ((substr($query, -1)!="*" && (substr($query, -1)!="\""))
  {
  $query=$query.'*';
  }


SamirDarji 04-12-2004 03:13 PM

I tried the original suggestion on vb3, beta7 but couldn't find the same query line. I found one similar that looked like it was checking if there were any html codes in the query. I put the lines after that one, but still no results. :confused:

We really badly need auto wildcarding on our board. Any suggestions would be greatly appreciated.


All times are GMT. The time now is 01:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01062 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete