Forums / Templates, Stylesheets, Page Layout / Need to put "search help?" into the search sidebox

Need to put "search help?" into the search sidebox

Locked

Views: 2,023

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
13 Oct 2006, 2:35 AM
#1
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Need to put "search help?" into the search sidebox

Does anyone know the exact code to copy and paste from the Advanced Search page to make the "search help" link appear in the Search sidebox on the top line to the right on the word "Search" and above the submit search button?
(whew--long sentence)

I have customers that will get confused and I want to have this pop up window available in this location also. (It will explain how to use double quote for phrases)

thanks,
Jeff Michaels
Musical Creations Ltd.

Jeff Michaels,
pres of Musical Creations Ltd.

13 Oct 2006, 3:17 AM
#2
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,846
Plugin Contributions:
0

Re: Need to put "search help?" into the search sidebox

The following code if placed in the tpl_search.php in the sideboxes directory after the closing php tag will make the search help appear in the search sidebox header next to the word search. This is the quick and dirty version. There probably is another way that is better, but this will start you off.

<div class="forward"><?php echo '<a href="javascript:popupWindow(\'' . zen_href_link(FILENAME_POPUP_SEARCH_HELP) . '\')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></div>

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

13 Oct 2006, 4:21 AM
#3
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Re: Need to put "search help?" into the search sidebox

Thanks so much...
It worked perfectly.

Small adjustment: The link is 'tight' to the top and right of the sidebox.
Are there adjustments to 'pad' it away a little bit?

thanks,
Jeff

Jeff Michaels,
pres of Musical Creations Ltd.

13 Oct 2006, 4:25 AM
#4
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Re: Need to put "search help?" into the search sidebox

Oops, there's a problem I didn't notice at first.

It says Search Help [?] ONLY when the Advanced Search page is showing.

With any other page, it says TEXT_SEARCH_HELP_LINK
and the java link will not work

Are there other pages that the define TEXT_SEARCH_HELP_LINK = Search Help [?] needs to be inserted?

thanks for any additional help

Jeff

Jeff Michaels,
pres of Musical Creations Ltd.

28 Oct 2006, 4:42 PM
#5
alphalion avatar

alphalion

New Zenner

Join Date:
Sep 2006
Posts:
19
Plugin Contributions:
0

Re: Need to put "search help?" into the search sidebox

I liked your idea, so I changed tpl_search.php from line 22 on down to the follwing:

$content .= '<br /><a href="' . zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a><br><a  href=javascript:popupWindow("http://www.alphalion.com/index.php?main_page=popup_search_help")>Search Help[?]</a>' ;
  }
  $content .= "</form>";
  $content .= '</div>';
  
?>
<script language="javascript" type="text/javascript"><!--
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,left=150')
}
//--></script>

It works well for me, you can see it at AlphaLion

28 Oct 2006, 5:22 PM
#6
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Re: Need to put "search help?" into the search sidebox

Darn...

It didn't work for me by just replacing the lines I had with yours. Nothing displayed at the bottom like yours.
Is there something else that is modified

I inserted the jscript_main.php file into the sidebox folder, but it still doesn't show up.

Any ideas what I'm missing here?

thanks,
Jeff

you can see my site at
http://store1.musicalcreations.com

Jeff Michaels,
pres of Musical Creations Ltd.

28 Oct 2006, 5:46 PM
#7
alphalion avatar

alphalion

New Zenner

Join Date:
Sep 2006
Posts:
19
Plugin Contributions:
0

Re: Need to put "search help?" into the search sidebox

I see the search help link on your quick search box, it's at the top instead of the bottom, but it looks good.

28 Oct 2006, 6:04 PM
#8
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Re: Need to put "search help?" into the search sidebox

yes, that was my original (which I can't adjust for centering with the Quicksearch text to its left)

I liked yours underneath, but it won't work with the code you sent me.
That's why I was wondering if there is something else that needs to be added in the code or an adjacent file

thanks
Jeff

Jeff Michaels,
pres of Musical Creations Ltd.

28 Oct 2006, 6:14 PM
#9
alphalion avatar

alphalion

New Zenner

Join Date:
Sep 2006
Posts:
19
Plugin Contributions:
0

Re: Need to put "search help?" into the search sidebox

Hmmm .. I can't think of anything else.
I am using the tpl_search.php from the template_default directory, which should work unless you have an overriding file in your template directory.

Possibly someone else with better knowledge of php than I have has a better idea or way of doing this.

30 Nov 2006, 10:32 AM
#10
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,846
Plugin Contributions:
0

Re: Need to put "search help?" into the search sidebox

OK reviewing some of my posts to see if I can clear some stuff up.```

<div class="forward"><?php echo '<a href="javascript:popupWindow(\'' . zen_href_link(FILENAME_POPUP_SEARCH_HELP) . '\')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></div> ```

change the text in red to "center" and then add to your stylesheet the following:

.center {text-align: center;}

This should center the "search help" in the sidebox

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!