[Sorted] How to change the word "Search:" in front of the search text box

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Clive

[Sorted] How to change the word "Search:" in front of the search text box

Post by Clive »

How to change the word "Search:" in front of the search text box. Not the text in the search box.  I want to change the text to something like "Search for Vacancy:"
Last edited by Clive on Wed Jun 27, 2007 7:47 pm, edited 1 time in total.
cyberman

Re: How to change the word "Search:" in front of the search text box

Post by cyberman »

You mean the label for the search box :).

Open file /modules/search/lang/en_US.php with your favorite editor, go to line 6 and you will found

Code: Select all

$lang['search'] = 'Search';
Change it to

$lang['search'] = 'Search for Vacancy:';

Delete line 11 - it's a doublette.
Clive

Re: [Nearly Sorted] How to change the word "Search:" in front of the search text box

Post by Clive »

Thanks
But now the submit button moves to under the Search Text Box and if I try to put more words as the title then the title moves to above the search text box.
It would seam that there is a default pixel size/space for the complete search module as a whole, as shows on the page.
Can I increase the size of the search module as it shows on the page to now include more text for a title but have the  title-text box-submit button  and still  show all on the same line, all in a row?
jatinder
Forum Members
Forum Members
Posts: 17
Joined: Thu Apr 12, 2007 1:49 pm

Re: [Nearly Sorted] How to change the word "Search:" in front of the search text

Post by jatinder »

You can control the width of the input box using CSS.

Can't provide more detailed help unless you post the link to your website.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: How to change the word "Search:" in front of the search text box

Post by calguy1000 »

cyberman wrote: You mean the label for the search box :).

Open file /modules/search/lang/en_US.php with your favorite editor, go to line 6 and you will found

Code: Select all

$lang['search'] = 'Search';
Change it to

$lang['search'] = 'Search for Vacancy:';

Delete line 11 - it's a doublette.
You can also add the following file:
module_custom/search/lang/en_US.php
and add the following code:

Code: Select all

<?php
$lang['search'] = 'Search for Vacancy';
?>
This will allow your minor language file string change to stay when you upgrade CMS.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Clive

Re: [Nearly Sorted] How to change the word "Search:" in front of the search text box

Post by Clive »

The site is at http://www.mosstaff.com/index.php

I have made these changes to the file en_US.php
$lang['searchsubmit'] = 'Click to Search';
$lang['search'] = 'Vacancy Jobs Search';

But as can be seen the 'Vacancy Jobs Search' is now above the search text box with the submit button below the search text box.  I want to keep the title, search text box and submit button all in a row on the same line.
Can this be done?
Pierre M.

Re: How to change the word "Search:" in front of the search text box

Post by Pierre M. »

calguy1000 wrote: This will allow your minor language file string change to stay when you upgrade CMS.
Cool ! How flexible is this CMS !-)
Pierre M.
alby

Re: How to change the word "Search:" in front of the search text box

Post by alby »

calguy1000 wrote:
This will allow your minor language file string change to stay when you upgrade CMS.
Is it possibile add other language (not en_US.php) too in modlang.inc.php  ::)
                        else if (@is_file("$dir/module_custom/".$modinstance->GetName()."/lang/$ourlang.php"))
                        {
                                include("$dir/module_custom/".$modinstance->GetName()."/lang/$ourlang.php");
                        }
Alby
Clive

Re: [Nearly Sorted] How to change the word "Search:" in front of the search text box

Post by Clive »

I see that I can replace the text "Search" with "Vacancy Jobs Search" But now the column where the main text goes for the page content is reduced in size, width,  by the mods to the search module.
I just want the title and search text box and the submit button all in a row on the same line.
Is this possible?

alby
That code is over my head and I do not know where to put that code or which files to update?.
alby

Re: [Nearly Sorted] How to change the word "Search:" in front of the search text

Post by alby »

Clive wrote: I see that I can replace the text "Search" with "Vacancy Jobs Search" But now the column where the main text goes for the page content is reduced in size, width,  by the mods to the search module.
I just want the title and search text box and the submit button all in a row on the same line.
Is this possible?
search in stylesheet div#search and substitute width: 23em; to:
div#search {
  float: right;
  width: 35em;    /* enough width for the search input box */
  text-align: right;
  padding: 0.6em 0 0.2em 0;
  margin: 0 1em;
}
Clive wrote: alby
That code is over my head and I do not know where to put that code or which files to update?.
;D ;D No, it's a feature request for international users  ::)

Alby
Clive

Re: [Sorted] How to change the word "Search:" in front of the search text box

Post by Clive »

alby
thanks thats just what I wanted.  I was trying that change in the stylesheet but only for the change of title text before I updated the en_US.php search module.

SO for anyone else that needs to change the text first;
1. Change the Title text >>
Open file /modules/search/lang/en_US.php with your favorite editor, go to line 6 and you will find

Code:
$lang['search'] = 'Search';
Change it to

$lang['search'] = 'Search for Vacancy:';

Delete line 11 - it's a doublette.

2. Change the default width for the title and search text box and submit button >>
search in stylesheet div#search and substitute width: 23em; to:

div#search {
   float: right;
   width: 35em;    /* enough width for the search input box */
   text-align: right;
   padding: 0.6em 0 0.2em 0;
   margin: 0 1em;
}


I used width: 50em; to get the correct width needed.
Last edited by Clive on Wed Jun 27, 2007 8:54 pm, edited 1 time in total.
Locked

Return to “CMSMS Core”