Обновлена логика центральных блоков: теперь поддерживается несколько блоков
This commit is contained in:
@@ -307,17 +307,6 @@ function GetBlock ($BlockVar, $side) {
|
||||
}
|
||||
}
|
||||
return $Block;
|
||||
|
||||
// $Block.='<div class="'.$BlockVar[$i]['bclass'].'"><div class="bcont">ku ku</div></div>';
|
||||
/*is_countable($$BlockVar) && count($BlockVar)
|
||||
$Block = "";
|
||||
if (is_countable($$BlockVar) && count($BlockVar) > 0){
|
||||
$Block = "true";
|
||||
}
|
||||
else{
|
||||
$Block = "false";
|
||||
}
|
||||
$Block = count($BlockVar);*/
|
||||
}
|
||||
|
||||
|
||||
@@ -769,14 +758,14 @@ if ($RURLstr!='error'){
|
||||
function loadPluginsInCenterBlock() {
|
||||
global $_SESSION, $path, $config;
|
||||
if ($_SESSION['Login'] == 'true') {
|
||||
$availablePlugins = ['dgrm', 'SvgEditorM'];
|
||||
$availablePlugins = ['dgrm', 'SvgEditorM', 'form_editor'];
|
||||
$pluginDir = $path . 'main_plugin/';
|
||||
if (is_dir($pluginDir)) {
|
||||
$dirs = array_diff(scandir($pluginDir), ['.', '..']);
|
||||
foreach ($dirs as $dir) {
|
||||
if (is_dir($pluginDir . $dir)) {
|
||||
if (!in_array($dir, $availablePlugins) || strpos($config['page_plugins'] ?? '', $dir) !== false) {
|
||||
if ($dir === 'SvgEditorM' || $dir === 'dgrm') {
|
||||
if ($dir === 'SvgEditorM' || $dir === 'dgrm' || $dir === 'form_editor') {
|
||||
$html .= includePlugin(['plugin' => $dir]);
|
||||
}
|
||||
}
|
||||
@@ -784,7 +773,6 @@ function loadPluginsInCenterBlock() {
|
||||
}
|
||||
}
|
||||
}
|
||||
$html .= includePlugin(['plugin' => 'form_editor']);
|
||||
return $html;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user