Configurable search block

Re: Configurable search block

by Jan Dierckx -
Number of replies: 0

After some experimenting, I can think of the following solutions:

  1. if you really want to be very creative you can use the HTML block and add your own form / form fields and a submit button. Then you can add colours / images / ... exactly where you want them. (But ... this requires good knowledge of html and forms. I wrote the block to easily add a search engine to a course without having to know all this stuff)

  2. Right now you can enter the name of the search engine in a simple textfield. I thought about replacing this with Moodle's HTML Editor. That way you could add colours / images / etc... The database for the block already contains two extra fields to enable use of the HTML editor. However, I wanted to use them for adding an extra description to each search engine.

  3. Adding a unique id to every search engine. That way you can use CSS to customize the look of each button. That way you can keep it simple (use the base class for the button) or make it as difficult as you want: add images to the background / use colours / etc... The same idea is used in the glossary filter.

I think solution 3 is the most flexible. I have not implemented this because I don't know much about CSS. In fact I have just copied the homelink class to make the 'fake button' and I have shamelessly copied the configuration table from the newsfeed block. (that's why the top border is missing blush)

Would adding the extra class solve your request? If so, is there any chance of helping me out with the CSS involved? I would be glad to include the changes in a next version.