mark27uk3 Posted March 6, 2005 Share Posted March 6, 2005 Hi Guys, My new site is coming on great :thumbsup: but I still have a couple of niggles that need sorting out. If you have a look at my site here you will see that the search button is out of alignment with the search field. This is the code for the search box: <?php $info_box_contents = array(); $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('go.jpg', BOX_HEADING_SEARCH) . '</a>'); new infoBox($info_box_contents); ?> Can anyone tell me how to align them correctly please? Thanks Mark :blink: Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
mark27uk3 Posted March 7, 2005 Author Share Posted March 7, 2005 Anyone please? Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
boxtel Posted March 7, 2005 Share Posted March 7, 2005 Hi Guys, My new site is coming on great :thumbsup: but I still have a couple of niggles that need sorting out. If you have a look at my site here you will see that the search button is out of alignment with the search field. This is the code for the search box: <?php $info_box_contents = array(); $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('go.jpg', BOX_HEADING_SEARCH) . '</a>'); new infoBox($info_box_contents); ?> Can anyone tell me how to align them correctly please? Thanks Mark :blink: <{POST_SNAPBACK}> put the button in a separate <td> </td> tag and valign to middle Treasurer MFC Link to comment Share on other sites More sharing options...
mark27uk3 Posted March 7, 2005 Author Share Posted March 7, 2005 Hi Amanda, I have no idea on how to do that inside an array! Thanks Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
boxtel Posted March 7, 2005 Share Posted March 7, 2005 Hi Amanda, I have no idea on how to do that inside an array! Thanks Mark <{POST_SNAPBACK}> $the_text = '<table> </tr> </td>' . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . tep_hide_session_id() . '</td> <td valign="middle">' . tep_image_submit('go.jpg', BOX_HEADING_SEARCH) . '</a></td> </tr> </table>' ; tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => $the_text); something like this. Treasurer MFC Link to comment Share on other sites More sharing options...
mark27uk3 Posted March 7, 2005 Author Share Posted March 7, 2005 Hi Amanda, Sorry for not replying earlier, I was having problems with my ftp and firewall. Call me stoopid and thick but I just can not integrate the code you suggested with this code <?php $info_box_contents = array(); $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('go.jpg', BOX_HEADING_SEARCH) . '</a>'); new infoBox($info_box_contents); ?> Everytime I do I get a flippin parse error which I can not resolve. >_< HELP! :'( Thanks Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
Mighty Mike Posted March 7, 2005 Share Posted March 7, 2005 mark i think it would be something like this $the_text = '<table> </tr> </td>' . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . tep_hide_session_id() . '</td> <td valign="middle">' . tep_image_submit('go.jpg', BOX_HEADING_SEARCH) . '</a></td> </tr> </table>' ; <?php $info_box_contents = array(); $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => $the_text new infoBox($info_box_contents); ?> might mot be 100% but its along those lines, i have done something similar but dont have the code here cheers Link to comment Share on other sites More sharing options...
mark27uk3 Posted March 7, 2005 Author Share Posted March 7, 2005 Hi Mike, Thanks for trying but that produced this error Parse error: parse error, unexpected T_NEW, expecting ')' in /home/*****/public_html/includes/boxes/search.php on line 32 Line 32 is this new infoBox($info_box_contents); Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
Mighty Mike Posted March 7, 2005 Share Posted March 7, 2005 mark it looks like you are missing an opening '(' bracket somewhere this is what i did for my login box, which is something the same as what you are trying to do $in_out_action = "<b><center>Welcome Back<br>$res->customers_firstname</center></b><br>"; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $in_out_action i think you might have to put ");" in so it looks like 'text' => $the_text); not 100% but as i have no idea what PHP is :o i just go by trial and error must of the time, and with a little help here and there :D Link to comment Share on other sites More sharing options...
Mighty Mike Posted March 7, 2005 Share Posted March 7, 2005 on an another note i am not sure these should be closing tags $the_text = '<table> </tr> </td>' . tep_draw_input_field surley they should be opening Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.