diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2006-12-31 11:37:01 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2006-12-31 11:37:01 +0000 |
| commit | 10716b0ddd3f3294a425158d3175673e3851e1b7 (patch) | |
| tree | eae4bcb3649f2f77f7ebf17adf0ae702cb858866 /LibertySystem.php | |
| parent | cf4bd08971a378a6173be50fad78f943b10fc3ea (diff) | |
| download | liberty-10716b0ddd3f3294a425158d3175673e3851e1b7.tar.gz liberty-10716b0ddd3f3294a425158d3175673e3851e1b7.tar.bz2 liberty-10716b0ddd3f3294a425158d3175673e3851e1b7.zip | |
add width and hight to the mix
Diffstat (limited to 'LibertySystem.php')
| -rwxr-xr-x | LibertySystem.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/LibertySystem.php b/LibertySystem.php index 009297e..c905ebd 100755 --- a/LibertySystem.php +++ b/LibertySystem.php @@ -3,7 +3,7 @@ * System class for handling the liberty package * * @package liberty -* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.52 2006/12/26 04:59:39 spiderr Exp $ +* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.53 2006/12/31 11:37:01 squareing Exp $ * @author spider <spider@steelsun.com> */ @@ -685,7 +685,16 @@ function liberty_plugins_div_style( $pParamHash ) { // styling case 'background-color': $key = 'background'; + case 'width': + case 'height': + if( preg_match( "/^\d+(em|px|%|pt)$/", trim( $value ) ) ) { + $ret['style'] .= "{$key}:{$value};"; + } elseif( preg_match( "/^\d+$/", $value ) ) { + $ret['style'] .= "{$key}:{$value}px;"; + } case 'float': + case 'width': + case 'height': case 'padding': case 'margin': case 'background': @@ -696,14 +705,14 @@ function liberty_plugins_div_style( $pParamHash ) { case 'font-size': case 'font-weight': case 'font-family': - $ret['style'] .= "$key:$value;"; + $ret['style'] .= "{$key}:{$value};"; break; // align and float are special case 'align': if( $value == 'center' || $value == 'middle' ) { $ret['style'] .= 'text-align:center;'; } else { - $ret['style'] .= "float:$value;"; + $ret['style'] .= "float:{$value};"; } break; // default just gets re-assigned |
