CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Making wildcard the default search option
Pages: [1]

Author Topic: Making wildcard the default search option  (Read 1204 times)

Durruti

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 1
    • The Kindling Trust
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.2.17
Making wildcard the default search option
April 22, 2008, 03:34:56 am
Hello Dave and all you other clever people! :)

OK so having read the documentation I understand how the search works and it is very powerful. My question is can I insert a % somewhere so that the default search for a word is %searchword% rather than searchword%.
I have had a go on my site to explain searching, but my database is very simple and most of the intended users, are not IT literate and do not have english as a first language. So it seemed like it would be easier for all concerned to just use wildcard as a default if that is possible. After Dave last intervention I am now beginning to understand using custom templates, is there something I could add to the php there?
I am still learning so please make any responses as idiot proof as possible.
Many thanks and keep up the great work!
Matt
http://feedingmanchester.org.uk

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Making wildcard the default search option
April 22, 2008, 06:06:33 am

This will be made configurable in 2.1. In 2.0 you will need to modify the code to get the behavior

the best place to look is: CRM/Contact/BAO/Query.php, function sortName

thax

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Making wildcard the default search option

This forum was archived on 2017-11-26.