Jump to content

James Burkart

Members
  • Content count

    4
  • Joined

  • Last visited

Profile Information

  • Real Name
    James Burkart
  1. James Burkart

    [contribution] Simple Template System (sts)

    I appologize in advance for being a newbie, but I gotta start somewhere. OK, I've searched thru the forum for 2 days looking for an answer to my problem. I am using the latest version of OSC and recently installed STS. I have zero knowledge of PHP or OSC for all it matters and am trying to add a search field to the table that the breadcrumbs reside. I don't want the search box there which is what people have told me in the past to do. The following is the code that I have attempted to add to sts_user_code.php: $sts_block_name = 'searchbar'; require(STS_START_CAPTURE); // require(DIR_WS_BOXES . 'search_bar.php'); echo "\n<tr class="header">\n"; echo "<td valign="middle" align="right">\n" echo "Search: "; echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'). tep_draw_input_field('keywords','','size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))); echo "</td>\n"; echo "<td valign="middle" width="30" align="center">\n"; echo "<input type="image" src="images/index/go_off.gif" border="0" alt="Quick Find" title=" Quick Find ">\n"; echo "</form>\n"; echo "</td>\n"; echo "</tr>\n"; require(STS_STOP_CAPTURE); $template['searchbar'] = strip_unwanted_tags($sts_block['searchbar'], 'searchbar'); I'd be soooo greatful if someone can beat me over the head first and then if they may be so inclined please point me in the right direction so that I may find a solution to this dilemma. If this requires that I pay someone for the bit of advice I might just have to take a look into my PayPal account and see if I got a few bucks. To get an idea of what I'm trying to do please look at my website www.electronicswarehouse.net/catalog. I accomplished this by removing all the html stuff from the code above and only left the block code and the tep_draw_form code. Of course this doesn't work though: $sts_block_name = 'searchbar'; require(STS_START_CAPTURE); echo "Search: "; echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'). tep_draw_input_field('keywords','','size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))); require(STS_STOP_CAPTURE); $template['searchbar'] = strip_unwanted_tags($sts_block['searchbar'], 'searchbar'); -James Burkart grafxjkb@adelphia.net http://www.electronicswarehouse.net/catalog
×