MyBB Community Forums

Full Version: how to replace the mybb search with the google custom search
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
didn't see anything on this, but I'm trying to replace the default mybb search with a google search...lately the mybb search has been, well, sucking, so I figure with the google search, it can crawl the site to help produce better search results.

is it possible?

or is there a way to improve the default search?
I don't think there is a search to disable search entirely but you can easily remove all references to the search function in your templates then doing something to prevent access to the file. Then just put your google search box code in whatever template you want, probably the header one would be best.
(2010-04-23, 08:44 AM)TimB. Wrote: [ -> ]I don't think there is a search to disable search entirely but you can easily remove all references to the search function in your templates then doing something to prevent access to the file. Then just put your google search box code in whatever template you want, probably the header one would be best.

I'd rather keep the default mybb search, but it's not producing the most relevant search results lately. is there something I can do to have it reindex my forum?
Are you using full text options? It works pretty well, but the default fulltext search functionality does not use relevancy or rank/score.

See my thread at http://community.mybboard.net/thread-57989.html for updated files and the reason for the problem.
(2010-04-23, 09:07 PM)pavemen Wrote: [ -> ]Are you using full text options? It works pretty well, but the default fulltext search functionality does not use relevancy or rank/score.

See my thread at http://community.mybboard.net/thread-57989.html for updated files and the reason for the problem.

thanks, but it's still not bringing the most relevant search results to the top......for example:
if you do a search for food storage here:
http://www.pazrt.com/forum/search.php

it should be the very first result because there's an actual thread called food storage. am I wrong for thinking this way?

after checking a few things, it looks like it might check the relevance in the post before the thread title, correct? is there a way to reverse this? so it checks a thread title before the post?
(2010-04-23, 08:04 PM)Shemo Wrote: [ -> ]I'd rather keep the default mybb search, but it's not producing the most relevant search results lately.

Not sure why Google would be any better then as surely the results you'd get would depend entirely on what's indexed in Google...??

If you do a title search for food storage, the thread you mentioned is first. Doing a post search will return any posts that contain the word 'food' or 'storage', whether the words are together or not. Typing "food storage" with the " and " would search for 'food storage' as a complete string, not two separate strings. Under the search terms box is the option for whether you want to search titles or post content for your search terms, edit the templates so the title option is preselected.
(2010-04-24, 12:11 PM)MattRogowski Wrote: [ -> ]
(2010-04-23, 08:04 PM)Shemo Wrote: [ -> ]I'd rather keep the default mybb search, but it's not producing the most relevant search results lately.

Not sure why Google would be any better then as surely the results you'd get would depend entirely on what's indexed in Google...??

If you do a title search for food storage, the thread you mentioned is first. Doing a post search will return any posts that contain the word 'food' or 'storage', whether the words are together. Typing "food storage" with the " and " would search for 'food storage' as a complete string, not two separate strings. Under the search terms box is the option for whether you want to search titles or post content for your search terms, edit the templates so the title option is preselected.

how would I go about editing the template so searching the thread is preselected?
In the 'search' template, about 25 lines down:

<span class="smalltext"><input type="radio" class="radio" name="postthread" value="1" checked="checked" />{$lang->search_entire_post}<br /><input type="radio" class="radio" name="postthread" value="2" />{$lang->search_titles_only}</span>

to:

<span class="smalltext"><input type="radio" class="radio" name="postthread" value="1" />{$lang->search_entire_post}<br /><input type="radio" class="radio" name="postthread" value="2" checked="checked" />{$lang->search_titles_only}</span>
(2010-04-24, 12:26 PM)MattRogowski Wrote: [ -> ]In the 'search' template, about 25 lines down:

<span class="smalltext"><input type="radio" class="radio" name="postthread" value="1" checked="checked" />{$lang->search_entire_post}<br /><input type="radio" class="radio" name="postthread" value="2" />{$lang->search_titles_only}</span>

to:

<span class="smalltext"><input type="radio" class="radio" name="postthread" value="1" />{$lang->search_entire_post}<br /><input type="radio" class="radio" name="postthread" value="2" checked="checked" />{$lang->search_titles_only}</span>

thanks.
I've had a gripe with the search engines for forums for years
Every one ive had (smf , phpbb , ipb , mybb ) all do the same thing
And thats to make the default search , to search posts and not TOPICS
Why ?
I have been administering forums for over 7 years and I have found that as
soon as I go and edit the code to make the default search the topics
All my complaints go away
People who use searches are used to google etc
So if they search for "finding the lost city"
They dont want the first 1000 results focusing on finding
and the lost city is nowhere to be found lol
So , My advice , ( only because I have put up with the whinging for years of users who cant use the advanced search or are too dumb too ) is to make the default search parameters
As SEARCH BY TOPIC TITLE
and not BY POST
I have fixed our site so its set this way and all complaints have gone
Just venting , as this would have to be the most annoying thing in any forum today
Switch it around and all will be good Big Grin
Pages: 1 2