OSDN Git Service

テンプレートのmain位置のスタイルを「none」(Artisteerなし)を選択可能にする。
authornaoki hirata <naoki@magic3.org>
Sat, 11 Jan 2014 11:36:53 +0000 (20:36 +0900)
committernaoki hirata <naoki@magic3.org>
Sat, 11 Jan 2014 11:36:53 +0000 (20:36 +0900)
include/global.php
include/manager/pageManager.php
templates/_admin4/index.php

index 1da4d14..a74e896 100644 (file)
@@ -48,8 +48,8 @@ define('M3_ENCODING', 'UTF-8');       // 内部エンコーディング
 // ########## システム関係 ##########
 // システム基本情報
 define('M3_SYSTEM_NAME',                       'Magic3');              // システム名称
-define('M3_SYSTEM_VERSION',                    '2.7.25');              // システムのバージョン
-define('M3_SYSTEM_RELEASE_DATE',       '2014/1/9');    // システムのリリース日付
+define('M3_SYSTEM_VERSION',                    '2.7.26');              // システムのバージョン
+define('M3_SYSTEM_RELEASE_DATE',       '2014/1/10');   // システムのリリース日付
 define('M3_SYSTEM_ID',                         'M3');                  // コンポーネント識別用ID
 define('M3_SYSTEM_DESCRIPTION',                'Magic3 is open source cms and web communication platform.');           // システムの説明
 define('M3_SYSTEM_MIN_MEMORY',         '16M');                 // 最小メモリ使用量
index b6f383d..ceea9f2 100644 (file)
@@ -1674,7 +1674,7 @@ class PageManager extends Core
                
                if (preg_match_all('#<jdoc:include\ type="([^"]+)" (.*)\/>#iU', $srcBuf, $matches)){
                        $count = count($matches[1]);
-                       for($i = 0; $i < $count; $i++)
+                       for ($i = 0; $i < $count; $i++)
                        {
                                $contents = '';
                                $type  = $matches[1][$i];
@@ -1715,7 +1715,19 @@ class PageManager extends Core
                                                $contents = $this->getContents($name, $style, $templateVer, $attr);
                                        }
                                } else if (strcasecmp($type, 'component') == 0){        // メインポジションタグの場合
-                                       $contents = $this->getContents('main', 'xhtml', $templateVer, $attr);
+                                       // スタイルを取得
+                                       $style = '';            // 表示スタイル
+                                       $params = explode(' ', $matches[2][$i]);
+                                       for ($j = 0; $j < count($params); $j++){
+                                               list($key, $value) = explode('=', $params[$j]);
+                                               if (strcasecmp($key, 'style') == 0){
+                                                       // スタイルは大文字小文字の区別あり
+                                                       $style = trim($value, "\"'");
+                                                       break;
+                                               }
+                                       }
+                                       if ($style != 'none') $style = 'xhtml';
+                                       $contents = $this->getContents('main', $style, $templateVer, $attr);
                                } else if (strcasecmp($type, 'message') == 0){  // メッセージタグの場合
                                }
                                $replace[$i] = $contents;
index a9b7a50..004e523 100644 (file)
@@ -35,11 +35,11 @@ $templateUrl = $document->baseurl . '/templates/' . $document->template;
     <div class="col-lg-3"><jdoc:include type="modules" name="left" style="none" /></div>
 <?php endif; ?>
 <?php if ($document->countModules('left') && $document->countModules('right')): ?>
-    <div class="col-lg-6"><jdoc:include type="component" /></div>
+    <div class="col-lg-6"><jdoc:include type="component" style="none" /></div>
 <?php elseif ($document->countModules('left') || $document->countModules('right')): ?>
-    <div class="col-lg-9"><jdoc:include type="component" /></div>
+    <div class="col-lg-9"><jdoc:include type="component" style="none" /></div>
 <?php else: ?>
-    <jdoc:include type="component" />
+    <jdoc:include type="component" style="none" />
 <?php endif; ?>
 <?php if ($document->countModules('right')): ?>
     <div class="col-lg-3"><jdoc:include type="modules" name="right" style="none" /></div>