main_randomImage' */ function main($content,$conf){ // If conf not set byebye if((!$conf["max_width"]) || (!$conf["col_width"]) || (!$conf["max_cols"]) || (!$conf["unity"])){ return; } // Debug Wrapper $debug = '::DEBUG-PHP::'; // Calc col margin $conf["col_margin"] = ( $conf["max_width"] - ( $conf["col_width"] * $conf["max_cols"] ) ) / ( $conf["max_cols"] - 1 ); // Build array $Register $Register = array ( "grid_max_width" => $conf["max_width"], "grid_max_cols" => $conf["max_cols"], "grid_col_width" => $conf["col_width"], "grid_col_margin" => $conf["col_margin"], "grid_unity" => $conf["unity"] ); $debug .= 'Register grid_max_width: '.$conf["max_width"].''; $debug .= 'Register grid_max_cols: '.$Register["grid_max_cols"].''; $debug .= 'Register grid_col_width: '.$Register["grid_col_width"].''; $debug .= 'Register grid_col_margin: '.$Register["grid_col_margin"].''; $debug .= 'Register grid_cols: '.$Register["grid_cols"].''; // If unity is percentage recalc col width and margin of 1 item if($conf["unity"]=='%'){ $Register["grid_col_width"] = $conf["col_width"] / $conf["max_width"] * 100; $Register["grid_col_margin"] = $conf["col_margin"] / $conf["max_width"] * 100; } // Build comma/semicolon separated list for($i=1; $i<=$conf["max_cols"]; $i++){ // Col 1 (no margin) if($i==1){ $Register["grid_cols"] = ("span_" . $i) . "," . ($Register["grid_col_width"] * $i) . ";"; $debug .= 'ohne: '.$i.''; // Col 2 to max cols (with margin) }else if(($i>1) && ($i<$Register["grid_max_cols"])){ $Register["grid_cols"] .= ("span_" . $i) . "," . ($Register["grid_col_width"] * $i + ( $Register["grid_col_margin"] * ($i-1) )) . ";"; $debug .= 'mit: '.$i.''; // Last col (100%) }else if($i==$Register["grid_max_cols"]){ $Register["grid_cols"] .= ("span_" . $i) . ",100"; $debug .= 'last: '.$i.''; } $debug .= ''.$Register["grid_cols"].': '.$i.''; } // Register $this->l_cObj = t3lib_div::makeInstance('tslib_cObj'); $this->l_cObj->LOAD_REGISTER($Register,''); // Output if($conf["debug"]==1){ $content = ''.$debug.'
'; } return $content; } } ?> Rund um den Hund | PHYSIOTHERAPIE 4 DOGS by Silke Völlnagel & natürlich Paul

Jede

Menge

Interessantes