Hack - Enable Custom Fields in Search

18 years 2 months ago #6664 by achintya
Replied by achintya on topic Re:re. Roberts Search Componenet
Hi Robert

Thanks for your support with this. Much appreciated. I have installed your script and it seems to be working well except for a couple of areas.

I am finding that your script doesn't seem to recognise new fields added in the usual CB admin menu after it has been installed. If the script is uninstalled and installed again, it recognises all core and custom fields which can then be activated.

The Update tool doesn't seem to recognise new fields added in CB after installation. I assume fields added using CB admin backend would have the CB prefix you mention.

Can you also confirm whether the script aggregates the search terms if someone fills in more than one field for searching? ie, if someone keys in search terms for name, city and activity then the script will do an AND search using all fields? I have tried this out and it seems to randomly pick up just one of the search fields, not all three?

It may be something I am doing wrong somewhere.


achintya


rg66 wrote:

mediaguru,

are the fields starting with cb_? Within the script their is a search criteriy which is looking for cb_ within the fields. If they do not start with cb_ then nothing will be shown.

I have decided to change this source at my next release, but I am currently hardly at home and do not have the means to work on my components nor make updates.

Another thing is that if you are using the Hack, check the script which you have had to add to the cb source. Check for this in the comprofiler.html.php hack file

[code:1]$query_search = "SELECT * FROM `jos_comprofiler_fields` WHERE name LIKE '%cb_%' AND search = 1 AND published = 1";[/code:1]

Change the jos_comprofiler_fields to #__comprofiler_fields

That might also be a reason.

Robert

Please Log in to join the conversation.

18 years 2 months ago #6665 by rg66
Replied by rg66 on topic Re:re. Roberts Search Componenet
Hi achintya,

thanks for using my script.

Currently the sql statement is made up of all fields which have a value which one has keyed in the form. The search is an AND and not an OR. The only OR is within the name, lastname and firstname. However it is searching for any of the words with LIKE%%. So that might be the problem you have. The LIKE%% will be an option to tutn on and off at the next release.

I am still working, as said with no spare time, to further expand the search criteria with
  • Search for all words
  • Search any word
  • search for all words if more then one word is keyed into a field

  • Concerning the Update feature: I might through this feature out and link it to the CB enabled fields. STill have to test as, the script then needs to find out if one is logged in or not. However I might also keep that option so that the Admin can choose what he/she wants. WIll look into this matter. There is a subroutine within the Update that only new fields should be added. May be there is a fault? WIll check it out.

    Robert

    Please Log in to join the conversation.

    18 years 2 months ago #6671 by achintya
    Replied by achintya on topic Re:re. Roberts Search Componenet
    Hi Robert

    Thanks for the information and explanation. Knowing what kind of search it does is useful and I can explain to users how to use the fields for searching, not to expect OR results except in name, firstname and last name.

    I will test the 'new fields' situation again later and let you know if there is a problem. Mediaman seemed to be having this problem earlier.

    thanks for your help.

    I was going to pay for someone to develop this feature and as your script is a good way there, I wonder if I could donate something toward helping you develop the features we are talking about? Would you be open to that? I may be able to pull together some matching funds too as I know several people are very keen to see this script brough to completion.

    It would be with the condition that the final script remains freely available to the community.


    achintya





    rg66 wrote:

    Hi achintya,

    thanks for using my script.

    Currently the sql statement is made up of all fields which have a value which one has keyed in the form. The search is an AND and not an OR. The only OR is within the name, lastname and firstname. However it is searching for any of the words with LIKE%%. So that might be the problem you have. The LIKE%% will be an option to tutn on and off at the next release.

    I am still working, as said with no spare time, to further expand the search criteria with

  • Search for all words
  • Search any word
  • search for all words if more then one word is keyed into a field

  • Concerning the Update feature: I might through this feature out and link it to the CB enabled fields. STill have to test as, the script then needs to find out if one is logged in or not. However I might also keep that option so that the Admin can choose what he/she wants. WIll look into this matter. There is a subroutine within the Update that only new fields should be added. May be there is a fault? WIll check it out.

    Robert

    Please Log in to join the conversation.

    18 years 2 months ago #6677 by mediaguru
    Replied by mediaguru on topic Re:re. Roberts Search Componenet
    I let it name all the fileds with the cb_ I didn't change any of those. So they all have it. I haven't run the hack as I don't realy want to hack anything if I don't have to, especially with upgrades that is going to be a pain.

    The search works good enough for me to use it now. It will do the trick for me until a new version or better plug comes out.

    CB/Joomla golf site: www.thegolfspace.com
    Geek/joomla site: www.tkserver.com

    Check out my Joomla/CB projects:

    * LIKE thumbs up system for "liking" content items
    * Karma - CB user rating system
    * Golf Score Tracker
    * Jitter - status update system. "What's on your mind?"
    * CB Author Plug - Shows CB author link and avatar in content items. J1.5 compatible and very customizable!

    Found on my web site or in the Joomlapolis Directory !

    Please Log in to join the conversation.

    18 years 2 months ago #7832 by ShaunZer
    Replied by ShaunZer on topic Re:Hack - Enable Custom Fields in Search
    cadilaccorvette wrote:

    installed hack advanced search creates search field in database selected certain options to be searchable
    advance tab pulls custom fields
    i click search to return results and i get redirected to my home page
    maybe i slipped up some where
    has anyone encouter this same affect and what did you do to rectify the issue.


    where can I obtain the hack?

    COMMUNITY BUILDER - Advanced Search Component

    I installed the component but on the config it asks whether I have a hack installed, I am very new to this, can someone point me where can I obtain the hack?

    Moreover, when I add a component link on my menu, i get the following error message:
    Fatal error: Call to a member function on a non-object in ....../public_html/administrator/components/com_cb_search/cb_search.class.php on line 157

    can someone help me on this? :(

    Post edited by: ShaunZer, at: 2006/03/07 10:39

    Please Log in to join the conversation.

    18 years 2 months ago #7840 by achintya
    Replied by achintya on topic Re:Hack - Enable Custom Fields in Search
    hi

    my understanding is that you don't need the hack for the advanced search component to work, it just needs to know if you have installed the hack so it can make adjustments. If you have not installed the hack, you don't need it to make the component work.




    achintya

    Please Log in to join the conversation.

    Moderators: beatnantkrileon
    Time to create page: 0.866 seconds

    Facebook Twitter LinkedIn