Rewritten all THEME_FOO variables to GLOBALS
authorRoland Häder <roland@mxchange.org>
Thu, 12 Mar 2009 17:34:03 +0000 (17:34 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 12 Mar 2009 17:34:03 +0000 (17:34 +0000)
.gitattributes
inc/libs/theme_functions.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-theme_import.php
inc/modules/member/what-themes.php
templates/de/html/admin/admin_new_ext.tpl [deleted file]
theme/business/theme.php
theme/default/theme.php
theme/desert/theme.php

index d13df1113fdf123f5d2ef201a998419a99783060..078ba80c1a9720f57ff34a8279ae1716bac35c2d 100644 (file)
@@ -1119,7 +1119,6 @@ templates/de/html/admin/admin_mods_stats.tpl -text
 templates/de/html/admin/admin_mods_stats2.tpl -text
 templates/de/html/admin/admin_mods_stats2_row.tpl -text
 templates/de/html/admin/admin_mods_stats_row.tpl -text
-templates/de/html/admin/admin_new_ext.tpl -text
 templates/de/html/admin/admin_newsletter.tpl -text
 templates/de/html/admin/admin_newsletter_nohtml.tpl -text
 templates/de/html/admin/admin_newsletter_tsk.tpl -text
index 766ca009a9a5db752191a7208ab8497a56535109..640dd0b1f3be961dbb33a192acc9fce490a73659 100644 (file)
@@ -63,7 +63,7 @@ function THEME_SELECTION_BOX ($mod, $act, $wht, $result) {
                        // And save all data in array
                        LOAD_INC($INC);
                        $themesArray['theme_unix'][] = $content['theme_path'];
-                       $themesArray['theme_name'][] = $THEME_NAME;
+                       $themesArray['theme_name'][] = $GLOBALS['theme_data']['name'];
                } // END - if
        } // END - while
 
index ae1e64d4d6059851565892e24c3e541cdb2a50c4..1aab5bbd916219c730a7c70f3da8fd842730fcbb 100644 (file)
@@ -98,7 +98,7 @@ if ($SEL > 0) {
 }
 
 // Switch to testing mode
-$THEME_MODE = "test";
+$GLOBALS['theme_mode'] = "test";
 
 // Generate output lines for the template
 $OUT = ""; $SW = 2;
@@ -123,9 +123,9 @@ if (SQL_NUMROWS($result) > 0) {
                        'link'      => $LINK,
                        'name'      => $content['theme_name'],
                        'is_act'    => TRANSLATE_YESNO($content['theme_active']),
-                       'email'     => "<a href=\"mailto:".$THEME_EMAIL."?Subject=[Theme:] ".$THEME_NAME." (".$content['theme_path'].")"."\">".$THEME_AUTHOR."</a>",
-                       'url_link'  => DEREFERER($THEME_URL),
-                       'url_title' => $THEME_URL,
+                       'email'     => "<a href=\"mailto:".$GLOBALS['theme_data']['email']."?Subject=[Theme:] ".$GLOBALS['theme_data']['name']." (".$content['theme_path'].")"."\">".$GLOBALS['theme_data']['author']."</a>",
+                       'url_link'  => DEREFERER($GLOBALS['theme_data']['url']),
+                       'url_title' => $GLOBALS['theme_data']['url'],
                        'ver'       => $content['theme_ver'],
                );
 
index 0cc67e7c319658179078790b31910ce2f9456a59..6d27c505d7c2dd2b1e8a1d3f1609aae91f1c7987 100644 (file)
@@ -49,7 +49,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Switch to testing mode
-$THEME_MODE = "test";
+$GLOBALS['theme_mode'] = "test";
 
 // Import selected theme if not present
 if (REQUEST_ISSET_POST(('theme'))) {
@@ -64,7 +64,7 @@ if (REQUEST_ISSET_POST(('theme'))) {
                        // Register it ith the exchange
                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_themes` (`theme_path`,`theme_active`,`theme_ver`,`theme_name`)
 VALUES ('%s','N','%s','%s')",
-                               array(REQUEST_POST('theme'), $THEME_VERSION, $THEME_NAME), __FILE__, __LINE__);
+                               array(REQUEST_POST('theme'), $GLOBALS['theme_data']['version'], $GLOBALS['theme_data']['name']), __FILE__, __LINE__);
 
                        // Destroy cache
                        rebuildCacheFiles("themes", "them");
@@ -107,11 +107,11 @@ while ($dir = readdir($handle)) {
 
                // Add found theme to array
                $THEMES['theme_unix'][]   = $dir;
-               $THEMES['theme_name'][]   = $THEME_NAME;
-               $THEMES['theme_author'][] = $THEME_AUTHOR;
-               $THEMES['theme_email'][]  = $THEME_EMAIL;
-               $THEMES['theme_url'][]    = $THEME_URL;
-               $THEMES['theme_ver'][]    = $THEME_VERSION;
+               $THEMES['theme_name'][]   = $GLOBALS['theme_data']['name'];
+               $THEMES['theme_author'][] = $GLOBALS['theme_data']['author'];
+               $THEMES['theme_email'][]  = $GLOBALS['theme_data']['email'];
+               $THEMES['theme_url'][]    = $GLOBALS['theme_data']['url'];
+               $THEMES['theme_ver'][]    = $GLOBALS['theme_data']['version'];
        } // END - if
 } // END - while
 
index 9d794f9135f7cf1392325603404c6faa1d7d5992..2a466cdbee5df30b2873a03fa309b645ad4f8dd8 100644 (file)
@@ -87,11 +87,11 @@ while ($entry = readdir($handle)) {
 
                // Add found theme to array
                $THEMES['theme_unix'][]   = $entry;
-               $THEMES['theme_name'][]   = $THEME_NAME;
-               $THEMES['theme_author'][] = $THEME_AUTHOR;
-               $THEMES['theme_email'][]  = $THEME_EMAIL;
-               $THEMES['theme_url'][]    = $THEME_URL;
-               $THEMES['theme_ver'][]    = $THEME_VERSION;
+               $THEMES['theme_name'][]   = $GLOBALS['theme_data']['name'];
+               $THEMES['theme_author'][] = $GLOBALS['theme_data']['author'];
+               $THEMES['theme_email'][]  = $GLOBALS['theme_data']['email'];
+               $THEMES['theme_url'][]    = $GLOBALS['theme_data']['url'];
+               $THEMES['theme_ver'][]    = $GLOBALS['theme_data']['version'];
        } // END - if
 } // END - while
 
diff --git a/templates/de/html/admin/admin_new_ext.tpl b/templates/de/html/admin/admin_new_ext.tpl
deleted file mode 100644 (file)
index 11f5d85..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<!-- @DEPRECATED //-->
index 0324a511d1b2eb706000034909a5eac7538572c4..a90427ac0e414d4c77c1f87b511c333eb6bf66bb 100644 (file)
@@ -46,24 +46,24 @@ if (!defined('__SECURITY')) {
 // Theme definitions
 //
 // The name of your theme
-$THEME_NAME = "Solid-Business";
+$GLOBALS['theme_data']['name'] = "Solid-Business";
 
 // Only your name please!
-$THEME_AUTHOR = "Roland H&auml;der";
+$GLOBALS['theme_data']['author'] = "Roland H&auml;der";
 
 // Your email address
-$THEME_EMAIL = "webmaster@mxchange.org";
+$GLOBALS['theme_data']['email'] = "webmaster@mxchange.org";
 
 // URL where you have uploaded it
-$THEME_URL = "http://www.mxchange.org";
+$GLOBALS['theme_data']['url'] = "http://www.mxchange.org";
 
 // Version number
-$THEME_VERSION = "0.0";
+$GLOBALS['theme_data']['version'] = "0.0";
 
 // Switch mode
-if (empty($THEME_MODE)) $THEME_MODE = "load";
+if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = "load";
 
-switch ($THEME_MODE)
+switch ($GLOBALS['theme_mode'])
 {
 case "test": // Do stuff while testing the theme: The admin clicked on "Import"
        break;
index a5726484866e89fa490faf8bdab0af11834dcd6b..b42cb8ada3f347898318ee9d5dcba0495ff136e1 100644 (file)
@@ -46,24 +46,24 @@ if (!defined('__SECURITY')) {
 // Theme definitions
 //
 // The name of your theme
-$THEME_NAME = "Standart-Theme";
+$GLOBALS['theme_data']['name'] = "Standart-Theme";
 
 // Only your name please!
-$THEME_AUTHOR = "Roland H&auml;der";
+$GLOBALS['theme_data']['author'] = "Roland H&auml;der";
 
 // Your email address
-$THEME_EMAIL = "webmaster@mxchange.org";
+$GLOBALS['theme_data']['email'] = "webmaster@mxchange.org";
 
 // URL where you have uploaded it
-$THEME_URL = "http://www.mxchange.org";
+$GLOBALS['theme_data']['url'] = "http://www.mxchange.org";
 
 // Version number
-$THEME_VERSION = "0.0";
+$GLOBALS['theme_data']['version'] = "0.0";
 
 // Switch mode
-if (empty($THEME_MODE)) $THEME_MODE = "load";
+if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = "load";
 
-switch ($THEME_MODE)
+switch ($GLOBALS['theme_mode'])
 {
 case "test": // Do stuff while testing the theme: The admin clicked on "Import"
        break;
index adcf7f2de3adf94a90e3c863d599d49ea6aa3cd2..55aaa018369b9922d001e2ccff8391d27a3921ce 100644 (file)
@@ -46,24 +46,24 @@ if (!defined('__SECURITY')) {
 // Theme definitions
 //
 // The name of your theme
-$THEME_NAME = "Desert-Storm";
+$GLOBALS['theme_data']['name'] = "Desert-Storm";
 
 // Only your name please!
-$THEME_AUTHOR = "Roland H&auml;der";
+$GLOBALS['theme_data']['author'] = "Roland H&auml;der";
 
 // Your email address
-$THEME_EMAIL = "webmaster@mxchange.org";
+$GLOBALS['theme_data']['email'] = "webmaster@mxchange.org";
 
 // URL where you have uploaded it
-$THEME_URL = "http://www.mxchange.org";
+$GLOBALS['theme_data']['url'] = "http://www.mxchange.org";
 
 // Version number
-$THEME_VERSION = "0.0.1";
+$GLOBALS['theme_data']['version'] = "0.0.1";
 
 // Switch mode
-if (empty($THEME_MODE)) $THEME_MODE = "load";
+if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = "load";
 
-switch ($THEME_MODE)
+switch ($GLOBALS['theme_mode'])
 {
 case "test": // Do stuff while testing the theme: The admin clicked on "Import"
        break;