Page 1 of 1

Modifying default search module

Posted: Wed Oct 28, 2009 1:47 pm
by Monkofdoom
Hello, this is my first post here but I've been playing around with CMSMS for a little while... It's now time for me to progress my understanding of it to the further depths.

I have got a clean installation of 1.6.6 with no additional plugins/addons as of yet.

I'm looking to make a small modification to the default search system and how it displays the search box/button etc.

I have gone through the source code and tracked down to Modules -> Search -> Search.module.php and found:

Code: Select all

  {
    return '{$startform}

    <label for="{$search_actionid}searchinput">{$searchprompt}: </label><input type="text" class="search-input" id="{$search_actionid}searchinput" name="{$search_actionid}searchinput" size="20" maxlength="50" value="{$searchtext}" {$hogan}/><input class="search-button" name="submit" value="{$submittext}" type="submit" />
{if isset($hidden)}{$hidden}{/if}

{$endform}';
  }
Now I assumed this was where the input boxes got called out for the page and made some small modifications. However I can see no change on my site. To the extent that when I deleted all the code within the {} it made no difference. Yes I am 100% sure it's be saved to the right place etc.

So am I missing something? Have I edited the wrong file? Or do I need to press a button for CMSMS to pick up the changes I've made?

Thank you for your time and if you have any further questions which will help me solve this problem then please feel free to ask them.

- Monk

Re: Modifying default search module

Posted: Wed Oct 28, 2009 1:51 pm
by RonnyK
Why are you making the changes in the files (that will be overwritten in an upgrade)...

Search is called in the templates attached to a page, and are styled in the stylesheets as you could call search within a div#search f.e.

Ronny

Re: Modifying default search module

Posted: Wed Oct 28, 2009 2:59 pm
by Monkofdoom
Thank you for your response.

I appreciate that the styling / changing can in a lot of cases be done in css etc but this time round I'm just wondering about how to actually make the changes to the root modules. It's not so much a I need to do it as it's obviously not advisable with these kinda systems but it's desire to learn how the system works as I play around.

I assumed editing that file would have an immediate effect on the website but it seems it doesn't, so I'm just trying to find out why. I worded my last post how I did as I wanted to try and explain clearly what I was trying to achieve and not so much why. I apologise for the confusion.

Re: Modifying default search module

Posted: Wed Feb 17, 2010 11:38 pm
by grinpin
same here, I edited search.module.php but with no result

I wanted to change type="submit" to type="image"

RonnyK -> of course you put {search} in template, and of course you can style "search" in css, but you can't change some things there, especially that mentioned above :)

but in the end, there is no need to change anything in the files, just css as you said ;)