Page 1 of 1
[Sorted] How to change the word "Search:" in front of the search text box
Posted: Tue Jun 26, 2007 2:06 pm
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:"
Re: How to change the word "Search:" in front of the search text box
Posted: Tue Jun 26, 2007 3:06 pm
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
Change it to
$lang['search'] = 'Search for Vacancy:';
Delete line 11 - it's a doublette.
Re: [Nearly Sorted] How to change the word "Search:" in front of the search text box
Posted: Wed Jun 27, 2007 2:07 pm
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?
Re: [Nearly Sorted] How to change the word "Search:" in front of the search text
Posted: Wed Jun 27, 2007 2:33 pm
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.
Re: How to change the word "Search:" in front of the search text box
Posted: Wed Jun 27, 2007 3:24 pm
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
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.
Re: [Nearly Sorted] How to change the word "Search:" in front of the search text box
Posted: Wed Jun 27, 2007 3:47 pm
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?
Re: How to change the word "Search:" in front of the search text box
Posted: Wed Jun 27, 2007 3:54 pm
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.
Re: How to change the word "Search:" in front of the search text box
Posted: Wed Jun 27, 2007 4:05 pm
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
Re: [Nearly Sorted] How to change the word "Search:" in front of the search text box
Posted: Wed Jun 27, 2007 4:12 pm
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?.
Re: [Nearly Sorted] How to change the word "Search:" in front of the search text
Posted: Wed Jun 27, 2007 7:29 pm
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?.

No, it's a feature request for international users
Alby
Re: [Sorted] How to change the word "Search:" in front of the search text box
Posted: Wed Jun 27, 2007 7:46 pm
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.