From ca39d31f0ec4ab874de5e8366e84466d28079280 Mon Sep 17 00:00:00 2001 From: mattpass Date: Tue, 6 Oct 2020 14:12:51 +0100 Subject: [PATCH] Tidy, no space after v, less PHP, nicer system display, remove old game DIV container --- editor.php | 109 +++++++++++++++++++++++++---------------------------- 1 file changed, 52 insertions(+), 57 deletions(-) diff --git a/editor.php b/editor.php index c643b5d..5586315 100644 --- a/editor.php +++ b/editor.php @@ -5,9 +5,9 @@ $t = $text['editor']; ?> - + -ICEcoder v <?php echo $ICEcoder["versionNo"];?> editor +ICEcoder v<?php echo $ICEcoder["versionNo"];?> editor @@ -15,31 +15,26 @@ $t = $text['editor']; '; -}; +$pluginFiles = [ + "jshint/jshint-2.5.6.min.js", + "emmet/emmet.min.js", + "pesticide/pesticide.js", + "stats.js/stats.min.js", + "responsive-helper/responsive-helper.js" +]; -if (true === file_exists(dirname(__FILE__)."/plugins/emmet/emmet.min.js")) { - echo ''; -}; - -if (true === file_exists(dirname(__FILE__)."/plugins/pesticide/pesticide.js")) { - echo ''; -}; - -if (true === file_exists(dirname(__FILE__)."/plugins/stats.js/stats.min.js")) { - echo ''; -}; - -if (true === file_exists(dirname(__FILE__)."/plugins/responsive-helper/responsive-helper.js")) { - echo ''; -};?> +for ($i = 0; $i < count($pluginFiles); $i++) { + if (true === file_exists(dirname(__FILE__) . "/plugins/" . $pluginFiles[$i])) { + echo '' . PHP_EOL; + } +} +?> @@ -102,12 +99,12 @@ h2 {color: rgba(0,198,255,0.7)}
-
+





-

+




-
+


-
    ' . $t['none'] . '

'; } else { @@ -142,8 +139,8 @@ h2 {color: rgba(0,198,255,0.7)} // Get extension (prefix 'ext-' to prevent invalid classes from extensions that begin with numbers) $ext = "ext-" . pathinfo($docRoot . $iceRoot . $fileFolderName, PATHINFO_EXTENSION); echo '
  • '; - echo ''; - echo str_replace($docRoot, "", str_replace("|", "/", $ICEcoder["last10Files"][$i])); + echo ''; + echo preg_replace("/^\//", "", str_replace($docRoot, "", str_replace("|", "/", $ICEcoder["last10Files"][$i]))); echo '
  • '; if ($i > 0) { echo PHP_EOL; @@ -164,9 +161,9 @@ h2 {color: rgba(0,198,255,0.7)}
    - -