+ Reply to Thread (include dating software, release, and patch number!)
Results 1 to 10 of 10

Thread: Custom fields not working in search page

  1. #1
    webbuddy
    Guest

    Question Custom fields not working in search page

    I finally got my search page how I want it, and created 3 new search fields. However, when I try to search by one of my custom fields and hit "submit", the search page, search.php just refreshes! How can I get my custom fields to be searchable?

  2. #2
    webbuddy
    Guest

    Lightbulb almost!!!

    So basically I spent all day trying to get this to work. What I'm trying to do is replace "I am a male looking for a female" to "I am a BB employee looking for a BB alumni". So I want to replace male and female on both ends to seven different identical option types. I have done my research on this site to know that "male" and "female" is hard coded into the search page, and several other php pages. So I looked at the source of search.php and also found that I need to edit:

    profiles.inc.php
    profiles_desc.inc.php
    search.php
    search_results.php

    I might be missing one. But the code I think I need to change is:

    <?php
    echo SelectOptions("LookingFor", ($member_sex=='male' ? 'female' : 'male') );
    ?>

    I changed it to:

    <?php
    echo SelectOptions("LookingFor", ($member_sex=='BB_employee' ? 'BB_alumni' : 'BB_employee' : 'MS_participant' : 'HS_participant' : 'College_participant' : 'Parent' : 'Volunteer' : 'Visitor') );
    ?>

    I also checked the tables in phpMyAdmin to make sure that all of the sex, looking for, tables had replaced "male" and "female" here. When I tried my search it only searched correctly for a profile who had BB_alumni as their sex or looking for. The others don't work.

    When I tried to change the code to:

    <?php
    echo SelectOptions("LookingFor", ($member_sex=='BB_employee' && 'BB_alumni' && 'BB_employee' && 'MS_participant' && 'HS_participant' && 'College_participant' && 'Parent' && 'Volunteer' && 'Visitor') );
    ?>

    It still only searched correctly for BB_alumni in a profile.

    Is it possible for me to change the hard coded male and female in the search page, and also the associated files that go along with it? I'm sure it must be possible. If I am over my head please let me know because I've been trying for the past week. Any help is appreciated...

  3. #3
    webbuddy
    Guest

    Default

    Also, on the join page, when I took out the headline field from the join page, when a new person signs up I always get the headline error message. How can I take this out?

  4. #4
    webbuddy
    Guest

    Default

    well, I got this to work. I had to do so much I don't even remember all that I changed, but now I have to figure out how to make my newly added fields searchable too.

  5. #5
    kappaluppa
    Guest

    Default

    What did you do!
    I need to find out!
    Thanks,
    K

  6. #6
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,642
    Blog Entries
    5

    Default

    Quote Originally Posted by kappaluppa View Post
    What did you do!
    I need to find out!
    Thanks,
    K
    Copy and paste the errors here you get - so we can see what they say.

    If you have DB errors, copy and paste them from your BUG REPORT email here, so we can see them too.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  7. #7
    Abantu
    Guest

    Default

    You need to add the names of the fields you are looking in the following section of search_results.php


    // check if user poset correct data
    if ( !isset($_GET['LookingFor']) && !$_GET['ID'] && !$_GET['NickName'] && !$_GET['distance'] && !$_GET['zip']
    && !$_GET['online_only'] && !$_GET['gallery_view'] && !$_GET['view_friends'] && !$_GET['tag'] )
    {
    echo '<script language="Javascript">location.href=\'search.php\' ;</script>';
    exit;
    }

    Hope that helps
    David

  8. #8
    penny
    Guest

    Default

    Hi David,

    How do you know what the field name is to add? Can you use the profile field name from Profile Fields Manager? (ie: "Activities_Dancing")

    I'm so confused..

    Kind Regards,

    Penny


    Quote Originally Posted by Abantu View Post
    You need to add the names of the fields you are looking in the following section of search_results.php


    // check if user poset correct data
    if ( !isset($_GET['LookingFor']) && !$_GET['ID'] && !$_GET['NickName'] && !$_GET['distance'] && !$_GET['zip']
    && !$_GET['online_only'] && !$_GET['gallery_view'] && !$_GET['view_friends'] && !$_GET['tag'] )
    {
    echo '<script language="Javascript">location.href=\'search.php\' ;</script>';
    exit;
    }

    Hope that helps
    David

  9. #9

    Join Date
    Jul 2006
    Posts
    101

    Default

    been trying to skpe smoge to answer this but no luck..
    this works fine for initial result but with pagination the results are not carried to the next page

    so when a user searches by country they only get one page for that country. does anyone have any ideas???

  10. #10
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,642
    Blog Entries
    5

    Default

    Hi,

    Old version of Dolphin or aeDating? If so - old bug - search the forum some - maybe you can find it.... or... maybe it is something else... but if it is an old version - there are posts about it.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

+ Reply to Thread (include dating software, release, and patch number!)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Custom Search / Home Page:
    By roldahayes in forum Boonex Dolphin 7
    Replies: 1
    Last Post: 08-27-2009, 08:08 PM
  2. Add custom fields to Browse page
    By jryan in forum FAQ & HOWTO
    Replies: 0
    Last Post: 05-12-2008, 12:48 PM
  3. Custom search page
    By ginger76 in forum Dolphin General Discussion v6.00 and above
    Replies: 6
    Last Post: 03-05-2008, 12:21 PM
  4. Custom Profile Fields
    By 2paulm in forum Dolphin General Discussion v6.00 and above
    Replies: 6
    Last Post: 03-02-2008, 01:32 PM
  5. Custom fields on search...
    By eSiK in forum General Issues, Comments, Questions
    Replies: 0
    Last Post: 06-16-2007, 12:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts