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 d13df11..078ba80 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 766ca00..640dd0b 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 ae1e64d..1aab5bb 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 0cc67e7..6d27c50 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 9d794f9..2a466cd 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 0324a51..a90427a 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 a572648..b42cb8a 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 adcf7f2..55aaa01 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;