Friday, May 14, 2010

CSS Rounded Corers with Jquery

http://www.w3.org/TR/html4/strict.dtd">

Rounded!


CSS round Corners -2

====
div.box { overflow:hidden} /* IE font-size fix */
/* MIDDLE */
div.box.body div.box.right {
background-image:url(m_r.png); background-position: right; background-repeat: repeat-y;
}
div.box.body div.box.left {
background-image:url(m_l.png); background-position: left; background-repeat: repeat-y;
}
div.box.body div.box.center {
background-image:url(m_c.png); margin-left: 12px; margin-right: 12px;
}

/* TOP */
div.box.head div.box.right {
background-image:url(t_r.png); background-position: top right; background-repeat: no-repeat; height:12px;
}
div.box.head div.box.left {
background-image:url(t_l.png); background-position: top left; background-repeat: no-repeat; height:12px;
}
div.box.head div.box.center {
background-image:url(t_c.png); height:12px; margin-left: 12px; margin-right: 12px;
}

/* BOTTOM */
div.box.foot div.box.right {
background-image:url(b_r.png); background-position: right bottom; background-repeat: no-repeat; height:12px;
}
div.box.foot div.box.left {
background-image:url(b_l.png); background-position: left bottom; background-repeat: no-repeat; height:12px;
}
div.box.foot div.box.center {
background-image:url(b_c.png); margin-left: 12px; margin-right: 12px; height:12px;
}


===================












TEXT












==============

CSS Round Corners

http://snipplr.com/view/830/css-rounded-corners/
CSS
/* set millions of background images */
.rbroundbox { background: url(nt.gif) repeat; }
.rbtop div { background: url(tl.gif) no-repeat top left; }
.rbtop { background: url(tr.gif) no-repeat top right; }
.rbbot div { background: url(bl.gif) no-repeat bottom left; }
.rbbot { background: url(br.gif) no-repeat bottom right; }

/* height and width stuff, width not really nessisary. */
.rbtop div, .rbtop, .rbbot div, .rbbot {
width: 100%;
height: 7px;
font-size: 1px;
}
.rbcontent { margin: 0 7px; }
.rbroundbox { width: 50%; margin: 1em auto; }







Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Duis
ornare ultricies libero. Donec
fringilla, eros at dapibus fermentum,
tellus tellus auctor erat, vitae porta
magna libero sed libero. Mauris sed leo.
Aliquam aliquam. Maecenas vestibulum.




php codes

Remove whitespace from a text string using the PHP trim function
Description
If you use a form on your site then you'll know that user input can often have white space before or after the text as the person filling in the form field sometimes accidentally adds spaces. This handy function will remove the whitespace from the beginning or end of the string.
The code

====================================================================
class MySQLDB{ /* Class constructor */ function MySQLDB()
{
$this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error()); mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());
}
function query($query)
{
return mysql_query($query, $this->connection);
}
};
$database = new MySQLDB;
$result = $database->query($query);
$num_rows = mysql_num_rows($result);
$post_title = mysql_result($result,0,"title");
================================================================
get defined variables
echo "
";print_r(get_defined_vars());echo "
";

========================================
1) Add this to the top of header.php

2) Add this to the functions.php page
(omit tags if they already exist)
global $bp;
if (bp_is_register_page() bp_is_activation_page())
return;
if(!bp_is_blog_page() && !is_user_logged_in())
{
bp_core_redirect( $bp->root_domain .'/'. BP_REGISTER_SLUG );
}
}
add_action( 'walled_garden', 'sh_walled_garden' );

?>