Column Action

See Also
  • tbd
NOT Included in any Wikka version yet
Last edited by OnegWR:
Modified links pointing to docs server
Mon, 28 Jan 2008 00:11 UTC [diff]

What

Use
{{col class="floatr"}}This is the same as putting the text in >> tags{{col}}
{{col left="DIV"}}{{col left="33"}}First column{{col}}{{col left="34"}}Middle column{{col}}{{col left="33"}}Last column{{col}}{{col}}

Parameters
nametyperequired?defaultdescription
idstringoptionalemptyDefine the id of this column.
classstringoptionalemptyDefine the class of this column.
left(pos) integeroptionalemptyWidth + left alignment
right(pos) integeroptionalemptyWidth + right alignment


Features

Installation

Code
<?php
// Col - print <DIV> columns
// by OnegWR, may 2005, License GPL
$col_id=$col_class=$col_left=$col_right="";
if(is_array($vars) AND $vars <> array() ){
    if(isset($vars['id'])){
        $col_id = preg_replace("%[^A-Za-z0-9]%", "", $vars['id']);
        if( $col_id <> '' ){ $col_id = " id=\"$col_id\""; }
    }
    if(isset($vars['class'])){
        $col_class = preg_replace("%[^A-Za-z0-9]%", "", $vars['class']);
        if( $col_class <> '' ){ $col_class = " class=\"$col_class\""; }
    }
    if(($col_id=='') AND ($col_class=='')){
        if(isset($vars['left'])){
            $col_left = preg_replace("%[^0-9]%", "", $vars['left']);
            if( $col_left <> '' ){
                $col_left>100 ? $col_left=" style=\"width: $col_left; float: left;\"" : $col_left=" style=\"width: $col_left%; float: left;\"";
            }
        }elseif(isset($vars['right'])){
            $col_right = preg_replace("%[^0-9]%", "", $vars['right']);
            if( $col_right <> '' ){
                $col_right>100 ? $col_left=" style=\"width: $col_right; float: right;\"" : $col_right=" style=\"width: $col_right%; float: right
;\""
;
            }
        }
    }
    print "<div". $col_id.$col_class.$col_left.$col_right .">";
}else{
    print "</div>";
}
?>

Demo
First column
Middle column
Last column


History

To Do


CategoryUserContributions
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki