Ken wrote: I've created a custom Google search for our sites, and would like to add the code for it to our sidebar... HTML is:
<!-- Google CSE Search Box Begins --> <form id="searchbox_008347340077112958749:8vjvepxyuvu" action="http://google.com/cse"> <input type="hidden" name="cx" value="008347340077112958749:8vjvepxyuvu" /> <input type="hidden" name="cof" value="FORID:0" /> <input name="q" type="text" size="40" /> <input type="submit" name="sa" value="Search" /> </form> <script type="text/javascript" src="http://google.com/coop/cse/brand?form=searchbox_008347340077112958749%3A8vjvepxyuvu"></script> <!-- Google CSE Search Box Ends -->
Any idea how to do this?
Rob wrote: Inject the HTML into the skin template file; for MonoBook, this is skins/monobook.php
Peter Blaise responds: Wow, great ideas and examples. On MediaWiki.org, we've been exploring the same, and I found this (below) lost in an install file which explains a bit about my struggle getting article "menus" into the navigation/sidebar (edit mediawiki:sidebar):
-- http://www.mediawiki.org/wiki/Project:Support_desk#mediawiki:sidebar_colorin...
Note: ...\medaiwiki\maintenance\language\messages.txt DOES have some interesting information regarding the "sidebar" feature:
'sidebar' => "The sidebar for MonoBook is generated from this message, lines that do not begin with * or ** are discarded, furthermore lines that do begin with ** and do not contain | are also discarded, but don't depend on this behaviour for future releases. Also note that since each list value is wrapped in a unique XHTML id it should only appear once and include characters that are legal XHTML id names.",
Cool! This information saves my much time in trying to rebuild "navigation/sidebar" as a table of contents. The sidebar's not looking for pages addresses, it's looking for XHTML id names! ... now to find a table of contents/index on MediaWiki XHTML id names ... --
I'm lookin' at skins/monobook.php and without a map, I guess it's just a matter of searching for "sidebar", pluging in the HTML and seeing what happens, then move it around and see what happens again, right?
Ken, let us know how it goes. Thanks for the pointer, Rob.
-- Peter Blaise
mediawiki-l@lists.wikimedia.org