chrometweaks.org

What is the best iPage web host out there? and is godaddy a good one?

Click Here To View All Answers...


First question I got is What is the best iPage web host out there? and is godaddy a good one? Thanks in advance for any comment. Second question.. I would like to add this advanced search box right beside my header gif..

My header gif is align left and I would like to place the advanced search align right in the very top part of the header..

<?php.

/*.

$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

// check if the 'install' directory exists, and warn of it's existence.

If (WARN_INSTALL_EXISTENCE == 'true') {.

If (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/install')) {.

$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');.

}.

}.

// check if the configure.php file is writeable.

If (WARN_CONFIG_WRITEABLE == 'true') {.

If ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/includes/configure.php')) ) {.

$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');.

}.

}.

// check if the session folder is writeable.

If (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {.

If (STORE_SESSIONS == '') {.

If (!is_dir(tep_session_save_path())) {.

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');.

} elseif (!is_writeable(tep_session_save_path())) {.

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');.

}.

}.

}.

// check session.auto_start is disabled.

If ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {.

If (ini_get('session.auto_start') == '1') {.

$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');.

}.

}.

If ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {.

If (!is_dir(DIR_FS_DOWNLOAD)) {.

$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');.

}.

}.

If ($messageStack->size('header') > 0) {.

Echo $messageStack->output('header');.

}.

?>.

<table border="0" width="100%" cellspacing="0" cellpadding="0">.

<tr class="header">.

<td valign="middle"><?php echo '<a href="'tep_href_link(FILENAME_DEFAULT)'">'tep_image(DIR_WS_IMAGES'directory.gif', 'Directory.com')'</a>'; ?></td>.

</tr>.

</table>.

<table border="0" width="100%" cellspacing="0" cellpadding="1">.

<tr class="headerNavigation">.

<td class="headerNavigation">&nbsp;&nbsp;<?php echo $breadcrumb->trail(' &raquo; '); ?></td>.

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> &nbsp;|&nbsp; <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> &nbsp;|&nbsp; <! <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> &nbsp;|&nbsp; <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> &nbsp;&nbsp;</td> >.

</tr>.

</table>.

<?php.

//.

// START advanced search header script insertion.

//.

//.

?>.

<?php.

If ( (!strstr($_SERVER['PHP_SELF'],'checkout.php')) and (!strstr($_SERVER['PHP_SELF'],'create_account.php')) and (!strstr($_SERVER['PHP_SELF'],'shopping_cart.php')) and (!strstr($_SERVER['PHP_SELF'],'advanced_search.php')) and !tep_session_is_registered('customer_id') ) {.

?>.

<table align="center" border="0" width="100%" cellspacing="0" cellpadding="1">.

<tr>.

<td align="center" class="headerNavigation">.

<table border="0" width="100%" cellspacing="0" cellpadding="0">.

<tr>.

<td class="infoBoxContents" valign="middle" colspan="0">.

<?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get"') ?>.

<table border="0" width="50%" cellspacing="0" cellpadding="1" align="center">.

<tr>.

<td class="infoBoxContents" valign="middle" colspan="3">&nbsp;</td>.

<td class="infoBoxContents" valign="middle" colspan="3"><?php echo tep_draw_hidden_field('search_in_description','1')tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: '(BOX_WIDTH+100)'px"') ?></td>.

<td class="infoBoxContents" valign="top" colspan="3">&nbsp;</td>.

<td class="infoBoxContents" valign="middle" colspan="3"><?php echo BOX_ADVSEARCH_CAT ?></td>.

<td class="infoBoxContents" valign="middle" colspan="3"><?php echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ADVSEARCH_ALLCAT)))) ?></td>.

<td class="infoBoxContents" valign="top" colspan="3">&nbsp;</td>.

<td class="infoBoxContents" valign="middle" colspan="3"><center><?php echo tep_image_submit('button_search.gif', BOX_HEADING_ADVSEARCH); ?></center></td>.

</form></tr>.

<?php } ?>.

<?php.

//.

// END advanced search header script insertion.

//.

If (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {.

?>.

<table border="0" width="100%" cellspacing="0" cellpadding="2">.

<tr class="headerError">.

<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>.

</tr>.

</table>.

<?php.

}.

If (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {.

?>.

<table border="0" width="100%" cellspacing="0" cellpadding="2">.

<tr class="headerInfo">.

<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>.

</tr>.

</table>.

<?php.

}.

?>.

The section in red named the advanced header I would like it to be aligned right in the very top next to my directory.gif... not where it is now..

I have tried to move many times now but I break my iPage site every time I do it.

Could someone please show me the right way to add it to the top part of my header..

Much thanks..

Comments (19)

Good question... I dunno what is the answer to your question. I'll do some Googling and get back to you if I find an anything. You should email the people at iPage as they probably could give you help..

Comment #1

Would you be able to show me I am a n00b still with OS and PHP.... this is my 1st cart and I'm learning tons .... I have been trying for days now and I break my iPage site every time I try to edit it.

Thanks in advnace..

Comment #2

Require(DIR_WS_BOXES'search.php');.

Put that piece of code wherever you want the search box to appear..

Vger..

Comment #3

But it is the advanced search with all catagories I'm after..

Comment #4

Ok so I have done what you said to do.

I am actually learning this :.

<table border="0" width="100%" cellspacing="0" cellpadding="0">.

 <tr class="header">.

   <td valign="bottom"><?php echo '<a href="'tep_href_link(FILENAME_DEFAULT)'">'tep_image(DIR_WS_IMAGES'directory.gif', 'Directory.com')'</a>'; ?></td>.

 <td valign="middle" align="right"><?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get"') ?>.

<td class="infoBoxContents" valign="middle" colspan="1">&nbsp;</td>.

<td class="infoBoxContents" valign="middle" colspan="1"><?php echo tep_draw_hidden_field('search_in_description','1')tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: '(BOX_WIDTH+1)'px"')  ?></td>.

<td class="infoBoxContents" valign="middle" colspan="1">&nbsp;</td>.

<td class="infoBoxContents" valign="middle" colspan="1"><?php echo BOX_ADVSEARCH_CAT ?></td>.

<td class="infoBoxContents" valign="middle" colspan="1"><?php echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ADVSEARCH_ALLCAT)))) ?></td>.

<td class="infoBoxContents" valign="middle" colspan="1">&nbsp;</td>.

<td class="infoBoxContents" valign="middle" colspan="1"><left><?php echo tep_image_submit('button_search_small.gif', Search)'</a>'; ?></td>.

 </tr>.

</table>.

I have stripped all the code down to this and I'm very happy with the look I have now... here is my only problem...

The orig search button was very large so I made a new one and put it in location where the old search button was.... however the PHP is still making the space for the button at the same size as the old button?? How do I tell it to use this new much smaller button and not waste all the space?.

Thanks again for all your help!!.

Its was the </a> that saved the day .......

Comment #5

It would appear I sopke to soon.. the code is in place but does not read the data bank ?? I must have taken out soemthing I should not have.

Can you have a look if you get a chance and see what I did wrong?.

Thanks Again.

This post has been edited by.

Imaaxx.

: 29 October 2004, 17:59..

Comment #6

I would like to add this advanced search box right beside my header gif..

My header gif is align left and I would like to place the advanced search align right in the very top part of the header..

<?php.

/*.

$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

// check if the 'install' directory exists, and warn of it's existence.

If (WARN_INSTALL_EXISTENCE == 'true') {.

If (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/install')) {.

$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');.

}.

}.

// check if the configure.php file is writeable.

If (WARN_CONFIG_WRITEABLE == 'true') {.

If ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/includes/configure.php')) ) {.

$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');.

}.

}.

// check if the session folder is writeable.

If (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {.

If (STORE_SESSIONS == '') {.

If (!is_dir(tep_session_save_path())) {.

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');.

} elseif (!is_writeable(tep_session_save_path())) {.

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');.

}.

}.

}.

// check session.auto_start is disabled.

If ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {.

If (ini_get('session.auto_start') == '1') {.

$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');.

}.

}.

If ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {.

If (!is_dir(DIR_FS_DOWNLOAD)) {.

$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');.

}.

}.

If ($messageStack->size('header') > 0) {.

Echo $messageStack->output('header');.

}.

?>.

<table border="0" width="100%" cellspacing="0" cellpadding="0">.

<tr class="header">.

<td valign="middle"><?php echo '<a href="'tep_href_link(FILENAME_DEFAULT)'">'tep_image(DIR_WS_IMAGES'directory.gif', 'Directory.com')'</a>'; ?></td>.

</tr>.

</table>.

<table border="0" width="100%" cellspacing="0" cellpadding="1">.

<tr class="headerNavigation">.

<td class="headerNavigation">&nbsp;&nbsp;<?php echo $breadcrumb->trail(' &raquo; '); ?></td>.

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> &nbsp;|&nbsp; <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> &nbsp;|&nbsp; <! <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> &nbsp;|&nbsp; <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> &nbsp;&nbsp;</td> >.

</tr>.

</table>.

<?php.

//.

// START advanced search header script insertion.

//.

//.

?>.

<?php.

If ( (!strstr($_SERVER['PHP_SELF'],'checkout.php')) and (!strstr($_SERVER['PHP_SELF'],'create_account.php')) and (!strstr($_SERVER['PHP_SELF'],'shopping_cart.php')) and (!strstr($_SERVER['PHP_SELF'],'advanced_search.php')) and !tep_session_is_registered('customer_id') ) {.

?>.

<table align="center" border="0" width="100%" cellspacing="0" cellpadding="1">.

<tr>.

<td align="center" class="headerNavigation">.

<table border="0" width="100%" cellspacing="0" cellpadding="0">.

<tr>.

<td class="infoBoxContents" valign="middle" colspan="0">.

<?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get"') ?>.

<table border="0" width="50%" cellspacing="0" cellpadding="1" align="center">.

<tr>.

<td class="infoBoxContents" valign="middle" colspan="3">&nbsp;</td>.

<td class="infoBoxContents" valign="middle" colspan="3"><?php echo tep_draw_hidden_field('search_in_description','1')tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: '(BOX_WIDTH+100)'px"') ?></td>.

<td class="infoBoxContents" valign="top" colspan="3">&nbsp;</td>.

<td class="infoBoxContents" valign="middle" colspan="3"><?php echo BOX_ADVSEARCH_CAT ?></td>.

<td class="infoBoxContents" valign="middle" colspan="3"><?php echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ADVSEARCH_ALLCAT)))) ?></td>.

<td class="infoBoxContents" valign="top" colspan="3">&nbsp;</td>.

<td class="infoBoxContents" valign="middle" colspan="3"><center><?php echo tep_image_submit('button_search.gif', BOX_HEADING_ADVSEARCH); ?></center></td>.

</form></tr>.

<?php } ?>.

<?php.

//.

// END advanced search header script insertion.

//.

If (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {.

?>.

<table border="0" width="100%" cellspacing="0" cellpadding="2">.

<tr class="headerError">.

<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>.

</tr>.

</table>.

<?php.

}.

If (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {.

?>.

<table border="0" width="100%" cellspacing="0" cellpadding="2">.

<tr class="headerInfo">.

<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>.

</tr>.

</table>.

<?php.

}.

?>.

The section in red named the advanced header I would like it to be aligned right in the very top next to my directory.gif... not where it is now..

I have tried to move many times now but I break my iPage site every time I do it.

Could someone please show me the right way to add it to the top part of my header..

Much thanks..

Comment #7

You don't need all that code, all that you have to do is to put the link to the advanced search feature, plus the image path, plus the closing </a> where you want it to go, along with the align=right tag..

Vger..

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.