Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • holyroodcomms Friend
    #148051

    Hello,

    I’ve been customising my install of JA Jobs for some time now, and I’ve managed to get the majority of the functionality I need, but there’s something else I need to change, but I don’t have access to the code.

    When an employer searches resumes, there is a box at the top for filtering results. This box is no use to me as it is, I need to replace the SQL query which is executed when something is entered into that box.

    As far as I can tell, this is handled by a function called geItemView_List() in the file models/jaresumes.php (Based on analysis of the unencoded parts of the view and controller.)

    As this file is IonCube encoded, I can not edit it. I need it to search my custom fields

    Simply adding the fields to the filter list is not acceptible, I need it to search 10 fields, and this puts too much junk on the screen, causing the width to go beyond any reasonable resolution in the process. I just want one search box, and a couple of filter drop-down boxes.

    Normally, I would just replace the code myself, but as this is not possible, can you do this for me? Could you modify the model file for jaresumes with my search query, re-encode the file, and send me the replacement?

    $query = "SELECT * FROM #__ja_resumes WHERE CONCAT(`title`, ' - ', `education`, ' - ', `description`, ' - ', `summary`, ' - ', `current_employer`, ' - ', `cur5rent_job_title`, ' - ', `resume_language1`, ' - ', `resume_job_experienc`, ' - ', `resume_cat_pri`, ' - ', `resume_search cv`) LIKE '%" . $search_terms . "%'" ;

    Where $search_terms is the (sanitised) input from the search field.

    The query above has the names of my custom fields ( Yes, I mis-spelled some of the field names, and some were cut short as they were added to the db, but the names in the query there are exactly as spelled in my db, so it will work 😛 ).

    Code explanation:
    This query treats my 10 search fields as one big field, and then looks for occurrences of the search term anywhere inside the row. This means, for example, if someone searches the term “manage”, it will return results with things like “manager” or “marketing manager”. The % string in the comparison part of the query is a MySQL wildcard, much like *, concat merges the fields into one (not permanently, the database structure remains the same, it just returns the results inside the concat statement as one column), the ” – ” bits between the fields separates the data, so for example if we had a person’s name in 2 fields, and their name was something like “Herman Agewell”, this would be treated as “herman – agewell” and not “hermanagewell” (Which matches the search term “Manage”) so it prevents false positives from the concatination process, and using “LIKE” instead of “=” uses MySQL’s most basic built-in fuzzy logic method, so the search becomes case insensitive.

    I realise that this is potentially a very bloated query, but my current jobs site doesn’t get huge amounts of traffic, so the benefit of the enhanced search outweighs the drawbacks in my case.

    Can you do this for me?

    Anonymous Moderator
    #330590

    Hello holyroodcomms,

    JA Job Board version 1.4.0 is not encoded anymore. You can do any customization to fit your needs.

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by Anonymous 14 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum