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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom Search directory? Problems placing the file in the correct directory
Pages: [1]

Author Topic: Custom Search directory? Problems placing the file in the correct directory  (Read 510 times)

gholt

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 0
Custom Search directory? Problems placing the file in the correct directory
July 26, 2012, 10:11:10 am
I'm trying to follow the instructions on how to create a custom search:
http://wiki.civicrm.org/confluence/display/CRMDOC40/Creating+A+Custom+Search+Extension

But I'm having trouble getting the edited php file to run in the directory I've specified as the upload directory for custom files (Administer > Configure > Global Settings > Directories). It runs if I put it in the directory with the core custom search files, but not in my directory outside of the core.

I've tried simply putting it in the base custom files directory specified in the global settings, and simply using FileName as the custom search path. And I've tried nesting the php file in the same sequence of directories as specified in the instructions (CRM/Contact/Form/Search/Custom) using the custom search path CRM_Contact_Form_Search_Custom_FileName.

Am I missing something? I guess one of the basic things I don't understand is how civi would know to look in my custom directory instead of the core directory.

I'd appreciate any help that I can get.

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: Custom Search directory? Problems placing the file in the correct directory
July 26, 2012, 11:23:43 am

Ideally you should use the new extensions framework (which will have lots of cool improved and tested features in 4.2 rather than doing it that way. We need to update the docs for 4.2 so any help would be appreciated :)

You can find a few sample extensions here:

http://svn.civicrm.org/tools/trunk/extensions/

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

gholt

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 0
Re: Custom Search directory? Problems placing the file in the correct directory
July 26, 2012, 11:50:26 am
Thanks, Lobo. But we're a little nervous about upgrading while we are excepting registrations for a conference. We're still at 3.4. I look forward to using all of the new features in 4.x, and I'd be happy to help with the non-technical parts of the documentation -- I'm just not very confident.

Any chance someone can help us to limp along until we can upgrade?

I guess one solution would be to simply use it from the core custom search directory. I hate to waste people's time when we're lagging behind.

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: Custom Search directory? Problems placing the file in the correct directory
July 26, 2012, 01:50:22 pm

I would just copy it to the core directory for now. you can fix and make it an extension once u upgrade :)

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

gholt

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 0
Re: Custom Search directory? Problems placing the file in the correct directory
July 26, 2012, 02:49:51 pm
Thanks again. That's what I will do. Now, if I could just get all of my edits to work... (a work in progress)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom Search directory? Problems placing the file in the correct directory

This forum was archived on 2017-11-26.