Page 1 of 1

Changing button text in search doesn't seem to work ?[SOLVED]

Posted: Thu Apr 05, 2007 4:18 pm
by Rytter
Hi,

I'm changing language on my CMS, but it seems that at least one parameter in search doesn't work ?

Im trying to use this code:

 

According to the documentation on the modules, the string submit="some string" should change the text on the submit button.

This doesnt work for me(at www.765.dk) - any ideas ?

Changing the searchtext(the other parameter I'm using) works fine btw.

Thanks in advance
Kenneth

Re: Changing button text in search doesn't seem to work ?

Posted: Thu Apr 05, 2007 6:20 pm
by RonnyK
Using your piece of code, gives me back the wished result.

Try clearing the cache...

Ronny

Re: Changing button text in search doesn't seem to work ?

Posted: Thu Apr 05, 2007 7:47 pm
by Rytter
Hi Ronny,

Thanks for the answer, but it doesn't seem to help.

Could you please go to the site I have, to make sure that this is a problem for you as well, thereby excluding any issues with my pc?

If it works for you, it should say "testtest" in the search field(which also works fine for me), and the button text should be "test" - which still doesn't work for me.

Thanks in advance
Kenneth

Re: Changing button text in search doesn't seem to work ?

Posted: Thu Apr 05, 2007 7:48 pm
by Nullig
I see the testtest text, but not the button text.

You have to change the following text in the language file.

Code: Select all

$lang['searchsubmit'] = 'Submit';
$lang['submit'] = 'Submit';
Nullig

Re: Changing button text in search doesn't seem to work ?

Posted: Thu Apr 05, 2007 7:53 pm
by Rytter
Thanks for that information - anyone have a bid on how to make it work ?

Maybe a workaround ?

Thanks again
Kenneth

Re: Changing button text in search doesn't seem to work ?

Posted: Thu Apr 05, 2007 8:09 pm
by Nullig
In case you don't know, the language file is in the modules/Search/lang directory. As you are not using english, you could change it in the language file in the ext subdirectory as well.

Nullig

Re: Changing button text in search doesn't seem to work ?

Posted: Thu Apr 05, 2007 8:21 pm
by Nullig
Also, if you wish to use an alternate language, you should call the search module like this:

Code: Select all

{search lang="<your language code>"}
Nullig

Re: Changing button text in search doesn't seem to work ?

Posted: Thu Apr 05, 2007 8:51 pm
by calguy1000
a), there's no need to directly modify the lang file, there are other solutions.  module_custom/Search/lang/.php can be used to override lang settings.

b) the 'submit' and 'searchtext' params worked fine for me:

Code: Select all

{search submit='button' searchtext='enter search words here'} worked just fine.

Re: Changing button text in search doesn't seem to work ?

Posted: Fri Apr 06, 2007 6:55 pm
by Rytter
Hi,

Tried pasting your code to make it work(if I had entered something wrong), but still the same problem:

Text in searchbox changes fine, but text on button deosn't change - still says "Submit".

Anyone ?

/Kenneth

Re: Changing button text in search doesn't seem to work ?

Posted: Fri Apr 06, 2007 7:02 pm
by Nullig
Have you cleared your cache?

With all the trouble you're having, I think I'd try changing the Language file...

Look for the following text in the language file:

$lang['searchsubmit'] = 'Submit';
$lang['submit'] = 'Submit';


and change it to whatever you like.

Nullig

Re: Changing button text in search doesn't seem to work ?

Posted: Sat Apr 07, 2007 4:59 pm
by Rytter
Hi,

I tried the langauge file thing, but it also gives me problems.

I tried setting the language using this code

 

I renamed the language file to da_DK(and edited it), but even before that, I tried using the original en_US - editing that didnt help.

It still doesn't work, and I have confirmed it on a PC that never browsed the site before.

Any help would be greatly appreciated :)

I'm close to asking someone to hard code the desired changes into the search module, because I have used way to much time on this problem, and it is really a thorn in my eye !

Rgs
Kenneth

Re: Changing button text in search doesn't seem to work ?

Posted: Sat Apr 07, 2007 5:14 pm
by Nullig
The "da_DK.php" language file is already there, in the ext sub-folder, so you shouldn't have to rename anything.

I'm beginning to wonder if your Search module is just screwed up. What version of CMSMS are you using and what version of the Search module?

You could try to re-upload that module.


Nullig

Re: Changing button text in search doesn't seem to work ?

Posted: Sat Apr 07, 2007 5:18 pm
by RonnyK
Kenneth,

are you sure you change the standard {search} tag in the template, and that that is the template you're using?

Ronny

I tried several possibilities with "Frontend" default languages set, or no default set, but all lead to the parameter being taken. If you're sure the template is the correct one, you might indeed re-install the search module, to make sure that that isn't causing the problem.

Re: Changing button text in search doesn't seem to work ?

Posted: Tue Apr 10, 2007 1:03 pm
by Rytter
Well, I finally made it work - but not the documented way.

I did set the searchtext(blank) by using this code:

{search searchtext=""}

But to change the button text, I found another way that finally worked for me. I opened the search module(extensions/search), selected the search template tab, and changed the code to this:

{$label}: {$inputbox}{$hidden}

This gives me a button with "Søg" on it.

I don't have any idea why the other methods don't work, but at least it works now :)

Thanx for your help
Kenneth