New Zenner
- Join Date:
- Nov 2012
- Posts:
- 50
- Plugin Contributions:
- 0
Post #1 by icwater
i want the search box but not the links that are attached to it. was wondering the easiest way to do this? thanks :smile:
Started by icwater on 10 Dec 2012, 7:06 PM · Views: 2,244
New Zenner
i want the search box but not the links that are attached to it. was wondering the easiest way to do this? thanks :smile:
Black Belt
We can advise more accurately if we can see your site (preferably live).
New Zenner
sorry, here ya go http://raptorengines.com/ and here http://pacmachineco.com/
Black Belt
That is a fully custom header, so the stock answer would have been irrelevant.
The search and top-nav are separate elements under a wrapper, so look in (probably) /includes/templates/your_template/common/tpl_header.php for a section like this:
<!-- ========== MENU ========== -->
<div id="nav-cat">
You should be able to eliminate the nav items or the whole menu there.
New Zenner
i'm not very php savvy, what part would i remove from this?
<div class="wrapper box2">
<!-- ========== MENU ========== -->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!-- ========================== -->
Black Belt
It wasn't apparent from the output (TM decided the class/id tags should be changed from the stock version) but this seems to be the ez-pages header menu being used for these links. You should be able to turn it off in Configuration > EZ-Pages Settings > EZ-Pages Display Status - HeaderBar.
New Zenner
that seems to disable the search box as well which i actually still want. just don't want the redundant navigation links that go with it. thanks for the help ;)
New Zenner
oh wait that removed all the navigation in the header. i just want the small nav links that are plan text under and over the search bar removed. i want the main header navigation to stay. one sec i'll post a screen shot.
New Zenner

Black Belt
Maybe there is something relevant in tpl_ezpages_bar_header.php.
What code builds this section in tpl_header.php?```
<div class="right-head"> <div class="wrapper"> <div class="search"> <!-- ========== SEARCH ========== --> <form name="quick_find_header" action="http://raptorengines.com/index.php?main_page=advanced_search_result" method="get"> <div> <input type="hidden" name="main_page" value="advanced_search_result" /><input type="hidden" name="search_in_description" value="1" /> <span class="corner"></span> <input type="text" name="keyword" class="input1" /> <input type="image" src="includes/templates/raptor/buttons/english/search.gif" alt="Search" title=" Search " class="input2" /> </div>
</form>
<!-- ============================ -->
</div>
<div class="navigation">
<!-- ========== NAVIGATION LINKS ========== -->
New Zenner
this is the tpl_ezpages_bar_header.php code. not sure if i get the question
<?php
/**
* Page Template
*
* Displays EZ-Pages Header-Bar content.<br />
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_ezpages_bar_header.php 3377 2006-04-05 04:43:11Z ajeh $
*/
/**
* require code to show EZ-Pages list
*/
include(DIR_WS_MODULES . zen_get_module_directory('ezpages_bar_header.php'));
?>
<?php if (sizeof($var_linksList) >= 1) { ?>
<div id="nav-cat">
<div id="level1">
<ul>
<?php
$count = 1;
foreach($var_linksList as $list) {
$link_list = substr($list['link'], strrpos($list['link'], '/'));
$link_referer = str_replace('&', '&', $_SERVER['REQUEST_URI']);
$link_referer = substr($link_referer, strrpos($link_referer, '/'));
if($link_list == $link_referer){
$class = 'selected';
}else{
$class = '';
}
if($this_is_home_page && strpos($link_list, 'main_page=index')){
$class = 'selected';
}
if(!next($var_linksList)){
$last = 'last';
}
else $last = '';
if($count == 1){
$first = 'first';
}
else $first = '';
echo '
<li class="' . $class . ' '.$last.' '.$first.'">
<a href="' . $list['link'] . '">
<span class="corner"></span>
<span>
<span>' . $list['name'] . '</span>
</span>
</a>
</li>
';
$count ++;
}
?>
</ul>
</div>
</div>
</div>
<?php } ?>
Black Belt
That has nothing useful in it. Look at tpl_header.php as I described above.
It does appear that TM is showing the ezpages header bar twice.
New Zenner
sorry i'm just not sure what exactly i'm looking for here
<?php
/**
* Common Template - tpl_header.php
*
* this file can be copied to /templates/your_template_dir/pagename<br />
* example: to override the privacy page<br />
* make a directory /templates/my_template/privacy<br />
* copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
* to override the global settings and turn off the footer un-comment the following line:<br />
* <br />
* $flag_disable_header = true;<br />
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
*/
?>
<?php
// Display all header alerts via messageStack:
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
echo htmlspecialchars(urldecode($_GET['error_message']));
}
if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
echo htmlspecialchars($_GET['info_message']);
} else {
}
?>
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<div id="header">
<div class="header-inner">
<div class="main-width">
<div class="wrapper">
<div class="logo">
<!-- ========== LOGO ========== -->
<a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.png'); ?></a>
<!-- ========================== -->
</div>
<div class="right-head">
<div class="wrapper">
<div class="search">
<!-- ========== SEARCH ========== -->
<?php echo zen_draw_form('quick_find_header', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');?>
<div>
<?php
echo zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
echo zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id();
?>
<span class="corner"></span>
<?php echo zen_draw_input_field('keyword', '', 'class="input1"');?>
<?php echo zen_image_submit ('search.gif', HEADER_SEARCH_BUTTON, 'class="input2" ');?>
</div>
</form>
<!-- ============================ -->
</div>
<div class="navigation">
<!-- ========== NAVIGATION LINKS ========== -->
<!-- ====================================== -->
</div>
</div>
<div class="wrapper box2">
<!-- ========== MENU ========== -->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!-- ========================== -->
</div>
</div>
</div>
</div>
</div>
</div>
<?php
if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) {
if (HEADER_SALES_TEXT != '') {
?>
<div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
<?php
}
}
?>
Black Belt
The file you show doesn't have the ability to affect the search box with ez-pages settings. It also doesn't have the ability to display the nav links more than once. Is there another section below this which mentions tpl_ezpages_bar_header.php?
You should be able to comment out the three PHP statements with // like this ```php
<!-- ========== MENU ========== -->
<?php //if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php //require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php //} ?>
<!-- ========================== -->
New Zenner
ok ran across another thread about the positioning of this box. so i did this
#header .box2{
overflow: hidden;
margin-top: -56px;
float: right;
text-align: right;
padding: 10px 0 0 0;
visibility: hidden;
"visibility: hidden;" seems to have done the trick. am i going to run into any issues with fixing it like that?
thanks again.
Black Belt
Technically, hiding page elements from human view could be seen by search engines as "black hat" manipulation. I believe they do understand some "styling-type" hiding vs. "manipulation-type" hiding, but it is still better where practical to eliminate processing of unwanted elements instead of processing, sending and then hiding them.
New Zenner
thank you, i appreciate all the help.
Tell staff why this post should be reviewed.