MN6S6O7T7P8Tu8QmmenuSkRS:S:T;T(;UQfVW=S=X>T>Y?Tu?Z[\ASA]BT8B^_`DSDaETEbFTuFcxdeHSHfITHIgdoctrinehiKSKjLTLkMTuMlmnOSOoPThPpdgeneratqrRSRsSTStTTuTusetsequevwVSVxWTxWyiercolumz{YSY|ZTZ}[Tu[~idgenera]S]^T^nuLangs`S`aTabTubddedclasdSdeT e"YlUgSghThiTuiapnuSkikSklT"lBBGg@nSnoTopTuprSrsT$s 'mmePxisinherixyGuSuvTuvdclassesyzS` z{T{|T'|dgenerat` ~S~TP(tionSWI` STuIyp`QS` TTu` STX-ion W+S` TTuence\Pro` ST80S` TTun'=>1, ` STH2'autogridRowStart'] : null); unset($GLOBALS['PCT_AUTOGRID_DATA_COLLECTOR'][$k]); $objAutoGrid->stop = true; } // Grid presets if($objRow->type == 'autogridGridStart') { $arrGridPreset = $GLOBALS['PCT_AUTOGRID']['GRID_PRESETS'][$objRow->autogrid_grid] ?: array(); // grid preset default values if( empty($objRow->autogrid_tablet) && empty($arrGridPreset) === false ) { $objRow->autogrid_tablet = $GLOBALS['PCT_AUTOGRID']['GRID_PRESETS'][$objRow->autogrid_grid]['grid']['tablet']; } if( empty($objRow->autogrid_mobile) && empty($arrGridPreset) === false ) { $objRow->autogrid_mobile = $GLOBALS['PCT_AUTOGRID']['GRID_PRESETS'][$objRow->autogrid_grid]['grid']['mobile']; } // @var object $objGrid = new \StdClass; $objGrid->config = $arrGridPreset; $objGrid->name = $objRow->autogrid_grid; $objGrid->desktop = $objRow->autogrid_css; $objGrid->tablet = $objRow->autogrid_tablet; $objGrid->mobile = $objRow->autogrid_mobile; if( !empty($arrGridPreset) ) { // compile grid classes if( $objRow->autogrid_css ) { $objGrid->desktop = 'd_'.rtrim(str_replace(array('%',' '), array('_'), $objRow->autogrid_css),'_'); } if( $objGrid->tablet ) { $objGrid->tablet = 't_'.rtrim(str_replace(array('%',' '), array('_'), $objRow->autogrid_tablet),'_'); } if( $objGrid->mobile ) { $objGrid->mobile = 'm_'.rtrim(str_replace(array('%',' '), array('_'), $objRow->autogrid_mobile),'_'); } // add to classes $arrClasses = array_merge($arrClasses, array($objGrid->desktop,$objGrid->tablet,$objGrid->mobile) ); // override AutoGrid vars $objAutoGrid->desktop = $objGrid->desktop; $objAutoGrid->tablet = $objGrid->tablet; $objAutoGrid->mobile = $objGrid->mobile; } // flag as custom grid definition else { $objGrid->isCustomGrid = true; } if( trim($objRow->autogrid_css) != trim($arrGridPreset['grid']['desktop']) ) { $objAutoGrid->hasCustomGrid = true; } // add to AutoGrid object $objAutoGrid->Grid = $objGrid; } else { $arrClasses[] = $objRow->autogrid_css; $arrClasses[] = $objRow->autogrid_tablet; $arrClasses[] = $objRow->autogrid_mobile; } // append more classes $arrClasses = array_merge($arrClasses, array($objRow->autogrid_offset,$objRow->autogrid_align,@$objAutoGrid->align_mobile,$objRow->autogrid_gutter,$objRow->autogrid_class)); // collect styles $arrStyles = array(); // color $arrColor = StringUtil::deserialize($objRow->autogrid_bgcolor) ?: array(); if( empty(array_filter($arrColor)) === false ) { $color = $arrColor[0]; $rgb = array(); //-- @see Contao\StyleSheets::convertHexColor // Try to convert using bitwise operation if (strlen($color) == 6) { $dec = hexdec($color); $rgb['red'] = 0xFF & ($dec >> 0x10); $rgb['green'] = 0xFF & ($dec >> 0x8); $rgb['blue'] = 0xFF & $dec; } // Shorthand notation elseif (strlen($color) == 3) { $rgb['red'] = hexdec(str_repeat(substr($color, 0, 1), 2)); $rgb['green'] = hexdec(str_repeat(substr($color, 1, 1), 2)); $rgb['blue'] = hexdec(str_repeat(substr($color, 2, 1), 2)); } //-- $alpha = '1'; if($arrColor[1]) { $alpha = (int)$arrColor[1] / 100; } $style = 'background-color:rgba('.implode(',', $rgb).','.$alpha.');'; $arrStyles['background-color'] = $style; } // background image if( empty($objRow->autogrid_bgimage) === false ) { $objFile = FilesModel::findByPath($objRow->autogrid_bgimage); if ( (boolean)Validator::isStringUuid($objRow->autogrid_bgimage) === true ) { $objFile = FilesModel::findByUuid($objRow->autogrid_bgimage); } if( $objFile === null && \file_exists(TL_ROOT.'/'.$objRow->autogrid_bgimage) === true ) { $objFile = \Contao\Dbafs::addResource($objRow->autogrid_bgimage); } if( $objFile !== null ) { $style = "background-image:url('".$objFile->path."');"; $arrStyles['background-image'] = $style; // generate an image object $tmp = new \StdClass; // add image to temp object \Contao\Controller::addImageToTemplate( $tmp, array('singleSRC' => $objFile->path) ); $objAutoGrid->Image = $tmp; unset($tmp); } // check if column is empty or not $objNext = null; if( in_array($objRow->ptable, array('tl_article','tl_news','tl_calender_events')) === true || empty($objRow->ptable) === true ) { $objNext = ContentModel::findNextPublished($objRow); } if( in_array($objNext->type, $GLOBALS['PCT_AUTOGRID']['wrapperElements']) === false || $objNext->type == 'autogridRowStart' ) { $objAutoGrid->hasContent = true; } } // background position if($objRow->autogrid_bgposition) { $style = 'background-position:'.$objRow->autogrid_bgposition.';'; $arrStyles['background-position'] = $style; } // background repeat if($objRow->autogrid_bgrepeat) { $style = 'background-repeat:'.$objRow->autogrid_bgrepeat.';'; $arrStyles['background-repeat'] = $style; } // background size if($objRow->autogrid_bgsize) { $style = 'background-size:'.$objRow->autogrid_bgsize.';'; $arrStyles['background-size'] = $style; } // padding if($objRow->autogrid_padding) { $tmp = array_filter( StringUtil::deserialize($objRow->autogrid_padding) ?: array() ); $unit = $tmp['unit'] ?? ''; unset($tmp['unit']); foreach($tmp as $k => $v) { $arrStyles['padding-'.$k] = 'padding-'.$k.':'.$v.$unit.';'; } } // custom styles if($objRow->autogrid_styles) { $arrStyles['custom'] = $objRow->autogrid_styles; } // clean up $arrStyles = array_filter(array_map('trim',$arrStyles)); if(!empty($arrStyles)) { $objAutoGrid->hasStyles = true; $objAutoGrid->styles = $arrStyles; } // compile css classes $objAutoGrid->classes = implode(' ', array_unique( array_filter($arrClasses) ) ); $objTemplate->AutoGrid = $objAutoGrid; return $objTemplate; } } An Error Occurred: Internal Server Error

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.