Recent Topics

1 Dec 18, 2008 08:32    

In some earlier version, one could find the search form and change it... Now, one can turn off the radio buttons in admin, and style the INPUT BOX ONLY in style.css. I see (from reading View Source) that the title is decreed SOMEWHERE to be controlled by h3, which also styles post titles, but I'm not finding where.

What I'd like to do is put the search form into the menu bar, over on the right (almost like a do-it-yourself menu item!). I imagine the "search" title styled like the other blog titles, and followed simply by an input field. (Return or the word SEARCH could serve as button.)

Does anybody know how to do this?

2 Dec 18, 2008 09:22

Here's how I edited the searchform widget to give a simple inline search form...

Simply load the widget into your preferred container and style to suit.

Hope it's of some help.

Goto blogs->inc->widgets->widgets and edit _coll_search_form.widget.php

// Collection search form:
		echo $this->disp_params['block_start'];

		// $this->disp_title( T_('Search') );:

		form_formstart( $Blog->gen_blogurl(), 'search', 'SearchForm' );
		$s = get_param( 's' );
		 echo '<p>';
           // echo '<label for="s" title="Search my site">Search:</label>';:
           // echo '<p>';:
           echo '<label for="s" title="Search my site">Search: </label><input type="text" id="s" title="Type your Search words here." name="s" size="25" value="'.htmlspecialchars($s).'" class="SearchField" /><input type="submit" name="submit" class="submit" value="'.T_('GO!').'" />';
		// echo '</p>';:
		// echo '<p>';:
           // echo '<input type="submit" name="submit" class="submit" value="'.T_('GO!').'" />';:
		echo '</p>';
           echo '</form>';

		echo $this->disp_params['block_end'];

and related CSS

.widget_core_coll_search_form {
	display: inline;
	text-align: center;
	padding: 0;
	color: #bb9;
	font-size: 90%;
	margin: 0 27px;
}
input.submit,
input.preview,
input.reset {
	background-color: #fff;
	color: #663;
	border: 1px solid #dd9;
	font-weight: normal;
	padding: 1px;
	margin: 0;
}

input.submit:hover,
input.preview:hover {
	color: #d95;
}

input.SearchField {
	color: #663;
	background-color: #fff;
	border: 1px solid #dd9;
	padding: 3px;
	width: 130px;
	margin-top: 0;
	margin-right: 3px;
}
.search p {
	padding-bottom: 6px;
	margin: 6px 27px;
	border-bottom: 1px solid #dd9;
}

3 Dec 18, 2008 21:45

I will be interest in a demo ;-)

5 Dec 19, 2008 03:45

Well, OK, here's what's happened so far.

With the search widget installed in the menu container, the blog displayed a search window over on the left, UNDER my menu items (blog titles), with a button labelled "search" underneath it--taking up a lot of valuable real estate, imho.

(1) In style.css I pasted in the css code John provided, adapting to the look I wanted. No change. Set the colors to outrageous colors (#f00 etc)--clearly not reading text or background color from this code.

(2) In inc>widgets>widgets>_coll_search_form.widget.php, I found the code section. I commented out that whole section and pasted in John's whole section.
RESULTS at last, sort of: This did put the search widget elements on the same line. Hooray! It added the word "Search:" (but, like the menu, something is overriding my attempts to style all caps). From left to right, it "reads" Search: [search window here], then an annoying little button labelled "Go." Still not picking up my "test" colors.

(3) Commenting out the lines in style.css produces NO CHANGES at all.

Stay tuned....

6 Dec 19, 2008 05:54

Martha, do you have a link to your site?

7 Dec 19, 2008 06:09

It's at http://www.mcgmquakers.org/?blog=1. It still has the sample posts, etc--I've been trying to get the skin & functionality to work. If I can, I'd use b2evo for this and another project, both imagined to use several blogs and assorted static pages each.

Since I posted, I worked on it a little more: I returned to the original text in the widget php file, with the "Go!" text (button) replaced by SEARCH. (I've done a bit of css, but I'm just guessing in the dark when it comes to php.) In style.css, I have statements parallel to your suggested code. I also tried styling for .submit, since the php seems to assign a class of submit. ALL of that css is currently up (not commented out at present) and includes primary colors for background and text, as a test.

My conclusion is that this stuff is getting styled somewhere that I can't find.

What I want is the menu line: MCGM HOME | MEETINGS | WHATEVER aligned left, and the search box and a search "button" *I* can style aligned right ON THE SAME LINE.

THEN it occurred to me: is there any hope that this search box will search across all the blogs of each of these imagined projects? Because one that won't is mighty little good, even deceptive.... Maybe I just need a blog or two on an integrated site after all!!!

8 Dec 19, 2008 06:50

Your Search set up needs to be wrapped in the list that holds your other menu items

<li class="selected"><a href="http://www.mcgmquakers.org/blog1.php" class="selected" title="METROPOLITAN CHICAGO GENERAL MEETING">MCGM HOME</a></li><li><a href="http://www.mcgmquakers.org/blog2.php" class="default" title="MCGM AREA MEETINGS">MEETINGS</a></li><li><a href="http://www.mcgmquakers.org/blog4.php" class="default" title="PHOTOS">PHOTOS</a></li><li><a href="http://www.mcgmquakers.org/blog5.php" class="default" title="EVENTS">EVENTS</a></li><form action="http://www.mcgmquakers.org/blog1.php" method="get" class="search"><p><input type="text" name="s" size="25" value="" class="SearchField" /></p><input type="submit" name="submit" class="submit" value=" SEARCH " /></form>	</ul>


After EVENTS</a>there is a </li>So, you need to incorporate the whole Search set up with the list code as well.
So try editing your code so it's something like....

<li><form action="http://www.mcgmquakers.org/blog1.php" method="get" class="search"><input type="text" name="s" size="25" value="" class="SearchField" /><input type="submit" name="submit" class="submit" value=" SEARCH " /></form></li></ul>


Form is loading...