Search Module "maxlength"

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
N4ndee
Joomla! Apprentice
Joomla! Apprentice
Posts: 49
Joined: Sun Nov 04, 2012 3:21 pm

Search Module "maxlength"

Post by N4ndee » Sat Nov 17, 2012 7:38 pm

I'd like to increase the "maxlength" attribute of the default search module's input. In the tmpl/default.php file the value of the "maxlength" attribute refers to "'.$maxlength.'". Could anybody tell me where can I edit this value? Thanks.

 
User avatar
cheetooh
Joomla! Explorer
Joomla! Explorer
Posts: 259
Joined: Tue Sep 19, 2006 10:51 am
Location: Malaysia
Contact:

Re: Search Module "maxlength"

Post by cheetooh » Sun Nov 18, 2012 4:18 am

the value is from the mod_search.php file in modules/mod_search. currently, the value is limited to 20 because it is controlled by language.
"Whether you're a programmer or a seamstress, it's all about new techniques, simplifying old techniques, and consolidating steps. Making things go faster -- but not worse. Better."
— Martha Stewart for Wired

N4ndee
Joomla! Apprentice
Joomla! Apprentice
Posts: 49
Joined: Sun Nov 04, 2012 3:21 pm

Re: Search Module "maxlength"

Post by N4ndee » Sun Nov 18, 2012 12:46 pm

Thank you for your reply. I also saw it in that file that "$maxlength" equals to "$upper_limit;", and upper limit equals to "$lang->getUpperLimitSearchWord();". What does it mean that it is controlled by language?

User avatar
cheetooh
Joomla! Explorer
Joomla! Explorer
Posts: 259
Joined: Tue Sep 19, 2006 10:51 am
Location: Malaysia
Contact:

Re: Search Module "maxlength"

Post by cheetooh » Sun Nov 18, 2012 3:13 pm

you may take a look in the file language/en-GB/en-GB.localise.php and en-GB is for English language
"Whether you're a programmer or a seamstress, it's all about new techniques, simplifying old techniques, and consolidating steps. Making things go faster -- but not worse. Better."
— Martha Stewart for Wired

N4ndee
Joomla! Apprentice
Joomla! Apprentice
Posts: 49
Joined: Sun Nov 04, 2012 3:21 pm

Re: Search Module "maxlength"

Post by N4ndee » Sun Nov 18, 2012 6:19 pm

Yes, it's in that file (language/hu-HU/hu-HU.localise.php for my language). Thank you for your help!

User avatar
cheetooh
Joomla! Explorer
Joomla! Explorer
Posts: 259
Joined: Tue Sep 19, 2006 10:51 am
Location: Malaysia
Contact:

Re: Search Module "maxlength"

Post by cheetooh » Mon Nov 19, 2012 3:32 am

you are most welcome. do take note that the language file that you changed might get overwritten if you update your Joomla.
"Whether you're a programmer or a seamstress, it's all about new techniques, simplifying old techniques, and consolidating steps. Making things go faster -- but not worse. Better."
— Martha Stewart for Wired

N4ndee
Joomla! Apprentice
Joomla! Apprentice
Posts: 49
Joined: Sun Nov 04, 2012 3:21 pm

Re: Search Module "maxlength"

Post by N4ndee » Mon Nov 19, 2012 4:16 pm

That is why I write the changes I make in a log txt file.

WillAllon
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat Dec 22, 2012 6:00 pm

Re: Search Module "maxlength"

Post by WillAllon » Sat Dec 22, 2012 6:16 pm

Hello, i'm new to these forums and I hope i'm not breaking a rule asking this question in someone else's thread.

I seem to have a problem with the width of the search box (where you imput the text), any idea how i change the width of the search box so that it actually fits in the search module?
You do not have the required permissions to view the files attached to this post.

sovainfo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8808
Joined: Sat Oct 01, 2011 7:06 pm

Re: Search Module "maxlength"

Post by sovainfo » Sat Dec 22, 2012 9:02 pm

Try changing the input size at basic options box width on the search module.
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!

WillAllon
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat Dec 22, 2012 6:00 pm

Re: Search Module "maxlength"

Post by WillAllon » Sat Dec 22, 2012 9:50 pm

Hi, ty for your reply, i tried putting : 10, 50, 75, 50%, 80% into the box width size but it always stayed the same :s.

sovainfo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8808
Joined: Sat Oct 01, 2011 7:06 pm

Re: Search Module "maxlength"

Post by sovainfo » Sat Dec 22, 2012 11:56 pm

That is because the width is set by default to 210px. See template.css line 773:

Code: Select all

input, textarea {
    width: 210px;
}
You need to override it somewhere!
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!

munyiva
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Apr 09, 2015 10:25 am

Re: Search Module "maxlength"

Post by munyiva » Tue Sep 15, 2015 7:08 am

Thanks a lot

 

Locked

Return to “Extensions for Joomla! 3.x”