1 keljem May 29, 2008 22:08
3 keljem May 30, 2008 00:26
Hi John
Thanks for that, but where do I find that file/page please ?
Cheers
Gary.
4 john May 30, 2008 01:13
Aplogies Gary...
It's in folder blogs->inc->widgets->widgets->coll_search_form.widget.php
5 keljem May 30, 2008 10:09
Thanks John :), I will have a go with that in my brew break.
Just started work for the day :(
Thanks again
Gary
6 keljem May 30, 2008 11:22
Hi John,
I tried moving the code in RED below and put it after the Blue code, but it didn't seem to work.
Any ideas please :)
Thanks
Gary
/**
* Display the widget!
*
* @param array MUST contain at least the basic display params
*/
function display( $params )
{
global $Blog;
$this->init_display( $params );
// Collection search form:
echo $this->disp_params['block_start'];
$this->disp_title( T_('Search') );
form_formstart( $Blog->gen_blogurl(), 'search', 'SearchForm' );
echo '<p>';
$s = get_param( 's' );
echo '<input type="text" name="s" size="25" value="'.htmlspecialchars($s).'" class="SearchField" /><br />';
$sentence = get_param( 'sentence' );
//echo '<input type="radio" name="sentence" value="AND" id="sentAND" '.( $sentence=='AND' ? 'checked="checked" ' : '' ).'/><label for="sentAND">'.T_('All Words').'</label><br />';
//echo '<input type="radio" name="sentence" value="OR" id="sentOR" '.( $sentence=='OR' ? 'checked="checked" ' : '' ).'/><label for="sentOR">'.T_('Some Word').'</label><br />';
//echo '<input type="radio" name="sentence" value="sentence" id="sentence" '.( $sentence=='sentence' ? 'checked="checked" ' : '' ).'/><label for="sentence">'.T_('Entire phrase').'</label>'<br />;
echo '</p>';
echo '<input type="submit" name="submit" class="submit" value="'.T_('Search').'" />';
echo '</form>';
echo $this->disp_params['block_end'];
return true;
}
}
?>
7 sam2kb May 30, 2008 11:45
Change echo '<p>'; to echo '<div style="margin:10px 0">';
and <br />; echo '</p>'; to echo '</div>';
8 keljem May 30, 2008 12:04
Thanks for that,
Here is what I ended up with but it still shows 1 error ?
Any ideas please ;)
Thanks
Gary :)
<?php
/**
* This file implements the xyz Widget class.
*
* This file is part of the evoCore framework - {@link http://evocore.net/}
* See also {@link http://sourceforge.net/projects/evocms/}.
*
* @copyright (c)2003-2008 by Francois PLANQUE - {@link http://fplanque.net/}
*
* {@internal License choice
* - If you have received this file as part of a package, please find the license.txt file in
* the same folder or the closest folder above for complete license terms.
* - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
* then you must choose one of the following licenses before using the file:
* - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
* - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
* }}
*
* @package evocore
*
* {@internal Below is a list of authors who have contributed to design/coding of this file: }}
* @author fplanque: Francois PLANQUE.
*
* @version $Id: _coll_search_form.widget.php,v 1.2.2.1 2008/04/26 22:28:53 fplanque Exp $
*/
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
load_class( 'widgets/model/_widget.class.php' );
/**
* ComponentWidget Class
*
* A ComponentWidget is a displayable entity that can be placed into a Container on a web page.
*
* @package evocore
*/
class coll_search_form_Widget extends ComponentWidget
{
/**
* Constructor
*/
function coll_search_form_Widget( $db_row = NULL )
{
// Call parent constructor:
parent::ComponentWidget( $db_row, 'core', 'coll_search_form' );
}
/**
* Get name of widget
*/
function get_name()
{
return T_('Content Search Form');
}
/**
* Get short description
*/
function get_desc()
{
return T_('Display search form');
}
/**
* Display the widget!
*
* @param array MUST contain at least the basic display params
*/
function display( $params )
{
global $Blog;
$this->init_display( $params );
// Collection search form:
echo $this->disp_params['block_start'];
$this->disp_title( T_('Search') );
form_formstart( $Blog->gen_blogurl(), 'search', 'SearchForm' );
echo '<div style="margin:10px 0">';
$s = get_param( 's' );
echo '<input type="text" name="s" size="25" value="'.htmlspecialchars($s).'" class="SearchField" />';
$sentence = get_param( 'sentence' );
//echo '<input type="radio" name="sentence" value="AND" id="sentAND" '.( $sentence=='AND' ? 'checked="checked" ' : '' ).'/><label for="sentAND">'.T_('All Words').'</label><br />';
//echo '<input type="radio" name="sentence" value="OR" id="sentOR" '.( $sentence=='OR' ? 'checked="checked" ' : '' ).'/><label for="sentOR">'.T_('Some Word').'</label><br />';
//echo '<input type="radio" name="sentence" value="sentence" id="sentence" '.( $sentence=='sentence' ? 'checked="checked" ' : '' ).'/><label for="sentence">'.T_('Entire phrase').'</label>'<br />;
echo '</div>';
echo '<input type="submit" name="submit" class="submit" value="'.T_('Search').'" />';
echo '</form>';
echo $this->disp_params['block_end'];
return true;
}
}
?>
9 sam2kb May 30, 2008 12:16
Ok, here is what I found. You can't put <input> tag inside the <form> tag directly.
So move echo '</div>'; after the last <input> (before the closing </form>). This will remove the space between search field and button, but I think you know how to fix it.
BTW you won't need style="margin:10px 0" since you move the echo '</div>';
10 sam2kb May 30, 2008 12:23
11 keljem May 30, 2008 12:26
sam2kb
Thanks very much, that's got it. Really appreciate your help :)
CSS errors huh ! I will have a play with them over the next day.
Thanks again
Gary
12 sam2kb May 30, 2008 12:45
No problem
13 john May 30, 2008 14:22
Man, I'm glad that's solved :)
14 keljem May 30, 2008 14:23
Yes, Cheers for your help John.
That's a beer each I owe you guys :)
Gz
15 yabba May 30, 2008 19:20
John wrote:
Man, I'm glad that's solved :)
Ditto :roll:
¥
16 keljem May 30, 2008 20:35
Oh don't worry, I am sure I can find something else for you guys to mend in the near future ! What you like with broken washing machines :)
Gz
17 yabba May 30, 2008 20:56
#washing_machine{
position:absolute;
left:unattended;
right:mess;
}
:roll:
¥
18 keljem May 31, 2008 12:04
Roflmao ;)
I wouldn't have a clue how to use one ! I havn't passed my housewifes test yet !
Have fun in the sun.
Gz
19 keljem Jun 01, 2008 19:25
:) CSS validates as well now ;)
Gz
The error is in your Sidebar Seach widget
Try moving the </p> after the <br /> and put it after the </form> and before the </li>