Page 1 of 1

[Solved] Remove "Search:" text before search box in {Search} Module

Posted: Tue Aug 28, 2007 8:00 pm
by claystorm
I just upgraded my CMSMS to the most current version 1.1.1 from version 1.0.6. I have installed and use the {Search} module version 1.3 on our CMSMS for our company website. Before the upgrade to 1.1.1, the {Search} module did not have the text string "Search:" before the text box when you have the {Search} module in the template.

Example: Image

Now that I have upgraded to version 1.1.1, when I have the {Search} module in the template, it now displays the text string "Search:" before the text box.

Example: Image

I would really like to get rid of that text string as It really screws up my template for our webpage, and the only way around it would to completely redesign how the {Search} module is in my template on the website (which is not high on my list of to-do's). I looked at the help for the {Search} module and searched the forums here, but I found no reference to how to remove the "Search:" text string. So far this does not appear to be an option in the {Search} module that I would be able to turn that off, or replace the text to nothing.

I did go into the source code for the {Search} module and change a few things to try and remove the text string, but when I did that I was left with a ":" before the text box.

Example: Image

I went back into not only the source code but also my template to make sure that I did not forget to remove the ":" or that somehow a ":" made in to my template.

My chagnes to the source code:

File:action.default.php

I removed the line:
$this->smarty->assign('label', ''.$this->Lang('search').'');
======

File: Search.module.php

I changed the line:
{$label}: {$inputbox}
to
{$inputbox}
======

So that is where I stand right now. I really do not messing around with the source code since I have no clue what my changes might due when I upgrade to future releases.  I know just enough PHP to get my self into trouble, but have no real knowlege of PHP, so I very well might have missed something also.

I know that this really should go into a feature request, but maybe in a future release, a option could be put into the {Search} module that would allow you to turn off and/or change that text string. But until then, does anyone have any ideas and/or help on how to compeletely remove the text string? If you need anymore info, please just ask.

Thank you,

Kevin Murray
Systems Administrator
CAC, Inc.

Http://www.cacinc.net
kevinm at cacinc dot net

Re: Remove "Search:" text before search box in {Search} Module

Posted: Tue Aug 28, 2007 8:12 pm
by tobik
Modifying the search template in Extensions > Search worked for me.

Code: Select all

{$startform}

{$inputbox}<input name="submit" value="{$submittext}" type="image" src="/pics/view.gif"/>
{if isset($hidden)}{$hidden}{/if}

{$endform}

Re: Remove "Search:" text before search box in {Search} Module

Posted: Tue Aug 28, 2007 8:13 pm
by RonnyK
Deleting:
{$label}: {$inputbox}
should work, but you shouldn't do it in the code, but in the search-template instead. "Extensions -> Search -> Search template".

Ronny

Re: Remove "Search:" text before search box in {Search} Module

Posted: Tue Aug 28, 2007 9:33 pm
by claystorm
Thank you everyone. Somehow I missed just totaly missed that. Again, thank you to everyone who responed.