Results 1 to 3 of 3

Highlight search results

This is a discussion on Highlight search results within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hello, I am trying to highlight the search results from the search box. I followed this tip/trick, made a few ...

      
  1. #1
    Active Member
    Join Date
    Mar 2004
    Posts
    131
    Rep Power
    13


    Default Highlight search results

    Hello,
    I am trying to highlight the search results from the search box.
    I followed this tip/trick, made a few fixes to the _GET issue, replacing it with HTTP_GET_VARS.
    This is the product_listing.php change for PRODUCT_LIST_NAME:
    case 'PRODUCT_LIST_NAME':
    $lc_align = '';
    if (isset($HTTP_GET_VARS['manufacturers_id'])) {
    $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id'] . $parm_add) . '">' . highlight_viewable_text($listing[$x]['products_name'], $HTTP_GET_VARS['keywords'], 'searchTag') . '</a>';
    } else {
    $lc_text = '&nbsp;<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>&nbsp;';
    }
    break;
    This is the product_info.tpl.php part:
    if ($display_search_results) {
    // highlight
    $products_name = highlight_viewable_text($product_info['products_name'], $HTTP_GET_VARS['keywords'], 'searchTag');
    } else {
    // normal
    $products_name = $product_info['products_name'];
    }
    and:
    if ($display_search_results) $product_info['products_description'] = highlight_viewable_text($product_info['products_description'], $HTTP_GET_VARS['keywords'], 'searchTag');
    This is the url i am recieving when searching for 'radio' from the search box:
    Any ideas what other differences are affected using max rc3, or another way to make this work?
    Thanks

  2. #2
    Active Member
    Join Date
    Mar 2004
    Posts
    131
    Rep Power
    13


    Default Re: Highlight search results

    forgot to mention, i also added tep_hide_session_id() . tep_draw_hidden_field('hl',1) to the search box.

  3. #3
    Active Member
    Join Date
    Mar 2004
    Posts
    131
    Rep Power
    13


    Default Re: Highlight search results

    Can anyone point me to the right direction to achieve the search word highlighted in the results?
    Only results from the search box are needed to be highlighted.
    Thanks.

Similar Threads

  1. Search not showing results.
    By JonCloud420 in forum osCmax v2 Installation issues
    Replies: 0
    Last Post: 09-03-2006, 07:59 PM
  2. filter results
    By no1uknow in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 07-22-2006, 10:24 PM
  3. modifing meta_tags.php to help search results?
    By Redeye_Joe in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 02-20-2006, 07:08 AM
  4. Remove 'Buy Now' button in AABox template Search Results
    By DigitalPimp in forum osCmax v2 Installation issues
    Replies: 4
    Last Post: 09-01-2005, 08:11 AM
  5. saving "search" results
    By GamerGoal in forum osCMax v1.7 General Mods Discussion
    Replies: 0
    Last Post: 01-15-2005, 08:41 AM

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
  •