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

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
Rytter

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

Post 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
Last edited by Rytter on Tue Apr 10, 2007 1:03 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

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

Post by RonnyK »

Using your piece of code, gives me back the wished result.

Try clearing the cache...

Ronny
Rytter

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

Post 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
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

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

Post 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
Last edited by Nullig on Thu Apr 05, 2007 7:57 pm, edited 1 time in total.
Rytter

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

Post by Rytter »

Thanks for that information - anyone have a bid on how to make it work ?

Maybe a workaround ?

Thanks again
Kenneth
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

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

Post 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
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

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

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

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

Post 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.
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.
Rytter

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

Post 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
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

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

Post 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
Last edited by Nullig on Fri Apr 06, 2007 9:29 pm, edited 1 time in total.
Rytter

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

Post 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
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

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

Post 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
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

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

Post 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.
Rytter

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

Post 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
Locked

Return to “Layout and Design (CSS & HTML)”