From 8d7971ec69d5c8ebeb4f63b67865fd56d75a36f6 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 21 Jun 2013 01:25:47 -0700 Subject: [PATCH] theme.xml now include tags for determining which stylesheets should be options in the theme-manager. Theme-Convert updated to include tags. --- e107_admin/theme.php | 70 ++++++++++++++++-- e107_handlers/theme_handler.php | 54 ++++++++------ e107_themes/bootstrap/css/superhero.css | 9 +++ .../img/glyphicons-halflings-white.png | Bin 0 -> 8777 bytes .../bootstrap/img/glyphicons-halflings.png | Bin 0 -> 12799 bytes e107_themes/bootstrap/theme.xml | 6 ++ 6 files changed, 109 insertions(+), 30 deletions(-) create mode 100644 e107_themes/bootstrap/css/superhero.css create mode 100644 e107_themes/bootstrap/img/glyphicons-halflings-white.png create mode 100644 e107_themes/bootstrap/img/glyphicons-halflings.png diff --git a/e107_admin/theme.php b/e107_admin/theme.php index afc0a21fd..75cab95a4 100644 --- a/e107_admin/theme.php +++ b/e107_admin/theme.php @@ -317,6 +317,9 @@ class theme_builder $mes = e107::getMessage(); $frm = e107::getForm(); + + + $data = array( 'main' => array('name','lang','version','date', 'compatibility'), 'author' => array('name','url'), @@ -324,7 +327,8 @@ class theme_builder 'description' => array('description'), 'keywords' => array('one','two'), 'category' => array('category'), - 'copyright' => array('copyright') + 'copyright' => array('copyright'), + 'stylesheets' => array('stylesheets') // 'adminLinks' => array('url','description','icon','iconSmall','primary'), // 'sitelinks' => array('url','description','icon','iconSmall') ); @@ -473,7 +477,7 @@ class theme_builder if(vartrue($newArray['CUSTOMPAGES'])) { $newArray['CUSTOMPAGES'] = trim($newArray['CUSTOMPAGES']); - $LAYOUTS = "\n"; + $LAYOUTS = "\n\n"; $LAYOUTS .= " {CUSTOMPAGES}\n"; $LAYOUTS .= " "; } @@ -482,6 +486,26 @@ class theme_builder $LAYOUTS = ""; } + if(vartrue($newArray['STYLESHEETS_STYLESHEETS'])) + { + $STYLESHEETS = "\n\t\n"; + foreach($newArray['STYLESHEETS_STYLESHEETS'] as $val) + { + $STYLESHEETS .= "\t\t\n"; + } + $STYLESHEETS .= "\t"; + + unset($newArray['STYLESHEETS_STYLESHEETS']); + } + else + { + $STYLESHEETS = ""; + } + + $newArray['STYLESHEETS'] = $STYLESHEETS; + + // print_a($newArray); + $template = <<