From 5f7858a688a1b6877246933a6c4c72318c885109 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 26 Feb 2012 04:17:02 -0800 Subject: [PATCH] show experimental and unsupported theme status on theme admin page --- include/plugin.php | 9 ++++++++- mod/admin.php | 6 ++++-- view/admin_plugins.tpl | 2 ++ view/theme/clean/unsupported | 0 view/theme/darkness/unsupported | 0 view/theme/darkzero-NS/unsupported | 0 view/theme/easterbunny/unsupported | 0 view/theme/ghost/unsupported | 0 view/theme/goldenrod/unsupported | 0 view/theme/loozah/unsupported | 0 view/theme/shady/unsupported | 0 11 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 view/theme/clean/unsupported create mode 100644 view/theme/darkness/unsupported create mode 100644 view/theme/darkzero-NS/unsupported create mode 100644 view/theme/easterbunny/unsupported create mode 100644 view/theme/ghost/unsupported create mode 100644 view/theme/goldenrod/unsupported create mode 100644 view/theme/loozah/unsupported create mode 100644 view/theme/shady/unsupported diff --git a/include/plugin.php b/include/plugin.php index 57f77cb570..8280b1022e 100755 --- a/include/plugin.php +++ b/include/plugin.php @@ -225,9 +225,16 @@ function get_theme_info($theme){ 'description' => "", 'author' => array(), 'maintainer' => array(), - 'version' => "" + 'version' => "", + 'experimental' => false, + 'unsupported' => false ); + if(file_exists("view/theme/$theme/experimental")) + $info['experimental'] = true; + if(file_exists("view/theme/$theme/unsupported")) + $info['unsupported'] = true; + if (!is_file("view/theme/$theme/theme.php")) return $info; $f = file_get_contents("view/theme/$theme/theme.php"); diff --git a/mod/admin.php b/mod/admin.php index bcbf3e28fa..0f600e3126 100755 --- a/mod/admin.php +++ b/mod/admin.php @@ -711,7 +711,7 @@ function admin_page_themes(&$a){ return; // NOTREACHED } - // display plugin details + // display theme details require_once('library/markdown.php'); if (theme_status($themes,$theme)) { @@ -769,7 +769,9 @@ function admin_page_themes(&$a){ '$submit' => t('Submit'), '$baseurl' => $a->get_baseurl(), '$function' => 'themes', - '$plugins' => $xthemes + '$plugins' => $xthemes, + '$experimental' => t('[Experimental]'), + '$unsupported' => t('[Unsupported]') )); } diff --git a/view/admin_plugins.tpl b/view/admin_plugins.tpl index f4afd2cf03..8367ff6a1d 100755 --- a/view/admin_plugins.tpl +++ b/view/admin_plugins.tpl @@ -6,6 +6,8 @@
  • $p.2.name - $p.2.version + {{ if $p.2.experimental }} $experimental {{ endif }}{{ if $p.2.unsupported }} $unsupported {{ endif }} +
    $p.2.description
  • {{ endfor }} diff --git a/view/theme/clean/unsupported b/view/theme/clean/unsupported new file mode 100644 index 0000000000..e69de29bb2 diff --git a/view/theme/darkness/unsupported b/view/theme/darkness/unsupported new file mode 100644 index 0000000000..e69de29bb2 diff --git a/view/theme/darkzero-NS/unsupported b/view/theme/darkzero-NS/unsupported new file mode 100644 index 0000000000..e69de29bb2 diff --git a/view/theme/easterbunny/unsupported b/view/theme/easterbunny/unsupported new file mode 100644 index 0000000000..e69de29bb2 diff --git a/view/theme/ghost/unsupported b/view/theme/ghost/unsupported new file mode 100644 index 0000000000..e69de29bb2 diff --git a/view/theme/goldenrod/unsupported b/view/theme/goldenrod/unsupported new file mode 100644 index 0000000000..e69de29bb2 diff --git a/view/theme/loozah/unsupported b/view/theme/loozah/unsupported new file mode 100644 index 0000000000..e69de29bb2 diff --git a/view/theme/shady/unsupported b/view/theme/shady/unsupported new file mode 100644 index 0000000000..e69de29bb2 -- 2.39.5