From a1e66fa1054fb0fe09fe4e2f4545b383768f7863 Mon Sep 17 00:00:00 2001 From: yamamoto Date: Tue, 25 Mar 2014 17:01:21 +0900 Subject: [PATCH 1/4] Not allow direct access --- assets/plugins/managermanager/default.mm_rules.inc.php | 4 +--- assets/plugins/managermanager/example.mm_rules.inc.php | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/plugins/managermanager/default.mm_rules.inc.php b/assets/plugins/managermanager/default.mm_rules.inc.php index d8edc7a..a60e104 100644 --- a/assets/plugins/managermanager/default.mm_rules.inc.php +++ b/assets/plugins/managermanager/default.mm_rules.inc.php @@ -1,4 +1,5 @@ \ No newline at end of file diff --git a/assets/plugins/managermanager/example.mm_rules.inc.php b/assets/plugins/managermanager/example.mm_rules.inc.php index b9da60a..e37951c 100644 --- a/assets/plugins/managermanager/example.mm_rules.inc.php +++ b/assets/plugins/managermanager/example.mm_rules.inc.php @@ -1,4 +1,5 @@ Date: Tue, 25 Mar 2014 17:02:03 +0900 Subject: [PATCH 2/4] For custom_tv --- assets/plugins/managermanager/mm.inc.php | 28 ++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/assets/plugins/managermanager/mm.inc.php b/assets/plugins/managermanager/mm.inc.php index 7361163..2d95bc1 100644 --- a/assets/plugins/managermanager/mm.inc.php +++ b/assets/plugins/managermanager/mm.inc.php @@ -115,7 +115,7 @@ ); // Add in TVs to the list of available fields -$all_tvs = $modx->db->makeArray($modx->db->select('name,type,id', $modx->db->config['table_prefix'].'site_tmplvars', '', 'name ASC')); +$all_tvs = $modx->db->makeArray($modx->db->select('name,type,id,elements', $modx->getFullTableName('site_tmplvars'), '', 'name ASC')); foreach ($all_tvs as $thisTv){ // What is the field name? $n = $thisTv['name']; @@ -129,7 +129,6 @@ case 'rawtextarea': case 'textareamini': case 'richtext': - case 'custom_tv': $t = 'textarea'; break; @@ -148,6 +147,31 @@ $fieldname_suffix = '[]'; break; + case 'custom_tv': + if(strpos($thisTv['elements'],'tvtype="text"')!==false) + $t = 'input'; + elseif(strpos($thisTv['elements'],'tvtype="textarea"')!==false) + $t = 'textarea'; + elseif(strpos($thisTv['elements'],'tvtype="select"')!==false) + $t = 'select'; + elseif(strpos($thisTv['elements'],'tvtype="checkbox"')!==false) + { + $t = 'input'; + $fieldname_suffix = '[]'; + } + elseif(strpos($thisTv['elements'],' Date: Tue, 25 Mar 2014 17:03:16 +0900 Subject: [PATCH 3/4] mm_widget_accessdenied - Fix image path issue in css --- .../managermanager/widgets/accessdenied/accessdenied.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/plugins/managermanager/widgets/accessdenied/accessdenied.css b/assets/plugins/managermanager/widgets/accessdenied/accessdenied.css index 7ad16ee..c3ca44e 100644 --- a/assets/plugins/managermanager/widgets/accessdenied/accessdenied.css +++ b/assets/plugins/managermanager/widgets/accessdenied/accessdenied.css @@ -11,7 +11,7 @@ width: 320px; padding: 40px 20px 40px 100px; border: 6px solid #AAA; - background: #FFF url(/assets/plugins/managermanager/widgets/accessdenied/alert.png) no-repeat 15px; + background: #FFF url(alert.png) no-repeat 15px; } #amessage SPAN{ From dd94e2f2a9ca484da922940c2b2437ac39fdeaee Mon Sep 17 00:00:00 2001 From: yamamoto Date: Tue, 25 Mar 2014 17:03:33 +0900 Subject: [PATCH 4/4] Light weight image file --- .../widgets/accessdenied/alert.png | Bin 5396 -> 1509 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/plugins/managermanager/widgets/accessdenied/alert.png b/assets/plugins/managermanager/widgets/accessdenied/alert.png index b5ff15af9a546f6c80588bc6ff3be7d52323da37..46d7c7a1b64ce9cce1a202e50559947bfb2c7fad 100644 GIT binary patch literal 1509 zcmZ8gc{J2p9RE=hCi9q%dXdNEy$;Hj@luvZL*r!`jBt))nKY%zHY3cVng$_cqSR!G zMA5=Y+D6%u>J2IpF~*#1g_0#AzVE8uKkuG%zsu+Qz2Ez}-+ONg&1Dw>uYt!fjNn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