vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Search.php question (https://vborg.vbsupport.ru/showthread.php?t=100941)

kau 11-16-2005 05:36 PM

Search.php question
 
What part of the code exactly checks to make sure that the word you are trying to search for is past the minimum char limit you have set?

Marco van Herwaarden 11-16-2005 05:43 PM

I haven't check, but i guess none. The limit is probably already set at time of posting.

kau 11-16-2005 06:14 PM

I am talking about searching for a string. You limit the search string so users can't search for very small words like AB and drag the server down. There is a check in search.php that checks that minimum char limit then tests the search string agansit it. What code does that?

Quote:

Originally Posted by kau
I am talking about searching for a string. You limit the search string so users can't search for very small words like AB and drag the server down. There is a check in search.php that checks that minimum char limit then tests the search string agansit it. What code does that?

Anyone? Is there a better section to ask this in to get a response?

kau 11-22-2005 03:09 AM

Anyone?

Marco van Herwaarden 11-22-2005 03:57 AM

Like i already said, the limit is enforced at the time of posting, not at the time of searching.

What vB version are you using?
What search method have you set in ACP?
What are you trying to do?

kau 11-22-2005 04:16 AM

VB 3.0

Your wrong. In search.php there is a section of code that tests the value the user is trying to search for agansit the minimum search limit.

I have it set at 4+. If you search for ABC it says: String too small. Search for ABCD and it works or ABC*.

What code does that check?

It has nothing to do with posting.

Marco van Herwaarden 11-22-2005 09:57 AM

This is done by the function is_index_word() in ./includes/functions_databuild.php

kau 11-22-2005 09:25 PM

Where in search calls that function?

What I am trying to do is allow certain user groups to ability to search for under the minimum number of characters. I tried working with that fucntion but it doesn't seem to work anyway I do it.

Marco van Herwaarden 11-22-2005 09:33 PM

Words shorter then the minimum are never even stored in the word table. So you can search whatever you want, but those words will never be found anyway.

That is what i am trying to tell you from the beginning.

PS It gets called from functions_search.php if i remember correct.

kau 11-22-2005 09:40 PM

Gotcha! That makes sense. I've gotten it to feed me back the STRING CANNOT BE FOUND instead of NOT ENOUGH CHARACTERS but couldn't figure out why. I didn't know it stores all the words into a table just for searching.

I apoligize!

Marco van Herwaarden 11-22-2005 09:58 PM

That is why i said the limit was enforced at time of posting.

kau 11-22-2005 11:40 PM

Quote:

Originally Posted by MarcoH64
That is why i said the limit was enforced at time of posting.

You are correct I just thought we were on different pages. Again my apoligies.


All times are GMT. The time now is 01:42 AM.

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.01083 seconds
  • Memory Usage 1,731KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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