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 »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • How to show extra information in "Event Name" when searching
Pages: [1]

Author Topic: How to show extra information in "Event Name" when searching  (Read 1264 times)

stuart

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3
How to show extra information in "Event Name" when searching
November 06, 2012, 02:54:48 am
We have several Events with the same name but at different locations/dates. When searching on "Event Name" in the Advanced Search/Participant Search/Etc. the quick search only returns the Event Name in its list, which isn't useful in distinguishing between the events for us.

Is there a way we can display "Event Name/Location/Date" in any of the Event Name quick search boxes? Maybe there's a hook which can do this, I couldn't find one.

So rather than showing this:
http://i.imgur.com/ywvg0.png

We'd like to show this:
http://i.imgur.com/M94YF.png
« Last Edit: November 06, 2012, 03:09:37 am by stuart »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: How to show extra information in "Event Name" when searching
November 06, 2012, 03:25:52 am
I don't think there is a hook for that. I think you would have to find the code for that and customize it.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

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: How to show extra information in "Event Name" when searching
November 06, 2012, 06:32:34 am

You should take a look at this issue and patch:

http://issues.civicrm.org/jira/browse/CRM-11141

and potentially see if you can reuse the code for the event search forms

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

stuart

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3
Re: How to show extra information in "Event Name" when searching
November 06, 2012, 08:13:12 am
Quote from: Donald Lobo on November 06, 2012, 06:32:34 am

You should take a look at this issue and patch:

http://issues.civicrm.org/jira/browse/CRM-11141

and potentially see if you can reuse the code for the event search forms

lobo

Thanks for that, should help.

stuart

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3
Re: How to show extra information in "Event Name" when searching
November 07, 2012, 07:29:37 am
Quote from: Donald Lobo on November 06, 2012, 06:32:34 am

You should take a look at this issue and patch:

http://issues.civicrm.org/jira/browse/CRM-11141

and potentially see if you can reuse the code for the event search forms

lobo

Do you know where I should be looking? I've read http://book.civicrm.org/developer/current/introduction/the-codebase/, spent about an hour looking in the files within CRM/Event/Form and grepped for variables I found in the webpage but can't seem to find the relevant bit of code. I'm not familiar with the way Civi is structured.

jcm55

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 14
Re: How to show extra information in "Event Name" when searching
November 07, 2012, 08:31:16 am
This has been a longstanding issue for us, and to work around it we just give all of our events titles that include the date/time.  So for example, we have events with titles like:

Tales of Olympus -- Dec 8 2:00pm
Tales of Olympus -- Dec 8 5:00pm
Tales of Olympus -- Dec 9 2:00pm
Tales of Olympus -- Dec 9 5:00pm
Tales of Olympus -- Dec 15 2:00pm

It's a reasonable workaround, with the minor annoyance of having to enter the date/time twice -- once in the title, and again in the regular date/time selectors.  Fortunately all of our performances are at the same location, so we don't need to include that info in the title. 

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: How to show extra information in "Event Name" when searching
November 07, 2012, 08:41:18 am

1. might be easier to ask questions on IRC

2.If you click on the attachment on that issue, u'll see the change the allen made enable "extended event titles" for reports. I suspect we can migrate the same change to the search form and other places

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

stuart

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3
Re: How to show extra information in "Event Name" when searching
November 08, 2012, 12:56:44 am
Quote from: jcm55 on November 07, 2012, 08:31:16 am
This has been a longstanding issue for us, and to work around it we just give all of our events titles that include the date/time. 

That would mess up the presentation of our front end Drupal website unforunately, as we want to style the time/date separately from the title.

Quote from: Donald Lobo on November 07, 2012, 08:41:18 am
1. might be easier to ask questions on IRC

2.If you click on the attachment on that issue, u'll see the change the allen made enable "extended event titles" for reports. I suspect we can migrate the same change to the search form and other places

lobo

Ok, I'll try on IRC. I've looked at the patch (and even started implementing it on our system before I realised it was only for reports). I just don't know where the relevant code for the search form is within the Civi folder structure. The book (http://book.civicrm.org/developer/current/introduction/the-codebase/) only describes the very basics.

stuart

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3
Re: How to show extra information in "Event Name" when searching
November 08, 2012, 07:01:58 am
I found the file to modify in case other people are interested:
civicrm/CRM/Event/Page/AJAX.php (you need to change the query in the event function)

(or copy it to your custom PHP directory and make changes there).

I've attached my altered version in case it's useful (I'm on Civi 3.4 still, so newer versions may be slightly different)

stuart

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3
Re: How to show extra information in "Event Name" when searching
November 08, 2012, 07:30:12 am
I've also raised a ticket about this issue, in case it's an amendment which might be useful to the core system: http://issues.civicrm.org/jira/browse/CRM-11245

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • How to show extra information in "Event Name" when searching

This forum was archived on 2017-11-26.