Custom label text for search
Posted: Sat Dec 29, 2007 4:49 pm
Hi,
I'm total newbie in CMS Made Simple and I am not keen PHP programmer, but I tried hack Search module and now I'm able to pass my own label text for the search field.
I added to Search.module.php two lines:
And slightly modified action.default.php file:
Total shock! It works!
Unfortunetly if post on my template something like this:, tags are not parsed.
Is there any easy way to fix it?
I'm total newbie in CMS Made Simple and I am not keen PHP programmer, but I tried hack Search module and now I'm able to pass my own label text for the search field.
I added to Search.module.php two lines:
Code: Select all
$this->CreateParameter('labeltext', 'null', 'Label for search field');
$this->SetParameterType('labeltext', CLEAN_STRING);
Code: Select all
$labeltext = (isset($params['labeltext'])) ? $params['labeltext'] : $this->Lang('search');
$this->smarty->assign('label', '<label for="'.$id.'searchinput">'.$labeltext.'</label>');
Unfortunetly if post on my template something like this:
Code: Select all
{search labeltext='Search in <span class="site_title">My<span>service</span></span>
Is there any easy way to fix it?